Wing Commander IV gets static recompilation to native C++
haraldF releases wc4w-recomp, statically recompiling Wing Commander IV's Windows build into a native arm64 binary via Ghidra.
Developer haraldF has released wc4w-recomp, a static recompilation project targeting the Windows version of Wing Commander IV: The Price of Freedom (WC4W.EXE, specifically the 1996 GOG 30th Anniversary Edition).
The pipeline uses Ghidra and a TypeScript driver to translate the x86 executable into C++. It builds a native program for arm64 macOS without Wine or Rosetta.
The project is in an early state. The build handles the first-time setup speed test, decodes HD movies via FFmpeg, and gets players into the opening simulator mission, the Duty Roster, and the first mission. You need the 30th Anniversary Edition from GOG and its exact file hashes to build it.
How to try it
- Install the build tools on macOS via Homebrew:
brew install node ghidra innoextract cmake ninja sdl3 ffmpeg freetype - Unpack the GOG installer to grab the
WC4_Enhancedfolder:innoextract --gog -I WC4_Enhanced -d ../game4.30 path/to/setup_wing_commander_iv_the_price_of_freedom_30th_anniversary_edition_v1.0_\(95014\).exe - Install project dependencies and run the build pipeline:
npm ci && npm run imports && npm run decompile && npm run recomp && npm run play
The engine checks the SHA-256 hash for the GOG WC4W.EXE and Xanlib.dll files and refuses other versions.