diff --git a/README.md b/README.md index a62d7fc..2f3c4b7 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,39 @@ WASD = Move Click = Use magic +# Building +The only supported build method is using the CMake
+To build do: +``` +./packdata.sh +cmake . +# or +# cmake -DCMAKE_BUILD_TYPE=Debug . +# or +# cmake -DCMAKE_BUILD_TYPE=Release . +make +``` +The result should be in the build-folder. To run +``` +./saland +``` + +## Building using Docker + +As getting a C++ project with many dependencies to compile can be a daunting task then I have provided a couple of Docker images that can perform a build. Both for Windows and Linux. + +On a fresh checkout you can use: +``` +docker build . -f extra/docker/Dockerfile -t saland_test +``` +and +``` +docker build . -f extra/docker/Dockerfile.WindowsBuild -t saland_test +``` + +The Docker files gives a step by step guide to create a build environment. + + ## Downloads The game is unreleased but Windows nightly builds can be found here: -https://files.poulsander.com/~poul19/public_files/saland/windows_nightly/ +https://files.poulsander.com/~poul19/public_files/saland/windows_nightly/ diff --git a/src/saland.cpp b/src/saland.cpp index 24f061e..2713517 100644 --- a/src/saland.cpp +++ b/src/saland.cpp @@ -411,12 +411,12 @@ void runGame() { int main(int argc, char* argv[]) { PHYSFS_init(argv[0]); - PHYSFS_addToSearchPath((std::string(SHAREDIR)+"/packages/saland-0001.data").c_str(), 1); - PHYSFS_addToSearchPath((std::string(PHYSFS_getBaseDir())+"/packages/saland-0001.data").c_str(), 1); - PHYSFS_addToSearchPath((std::string(PHYSFS_getBaseDir())+"/data").c_str(), 1); + PHYSFS_mount((std::string(SHAREDIR)+"/packages/saland-0001.data").c_str(), nullptr, 0); + PHYSFS_mount((std::string(PHYSFS_getBaseDir())+"/packages/saland-0001.data").c_str(), nullptr, 0); + PHYSFS_mount((std::string(PHYSFS_getBaseDir())+"/data").c_str(), nullptr, 0); std::string savepath = getPathToSaveFiles(); OsCreateSaveFolder(); - PHYSFS_addToSearchPath(savepath.c_str(), 1); + PHYSFS_mount(savepath.c_str(), nullptr, 0); PHYSFS_setWriteDir(savepath.c_str()); boost::program_options::options_description desc("Options"); desc.add_options()