pokecrystal-board/INSTALL.md

185 lines
4.8 KiB
Markdown
Raw Normal View History

# Instructions
2020-09-15 05:36:11 -07:00
These instructions explain how to set up the tools required to build **pokecrystal**, including [**rgbds**](https://github.com/gbdev/rgbds), which assembles the source files into a ROM.
2016-01-31 15:36:18 -08:00
If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
2016-03-16 14:57:03 -07:00
2016-01-31 15:36:18 -08:00
## Windows 10
Download and install [**Windows Subsystem for Linux**](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Then open the **WSL terminal**.
WSL has its own file system that's not accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to install pokecrystal within Windows. You'll have to change the **current working directory** every time you open WSL.
For example, if you want to store pokecrystal in **C:\Users\\*\<user>*\Desktop**, enter this command:
```bash
cd /mnt/c/Users/<user>/Desktop
```
(The Windows `C:\` drive is called `/mnt/c/` in WSL. Replace *\<user>* in the example path with your username.)
If this works, then follow [the instructions for **Linux**](#linux) below for whatever distribution you installed for WSL.
Otherwise, continue reading below for [the older Windows instructions](#windows).
2014-11-12 07:30:37 -08:00
## Windows
Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.
Run setup and leave the default settings. At the "**Select Packages**" step, choose to install the following, all of which are in the "**Devel**" category:
- `make`
- `git`
- `gcc-core`
2019-04-29 13:01:56 -07:00
Double click on the text that says "**Skip**" next to each package to select the most recent version to install.
2020-09-15 05:36:11 -07:00
Then download [**rgbds**](https://github.com/gbdev/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
**Note: If you already have an older rgbds, you will need to update to 0.4.1.** Ignore this if you have never installed rgbds before. If a version newer than 0.4.1 does not work, try downloading 0.4.1.
Now open the **Cygwin terminal** and enter the following commands.
Cygwin has its own file system that's within Windows, at **C:\cygwin64\home\\*\<user>***. If you don't want to store pokecrystal there, you'll have to change the **current working directory** every time you open Cygwin.
For example, if you want to store pokecrystal in **C:\Users\\*\<user>*\Desktop**:
```bash
cd /cygdrive/c/Users/<user>/Desktop
```
(The Windows `C:\` drive is called `/cygdrive/c/` in Cygwin. Replace *\<user>* in the example path with your username.)
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
2012-06-02 13:27:24 -07:00
## macOS
2020-02-25 05:59:06 -08:00
Install [**Homebrew**](https://brew.sh/). Follow the official instructions.
2020-02-25 05:59:06 -08:00
Open **Terminal** and enter the following commands.
2012-06-02 13:27:24 -07:00
To install **rgbds**:
```bash
2020-02-25 05:59:06 -08:00
brew install rgbds
```
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
## Linux
Open **Terminal** and enter the following commands, depending on which distro you're using.
### Debian or Ubuntu
To install the software required for **pokecrystal**:
```bash
sudo apt-get install make gcc git
```
To install **rgbds**:
```bash
2018-11-19 11:02:07 -08:00
sudo apt-get install pkg-config flex bison libpng-dev
2020-09-15 05:36:11 -07:00
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
sudo make -C rgbds install
```
### OpenSUSE
To install the software required for **pokecrystal**:
```bash
sudo zypper install make gcc git
```
To install **rgbds**:
```bash
2018-11-19 11:02:07 -08:00
sudo zypper install pkg-config flex bison libpng16-devel
2020-09-15 05:36:11 -07:00
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
sudo make -C rgbds install
```
### Arch Linux
To install the software required for **pokecrystal**:
```bash
sudo pacman -S make gcc git rgbds
```
2012-06-02 13:27:24 -07:00
If you want to compile and install **rgbds** manually instead of using the Arch package:
```bash
2018-11-19 11:02:07 -08:00
sudo pacman -S pkg-config flex bison libpng
2020-09-15 05:36:11 -07:00
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
sudo make -C rgbds install
```
### Termux
To install the software required for **pokecrystal**:
```bash
sudo apt install make clang git sed
```
To install **rgbds**:
```bash
sudo apt install rgbds
```
### Other distros
If your distro is not listed here, try to find the required software in its repositories:
- `make`
- `gcc` (or `clang`)
- `git`
- `rgbds`
2016-01-31 15:27:32 -08:00
If `rgbds` is not available, you'll also need these:
2018-11-19 11:02:07 -08:00
- `pkg-config`
- `flex`
- `bison`
- `libpng` (and the development headers)
2012-06-02 13:27:24 -07:00
To install **rgbds**:
```bash
2020-09-15 05:36:11 -07:00
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
sudo make -C rgbds install
```
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
## Build pokecrystal
To download the **pokecrystal** source files:
2012-06-02 13:27:24 -07:00
```bash
git clone https://github.com/pret/pokecrystal
cd pokecrystal
```
To build **pokecrystal.gbc**:
```bash
make
```
To build **pokecrystal11.gbc**:
```bash
make crystal11
```