Skip to content

Commit df92c4b

Browse files
committed
fix: generate chobby_config.json in lobby .sdd for launcherless bundle
The BAR desktop launcher normally reads dist_cfg/config.json and extracts json_files.chobby_config.json, writing it to the game data directory before starting the engine. Without the launcher present, Chobby Lua code fails to find the file via VFS, causing the Chobby global to be nil and crashing every widget that references it. Write chobby_config.json directly into the Chobby .sdd with the BAR server address and "byar" game config so the lobby initialises correctly.
1 parent 56ec30e commit df92c4b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/macos-build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,24 @@ jobs:
339339
sed -i.bak "s/\\\$VERSION/$LOBBY_VERSION/g" "$LOBBY_SDD/modinfo.lua"
340340
rm -f "$LOBBY_SDD/modinfo.lua.bak"
341341
342+
# The BAR launcher normally reads dist_cfg/config.json and
343+
# extracts the json_files.chobby_config.json entry, writing it
344+
# to the game data directory before launching the engine.
345+
# Since this bundle has no launcher, we generate the file
346+
# directly inside the Chobby .sdd so the VFS can find it.
347+
cat > "$LOBBY_SDD/chobby_config.json" <<CHOBBY_CFG
348+
{
349+
"server": {
350+
"address": "server4.beyondallreason.info",
351+
"port": 8200,
352+
"protocol": "spring",
353+
"serverName": "BAR"
354+
},
355+
"game": "byar"
356+
}
357+
CHOBBY_CFG
358+
359+
342360
echo "Game content staged:"
343361
echo " Game: Beyond All Reason $GAME_VERSION"
344362
echo " Lobby: BYAR Chobby $LOBBY_VERSION"

0 commit comments

Comments
 (0)