-
-
Notifications
You must be signed in to change notification settings - Fork 250
New DevSetup
-
Windows
- Windows 10+ includes PowerShell 5.x by default, which works. PowerShell 7 is recommended.
-
Execution Policy (required on Windows)
# If you cloned the Axmol repository: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force # If you downloaded the ZIP release: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
-
macOS / Linux
- Run
setup.ps1directly. (TIPS:setup.ps1can also be executed in bash mode on macOS/Linux.)
- Run
-
Windows: Install Visual Studio 2022 or 2026 with the
Desktop development with C++workload.- For UWP development, also enable the
WinUI application development toolsworkload and include the optional componentC++ Universal Windows Platform tools.
- For UWP development, also enable the
-
macOS:
- For
axmol-v2: Install Xcode 14.2 or later — note that Xcode 14.2 is only supported on macOS 12.5 ~ macOS 13.x. - For
axmol-v3: Install Xcode 16.4 or later, which requires macOS 15.3 or newer.
- For
-
Linux: Ensure GCC/G++ is installed (Ubuntu 22.04+, Debian 12+, ArchLinux).
./setup.ps1This will install dependencies and configure environment variables. Restart your terminal after completion.
axmol new -p dev.axmol.hellocpp -d ./projects -l cpp HelloCpp-
-lcan becpporlua -
--portraitoptional, generates a portrait project
axmolBy default, this builds the host target on your development machine.
Use the -p option to cross‑compile for a different platform.
| Platform | Example Command |
|---|---|
| Windows | axmol -p win32 |
| UWP | axmol -p winuwp |
| Linux | axmol -p linux |
| macOS x64 | axmol -p osx -a x64 |
| macOS arm64 | axmol -p osx -a arm64 |
| iOS (simulator) | axmol -p ios -a x64 -sdk sim |
| iOS (device) | axmol -p ios -a arm64 -c |
| tvOS (simulator) | axmol -p tvos -a arm64 -sdk sim |
| tvOS (device) | axmol -p tvos -a arm64 -c |
| Android APK | axmol -p android -a arm64 |
| Android AAB | axmol -p android -a arm64 -aab |
| WASM | axmol -p wasm |
| WASM64(requires v3) | axmol -p wasm64 |
-
-p <platform>
Specify the target platform, e.g.win32,linux,osx,ios,android,wasm, etc. -
-a <arch>
Specify the target architecture, e.g.x64,arm64. This is especially important on multi‑architecture platforms such as macOS, iOS, tvOS, and Android. -
-c
Generate IDE project files (e.g. Visual Studio.slnor Xcode.xcodeproj). For iOS/tvOS real device builds this flag is mandatory because code signing is required. -
-sdk <name>
Specify the SDK type, e.g.simfor simulator builds. -
-aab
Generate an Android AAB package (required by Google Play). By default, APK is generated. -
-O<n>
Specify the optimization level for builds:-
-O0→ Debug -
-O1→ MinSizeRel -
-O2→ RelWithDebInfo (default) -
-O3→ Release
-
- You may notice that for iOS (device) and tvOS (device) we added the
-cflag. This is required because real device builds must be code‑signed. At present, you need to open the generated Xcode project and configure signing manually. - The
axmolcommand is a shorthand foraxmol build, useaxmol build -hto see all available options and details. -
Wasm: Supported on all development OS (macOS, Windows, Linux). Please ensure Python 3.13 or later is installed.
👉 Runpython -Vin the PowerShell terminal to verify your current Python version, then useaxmol run -p wasmto build and automatically launch your game project in the browser.
Axmol CLI covers all build needs for most platforms.
-
For Windows / Linux / macOS (simulator), IDEs are optional.
-
For iOS/tvOS real devices, IDEs are required because builds must be code‑signed in Xcode.
-
Visual Studio (Windows)
Runaxmol -c, then open the generated solution file:-
VS2022 →
build/ProjectName.sln -
VS2026 →
build/ProjectName.slnx
-
VS2022 →
-
Xcode (macOS/iOS/tvOS)
Runaxmol -p osx/ios/tvos -c, then open the generated.xcodeproj⚠️ For iOS/tvOS device builds, you must open the project in Xcode and configure signing manually. -
Android Studio
Runaxmol -p android -c, then openproj.android
Useful for CI/CD workflows:
axmol -p android -a arm64 -xc "-PKEY_STORE_FILE=/path/to/your-app.jks,-PKEY_STORE_PASSWORD=<your_key_store_passwd>,-PKEY_ALIAS=<your_key_alias>,-PKEY_PASSWORD=<your_key_passwd>"To generate an AAB instead of an APK, simply add the -aab option.
-
Windows Build Tools: Axmol supports building without installing the full Visual Studio IDE by using BuildTools.
However, we strongly recommend installing Visual Studio 2022 or 2026 IDE for the best Windows development experience — in our view, it’s the most powerful IDE available. -
Windows: Clang is also supported for building the Win32 target platform.
👉 Use the command:axmol -cc clang -
Android SDK/NDK:
setup.ps1 -p androidinstalls the minimum NDK version — r23d foraxmol-v2, and r27d foraxmol-v3. -
Linux: Use VSCode with the C++ and CMake Tools extensions for the best development experience.
👉 Ensure your system has GCC/G++ and CMake installed (Ubuntu 22.04+, Debian 12+, ArchLinux recommended). -
WASM Debugging: Default emsdk version is
3.1.73. Use Chrome DevTools for debugging.
Minimal workflow is just three steps:
./setup.ps1axmol newaxmol build
Everything else is optional or advanced.
For more common build issues, please check:
Axmol FAQ – Building