Building

Getting Source

git clone https://github.com/crownengine/crown.git

Prerequisites

Android

  1. Install Android NDK (>= r21e LTS):

  2. Set NDK path and ABI version:

export ANDROID_NDK_ROOT=<path/to/android_ndk>
export ANDROID_NDK_ABI=23
  1. Install LuaJIT dependencies:
sudo apt-get install libc6-dev-i386
  1. Continue to Build.

Linux (Ubuntu >= 20.04)

sudo apt install build-essential mesa-common-dev libgl1-mesa-dev \
libpulse-dev libxrandr-dev libc6-dev-i386 libgtk-3-dev

sudo add-apt-repository ppa:vala-team
sudo apt install valac libgee-0.8-dev

If you encounter any errors while adding the Vala PPA, update ca-certificates first:

sudo apt update
sudo apt install ca-certificates

To build documentation you will also need:

sudo apt-get install python3-sphinx

Windows (VS 2019)

  1. Install Visual Studio 2019:

  2. If you want to build tools, continue to Windows (MSYS2).

  3. Continue to Build.

Windows (VS Code)

  1. Install Visual Studio Code:

  2. Continue to Windows (MSYS2).

Windows (MSYS2)

  1. Install MSYS2:

  2. Add MSYS2 bin to your PATH; for a default install this would be:

C:\msys64\usr\bin
  1. Open MSYS2 shell and install dependencies:
pacman -S make mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf \
mingw-w64-x86_64-gtk3 mingw-w64-x86_64-sassc \
mingw-w64-x86_64-vala mingw-w64-x86_64-libgee
  1. Continue to Build.

Build

Android

make android-arm-release MAKE_JOBS=4

Linux

make tools-linux-release64 MAKE_JOBS=4

Windows (VS 2019)

  1. Open Visual Studio 2019 Command Prompt:
make tools-windows-release64 MAKE_JOBS=4
  1. To build tools, open a MSYS2 MINGW64 shell:
export MINGW=/mingw64
make tools-mingw-release64 MAKE_JOBS=4

Windows (VS Code)

  1. Add the MinGW compiler to your path:

  2. Open Visual Studio Code Shell:

$env:MINGW = "C:\\msys64\\mingw64"
make tools-mingw-release64 MAKE_JOBS=4

Windows (MSYS2)

Open MSYS2 MINGW64 shell:

export MINGW=/mingw64
make tools-mingw-release64 MAKE_JOBS=4