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:
Cyd
2026-08-01 20:59:17 -05:00
co-authored by Claude Opus 5
parent 870a8a257d
commit 63bdb2c1da
2 changed files with 103 additions and 86 deletions
+17 -2
View File
@@ -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