CN·IOS
TH·EN
BUILD GUIDE · STEP-BY-STEP

Build it yourself

macOS target ก่อน —> เสร็จแล้วค่อย iOS —> sideload ลง iPad ของคุณ. ไม่ต้อง Jailbreak. ไม่ต้อง Apple Developer (free ก็ได้ถ้า sideload ในเครื่องตัวเอง).

0 · Prerequisites

ติดตั้ง toolchain ให้ครบก่อน:

Xcode + Command Line Tools

xcode-select --install
brew install cmake ninja meson pkg-config

vcpkg (C++ package manager)

git clone https://github.com/microsoft/vcpkg ~/vcpkg && ~/vcpkg/bootstrap-vcpkg.sh
export VCPKG_ROOT=~/vcpkg
Note: shallow clone needed — full history breaks vcpkg manifest baselines.

Vulkan SDK (NOT the Homebrew cask)

brew tap lunarg/lunarg && brew install lunarg/lunarg/vulkan-sdk
export VULKAN_SDK=$HOME/VulkanSDK/<version>/macOS
Note: Homebrew Vulkan is the wrong version. Use the official LunarG SDK.

Steam copy of Zero Hour

open https://store.steampowered.com/app/2732960/    # ~$5 (often on sale)

The fetch script pulls .big archives from your Steam install — you must own the game.

1 · macOS Build

Clone & build (Apple Silicon)

git clone https://github.com/ammaarreshi/Generals-Mac-iOS-iPad.git GeneralsX
cd GeneralsX
./scripts/build/macos/build-macos-zh.sh         # checks deps, configures, builds

Deploy & play

./scripts/build/macos/deploy-macos-zh.sh       # creates ~/GeneralsX/GeneralsZH + run.sh
cd ~/GeneralsX/GeneralsZH && ./run.sh -win

First run pulls assets from your Steam install. Subsequent runs use the cache.

2 · iOS Build

Set up iOS DXVK submodule

cd GeneralsX
git submodule update --init references/fbraz3-dxvk
./scripts/build/ios/fetch-moltenvk.sh          # pinned MoltenVK.framework

Configure & build

cmake --preset ios-vulkan
cmake --build build/ios-vulkan --target z_generals

Find your Team ID

Xcode → Settings → Accounts. Look for Team ID — it's an alphanumeric string.

Assemble & install on your iPad

GX_TEAM_ID=<your-team-id> GX_BUNDLE_ID=com.YOU.generalszh \
  ./scripts/build/ios/package-ios-zh.sh --install
Free dev account: Sideload to your own devices only. Cert is valid 7 days — re-install weekly for testing. Paid ($99/yr) gets you a year.

3 · Play!

Open Generals ZH on your iPad, drop your Steam assets into the Files app share (or install via Xcode), campaign + skirmish + challenge all work.

Tap = select · drag = box-select · long-press = deselect · 2-finger pan · pinch zoom

Known issue: Long sessions on iPad can hit ~3GB resident → iOS kills silently. Save often. More RAM iPads (M2+) fare better.