Native macOS, Linux, Android, and iOS source port of Command & Conquer: Red Alert.
ra-port lets you play Red Alert (1996) on modern platforms. It currently runs as native macOS and Linux executables, a local Android debug APK, and an iOS debug app, with SDL2 providing the platform layer.
The repository contains only source code and build tooling. No game assets are included in the repository. To play, provide legally obtained Red Alert assets from your own discs, mounted images, or local backups.
Red Alert was released for a very different desktop world. This project keeps the original code recognizable while supporting macOS, Linux, Android, and iOS.
This is an unofficial source port based on the source code Electronic Arts released under GPLv3 with additional terms: https://github.com/electronicarts/CnC_Red_Alert.
| Status | Feature | Notes |
|---|---|---|
| ✅ | macOS on Apple Silicon | Builds and runs with CMake/Ninja. |
| ✅ | Linux on Ubuntu | Builds and runs as a native SDL2 desktop executable. |
| ✅ | Android debug APK | Builds a local landscape APK for arm64-v8a devices and emulators. |
| ✅ | iOS debug app | Builds a landscape simulator/device app with CMake/Xcode. |
| ✅ | Campaign | Allied and Soviet campaigns are fully working. |
| ✅ | Skirmish | Local skirmish is fully working. |
| ✅ | Videos | Videos are playing with sound. |
| ✅ | Controls and audio | macOS keyboard/mouse plus Android and iOS touch/audio work. |
| ❌ | Online/network multiplayer | Not wired up yet. |
| ❌ | Launcher/setup tools | Not ported. |
| ❌ | Expansion packs | Not a focus yet. |
| ❌ | .app bundle |
Not packaged yet; the build creates a normal macOS executable. |
| ❌ | Android release build | Only local debug APKs are supported right now. |
| ❌ | iOS release build | Only local debug simulator/device builds are supported right now. |
Install the macOS build tools:
brew install cmake ninja pkg-config sdl2
xcode-select --installBuild the port:
cmake -S . -B build -G Ninja
cmake --build build --target redalert_mac -j 8On Ubuntu, install the Linux build tools and build the port:
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config libsdl2-dev
cmake -S . -B build-linux -G Ninja
cmake --build build-linux --target redalert_linux -j 8Prepare local game data:
scripts/prepare_assets_from_local.sh \
--allies /path/to/allies-disc \
--soviet /path/to/soviet-discRun:
scripts/run_mac_dev.sh --no-buildOn Ubuntu, run:
scripts/run_linux_dev.sh --no-buildTo build and run the Android debug APK, install the Android prerequisites listed below, keep the same prepared local game data under assets/redalert, then run:
scripts/build_android_debug.sh
scripts/run_android_debug.sh --no-buildTo build and run the iOS simulator debug app, install full Xcode, keep the same prepared local game data under assets/redalert, then run:
scripts/build_ios_debug.sh
scripts/run_ios_simulator.sh --no-buildThe repository contains only source code and build tooling. It does not contain game data, movies, music, disc images, archives, installers, generated palettes, or packaged executables.
The asset preparation script copies from local paths that you provide:
assets/redalert/alliesassets/redalert/soviet
Those directories are ignored by git. They should contain original disc-root style files such as INSTALL/REDALERT.INI and the base-game .MIX files.
The Android and iOS debug builds use the same ignored assets/redalert tree. Gradle copies those local files into generated Android debug assets, and the iOS CMake target copies them into the debug app bundle. They are not checked in and they are not used for release packaging.
Configure and build on macOS:
cmake -S . -B build -G Ninja
cmake --build build --target redalert_mac -j 8If you do not have Ninja installed, omit -G Ninja and CMake will choose the default generator.
The build currently creates a raw macOS executable:
build/redalert_macIt is not packaged as a .app bundle yet.
Install Ubuntu build dependencies:
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config libsdl2-devConfigure and build:
cmake -S . -B build-linux -G Ninja
cmake --build build-linux --target redalert_linux -j 8Run from the repository root:
scripts/run_linux_dev.shFor headless smoke validation, install Xvfb and ImageMagick, then capture the title/menu:
sudo apt-get install -y xvfb imagemagick
scripts/smoke_linux_menu.sh --seconds 20The normal development run command builds if needed, verifies local assets, codesigns the executable, and launches from the repository root:
scripts/run_mac_dev.shUseful variants:
scripts/run_mac_dev.sh --no-build
scripts/run_mac_dev.sh --prepare-onlyThe Linux run helper follows the same flow without codesigning:
scripts/run_linux_dev.sh
scripts/run_linux_dev.sh --no-build
scripts/run_linux_dev.sh --prepare-onlyYou can also run the built executable directly after codesigning:
codesign --force --sign - build/redalert_mac
./build/redalert_macRuntime files such as SAVEGAME.*, OPTIONS.INI, ASSERT.TXT, screenshots, logs, and generated palette caches are ignored by git.
The Android target is for local development and testing only. It builds an arm64-v8a debug APK, locks the activity to landscape, uses touch-native input, and extracts the bundled debug assets into app storage on first launch.
Install Android tooling:
- JDK 17
- Gradle compatible with Android Gradle Plugin 9.2.0
- Android SDK Platform 36
- Android SDK Build Tools
- Android NDK
28.2.13676358 - Android CMake package
- Android platform-tools for
adb
Android Studio is the easiest way to install the SDK, NDK, CMake, emulator, and platform-tools. On Homebrew-based macOS setups, the helper scripts auto-detect common openjdk@17 and Android SDK locations when JAVA_HOME, ANDROID_HOME, or ANDROID_SDK_ROOT are not already set.
Build the debug APK:
scripts/build_android_debug.shThe first build downloads SDL2 sources into ignored local storage under android/third_party/. The APK is written to:
android/app/build/outputs/apk/debug/app-debug.apk
Install and launch on a connected device or emulator:
scripts/run_android_debug.sh --no-buildIf an emulator is low on space and in-place install fails, uninstall the old debug app first:
scripts/run_android_debug.sh --no-build --fresh-install--fresh-install removes existing app data, including extracted assets and saves.
Build, install, launch, and tail Android logs:
scripts/run_android_debug.sh --logcatUseful direct commands:
adb install -r android/app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n com.raport.redalert/.RedAlertActivityThe debug APK intentionally includes your local ignored game data so the app can run on the device without external storage setup. Do not distribute that APK.
The iOS target is for local development and testing only. It builds a landscape app for the iOS simulator by default, or for a signed arm64 device build when you provide an Apple development team.
Install iOS tooling:
- Full Xcode, not only Command Line Tools
- CMake
- Local Red Alert assets prepared under
assets/redalert
Build the simulator app:
scripts/build_ios_debug.shThe first build downloads SDL2 sources into ignored local storage under ios/third_party/. The app is written under:
ios/build-simulator/Debug-iphonesimulator/redalert_ios.app
Install and launch on the booted iOS simulator:
scripts/run_ios_simulator.sh --no-buildBuild a signed device app for iPhone or iPad:
RA_IOS_DEVELOPMENT_TEAM=TEAMID scripts/build_ios_debug.sh --deviceThe debug iOS app intentionally includes your local ignored game data. On first launch it copies that bundled data into app-writable storage before starting the game, so saves and options can be written inside the iOS sandbox. Do not distribute that app bundle.
Start fullscreen:
RA_FULLSCREEN=1 scripts/run_mac_dev.shToggle fullscreen while running:
Command+Return on macOS
Alt+Return on Linux
Run the source-level tests and script checks:
tests/run_script_tests.shValidate a fresh checkout with a full build first:
cmake -S . -B build -G Ninja
cmake --build build --target redalert_mac -j 8
tests/run_script_tests.shOn Linux:
cmake -S . -B build-linux -G Ninja
cmake --build build-linux --target redalert_linux -j 8
tests/run_script_tests.sh| Path | Purpose |
|---|---|
CODE/ |
Main Red Alert game code |
PORT/MAC/ |
Shared desktop runtime, compatibility shims, SDL2 integration |
PORT/ANDROID/ |
Android entrypoint and platform-specific resource setup |
PORT/IOS/ |
iOS entrypoint and writable sandbox resource setup |
android/ |
Gradle Android app that builds the debug APK |
ios/ |
CMake/Xcode iOS app target |
WIN32LIB/, WINVQ/ |
Legacy support libraries used by the port |
scripts/ |
Asset preparation, run helpers, smoke capture, Linux include overlay generation |
tests/ |
Focused source-level and shim tests |
docs/images/ |
README images only, not game data |
The port is intentionally conservative: keep original source layout and behavior recognizable, and prefer small platform-specific support files over broad rewrites. Good next areas are macOS .app packaging, Linux packaging, Android/iOS release packaging, physical device validation, Intel macOS validation, save/load hardening, expansion support, CI coverage, and mobile input/UI polish.
Network and online multiplayer are out of scope for the current milestone.
The source code is distributed under GPLv3 with additional terms. See LICENSE.md.
This is an unofficial modified source port. It is not affiliated with, endorsed by, sponsored by, or supported by Electronic Arts or any other rights holder. See NOTICE.md.
