Add instructins for linux in the README

This commit is contained in:
Random06457 2022-03-23 17:11:13 +09:00
parent 7e4fb41f8f
commit 31dcd86d43

View File

@ -50,6 +50,8 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
## Building The Ship of Harkinian
### Windows
1. Install [Python](https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe)
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
@ -68,6 +70,35 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
16. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`.
17. Launch `soh.exe`.
### Linux
```bash
# Clone the repo
git clone git@github.com:HarbourMasters/ShipWright.git
cd ShipWright
# Copy the baserom to the soh folder
cp .../baserom_non_mq.z64 soh
# Build the docker image
sudo docker build . -t soh
# Run the docker image with the working directory mounted to /soh
sudo docker run --rm -it -v $(pwd):/soh soh /bin/bash
```
Inside the Docker container:
```bash
# Clone and build StormLib
git clone https://github.com/ladislav-zezula/StormLib external/StormLib
cmake -B external/StormLib/build -S external/StormLib
cmake --build external/StormLib/build
cp external/StormLib/build/libstorm.a external
cp /usr/local/lib/libGLEW.a external
cd soh
# Extract the assets/Compile the exporter/Run the exporter
make setup -j$(nproc)
# Compile the code
make -j $(nproc)
```
## Troubleshooting The Exporter
- Affirm that you have an `/assets` folder filled with XMLs in the same directory as OTRGui.exe
- Affirm that `zapd.exe` exists in the `/assets/extractor` folder