-
Notifications
You must be signed in to change notification settings - Fork 19
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.
WARNING: the build system seems to just break on its own over time, it's pretty likely it has broken since I last updated this.
If these steps don't work for you, please open an issue.
(click to expand)
For this guide, I'm using Git Bash for Windows: https://gitforwindows.org
You will need to run bash files so either use that or figure out some other way.
You also need to install CMake in order for Conan to set up the libraries:
https://cmake.org/download/
MAKE SURE TO CHECK "Add CMake to system path" IN THE INSTALLER
Also note that if you install CMake while Visual Studio is open, you have to restart Visual Studio for it to see CMake.
You will also need Visual Studio (Community) 2019.
2017 should probably also work.
First, clone the repo:
git clone https://github.com/PieKing1215/FallingSandSurvival.git
CD into the directory where it was cloned and switch to the branch that you want.
Use 'dev' for the active development version.
Use 'master' for the latest stable version (note: as of now, there is no stable version so you should use 'dev').
cd FallingSandSurvival/
git checkout dev
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)
For this guide, I'm using Git Bash for Windows: https://gitforwindows.org
You will need to run bash files so either use that or figure out some other way.
You also need to install CMake in order for Conan to set up the libraries:
https://cmake.org/download/
MAKE SURE TO CHECK "Add CMake to system path" IN THE INSTALLER
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
(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
OR instead you can do this to have it run on 4 threads (or however many you want):
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.