Skip to content
Fireball edited this page Jan 21, 2022 · 53 revisions

Clone

git clone --recursive https://github.com/beyond-all-reason/spring -b BAR105 spring

cd spring

If you cloned before without --recursive, you can apply --recursive with

git submodule update --init --recursive

MSVC - x64

git clone https://github.com/spring/vclibs64 vclibs64

MSVC - x32

git clone https://github.com/spring/vclibs14 vclibs

  • Dont change path name of vclibs64/vclibs or cmake won´t find the libs

Dependencies

Env variables

Add to permanent variables in Windows settings (or [advanced] use script to set them up each time the engine is launched)

  • set SPRING_DATADIR=<place to where your content root is>
  • set SPRING_WRITEDIR=<place to where your content root is>

E.g. your spring maps are at E:\spring\maps, <place to where your content root is> should be E:\spring
Note set is only needed if you launch from script, Windows environment variables dialog needs no set

Building

  • cmake-gui . choose win32 or x64 depending on which vclibs you chose above

  • Pick the build dir separate from the main spring dir (for example spring/build-msvc-x32)

  • In the options disable sound (NO_SOUND = ON), disable AI (AI_TYPES = NONE), BUILD_BITS = 32 (if it's 64 you likely didn't choose MSVC 2019 (x32) two steps above).

  • Press Configure, Generate, Open Project

  • Apply hacks https://github.com/beyond-all-reason/spring/wiki/Common-MSVC-gotchas

  • Build engine-legacy from the projects list, set it startup default

  • Copy *.dll from vclibs14/dll into the builddir (Debug/Release/etc)

  • Copy unitsync.dll from somewhere or just create an empty file in the builddir (Debug/Release/etc)*

  • Launch the engine right from the debugger (MSVC environment variables (as set from the debugger menu) are broken, use some .bat script to set env variables (in case not set globally) and launch spring.exe