pod bundle: explicit app-level config, and the registry profile catches up
The portable config a bundle shipped carried only Profiles, so every app-level setting - ports, baud, poll rate - rode whatever that build of RIOJoy compiled in. That matched today and would drift invisibly the day a default changes or the FastRIO path moves AnalogPollMs. The generated config now writes them out, so a bundle says what it runs with. Verified by building the Descent 3 bundle and parsing the result. profiles/descent3.json was a pre-cockpit draft: old button layout, no explicit ports, no overlay labels. Replaced verbatim with the flown-and-confirmed Tesla profile from the game's own repo (Descent3 venue/riojoy/tesla.riojoy.json, which pack-dist feeds to build-pod and is the canonical copy) - explicit COM1/COM2, the 30-mapping layout, afterburner on the thumb. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+17
-2
@@ -92,8 +92,23 @@ try {
|
||||
}
|
||||
|
||||
# 2. Portable config beside the exe (ConfigLocator picks it over %APPDATA%):
|
||||
# an AppConfig wrapping just this game's profile, verbatim.
|
||||
$configJson = "{`n `"Profiles`": [`n$profileText`n ]`n}"
|
||||
# an AppConfig wrapping this game's profile, verbatim, plus the app-level
|
||||
# settings written out explicitly. A config that carries only Profiles
|
||||
# leaves every app-level value to whatever this build of RIOJoy compiles
|
||||
# in - which happens to match today, and would drift invisibly the day a
|
||||
# default changes or a pod needs tuning (the FastRIO path will move
|
||||
# AnalogPollMs). A pod bundle should say what it runs with.
|
||||
$configJson = @"
|
||||
{
|
||||
"DefaultRioComPort": "COM1",
|
||||
"DefaultPlasmaComPort": "COM2",
|
||||
"RioBaudRate": 9600,
|
||||
"AnalogPollMs": 55,
|
||||
"Profiles": [
|
||||
$profileText
|
||||
]
|
||||
}
|
||||
"@
|
||||
Set-Content -Path (Join-Path $appOut 'config.json') -Value $configJson -Encoding utf8
|
||||
Set-Content -Path (Join-Path $pkgDir 'VERSION.txt') -Value "RIOJoy pod bundle $version ($Flavor) - $($profileDoc.Name)" -Encoding utf8
|
||||
|
||||
|
||||
+86
-84
@@ -1,12 +1,10 @@
|
||||
{
|
||||
"Name": "Descent 3",
|
||||
"MatchExecutables": [
|
||||
"Descent3",
|
||||
"d3"
|
||||
],
|
||||
"Name": "Tesla",
|
||||
"MatchExecutables": [ "Descent3" ],
|
||||
"RioComPort": "COM1",
|
||||
"PlasmaComPort": "COM2",
|
||||
"PlasmaGreeting": "DESCENT 3",
|
||||
"WallpaperPath": null,
|
||||
"OverlayLabels": {},
|
||||
"Calibration": {
|
||||
"InvertX": false,
|
||||
"InvertY": false,
|
||||
@@ -17,85 +15,89 @@
|
||||
"EnableZR": true
|
||||
},
|
||||
"AxisRouting": {
|
||||
"X": {
|
||||
"Target": "LeftThumbX",
|
||||
"Mode": "Centered"
|
||||
},
|
||||
"Y": {
|
||||
"Target": "LeftThumbY",
|
||||
"Mode": "Centered"
|
||||
},
|
||||
"Z": {
|
||||
"Target": "RightThumbY",
|
||||
"Mode": "UnipolarPositive"
|
||||
},
|
||||
"Rx": {
|
||||
"Target": "None",
|
||||
"Mode": "Centered"
|
||||
},
|
||||
"Ry": {
|
||||
"Target": "None",
|
||||
"Mode": "Centered"
|
||||
},
|
||||
"Rz": {
|
||||
"Target": "RightThumbX",
|
||||
"Mode": "Centered"
|
||||
}
|
||||
"X": { "Target": "LeftThumbX", "Mode": "Centered" },
|
||||
"Y": { "Target": "LeftThumbY", "Mode": "Centered" },
|
||||
"Z": { "Target": "RightThumbY", "Mode": "UnipolarPositive" },
|
||||
"Rx": { "Target": "None", "Mode": "Centered" },
|
||||
"Ry": { "Target": "None", "Mode": "Centered" },
|
||||
"Rz": { "Target": "RightThumbX", "Mode": "Centered" }
|
||||
},
|
||||
"Feedback": {
|
||||
"AllowLampCommands": true,
|
||||
"AllowPlasmaText": true,
|
||||
"Rumble": null
|
||||
},
|
||||
"Buttons": {
|
||||
"16": 32822,
|
||||
"17": 32823,
|
||||
"18": 32824,
|
||||
"19": 32825,
|
||||
"20": 32816,
|
||||
"21": 32777,
|
||||
"24": 32781,
|
||||
"28": 34991,
|
||||
"29": 34990,
|
||||
"32": 32817,
|
||||
"33": 32818,
|
||||
"34": 32819,
|
||||
"35": 32820,
|
||||
"36": 32821,
|
||||
"37": 32850,
|
||||
"56": 67,
|
||||
"57": 68,
|
||||
"58": 88,
|
||||
"59": 65,
|
||||
"60": 4101,
|
||||
"62": 4102,
|
||||
"63": 83,
|
||||
"64": 4097,
|
||||
"65": 8194,
|
||||
"66": 8192,
|
||||
"67": 8193,
|
||||
"68": 8195,
|
||||
"69": 188,
|
||||
"70": 190,
|
||||
"71": 4099,
|
||||
"80": 48,
|
||||
"81": 49,
|
||||
"82": 50,
|
||||
"83": 51,
|
||||
"84": 52,
|
||||
"85": 53,
|
||||
"86": 54,
|
||||
"87": 55,
|
||||
"88": 56,
|
||||
"89": 57,
|
||||
"90": 9,
|
||||
"91": 66,
|
||||
"92": 82,
|
||||
"95": 70,
|
||||
"96": 28672,
|
||||
"97": 28673,
|
||||
"98": 28674,
|
||||
"99": 28675,
|
||||
"100": 28676,
|
||||
"101": 28677,
|
||||
"102": 28678,
|
||||
"103": 28679,
|
||||
"104": 28680,
|
||||
"105": 28681
|
||||
"47": 32817,
|
||||
"46": 32818,
|
||||
"45": 32819,
|
||||
"44": 32820,
|
||||
"43": 32821,
|
||||
"42": 32822,
|
||||
"41": 32823,
|
||||
"40": 32824,
|
||||
|
||||
"39": 32825,
|
||||
"38": 32816,
|
||||
|
||||
"18": 32840,
|
||||
"17": 32850,
|
||||
"16": 32777,
|
||||
|
||||
"15": 32954,
|
||||
"14": 32990,
|
||||
"13": 32989,
|
||||
"12": 32987,
|
||||
"11": 32956,
|
||||
"10": 32958,
|
||||
"8": 32988,
|
||||
|
||||
"61": 32781,
|
||||
"63": 32858,
|
||||
|
||||
"64": 36865,
|
||||
"65": 40962,
|
||||
"66": 40960,
|
||||
"67": 40961,
|
||||
"68": 40963,
|
||||
"69": 36868,
|
||||
"70": 36867,
|
||||
"71": 36866
|
||||
},
|
||||
"OverlayLabels": {
|
||||
"b-2F": "WPN 1",
|
||||
"b-2E": "WPN 2",
|
||||
"b-2D": "WPN 3",
|
||||
"b-2C": "WPN 4",
|
||||
"b-2B": "WPN 5",
|
||||
"b-2A": "WPN 6",
|
||||
"b-29": "WPN 7",
|
||||
"b-28": "WPN 8",
|
||||
|
||||
"b-27": "WPN 9",
|
||||
"b-26": "WPN 10",
|
||||
"b-10": "AUTOMAP",
|
||||
"b-11": "REAR VIEW",
|
||||
"b-12": "HEADLIGHT",
|
||||
|
||||
"b-0F": "CM PREV",
|
||||
"b-0E": "CM NEXT",
|
||||
"b-0D": "INV NEXT",
|
||||
"b-0C": "INV PREV",
|
||||
"b-0B": "CYCLE PRI",
|
||||
"b-0A": "CYCLE SEC",
|
||||
"b-08": "INV USE",
|
||||
|
||||
"b-3D": "PANIC / CM",
|
||||
"b-3F": "REVERSE",
|
||||
|
||||
"b-40": "FIRE",
|
||||
"b-41": "SLIDE DN",
|
||||
"b-42": "SLIDE UP",
|
||||
"b-43": "SLIDE R",
|
||||
"b-44": "SLIDE L",
|
||||
"b-45": "AFTERBURN",
|
||||
"b-46": "FLARE",
|
||||
"b-47": "MISSILE"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user