mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-03-11 07:30:19 -04:00
Update BUILDING.md (#4029)
This commit is contained in:
parent
0f43d5de2d
commit
fb29c827ad
@ -123,34 +123,27 @@ zypper in clang libstdc++-devel git cmake ninja SDL2-devel libpng16-devel libzip
|
|||||||
_Note: If you're using Visual Studio Code, the [CMake Tools plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._
|
_Note: If you're using Visual Studio Code, the [CMake Tools plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repo
|
# Clone the repo and enter the directory
|
||||||
git clone https://github.com/HarbourMasters/Shipwright.git
|
git clone https://github.com/HarbourMasters/Shipwright.git
|
||||||
cd Shipwright
|
cd Shipwright
|
||||||
|
|
||||||
# Clone the submodules
|
# Clone the submodules
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
# Copy the baserom to the OTRExporter folder
|
|
||||||
cp <path to your ROM> OTRExporter
|
|
||||||
# Generate Ninja project
|
# 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)
|
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)
|
||||||
# Extract assets & generate OTR (run this anytime you need to regenerate OTR)
|
|
||||||
cmake --build build-cmake --target ExtractAssets
|
# Generate soh.otr
|
||||||
|
cmake --build build-cmake --target GenerateSohOtr
|
||||||
|
|
||||||
# Compile the project
|
# Compile the project
|
||||||
cmake --build build-cmake # --config Release (if you're packaging)
|
cmake --build build-cmake # --config Release (if you're packaging)
|
||||||
|
|
||||||
# Now you can run the executable in ./build-cmake/soh/soh.elf
|
# 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)
|
# 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
|
### Generate a distributable
|
||||||
After compiling the project you can generate a distributable by running of the following:
|
After compiling the project you can generate a distributable by running of the following:
|
||||||
```bash
|
```bash
|
||||||
# Go to build folder
|
# Go to build folder
|
||||||
@ -161,6 +154,20 @@ cpack -G ZIP
|
|||||||
cpack -G External (creates appimage)
|
cpack -G External (creates appimage)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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
|
||||||
|
cp <path to your ROM> OTRExporter
|
||||||
|
cmake --build build-cmake --target ExtractAssetHeaders
|
||||||
|
```
|
||||||
|
|
||||||
## macOS
|
## macOS
|
||||||
Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake` (can be installed via homebrew, macports, etc)
|
Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake` (can be installed via homebrew, macports, etc)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user