Skip to content

Modernize the macOS build: universal, macOS 15+, Steam - #1158

Merged
mrimer merged 1 commit into
CaravelGames:masterfrom
TomBrouws:macos-modern-build
Jul 6, 2026
Merged

Modernize the macOS build: universal, macOS 15+, Steam#1158
mrimer merged 1 commit into
CaravelGames:masterfrom
TomBrouws:macos-modern-build

Conversation

@TomBrouws

Copy link
Copy Markdown
Contributor

Build DROD on modern macOS with Apple Clang + Homebrew, producing a self-contained, ad-hoc-signed .app/.dmg that runs on macOS 15+ (Intel and Apple Silicon). Replaces the unmaintained gcc-4.9 / x86_64 Intel setup.

Build system (Master/Darwin/Config, Makefile):

  • Apple Clang, C++11, arm64 by default; UNIVERSAL_BUILD=1 builds x86_64+arm64.
  • Module source lists come from the maintained .2019.vcxproj files instead of the stale VC6 .dsp files.
  • -iquote for module includes so macOS's case-insensitive filesystem doesn't resolve system <wchar.h> to BackEndLib/Wchar.h.
  • Build types: custom, release, debug, and steam (-DSTEAMBUILD -DSTEAMBUILD_TSS_APP, links libsteam_api). Archive rule recreates fat .a files so incremental universal builds don't trip macOS ar.

Dependencies (Master/Darwin/build_deps.sh):

  • All third-party libs are built from source as universal dylibs targeting macOS 15 into Master/Darwin/deps (curl + zlib come from the SDK): real SDL2 (no sdl2-compat/SDL3), lean SDL2_mixer (Ogg/Vorbis + WAV + drmp3), SDL2_ttf, freetype, libpng, jpeg-turbo, expat, ogg/vorbis/theora, jsoncpp, and metakit. This is what lets the app back-deploy to macOS 15 / Intel.

Source fixes for libc++/clang (guarded, portable):

  • BackEndLib/Wchar.cpp, DRODLib/I18N.cpp: avoid char16_t string streams, which libc++ lacks the std::ctype<char16_t> facet for.

Packaging (Master/Darwin/build_macos.sh):

  • One command builds the bundle: installs build tools, builds deps + drod, assembles the .app, vendors all dylibs via dylibbundler, and ad-hoc signs.
  • Bundle structure comes from the repo (stub drod5_0.dat, Help, Licenses, icon, Info.plist); loose Fonts/Bitmaps are overlaid from the drodData repo.
  • Real game data is copied from --dat-dir or a gitignored Master/Darwin/localdata (all *.dat); nothing copyrighted is committed.
  • Steam: --steam builds the Steam app and vendors libsteam_api from the SDK; a gitignored steam_appid.txt (via --steam-appid) can be dropped in for out-of-Steam dev testing.

Also: remove unused SDLMain.{h,m} and buildcmd.sh; replace the stale OSX docs with CompilingDrod_macOS.md; update readme and the Info.plist copyright; ignore build output and local dev files.

Build DROD on modern macOS with Apple Clang + Homebrew, producing a
self-contained, ad-hoc-signed .app/.dmg that runs on macOS 15+ (Intel and
Apple Silicon). Replaces the unmaintained gcc-4.9 / x86_64 Intel setup.

Build system (Master/Darwin/Config, Makefile):
- Apple Clang, C++11, arm64 by default; UNIVERSAL_BUILD=1 builds x86_64+arm64.
- Module source lists come from the maintained <Module>.2019.vcxproj files
  instead of the stale VC6 .dsp files.
- -iquote for module includes so macOS's case-insensitive filesystem doesn't
  resolve system <wchar.h> to BackEndLib/Wchar.h.
- Build types: custom, release, debug, and steam (-DSTEAMBUILD
  -DSTEAMBUILD_TSS_APP, links libsteam_api). Archive rule recreates fat .a
  files so incremental universal builds don't trip macOS ar.

Dependencies (Master/Darwin/build_deps.sh):
- All third-party libs are built from source as universal dylibs targeting
  macOS 15 into Master/Darwin/deps (curl + zlib come from the SDK): real SDL2
  (no sdl2-compat/SDL3), lean SDL2_mixer (Ogg/Vorbis + WAV + drmp3), SDL2_ttf,
  freetype, libpng, jpeg-turbo, expat, ogg/vorbis/theora, jsoncpp, and metakit.
  This is what lets the app back-deploy to macOS 15 / Intel.

Source fixes for libc++/clang (guarded, portable):
- BackEndLib/Wchar.cpp, DRODLib/I18N.cpp: avoid char16_t string streams, which
  libc++ lacks the std::ctype<char16_t> facet for.

Packaging (Master/Darwin/build_macos.sh):
- One command builds the bundle: installs build tools, builds deps + drod,
  assembles the .app, vendors all dylibs via dylibbundler, and ad-hoc signs.
- Bundle structure comes from the repo (stub drod5_0.dat, Help, Licenses, icon,
  Info.plist); loose Fonts/Bitmaps are overlaid from the drodData repo.
- Real game data is copied from --dat-dir or a gitignored Master/Darwin/localdata
  (all *.dat); nothing copyrighted is committed.
- Steam: --steam builds the Steam app and vendors libsteam_api from the SDK; a
  gitignored steam_appid.txt (via --steam-appid) can be dropped in for
  out-of-Steam dev testing.

Also: remove unused SDLMain.{h,m} and buildcmd.sh; replace the stale OSX docs
with CompilingDrod_macOS.md; update readme and the Info.plist copyright; ignore
build output and local dev files.
@TomBrouws

Copy link
Copy Markdown
Contributor Author

@mrimer we'll need CaravelGames/metakit#1 to be merged as well and the submodule updated to make this work.

@mrimer
mrimer requested a review from Hypexion July 6, 2026 02:43
@mrimer
mrimer merged commit ed2f535 into CaravelGames:master Jul 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants