How to Set Up the Development Environment for ArmorPaint: Complete Build Guide

Clone the armory3d/armorpaint repository, install a C/C++ compiler (Clang 19+ on Linux, Visual Studio 2022 on Windows, or Xcode 15 on macOS), and run ../base/make from the paint/ directory to generate IDE project files and compile the application.

ArmorPaint is a native desktop application for real-time 3D PBR texture painting built in C/C++ using the Kinc graphics library. Setting up the ArmorPaint development environment requires configuring platform-specific compiler toolchains and understanding the repository's split structure between the base/ build system and the paint/ source code. This guide walks through the complete setup process for Windows, Linux, macOS, and WebAssembly targets.

Install Compiler Toolchains by Platform

ArmorPaint requires a modern C/C++ compiler with support for contemporary standards. The specific toolchain varies by operating system.

Windows (x64)

Install Visual Studio 2022 with the Desktop development with C++ workload and the Clang tools for Windows component. The project uses Clang with Microsoft CodeGen for compilation. After installation, verify that clang is available in your Developer Command Prompt.

Linux (x64)

Install Clang 19 or newer to support the C23 #embed directive, along with Make and system libraries. On Debian or Ubuntu, run:

sudo apt install make clang libvulkan-dev libgtk-3-dev libssl-dev libxi-dev libxrandr-dev libxcursor-dev libasound2-dev

For Arch Linux, use:

sudo pacman -S make clang vulkan-devel gtk3 openssl libxi libxrandr libxcursor alsa-lib

See the complete dependency list in base/docs/linux_deps.md within the repository.

macOS (arm64)

Install Xcode 15 or newer from the App Store, which includes the required clang compiler. Run xcode-select --install to ensure command-line tools are properly configured for terminal builds.

Mobile and WebAssembly Targets

For Android builds, install Android Studio with the NDK. For iOS, use Xcode. For WebAssembly, install the Emscripten SDK and activate the latest toolchain:

emsdk install latest && emsdk activate latest

Clone the Repository and Navigate the Structure

The ArmorPaint repository uses a deliberate split between build assets and application code. Clone the repository and enter the source directory:

git clone https://github.com/armory3d/armorpaint
cd armorpaint/paint

The paint/ folder contains the actual application source, while base/ houses build scripts, documentation, and shared assets. All compilation commands run from within paint/ but reference the parent base/ directory for build configuration.

Build ArmorPaint Using the Make Script

The unified build entry point is the base/make script (or base/make.bat on Windows). This script auto-detects your platform and generates appropriate project files for Visual Studio, Xcode, or Makefiles.

Generate Project Files

From the paint/ directory, run:

../base/make

This creates:

  • build/ArmorPaint.sln on Windows
  • build/ArmorPaint.xcodeproj on macOS
  • Makefiles on Linux

Build and Run Immediately

For rapid iteration on Linux, combine generation and compilation:

../base/make --run

Build for Specific Targets

Cross-compile for alternative platforms using the --target flag:

../base/make --target android    # Generates Android Studio project in build/

../base/make --target ios        # Generates iOS Xcode project

../base/make --target wasm --compile --embed  # WebAssembly build

Embed Assets into the Binary

From version 0.6 onward, ArmorPaint supports embedding textures, shaders, and UI files directly into the executable using the C23 #embed directive. Requires Clang 19+:

../base/make --embed

Development Workflow and Hot-Reloading

After successful compilation, launch paint/ArmorPaint (or the binary from your IDE) to open the editor. The development environment supports several rapid iteration features.

Shader Hot-Reload

The Kinc engine automatically reloads shaders when source files change. Edit files in paint/shaders/ and press F5 in the running application to see updates instantly without recompiling the entire project.

Adding Material Nodes

All node implementations reside in paint/sources/nodes_material/. Each node follows a consistent C-style interface defined in files like *_node.c. After adding or modifying nodes, re-run ../base/make to regenerate project files and reflect changes in the build system.

Localization Workflow

Generate new locale files using the extraction tool:

../base/make --js base/tools/extract_locales.js <locale_code>

Place the resulting JSON files in paint/assets/locale/ to add language support.

Summary

  • Install modern compilers: Clang 19+ on Linux, Visual Studio 2022 with Clang on Windows, or Xcode 15 on macOS.
  • Navigate to paint/: This subdirectory contains the main application source separate from the base/ build system.
  • Use ../base/make: This script generates native IDE projects and handles all platform-specific configuration automatically.
  • Enable asset embedding: Add --embed when compiling with Clang 19+ to inline resources using C23 #embed.
  • Leverage hot-reload: Edit shaders in paint/shaders/ and press F5 for instant updates during development.

Frequently Asked Questions

Can I use MinGW instead of Visual Studio on Windows?

No. The ArmorPaint build system specifically requires Visual Studio 2022 with the Clang tools component. The base/make script generates Visual Studio solution files (.sln) that rely on the MSVC toolchain integration with Clang for proper Windows SDK linking and Kinc graphics support.

Why does Linux specifically require Clang 19 or newer?

ArmorPaint utilizes the C23 #embed preprocessor directive to inline binary assets directly into the executable at compile time. This feature requires Clang 19 or later. Earlier versions lack support for #embed, causing builds with the --embed flag to fail. Additionally, Clang provides better Vulkan and graphics driver compatibility on Linux compared to GCC for this codebase.

How do I build ArmorPaint for mobile devices?

Run ../base/make --target android to generate an Android Studio project in build/ArmorPaint, or ../base/make --target ios to create an Xcode project for iOS devices. Both require their respective SDKs (Android NDK or Xcode) to be installed and properly configured on your development machine.

Where are the shader files located for hot-reloading?

Shader source files are located in paint/shaders/. The Kinc engine monitors these files during runtime. When you modify a shader and save the file, pressing F5 in the ArmorPaint window triggers an immediate reload of the compiled shaders without requiring a full application restart or recompilation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →