Feature #482

Build 32/64 bit universal binaries on OS X

Added by swillits over 5 years ago. Updated over 5 years ago.

Status:New% Done:


Target version:ALL
OS:OS X Arch:


The current build scripts are building 32-bit explicitly rather than whatever the host architecture is at build time.

The legacy cgame and ui libs are already building as universal, but qagame, etl, and etlded are not by default. The reasoning is that if etl/etlded are universal, they’ll by default launch as 64-bit on the vast majority of systems (32-bit systems are rare these days), but the mods the user may be using may be 32-bit only leading a problem.

If etl and etlded are built as 32/64 universal, then the simplest strategy for dealing with 32-bit-only mods is to launch etl/etlded in 32-bit mode. Since etl.app is a bundle, the user could use the "Open in 32-bit mode" checkbox in Finder. For etlded the user would need to launch the server explicitly in 32-bit mode via `arch -arch i386 etlded`. Both are easy, the only drawback is knowing you need to do it. In the case of etlded, it’d be trivial in releases to also ship an etlded64 so the release package has both 32 and 64 versions, but it’s strange to do so for the client app bundle.

The "best" solution would be to detect that a given mod cannot be loaded for the current architecture, inform the user of this in-game, and then offer to¬†automatically relaunch in the appropriate architecture. OS X’s System Preferences app does this for example, when a given third-party preference pane is 32-bit only. It’s doable but more complex. (The only time where it may be odd is if the user is connecting via their 64-bit client to a server that has only a 32-bit mod, the mod is then auto-downloaded, but the game has to restart in 32 to use it. So the game would relaunch, passing "connect ip" as arguments so it auto reconnects to the server, but there’s a tiny race condition where their slot may have been taken by another player in the mean time if it’s a full and popular server. Other than that, I can’t think of a downside.)


#1 Updated by swillits over 5 years ago

  • Description updated (diff)

Also available in: Atom PDF