mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
4.4 KiB
4.4 KiB
Building Ghostship
Setting Up CubeOS
- Clone the CubeOS repository and follow the build instructions.
- Run the executable passing the path to your ROM as an argument.
- You should now have a smcube.otr in the root folder of the repository, which will be needed when running this application.
Windows
Requires:
- Visual Studio 2022 Community Edition with the C++ feature set
- One of the Windows SDKs that comes with Visual Studio, for example the current Windows 10 version 10.0.19041.0
- The
MSVC v142 - VS 2019 C++ build toolscomponent of Visual Studio - Git (can be installed manually or as part of Visual Studio)
- Cmake (can be installed via chocolatey or manually)
Clone the Ghostship repository
Note: Be sure to either clone with the --recursive flag or do git submodule update --init after cloning to pull in the libultraship submodule!
Building Ghostship
Note: Instructions assume using powershell
# Navigate to the Ghostship repo within powershell. ie: cd "C:\yourpath\Ghostship"
cd Ghostship
# Setup cmake project
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Debug
# or for VS2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Debug
# Compile project
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging)
# If you need to clean the project you can run
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean
#### Visual Studio
To develop using Visual Studio you only need to use cmake to generate the solution file:
```powershell
# Generates Ghostship.sln at `build/x64` for Visual Studio 2022
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64
# or for Visual Studio 2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64
Running the executable
- Copy over the smcube.otr you have generated into the directory containing your executable, e.g.
.\build\x64\Debug - Download the latest
sm64.otrfrom the pins in the discord channel and place that in the same directory as you smcube.otr - Now you can run the executable directly or from Visual Studio
Linux
Requires gcc >= 10, x11, sdl2 >= 2.0.22, libpng, ninja, cmake, lld
Important: For maximum performance make sure you have ninja build tools installed!
Note: If you're using Visual Studio Code, the cpack plugin makes it very easy to just press run and debug.
Building Ghostship
# Clone the repo
git clone https://github.com/HarbourMasters/Ghostship.git
cd Ghostship
# Clone the submodule libultraship
git submodule update --init
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE= Debug
# Compile the project
cmake --build build-cmake
# If you need to clean the project you can run
cmake --build build-cmake --target clean
Running the executable
- Copy over the smcube.otr you have generated into the root directory if the repository
- Download the latest
sm64.otrfrom the pins in the discord channel and place that in the build directory, e.g../build-cmake - Now you can run the executable directly or from Visual Studio Code
macOS
Requires Xcode (or xcode-tools) && ninja, cmake (can be installed via homebrew, macports, etc)
Important: For maximum performance make sure you have ninja build tools installed!
Note: If you're using Visual Studio Code, the cpack plugin makes it very easy to just press run and debug.
Building Ghostship
# Clone the repo
git clone https://github.com/HarbourMasters/Ghostship.git
cd Ghostship
# Clone the submodule libultraship
git submodule update --init
# Generate Ninja project
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
# Compile the project
cmake --build build-cmake
# If you need to clean the project you can run
cmake --build build-cmake --target clean
Running the executable
- Copy over the smcube.otr you have generated into the root directory if the repository
- Download the latest
sm64.otrfrom the pins in the discord channel and place that in the build directory, e.g../build-cmake - Now you can run the executable directly or from Visual Studio Code