Skip to content
luis996 edited this page Jan 27, 2024 · 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 the shown OS, you may want to see README.md instructions if you want to compile for another OS
  • Posdata 26/01/2024, if VCPKG Fails to download with error 1, try to cd to vcpkg then run "git pull origin master", "./vcpkg update", cd.. and re-bootstrap.