Open source version of Notrium.
Notrium is a top-down survival game originally developed by Ville Mönkkönen.
Join the chat at https://gitter.im/verhoevenv/OpenNotrium
- SDL 2.0
- SDL_mixer 2.0
- SDL_image 2.0
- CMake for building
How to build - Linux
Underneath, Ubuntu is assumed. This probably only affects the package manager,
apt-get. Please refer to the documentation of your own distro if you are not sure how to execute the following steps.
We will also assume you have the OpenNotrium source files checked out in
sudo apt-get install cmake
sudo apt-get install build-essential libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libphysfs-dev
Go to the OpenNotrium source directory and create a new directory for build output
cd ~/OpenNotrium mkdir build cd build
From this new directory, let cmake generate the Makefile. CMake should end with a message about build files being written. Fix any errors before continuing!
Build OpenNotrium. This also shouldn't produce any errors. A few warnings is fine.
You should have the executable OpenNotrium in your build directory. We will create a seperate directory from which to run the program. We also need the runtime files there.
cd .. mkdir out cp build/OpenNotrium out cp -r runtime_files/* out
cd out ./OpenNotrium
How to build - Mac
We highly suggest using a package manager for Mac, either fink, MacPorts or Homebrew. Underneath Homebrew is used.
Get XCode command line tools running
You should search online for this. It involves registering an Apple developer account, downloading XCode, and installing the command line tools from there.
brew install cmake
brew install sdl2 sdl2_mixer physfs
Follow Linux guidelines from step 3 onwards.
How to build - Windows - Visual Studio
These instructions have been tested on Visual Studio Community 2013 and 2015, which are both free to download. Other versions of Visual Studio might or might not work, but the instructions below should still apply. Alternatively, it might be possible to use MinGW to build OpenNotrium, if you manage to do so, please let us know!
Find it from the website.
Physfs doesn't provide binaries on Windows. Google, download and unpack. Then, follow the instructions they provide in INSTALL.txt, which is mainly to use CMake.
Place the created libraries in the physfs directory, under a
libsubdirectory. That is where CMake expects to find them
Make sure to get the VS-development archives. It is highly recommended to unpack the libraries to the same directory, this helps with the next steps.
Create environment variables for the libraries so CMake can find them. You can do this by typing the below in a command prompt. Alternatively, use the control panel. Set the paths to where you unpacked.
setx SDL2DIR c:\SDL2 setx PHYSFSDIR c:\physfs
Create a project file using CMake
Similar to steps 3 and 4 under the Linux howto: mkdir build cd build :: to build with VS2013: cmake .. -G "Visual Studio 12" :: to build with VS2015: cmake .. -G "Visual Studio 14" Alternatively, use cmake-gui:
- Where is the source code: browse to where you placed the OpenNotrium sources
- Where to build the binaries: copy-paste the above, add
/buildto it to build in a subdirectory
Configure. Select your preferred option for any dialog the pops up.
- The messages at the bottom should end with
Configuring done, and the configuration options above should be filled out with proper paths. If not, fix errors. Probably your environment variables aren't set up properly, or the physfs libs aren't in a
Build OpenNotrium by opening the Visual Studio solution file (under the /build subdirectory) and doing a build. If you want an optimized executable, make sure the "Release" target is set. For development purposes, the "Debug" target is ok.
Create a new directory named
outunder the OpenNotrium source directory. Copy both the executable (should be under
build\Debug\OpenNotrium.exe) and the contents of
Search the library directories for any necessary
.dllfiles, and copy these to the new
outdirectory. This may depend on your system, but you might want the x86 versions of: