summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorArchez <Archez@users.noreply.github.com>2024-11-09 21:15:10 -0500
committerGitHub <noreply@github.com>2024-11-09 20:15:10 -0600
commit449a2ebc70d12a7f5c01d6833100435af152ee6c (patch)
treea38b0e2ee32670ef60081145e17e9ae8184c39fe /docs
parentbe70a5a1236c0b7ef309cc239432fd61d7634f6b (diff)
Archive version checking and regeneration (#822)
* Add archive version checking and regeneration * update building docs and copy assets for visual studio
Diffstat (limited to 'docs')
-rw-r--r--docs/BUILDING.md81
1 files changed, 49 insertions, 32 deletions
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index 8f6c7ec2e..34775cdd2 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 O2R extraction to make your mm.o2r file.
_Note: Instructions assume using powershell_
```powershell
@@ -30,22 +30,17 @@ _Note: Instructions assume using powershell_
cd 2ship2harkinian
# 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 2ship.o2r
+& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target Generate2ShipOtr
-# 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 2ship.o2r only
-& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target Generate2ShipOtr
+# Now you can run the executable in .\build\x64 or run in Visual Studio
```
### Developing 2S2H
@@ -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 2ship2harkinian
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 2ship.o2r
cmake --build build-cmake --target Generate2ShipOtr
# 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/mm/2s2h.elf
# To develop the project open the repository in VSCode (or your preferred editor)
@@ -157,7 +168,6 @@ 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
```
@@ -174,27 +184,21 @@ git clone https://github.com/HarbourMasters/2ship2harkinian.git
cd 2ship2harkinian
# 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
+# Add `-DCMAKE_BUILD_TYPE:STRING=Release` if you're packaging
+cmake -H. -Bbuild-cmake -GNinja
+
+# Generate 2ship.o2r
+cmake --build build-cmake --target Generate2ShipOtr
+
# 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 file:
./build-cmake/mm/2s2h-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 2ship.o2r only
-cmake --build build-cmake --target Generate2ShipOtr
```
### Generating a distributable
@@ -206,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
+```
+
# Compatible Roms
See [`supportedHashes.json`](supportedHashes.json)