Skip to content

Latest commit

 

History

History
103 lines (64 loc) · 2.31 KB

compiling.rst

File metadata and controls

103 lines (64 loc) · 2.31 KB

µCity Advance - Compiling

Requirements

Before building for either GBA or Linux, you need to follow the instructions here:

First, you need CMake 3.15 or newer, make, and libpng 1.6. For example:

sudo apt install cmake build-essential libpng-dev

Then, clone the repository of this game with all its submodules:

git clone --recurse-submodules https://github.com/AntonioND/ucity-advance
cd ucity-advance

Finally, convert the assets of the game:

bash assets.sh

Linux

This should be enough:

mkdir build
cd build
cmake .. -DBUILD_GBA=OFF
make -j`nproc` install

The output is in the folder build/install.

Game Boy Advance

With devkitPro

First, you need to install devkitPro. Follow the instructions in the following link to install it in your system: https://devkitpro.org/wiki/Getting_Started

The Linux and Game Boy Advance binaries are built at the same time:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j`nproc` install

The output is in the folder build/install.

Without devkitPro

Install gcc-arm-none-eabi toolchain: You can get it from your package manager, or from Arm's GNU toolchain downloads website. In Ubuntu you can just do:

sudo apt install gcc-arm-none-eabi

The Linux and Game Boy Advance binaries are built at the same time:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_DEVKITARM=OFF
make -j`nproc` install

The output is in the folder build/install.

To override the autodetected location of the cross compiler, you can add -DARM_GCC_PATH=/path/to/folder/ to the cmake command.

Regenerate assets

If a tileset is modified, for example, it is needed to regenerate assets.

Install Tiled. Then run:

bash gen_maps.sh

It isn't needed to do this as part of the build process, the resulting files are included in the repository.