-
Notifications
You must be signed in to change notification settings - Fork 20
Building
This page is for people who want to build FallingSandSurvival from the source code themselves.
Automatic builds for Windows x64 and Linux x64 can be found here.
If these steps don't work for you, please open an issue.
(click to expand)
Note: using Git Bash for Windows: https://gitforwindows.org/Run the setup script, which will guide you through setting up the required and optional tools+libraries:
sh setup.sh
Install the Conan Extension for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
Open the .sln in Visual Studio 2019.
Right click on the solution and click "Retarget solution"
This will open a popup with a dropdown, where you should select the version you have installed and click "OK"
Right click on the project and click "Properties"
In the top right, click "Configuration Manager"
Set the "Active solution configuration":
"Debug" allows the use of Visual Studio's debugging tools, but disables some compiler optimizations
"Release" has full compiler optimization, but debugging tools don't work as well.
Set the "Active solution platform":
"x64" builds a 64-bit executable (you should use x64 by default)
"x86" builds a 32-bit executable
Right click the project and click "Install (Current Project)" (should be the first thing in the right-click menu).
If you don't have this option, then you didn't install the Conan Extension for Visual Studio like I said before: https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
This will build/install all of the Conan libraries (this may take 5+ minutes).
(You can monitor its progress by clicking on the "Output" tab on the bottom and switching "Show output from:" to "Conan")
If you don't have the "Output" window visible, open it in View->Output (Ctrl+Alt+O by default)
When it's done, there should be a line (bottom or second to bottom) that says something like:
[Conan.VisualStudio] Conan has succsessfully installed configuration 'Architecture: ###, build type: #####, ...
Note that if you change the active configuration (Debug/Release, x86/x64), you will need to re-run Conan.
Right click the project and click "Build" to build the project (it should succeed).
(You can monitor its progress by clicking on the "Output" tab on the bottom and switching "Show output from:" to "Build")
If you don't have the "Output" window visible, open it in View->Output (Ctrl+Alt+O by default)
Once the build succeeds, in the top toolbar click "Debug" -> "Start Debugging" (F5 by default) to run the program.
(click to expand)
Note: using Git Bash for Windows: https://gitforwindows.org/ ### Setup `sh setup.sh`cmake -B build -G "Visual Studio 15 2017 Win64"
cd build/
cmake --build . --config Release
The exe should be located at {repo root}/{PLATFORM}/{CONFIG}/FallingSandSurvival.exe
(for example, {repo root}/x64/Release/FallingSandSurvival.exe
).
In order to run it, you will need to copy the assets/
, data/
, and gamedir/
folders (found at {repo root}/FallingSandSurvival/
) next to the exe, as well as the needed .dlls
, which can be found at {repo root}/FallingSandSurvival/lib/bin/{PLATFORM}/
(click to expand)
sh setup.sh
Install extra system deps that conan can't install
See: https://github.com/bincrafters/community/projects/37
sudo apt-get install -y libgl-dev xorg-dev libx11-xcb-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libjack-jackd2-0 libjack-jackd2-dev
cd build/
cmake ..
cmake --build . --config Release
cmake --build . --config Release -- -j 4
The binary file should be located at {repo root}/build/FallingSandSurvival/FallingSandSurvival
.
In order to run it, you will need to copy the assets/
, data/
, and gamedir/
folders (found at {repo root}/FallingSandSurvival/
) next to the binary.
The binary is set up so it should automatically find the needed .so
files in the dev environment, but if not they can be found at {repo root}/FallingSandSurvival/lib/FMOD/lib/{PLATFORM}/
and {repo root}/FallingSandSurvival/lib/FMOD_studio/lib/{PLATFORM}/
, and should be placed in a folder called "lib" next to the binary.