Skip to main content
The atlas pack command builds your project and packages it for distribution on the target platform. It creates platform-specific application bundles with all necessary resources.

Usage

atlas pack [OPTIONS]
Run this command from your project root directory (where atlas.toml is located).

Options

—release, -r

Build in release mode with optimizations enabled.
atlas pack --release
Values:
  • 0 - Debug build (default)
  • 1 or any non-zero value - Release build
Default: 0 (debug mode)

Build Process

The pack command performs the following steps:
1

Clean previous builds

Removes existing build/ and app/ directories to ensure a fresh build.
2

Configure CMake

Runs CMake configuration with the appropriate build type:
cmake .. -DCMAKE_BUILD_TYPE=Release
3

Build executable

Compiles your C++ code and links all libraries:
cmake --build . --config Release
4

Create platform bundle

Packages the executable with resources for your target platform.

Platform-Specific Packaging

macOS

On macOS, the pack command creates a complete .app bundle:
app/
└── MyGame.app/
    └── Contents/
        ├── Info.plist
        ├── MacOS/
        │   └── MyGame       # Executable
        └── Resources/
            └── AppIcon.icns # Application icon
The Info.plist is automatically generated with values from atlas.toml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleName</key>
    <string>MyGame</string>
    
    <key>CFBundleDisplayName</key>
    <string>MyGame</string>
    
    <key>CFBundleIdentifier</key>
    <string>com.example.mygame</string>
    
    <key>CFBundleVersion</key>
    <string>1.0</string>
    
    <key>CFBundleExecutable</key>
    <string>MyGame</string>
    
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    
    <key>CFBundleIconFile</key>
    <string>AppIcon.icns</string>
    
    <key>LSMinimumSystemVersion</key>
    <string>10.13</string>
</dict>
</plist>

Linux & Windows

On Linux and Windows, the pack command creates the executable in the build output directory:
build/
└── bin/
    └── mygame       # or mygame.exe on Windows

Configuration

Packing behavior is controlled by the [pack] section in atlas.toml:
[project]
name = "MyGame"
app_name = "My Awesome Game"

[pack]
icon = "icon.icns"
supported_platforms = "macos,linux"
version = "1.2.3"
identifier = "mycompany"

Pack Configuration Options

icon

Path to the application icon file, relative to the assets/ directory.
  • macOS: Use .icns format
  • Windows: Use .ico format (when supported)
  • Linux: Varies by distribution
icon = "icon.icns"
If set to "none" or the file doesn’t exist, no icon will be included.

supported_platforms

Comma-separated list of platforms this application supports.
supported_platforms = "macos,linux,windows"
# or
supported_platforms = "all"
Values: "all", "macos", "linux", "windows" If the current platform is not in the list, a warning will be displayed but packing will continue.

version

Application version string used in platform metadata.
version = "1.2.3"
Default: "1.0" On macOS, this becomes the CFBundleVersion in Info.plist.

identifier

Bundle identifier prefix for macOS applications.
identifier = "mycompany"
Default: "example" Generates bundle IDs like com.mycompany.mygame.

Example Output

Debug Build

$ atlas pack
Packing project for target machine.
Using renderer: OpenGL
CMake configuration successful!
CMake build successful!
Executable found at: build/bin/mygame
Packing completed successfully.

Release Build

$ atlas pack --release
Packing project for target machine.
Using renderer: OpenGL
CMake configuration successful!
CMake build successful!
Executable found at: build/bin/mygame
Packing completed successfully.
The packaged application will be in:
  • macOS: app/YourGame.app/
  • Linux/Windows: build/bin/

Distributing Your Application

After packing:

macOS

  1. Compress the .app bundle:
    cd app
    zip -r MyGame.zip MyGame.app
    
  2. For wider distribution, consider code signing:
    codesign --force --deep --sign "Developer ID" MyGame.app
    

Linux

Create a tarball or use platform-specific packaging:
cd build/bin
tar -czf mygame-linux.tar.gz mygame

Windows

Package the executable with any required DLLs:
zip mygame-windows.zip mygame.exe

Troubleshooting

CMake Configuration Failed

Ensure all dependencies are installed:
# macOS
brew install glfw glm assimp freetype openal-soft

# Ubuntu/Debian
sudo apt-get install libglfw3-dev libglm-dev libassimp-dev libfreetype6-dev libopenal-dev

Build Errors

Check your C++ code for compilation errors. Build output is displayed during the pack process.

Missing Executable

If “No executable found in build directory” appears:
  1. Check for build errors in the output
  2. Verify CMakeLists.txt is properly configured
  3. Ensure source files are in the correct directory

Platform Not Supported

Current platform 'linux' is not supported for packing.
Update supported_platforms in atlas.toml to include your platform or use "all".

Next Steps

Build docs developers (and LLMs) love