Skip to content
luis996 edited this page Aug 25, 2023 · 40 revisions

This page shows you how to build OpenSpades.

Notes

  • Working since 24/08/2023
  • Examples will assume C:\Users\luisa\Desktop/openspades/ is the working directory
  • If you wish just to download the latest dev snapshot, you can go to the Snapshots page
  • Compiling OpenSpades can take quite some time depending on you computer settings
    • You computer may be slowed down during the build procces
    • If this happens, its recommended to leave it alone during the build proccess.

Building for Windows

  • Requeriments
    • Visual Studio 16 2019.
    • CMake Latest version.
    • Powershell 7+
    • Git for Windows.
  • Steps
    • You first grab the source code, by opening Command line in your desktop, then using git.
git init ./openspades
cd openspades
git remote add origin https://github.com/yvt/openspades
git config gc.auto 0
git config --get-all http.https://github.com/yvt/openspades.extraheader
git fetch --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/*
git checkout master
git submodule sync
git submodule update --init --force
  • Bootstrap vcpkg and build the dependencies
vcpkg/bootstrap-vcpkg.bat
vcpkg/vcpkg install @vcpkg_x86-windows.txt
  • Configure application with CMake
mkdir openspades.mk
cd openspades.mk
cmake .. -A Win32 -DCMAKE_BUILD_TYPE=RelWithDebInfo --toolchain C:\users\luisa\desktop/openspades/vcpkg/scripts/buildsystems/vcpkg.cmake -D VCPKG_TARGET_TRIPLET=x86-windows-static
  • Build application with CMake
cmake --build C:\users\luisa\desktop/openspades/openspades.mk --config RelWithDebInfo --parallel 2
  • The build will generate the files to C:\Users\luisa\Desktop/openspades/openspades.mk/bin/RelWithDebInfo/, You will need to copy the assets to the folder, then you are done.
  • This is only an update for compiling for windows, you may want to see README.md instructions if you want to compile for another OS