Prerequisites
Choose the tab for your platform and follow the steps to install the required packages.
On Windows, WSL1 is the recommended option — it is the fastest terminal for building pokeemerald. msys2 is approximately 2x slower than WSL1, and Cygwin is 5–6x slower.
Windows (WSL1)
Windows (msys2)
Windows (Cygwin)
macOS
Linux (Debian/Ubuntu)
Linux (Arch)
NixOS
WSL1 is the preferred terminal to build pokeemerald on Windows 10 and 11.Install WSL1
Open Windows PowerShell as Administrator and run:Once the process finishes, restart your machine. Configure Ubuntu to use WSL1
After restarting, open Windows PowerShell as Administrator again and run: Set up Ubuntu
Open Ubuntu (e.g. via Search). WSL will complete its first-time setup and prompt you to create a username and password.Then update the system: Install required packages
If the above command does not work, try replacing apt with apt-get.
All Windows instructions assume the default drive is C:\. If your drive letter differs, replace C with the correct letter throughout these instructions. Install devkitARM
Download the devkitPro installer from GitHub. Run it and, in the “Choose Components” screen, uncheck everything except GBA Development. Keep the install location as C:\devkitPro. Open msys2
Open msys2 at C:\devkitPro\msys2\msys2_shell.bat.In msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
Install required packages
Install libpng
Download libpng 1.6.37. Then change directory to where it was downloaded (e.g. Downloads) and run:Then return to the user profile folder: Install devkitARM
Follow the devkitARM installation steps from the msys2 tab. Do not continue with the msys2-specific instructions after installing devkitARM. Install Cygwin
Download the Cygwin installer from cygwin.com: setup-x86_64.exe for 64-bit, setup-x86.exe for 32-bit.During setup, at Select Packages, set the view to Full and select the following packages:
make
git
gcc-core
gcc-g++
libpng-devel
Double-click Skip next to each package to select the latest version, then complete the installation. Configure devkitARM for Cygwin
Open Cygwin and run:Replace the drive letter c with your actual drive letter if it is not c.
Install Xcode Command Line Tools
Install Homebrew and libpng
If Homebrew is not installed, follow the instructions on the Homebrew website to install it. Then run: Install devkitARM
Download the devkitpro-pacman-installer.pkg package from GitHub and open it to install devkitPro pacman.Then in the Terminal, run:When prompted for package selection during the gba-dev step, press Enter to install all packages, then enter Y to confirm. Set devkitARM environment variables
Run the following command as root: Start an interactive shell with the necessary packages:
Cloning the repository
Once your environment is set up, clone the source and build the custom GBA C compiler (agbcc).
Clone and build agbcc
agbcc is the custom GBA C compiler required for a byte-identical build. Clone it into the same directory as pokeemerald, then build and install it:After installation, return to the parent directory: Enter the pokeemerald directory
You are now ready to build.