summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalkierian <malkierian@gmail.com>2024-10-28 00:02:04 -0700
committerGitHub <noreply@github.com>2024-10-28 00:02:04 -0700
commit1df91890fe187b98f78d46b49b54f585c62e8c16 (patch)
treec9c2c70121f4614f668fa53435a1806a6e46fbfb /docs
parentd6ebed59dc7ed8a2c29f2304147e8c11b5c98f7f (diff)
Windows Build Assets Tweak (#4486)
* Change CMake process to copy assets necessary for OTR creation to VS run directory. Remove reference to ExtractAssets target from Windows build instructions. * Unify build instructions where appropriate across PC platforms. Clarify commented parts of some commands. * PR feedback.
Diffstat (limited to 'docs')
-rw-r--r--docs/BUILDING.md86
1 files changed, 50 insertions, 36 deletions
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index aa44f3e44..a95dbc31e 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -22,7 +22,7 @@ It is recommended that you install Python and Git standalone, the install proces
_Note: Be sure to either clone with the ``--recursive`` flag or do ``git submodule update --init`` after cloning to pull in the libultraship submodule!_
-2. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice
+2. After setup and initial build, use the built-in OTR extraction to make your oot.otr/oot-mq.otr files.
_Note: Instructions assume using powershell_
```powershell
@@ -30,22 +30,17 @@ _Note: Instructions assume using powershell_
cd Shipwright
# Setup cmake project
-& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
-# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # --config Release (if you're packaging)
-# Compile project
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging)
-
-# Now you can run the executable in .\build\x64
+# Add `-DCMAKE_BUILD_TYPE:STRING=Release` if you're packaging
+& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64
-# If you need to clean the project you can run
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean
+# Generate soh.otr
+& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target GenerateSohOtr
-# If you need to regenerate the asset headers to check them into source
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssetHeaders
+# Compile project
+# Add `--config Release` if you're packaging
+& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64
-# If you need a newer soh.otr only
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target GenerateSohOtr
+# Now you can run the executable in .\build\x64 or run in Visual Studio
```
### Developing SoH
@@ -76,6 +71,19 @@ cd "build/x64"
& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP
```
+### Additional CMake Targets
+#### Clean
+```powershell
+# If you need to clean the project you can run
+C:\Program Files\CMake\bin\cmake.exe --build build-cmake --target clean
+```
+
+#### Regenerate Asset Headers
+```powershell
+# If you need to regenerate the asset headers to check them into source
+C:\Program Files\CMake\bin\cmake.exe --build build-cmake --target ExtractAssetHeaders
+```
+
## Linux
### Install dependencies
#### Debian/Ubuntu
@@ -124,13 +132,16 @@ cd Shipwright
git submodule update --init
# Generate Ninja project
-cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging) -DPython3_EXECUTABLE=$(which python3) (if you are using non-standard Python installations such as PyEnv)
+# Add `-DCMAKE_BUILD_TYPE:STRING=Release` if you're packaging
+# Add `-DPython3_EXECUTABLE=$(which python3)` if you are using non-standard Python installations such as PyEnv
+cmake -H. -Bbuild-cmake -GNinja
# Generate soh.otr
cmake --build build-cmake --target GenerateSohOtr
# Compile the project
-cmake --build build-cmake # --config Release (if you're packaging)
+# Add `--config Release` if you're packaging
+cmake --build build-cmake
# Now you can run the executable in ./build-cmake/soh/soh.elf
# To develop the project open the repository in VSCode (or your preferred editor)
@@ -153,11 +164,9 @@ cpack -G External (creates appimage)
# If you need to clean the project you can run
cmake --build build-cmake --target clean
```
-
#### Regenerate Asset Headers
```bash
# If you need to regenerate the asset headers to check them into source
-cp <path to your ROM> OTRExporter
cmake --build build-cmake --target ExtractAssetHeaders
```
@@ -172,32 +181,24 @@ _Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplac
# Clone the repo
git clone https://github.com/HarbourMasters/Shipwright.git
cd ShipWright
+
# Clone the submodule libultraship
git submodule update --init
-# Copy the baserom to the OTRExporter folder
-cp <path to your ROM> OTRExporter
+
# Generate Ninja project
-cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging)
-# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
-cmake --build build-cmake --target ExtractAssets
-# Compile the project
-cmake --build build-cmake # --config Release (if you're packaging)
+# Add `-DCMAKE_BUILD_TYPE:STRING=Release` if you're packaging
+cmake -H. -Bbuild-cmake -GNinja
-# Copy oot.otr into the Application Support directory
-cp build-cmake/soh/oot.otr ~/Library/Application\ Support/com.shipofharkinian.soh/
+# Generate soh.otr
+cmake --build build-cmake --target GenerateSohOtr
+
+# Compile the project
+# Add `--config Release` if you're packaging
+cmake --build build-cmake
# Now you can run the executable file:
./build-cmake/soh/soh-macos
# To develop the project open the repository in VSCode (or your preferred editor)
-
-# If you need to clean the project you can run
-cmake --build build-cmake --target clean
-
-# If you need to regenerate the asset headers to check them into source
-cmake --build build-cmake --target ExtractAssetHeaders
-
-# If you need a newer soh.otr only
-cmake --build build-cmake --target GenerateSohOtr
```
### Generating a distributable
@@ -209,6 +210,19 @@ cd build-cmake
cpack
```
+### Additional CMake Targets
+#### Clean
+```bash
+# If you need to clean the project you can run
+cmake --build build-cmake --target clean
+```
+
+#### Regenerate Asset Headers
+```bash
+# If you need to regenerate the asset headers to check them into source
+cmake --build build-cmake --target ExtractAssetHeaders
+```
+
## Switch
1. Requires that your build machine is setup with the tools necessary for your platform above
2. Requires that you have the switch build tools installed