Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix readme formatting #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,27 @@ There are 3 steps to set up a working build.
#### Step 1: Install dependencies

The build system has the following package requirements:
* binutils-mips
* pkgconf
* python3 >= 3.6

* binutils-mips
* pkgconf
* python3 >= 3.6

Dependency installation instructions for common Linux distros are provided below:

##### Debian / Ubuntu
To install build dependencies:
```

```bash
sudo apt install -y binutils-mips-linux-gnu build-essential git pkgconf python3
```

##### Arch Linux
To install build dependencies:
```

```bash
sudo pacman -S base-devel python
```

Install the following AUR packages:
* [mips64-elf-binutils](https://aur.archlinux.org/packages/mips64-elf-binutils) (AUR)

Expand All @@ -81,11 +85,12 @@ You may also use [Docker](#docker-installation) to handle installing an image wi
For each version (jp/us/eu/sh/cn) for which you want to build a ROM, put an existing ROM at
`./baserom.<VERSION>.z64` for asset extraction.

##### Step 3: Build the ROM
#### Step 3: Build the ROM

Run `make` to build the ROM (defaults to `VERSION=us`).
Other examples:
```

```bash
make VERSION=jp -j4 # build (J) version instead with 4 jobs
make VERSION=eu COMPARE=0 # build (EU) version but do not compare ROM hashes
```
Expand All @@ -106,14 +111,15 @@ With macOS, you may either use Homebrew or [Docker](#docker-installation).

#### Homebrew

#### Step 1: Install dependencies
##### Step 1: Install dependencies
Install [Homebrew](https://brew.sh) and the following dependencies:
```

```bash
brew update
brew install coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils
```

#### Step 2: Copy baserom(s) for asset extraction
##### Step 2: Copy baserom(s) for asset extraction

For each version (jp/us/eu/sh/cn) for which you want to build a ROM, put an existing ROM at
`./baserom.<VERSION>.z64` for asset extraction.
Expand All @@ -122,31 +128,33 @@ For each version (jp/us/eu/sh/cn) for which you want to build a ROM, put an exis

Use Homebrew's GNU make because the version included with macOS is too old.

```
```bash
gmake VERSION=jp -j4 # build (J) version instead with 4 jobs
```

### Docker Installation
#### Docker Installation

#### Create Docker image
##### Create Docker image

After installing and starting Docker, create the docker image. This only needs to be done once.
```

```bash
docker build -t sm64 .
```

#### Build
##### Build

To build, mount the local filesystem into the Docker container and build the ROM with `docker run sm64 make`.

##### macOS example for (U):
```
###### macOS example for (U):
```bash
docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=us -j4
```

##### Linux example for (U):
###### Linux example for (U):
For a Linux host, Docker needs to be instructed which user should own the output files:
```

```bash
docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 --user $UID:$GID sm64 make VERSION=us -j4
```

Expand Down