2.3 KiB
Prerequisites
Linux: none
macOS: Xcode Command Line Tools package
Windows 10 (1709+): Windows Subsystem for Linux
Windows Vista, 7, 8, 8.1, and 10 (1507, 1511, 1607, 1703): Choose one of the following two options.
- Get Cygwin and include the
make
,git
,gcc-core
,gcc-g++
, andlibpng-devel
packages. - Get MSYS2 and the pokeruby-tools.
If you are on Windows 10 1607 or 1703 and use the prerelease version of the Linux subsystem, consider uninstalling it.
Install the devkitARM toolchain of devkitPro and, except for MSYS2, add its environment variables. To set up devkitPro in MSYS2, use the graphical installer.
export DEVKITPRO=/opt/devkitpro
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
Installation
To set up the repository:
git clone https://github.com/pret/pokeemerald
git clone https://github.com/pret/agbcc
cd ./agbcc
./build.sh
./install.sh ../pokeemerald
cd ../pokeemerald
./build_tools.sh
To build pokeemerald.gba:
make -j$(nproc)
To confirm it matches the official ROM image while building, do this instead:
make compare -j$(nproc)
Note: If only .c
or .s
files were changed, turn off the dependency scanning temporarily. Changes to any other files will be ignored and the build will either fail or not reflect those changes.
make -j$(nproc) NODEP=1
Note 2: If the build command is not recognized on Linux, including the Linux environment used within Windows, run nproc
and replace $(nproc)
with the returned value (e.g.: make -j4
). Because nproc
is not available on macOS, the alternative is sysctl -n hw.ncpu
.