summaryrefslogtreecommitdiff
path: root/INSTALL.md
blob: c4f62a60cfc7332b7cc2dae58d718fcec4a653e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
### 1. Copy baserom(s) into root folder

Put a clean copy of Pokemon Diamond (US) nds rom at `./baserom.nds`.

### 2. Install MWCC compiler

The build system requires the use of the Metrowerk C Compiler 2.0/base to compile matching files. We cannot distribute the correct compiler here so join the PRET discord and download the pinned mwccarm.zip zip in #pokediamond and extract it to tools/. Run each of the executables so they ask for a license.dat and provide the one in the rar (it may also ask for it when compiling). This only needs to be done once.

In the future, a GCC option will be available so MWCC is not required to build, however it is required for a matching ROM.

### 3. Dependencies

#### Linux

Building the ROM requires the following packages:

* make
* git
* build-essentials
* binutils-arm-none-eabi
* wine (to run the mwcc executables)
* libpng-devel

NOTE: If you are using Arch/Manjaro or Void you will only need base-devel instead of build-essentials or make or git. You will still need wine.

Also, if you are using WSL on Windows, please pass NOWINE=1 when compiling, and wine is not necessary for a WSL environment.

#### Windows

Before following the respective guides, please install devkitARM and ensure the DEVKITPRO and DEVKITARM variables are added to bashrc such that:

Msys2:
export DEVKITPRO=C:/devkitPro
export DEVKITARM=${DEVKITPRO}/devkitARM

Cygwin:
export DEVKITPRO=/cygdrive/c/devkitPro
export DEVKITARM=${DEVKITPRO}/devkitARM

You will still require the following packages:

* make
* git
* build-essentials
* libpng-devel

Install them using either the Cygwin package manager or using pacman on Msys2.

### 4. Build ROM

Run `make` to build the ROM.

Windows Users:

If you get an error in saving configuration settings when specifying the license file, you need to add a system environment variable called LM_LICENSE_FILE and point it to the license.dat file.