@@ -95,22 +95,83 @@ an actual macOS 15 / Intel Mac before relying on it there.
9595
9696## Steam build
9797
98+ There are two Steam apps built from this engine, selected with ` --steam-variant ` :
99+
100+ | variant | game | AppID | define | data file | icon |
101+ | ---------| ------| -------| --------| -----------| ------|
102+ | ` tss ` (default) | DROD: The Second Sky | 351320 | ` -DSTEAMBUILD_TSS_APP ` | ` drod-tss5_0.dat ` | ` assets/TSS ` |
103+ | ` gateb ` | Gunthro and the Epic Blunder | 314330 | (none) | ` drod5_0.dat ` | ` assets/GatEB ` |
104+
98105```
99- ./build_macos.sh --steam --universal --steam-sdk /path/to/steamworks-sdk
106+ ./build_macos.sh --steam-variant gateb --universal --steam-sdk /path/to/steamworks-sdk
107+ ./build_macos.sh --steam-variant tss --universal # (--steam is shorthand for tss)
100108```
101109
102- This builds with ` -DSTEAMBUILD -DSTEAMBUILD_TSS_APP ` (the TSS Steam app: data file
103- ` drod-tss5_0.dat ` , game name ` drod-tss ` ) and links ` libsteam_api ` . Details:
110+ Both build with ` -DSTEAMBUILD ` and link ` libsteam_api ` ; ` tss ` adds ` -DSTEAMBUILD_TSS_APP ` .
111+ The variant table (AppIDs etc.) lives near the top of ` build_macos.sh ` . Details:
104112- ` --steam-sdk ` points at an unpacked Steamworks SDK (default ` ~/Developer/steam-sdk ` );
105113 its ` public/steam ` headers are added to the include path.
106- - ` libsteam_api.dylib ` is taken from the SDK's ` redistributable_bin/osx/ ` (override
107- with ` --steam-lib ` ), staged into ` deps/lib ` , vendored into the bundle, and signed.
108- - A Steam build is normally launched through the Steam client (which supplies the
109- app id), so the shipped bundle contains no ` steam_appid.txt ` .
110- - To run a Steam build ** outside** Steam for local testing, provision a gitignored
111- AppID file once: ` ./build_macos.sh --steam --steam-appid <id> … ` . That writes
112- ` Master/Darwin/steam_appid.txt ` (gitignored), and every subsequent Steam build
113- copies it next to the executable so ` SteamAPI_Init ` works without Steam launching
114- it. ** Never upload that file to the Steam depot** — delete
115- ` Master/Darwin/steam_appid.txt ` to build a clean shippable app.
116- - Just the binary: ` make drod-steam STEAM_SDK=/path/to/steamworks-sdk ` .
114+ - ` libsteam_api.dylib ` is taken from the SDK's ` redistributable_bin/osx/ ` (override with
115+ ` --steam-lib ` ), staged into ` deps/lib ` , vendored into the bundle, and signed.
116+ - Game data comes from the per-app dir ` Master/Darwin/localdata/<App>/ ` (` TSS ` /` GatEB ` ,
117+ gitignored) by default; override with ` --dat-dir ` . The app icon comes from the committed
118+ ` Master/Darwin/assets/<App>/ ` (its ` DROD.icns ` , plus any icon bitmaps overlaid onto the
119+ shared drodData ones). Switching variants cleans the shared ` steam/ ` build dir
120+ automatically, so no manual clean is needed.
121+ - A Steam build is normally launched through the Steam client (which supplies the app id),
122+ so the shipped bundle contains no ` steam_appid.txt ` . To run ** outside** Steam for local
123+ testing, add ` --steam-appid ` : it writes the variant's AppID to
124+ ` Contents/MacOS/steam_appid.txt ` in the bundle. ** Never upload that file to the depot** —
125+ omit ` --steam-appid ` for a clean shippable app.
126+ - Just the binary: ` make drod-steam STEAM_SDK=/path/... [STEAM_TSS=1] ` (STEAM_TSS=1 = TSS).
127+
128+ ## Standalone older games (KDD / JtRH / TCB / GatEB)
129+
130+ The same engine also builds the older games as ** standalone** (non-Steam) apps,
131+ selected with ` --game ` . Each is gated behind its own compile-time define and
132+ looks for its own data file:
133+
134+ | ` --game ` | game | define | data file | app / icon / data folder |
135+ | ----------| ------| --------| -----------| --------------------------|
136+ | ` kdd ` | King Dugan's Dungeon | ` -DKDD_STANDALONE ` | ` drod-kdd5_0.dat ` | ` KDD ` |
137+ | ` jtrh ` | Journey to Rooted Hold | ` -DJTRH_STANDALONE ` | ` drod-jtrh5_0.dat ` | ` JtRH ` |
138+ | ` tcb ` | The City Beneath | ` -DTCB_STANDALONE ` | ` drod-tcb5_0.dat ` | ` TCB ` |
139+ | ` gateb ` | Gunthro and the Epic Blunder| ` -DGATEB_STANDALONE ` | ` drod-gateb5_0.dat ` | ` GatEB ` |
140+
141+ ```
142+ ./build_macos.sh --game kdd # -> "DROD KDD.app"
143+ ./build_macos.sh --game tcb --universal
144+ ```
145+
146+ - ` --game ` cannot be combined with ` --steam ` (these are standalone builds).
147+ - App name defaults to ` DROD <App> ` (override with ` --name ` ); the icon comes from
148+ ` Master/Darwin/assets/<App>/DROD.icns ` (falls back to the TSS icon with a warning
149+ if not present yet), and branded ` Icon*.bmp ` from the same folder.
150+ - Game data comes from ` Master/Darwin/localdata/<App>/ ` (gitignored) by default.
151+ The build copies ** only this game's** data set — ` drod-<game>5_0.dat ` plus its
152+ ` drod-<game>5_0_NN.dat ` add-on packs — so a folder shared with another game's
153+ dats (e.g. Steam GatEB's ` drod5_0*.dat ` alongside standalone GatEB's
154+ ` drod-gateb5_0*.dat ` in ` localdata/GatEB/ ` ) never leaks mismatched data into the
155+ bundle.
156+ - Switching game/variant cleans the reused ` custom/ ` (or ` release ` /` debug ` ) build
157+ dir automatically, since make can't see the changed ` -D ` flag.
158+ - Just the binary: ` make drod-custom GAME=kdd ` (or ` jtrh ` /` tcb ` /` gateb ` ).
159+
160+ ## Demo build (TSS)
161+
162+ ```
163+ ./build_macos.sh --demo # -> "DROD TSS Demo.app"
164+ ```
165+
166+ There is ** no demo compile flag** — a TSS demo is the * plain* TSS binary (data
167+ ` drod5_0.dat ` ) shipping a demo hold. The engine decides demo-vs-full at runtime in
168+ ` CDrodScreen::IsGameFullVersion() ` : a build is a demo when its installed hold has
169+ ≤50 level entrances (` EntrancesInFullVersion() ` ), which enables the "Buy Now" menu
170+ item and the sell/buy screens.
171+
172+ ` --demo ` is purely a convenience: it brands the app ` DROD TSS Demo ` and sources the
173+ demo ` drod5_0.dat ` from ` Master/Darwin/localdata/TSS-Demo/ ` (gitignored), keeping it
174+ apart from the Steam TSS data in ` localdata/TSS/ ` (` drod-tss5_0.dat ` ). It is the
175+ same binary as a full standalone TSS, so it shares the ` custom/ ` build objects — no
176+ recompile when switching between them. TSS-standalone only (not with ` --game ` /
177+ ` --steam ` ).
0 commit comments