Merge pull request #36 from ahouts/master

Add Docker Support
This commit is contained in:
Matt Kempster 2020-04-19 12:06:42 -07:00 committed by GitHub
commit 9a40d86f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 0 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM ubuntu:18.04 as build
RUN apt-get update && \
apt-get install -y \
binutils-mips-linux-gnu \
bsdmainutils \
build-essential \
libaudiofile-dev \
pkg-config \
python3 \
wget \
zlib1g-dev
RUN wget \
https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb \
-O qemu.deb && \
echo 8170f37cf03a08cc2d7c1c58f10d650ea0d158f711f6916da9364f6d8c85f741 qemu.deb | sha256sum --check && \
dpkg -i qemu.deb && \
rm qemu.deb
RUN mkdir /sm64
WORKDIR /sm64
ENV PATH="/sm64/tools:${PATH}"
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=${VERSION:-us} -j4\n' \
'see https://github.com/n64decomp/sm64/blob/master/README.md for advanced usage'

View File

@ -16,6 +16,33 @@ A prior copy of the game is required to extract the required assets.
## Installation ## Installation
### Docker
#### 1. Copy baserom(s) for asset extraction
For each version (jp/us/eu) that you want to build a ROM for, put an existing ROM at
`./baserom.<version>.z64` for asset extraction.
#### 2. Create docker image
```bash
docker build -t sm64 .
```
#### 3. Build
To build we simply have to mount our local filesystem into the docker container and build.
```bash
# for example if you have baserom.us.z64 in the project root
docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 sm64 make VERSION=us -j4
# if your host system is linux you need to tell docker what user should own the output files
docker run --rm --mount type=bind,source="$(pwd)",destination=/sm64 --user $UID:$UID sm64 make VERSION=us -j4
```
Resulting artifacts can be found in the `build` directory.
### Linux ### Linux
#### 1. Copy baserom(s) for asset extraction #### 1. Copy baserom(s) for asset extraction