Skip to content

Commit

Permalink
Updating install instructions (#5610)
Browse files Browse the repository at this point in the history
Co-authored-by: Hedara <[email protected]>
  • Loading branch information
hedara90 and Hedara authored Dec 15, 2024
1 parent bcc65e7 commit 3b594e2
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 534 deletions.
586 changes: 52 additions & 534 deletions INSTALL.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/install/chromeos/CHROME_OS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Instructions for ChromeOS

1. Enable the Linux terminal by following the instructions on [this page](https://chromeos.dev/en/productivity/terminal). Be sure to allocate enough space for the Linux install.
2. After the Linux terminal has finished installing, run the following command in the terminal to update and upgrade the Linux terminal:

```console
sudo apt update && apt upgrade
```
3. Then install all dependencies by running the following command:

```console
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev python3
```
**NOTE**: The project must be kept in a directory inside the Linux filesystem, for example under `~/Decomps/pokeemerald-expansion`
6 changes: 6 additions & 0 deletions docs/install/linux/ARCH_LINUX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Arch Linux instructions
## Installing dependencies
Run the following command from the command line:
```console
sudo pacman -S base-devel arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib git libpng python
```
6 changes: 6 additions & 0 deletions docs/install/linux/DEBIAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Debian instructions
## Installing dependencies
Open a terminal and run the following command from the command line:
```console
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev python3
```
5 changes: 5 additions & 0 deletions docs/install/linux/NIXOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# NixOS instructions
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
11 changes: 11 additions & 0 deletions docs/install/linux/OTHERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Instructions for other distributions
1. Try to find the required software in its repositories:
- `gcc`
- `g++`
- `arm-none-eabi-gcc`
- `arm-none-eabi-binutils`
- `arm-none-eabi-newlib`
- `make`
- `git`
- `libpng-dev`
- `python3`
6 changes: 6 additions & 0 deletions docs/install/linux/UBUNTU.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ubuntu instructions
## Installing dependencies
Open a terminal and run the following command from the command line:
```console
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev python3
```
93 changes: 93 additions & 0 deletions docs/install/mac/MAC_OS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Instructions for macOS
1. If the Xcode Command Line Tools are not installed, download the tools [here](https://developer.apple.com/xcode/resources/), open your Terminal, and run the following command:

```bash
xcode-select --install
```

2. - If libpng is **not installed**, then go to [Installing libpng (macOS)](#installing-libpng-macos).
- If pkg-config is **not installed**, then go to [Installing pkg-config (macos)](#installing-pkg-config-macos).
- If devkitARM is **not installed**, then go to [Installing devkitARM (macOS)](#installing-devkitarm-macos).
- Otherwise, **open the Terminal** and go to [Choosing where to store pokeemerald-expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos)

### Installing libpng (macOS)
<details>
<summary><i>Note for advanced users...</i></summary>

> This guide installs libpng via Homebrew as it is the easiest method, however advanced users can install libpng through other means if they so desire.
</details>

1. Open the Terminal.
2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website.
3. Run the following command to install libpng.

```bash
brew install libpng
```
libpng is now installed.

Continue to [Installing pkg-config (macOS)](#installing-pkg-config-macos) if **pkg-config is not installed**. Otherwise, continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**.

If both pkg-config and devkitARM are already installed, go to [Choosing where to store pokeemerald-expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos).

### Installing pkg-config (macOS)
<details>
<summary><i>Note for advanced users...</i></summary>

> This guide installs pkg-config via Homebrew as it is the easiest method, however advanced users can install pkg-config through other means if they so desire.
</details>

1. Open the Terminal.
2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website.
3. Run the following command to install libpng.

```bash
brew install pkg-config
```
pkg-config is now installed.

Continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**, otherwise, go to [Choosing where to store pokeemerald-expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos).

### Installing devkitARM (macOS)
1. Download the `devkitpro-pacman-installer.pkg` package from [here](https://github.com/devkitPro/pacman/releases).
2. Open the package to install devkitPro pacman.
3. In the Terminal, run the following commands to install devkitARM:

```bash
sudo dkp-pacman -Sy
sudo dkp-pacman -S gba-dev
sudo dkp-pacman -S devkitarm-rules
```

The command with gba-dev will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.

4. After the tools are installed, devkitARM must now be made accessible from anywhere by the system. To do so, run the following commands:

```bash
export DEVKITPRO=/opt/devkitpro
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.zshrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo "export DEVKITARM=$DEVKITARM" >> ~/.zshrc
echo "if [ -f ~/.zshrc ]; then . ~/.zshrc; fi" >> ~/.zprofile
```
*Note: Starting with macOS 10.15, the default Unix shell is now zsh. If you migrated from an older version of macOS, you might still be using bash. You can check my running `echo $0` in the terminal.*
<details>
<summary><i>If your terminal is using bash instead of zsh...</i></summary>

```bash
export DEVKITPRO=/opt/devkitpro
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile
```
</details>

### Installing Python (macOS)
1. Download the latest Python package from [here](https://www.python.org/downloads/).
2. Open the package to install Python.

Python is now installed.

4 changes: 4 additions & 0 deletions docs/install/windows/CYGWIN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# cygwin
Don't, just don't.
Currently doesn't work on current Expansion versions.
This is a bug from upstream pret `pokeemerald`.
4 changes: 4 additions & 0 deletions docs/install/windows/MSYS2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# msys2
Don't, just don't.
Currently doesn't work on current Expansion versions.
This is a bug from upstream pret `pokeemerald`.
87 changes: 87 additions & 0 deletions docs/install/windows/WSL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Windows WSL instructions
## Choosing WSL version
If you must store your project on the Windows file system (under /mnt/c/), you should use WSL1.
If you want the best performance and least amount of issues with Windows interfering with compiling the project, use WSL2 and store the project on the Linux file system (under ~/).
## Installing WSL
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).

```powershell
wsl --install -d Ubuntu --enable-wsl1
```
2. Once the process finishes, restart your machine.
### WSL1
3a. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
```powershell
wsl --set-version Ubuntu 1
```
### WSL2
3a. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL2.
```powershell
wsl --set-version Ubuntu 2
```
<details>
<summary><i>Note...</i></summary>
> WSL may open automatically after restarting, but you can ignore it for now.
</details>
## Installing dependencies
Some tips before proceeding:
- In WSL, Copy and Paste is either done via
- **right-click** (selection + right click to Copy, right click with no selection to Paste)
- **Ctrl+Shift+C/Ctrl+Shift+V** (enabled by right-clicking the title bar, going to Properties, then checking the checkbox next to "Use Ctrl+Shift+C/V as Copy/Paste").
- Some of the commands that you'll run will ask for your WSL password and/or confirmation to perform the stated action. This is to be expected, just enter your WSL password and/or the yes action when necessary.
1. Open **Ubuntu** (e.g. using Search).
2. WSL/Ubuntu will set up its own installation when it runs for the first time. Once WSL/Ubuntu finishes installing, it will ask for a username and password (to be input in).
<details>
<summary><i>Note...</i></summary>
> When typing in the password, there will be no visible response, but the terminal will still read in input.
</details>
3. Update WSL/Ubuntu before continuing. Do this by running the following command. These commands will likely take a long time to finish:
```bash
sudo apt update && sudo apt upgrade
```
4. Certain packages are required to build pokeemerald Expansion. Install these packages by running the following command:
```bash
sudo apt install build-essential binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi git libpng-dev python3
```
## Choosing a location to store pokeemerald Expansion, WSL1
WSL has its own file system that's not natively accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to store pokeemerald Expansion within Windows.
For example, say you want to store pokeemerald Expansion in **C:\Users\\_\<user>_\Desktop\decomps**. First, ensure that the folder already exists. Then, enter this command to **change directory** to said folder, where *\<user>* is your **Windows** username:
```bash
cd /mnt/c/Users/<user>/Desktop/decomps
```

<details>
<summary><i>Notes...</i></summary>

> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details>
## Choosing a location to store pokeemerald Expansion, WSL2
WSL has its own file system that's not natively accessible from Windows, but Windows files *are* accessible from WSL. But accessing files on the Windows file system with WSL2 is very slow, so you're going to want to store pokeemerald Expansion within WSL2.
To access the files on the WSL filesystem from Windowsm, you have to open the WSL filesystem as a network attached storage in the file explorer, it should be at the bottom of the left sidebar as "Ubuntu".

Thus you're going to make sure that you're in the WSL filesystem, then create the folder for decomps if it doesn't already exist, then move into that folder.

```bash
cd ~/
mkdir decomps
cd decomps
```

0 comments on commit 3b594e2

Please sign in to comment.