Skip to content

Building from Source

radj307 edited this page Mar 4, 2024 · 26 revisions

Building ARRCON From Source

Building ARRCON from source is a relatively painless process, and is automated with git submodules.

Prerequisites (v4+)

  • git
  • cmake v3.22 or newer
  • C++ Compiler:
    • Windows: MSVC 17.0 or newer
    • Linux: gcc-10 or newer
    • macOS: clang 16 or newer
      (Prior to v4, the macOS version was compiled with gcc-10)
  • ninja

Additional Prerequisites for macOS

(Credits: FelixKLG)

  • XCode
  • XCode Command Line Tools
    Once XCode has been installed, you can install the commandline tools by running xcode-select --install from a terminal.
  • (optional) Homebrew
    Recommended for installing the prerequisites as packages from the commandline.
    Once installed, you can setup all of the other prerequisites by running brew install llvm@16 cmake ninja from a terminal.

Building The Executable

Short Version

Run the following commands in a terminal:

git clone https://github.com/radj307/ARRCON
cd ARRCON
git submodule update --init --recursive
cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja
cmake --build build --config Release

The executable will be located at build/ARRCON/ARRCON (or build/ARRCON/ARRCON.exe on Windows).

Long Version

Using your preferred terminal (or git client), cd to a workspace directory of your choice, then enter the following commands:

  1. First, we'll need a copy of the source code:
    git clone https://github.com/radj307/ARRCON && cd ARRCON

  2. Next we'll need to download the dependencies:
    git submodule update --init --recursive
    Note: If you're using Linux or macOS, you can use this command instead: git submodule update --init --recursive 307lib

  3. Finally, we'll build the executable for your OS using cmake-gui:
    Open cmake-gui:

    If you're using CMake CLI, I'll assume you already know what you're doing & won't spend time writing the same guide twice.

  4. Enter the path to the root ARRCON directory in "Where is the source code"

  5. Create a build output directory: ARRCON/out, and enter its location in "Where to build the binaries"

  6. Next, click Configure and select a compiler.


    Once the configuring step is complete, you should see this message:

    You can ignore any warnings that appear, so long as they aren't errors.

  7. Click Generate to generate the project files using your compiler.

  8. Now we'll open the generated project files using whichever generator you chose in step 6.

  9. Open the project and compile it using your preferred compiler.

Visual Studio

  1. Switch the configuration to Release or MinSizeRel
  2. Then R+Click on the ARRCON project in the solution explorer, and select "Build"
  3. The generated executable will be located in this subdirectory: out/build/<CONFIGURATION>/ARRCON/