Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/armory3d/armorpaint/llms.txt

Use this file to discover all available pages before exploring further.

amake is the ArmorPaint build tool (based on kmake). It orchestrates the entire build pipeline: converting image assets to an optimized internal format, compiling .kong shaders to platform-specific bytecode, and generating IDE project files for Visual Studio, Xcode, or Android Studio — or compiling the project directly from the command line.

Components

amake is composed of four main parts that each handle a distinct stage of the build process.

aimage.c

Converts common image formats (.jpg, .png, .hdr) into the custom .k format, which is faster to load at runtime. Also handles converting icon.png into platform-specific icon formats (e.g. .ico on Windows).

ashader.c

Converts .kong shader source files into graphics API-specific formats: HLSL compiled to D3D bytecode (Windows/Direct3D 12), MSL for Metal (macOS/iOS), and SPIRV for Vulkan (Linux).

quickjs

An embedded JavaScript engine used to execute the make.js script. This enables the build system logic to be written in JavaScript without any external runtime dependency.

make.js

Handles processing of project.js files and generating target-specific project files — a Visual Studio solution (.sln), an Xcode project (.xcodeproj), or an Android Studio project.

The .k Image Format

Images referenced in the project are converted from PNG, JPG, or HDR into the .k format at build time. The .k format is intentionally simple:
  • A small image header containing width, height, and format metadata
  • Pixel data compressed with lz4
This format is significantly faster to load than PNG or JPG because it skips the decoder entirely and decompresses directly into GPU-ready memory using the lightweight lz4 algorithm.

CLI Usage

All amake commands are run from the project directory (e.g. armorpaint/paint/), referencing the binary in the sibling base/ tree.
# Generate IDE project files for the host platform
../base/make

# Compile the project in-place (no IDE project generated)
../base/make --compile

# Compile and immediately run the resulting binary
../base/make --run

# Embed data files into the binary (requires clang 19+)
../base/make --embed

# Target Android — generates an Android Studio project
../base/make --target android

# Target iOS — generates an Xcode project for device
../base/make --target ios

# Target WebAssembly
../base/make --target wasm

# Run an arbitrary JS tool script through the embedded QuickJS engine
../base/make --js base/tools/extract_locales.js <locale_code>
The --embed flag requires a compiler with C23 #embed support. Clang 19 or newer is required for this feature. Earlier versions of Clang will fail to compile the embedded data file header.

Pre-Built Binaries

Pre-compiled amake binaries for each supported platform are checked into the repository at:
/base/tools/bin/
These binaries are used directly — there is no separate installation step. The correct binary for the host platform is invoked automatically when you run ../base/make.

Building amake Itself

If you need to rebuild amake from source (for example, after modifying aimage.c or ashader.c), navigate to the amake tool source directory and compile it:
../../make --compile && cp build/out/amake ../bin/linux_x64/amake
This assumes you are inside base/tools/amake/ and targeting Linux x64. Adjust the destination path for other platforms (e.g. ../bin/windows_x64/amake.exe or ../bin/macos_arm64/amake).

Build docs developers (and LLMs) love