Difference between revisions of "Installation"
Line 81: | Line 81: | ||
by running the following commands (As root) in a terminal window: | by running the following commands (As root) in a terminal window: | ||
− | apt-get install build-essential | + | apt-get install build-essential autoconf automake libtool libjpeg-dev libpng12-dev libvorbis-dev libglu1-mesa-dev libopenal-dev libsdl2-dev libbullet-dev |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Building on Windows === | === Building on Windows === | ||
Line 96: | Line 89: | ||
=== Building the Bullet physics library === | === Building the Bullet physics library === | ||
+ | ''If you're building Osirion on Ubuntu(or any other Debian-based distro), Bullet packages have been added to the official repositories, and you might not need to follow this step.'' | ||
The engine uses the [http://www.bulletphysics.com/ Bullet Physics library] for physics support. You can download the bullet source code here: | The engine uses the [http://www.bulletphysics.com/ Bullet Physics library] for physics support. You can download the bullet source code here: | ||
Revision as of 19:17, 21 March 2016
While there is still a lot of work to be done before there will be a final release of the game, there are packages with development builds available to serve as a platform for developers and contributers, or for those who are just curious about the current state of affairs.
The package are usually lagging somewhat behind on actual development. If you feel courageous you can download the latest and greatest development revision from the subversion repository and build your own binaries.
Contents
Installing the latest release
The quickest and easiest way to install Project::OSiRiON is by downloading the most recent development release. In general, you will need to download and extract two packages: one packages with binaries for your operating system (the exe files), and the package with the game data (textures, sounds, models, ...).
Windows
First of all you need to download the exe files. There's a package for 32-bit windows and a package for 64-bit windows, you only need to download one of them. If you don't know which one to pick, the 32-bit is a safe choice, as it will also work on 64-bit windows systems.
- Windows 32-bit: osirion-latest-win32.zip
- Windows 64-bit: osirion-latest-win64.zip
Unzip the package to an approriate location, a new folder will automaticly be created.
Next you will have to download the game data.
- Game data: osirion-latest-data.zip
Unzip the game data into the Project::Osirion directory, a new subfolder data will be created. The file Osirion.exe and the data subfolder should end up in the same folder.
Click on Osirion.exe to start the game.
Linux
To run the game, you will need to have SDL installed. This is a fairly common library and chances are high you already have it installed. Besides SDL, you will need working OpenGL drivers. The package contains both 32-bit and 64-bit binaries.
- Linux 32-bit and 64-bit: osirion-latest-linux.tar.bz2
Extract the binaries to a suitable location, for example, /usr/local/games. A new directory called osirion-version-linux will automaticly be created. (The actual directory name depend on the version number).
cd /usr/local/games sudo tar jxvf /where/you/downloaded/osirion-latest-linux.tar.bz2 cd osirion-version-linux
Download the game data.
- Game data: osirion-latest-data.zip
Extract it into the osirion directory. A new subdirectory data will be created.
sudo unzip /where/you/downloaded/osirion-latest-data.zip
To run the 32-bit version:
./osirion.x86
To run the 64-bit version:
./osirion.x86_64
Building Prerequisites
To build Project::OSiRiON from source code you need a working C++ compiler and have the necessary libraries and header files installed. The official binaries are compiled with gcc on linux, and mingw on windows.
Dependencies
The following packages are required to build the the dedicated server:
- zlib
- Bullet physics library
- ncurses or pdcurses (optional)
Additionally, the client requires:
- libjpeg
- libpng
- libSDL 1.2
- OpenGL
- OpenAL or OpenAL Soft
- Ogg Vorbis
You will also need gcc, GNU make, automake and libtool.
Building on Ubuntu
To build the game on Ubuntu, you can install the required tools and dependencies by running the following commands (As root) in a terminal window:
apt-get install build-essential autoconf automake libtool libjpeg-dev libpng12-dev libvorbis-dev libglu1-mesa-dev libopenal-dev libsdl2-dev libbullet-dev
Building on Windows
You can build the game on windows using a MinGW/MSYS environment. You can use the instructions in this document to create a complete environment, capable of building the Project::OSiRiON source code. You need to install the base system described in part one, and the following packages described in part two: pkg-config, DirectX development files, zlib, SDL, libpng, libjpeg, OpenAL Soft, libogg, libvorbis, pdcurses and bullet.
Building the Bullet physics library
If you're building Osirion on Ubuntu(or any other Debian-based distro), Bullet packages have been added to the official repositories, and you might not need to follow this step. The engine uses the Bullet Physics library for physics support. You can download the bullet source code here:
To download and install the library:
wget http://bullet.googlecode.com/files/bullet-2.81-rev2613.tgz tar zxvf bullet-2.81-rev2613.tgz cd bullet-2.81-rev2613 ./autogen.sh ./configure --prefix=/usr/local --disable-demos make sudo make install cd ..
If you do not want to install bullet in /usr/local, you can edit the --prefix option here. Edit the the --with-bullet option when configuring the Project::OSiRiON source code accordingly.
It is recommended you use this specific version of the library, physics behaviour could be different in other versions.
Building from source code
Obtaining the source code
You can get the latest source code from the subversion repository:
On linux, you can use the Subversion command line client tool. The following command will create a new subdirectory osirion and download the source code into it.
svn co svn://osirion.org/osirion osirion
Enter the new subdirectory:
cd osirion
On windows, you can use Turtoisesvn to access the SVN repositories. You can download it here:
You can also download the source package from the website:
Obtaining the game data
Get the latest game data from the subversion repository:
The following command will create a new subdirectory data and download the game data into it:
svn co svn://osirion.org/osirion-data data
You can also download the game data from the website:
The data subdirectory should be inside the osirion directory.
Configuring the source code
Create the configure script:
autoreconf -i
Run the script to configure the source code:
./configure --with-bullet=/usr/local --enable-static-bullet
If you do not need the client and want to build the dedicated server only you can pass the --without-client option to configure:
./configure --with-bullet=/usr/local --enable-static-bullet --without-client
If configure finds ncurses or pdcurses, the dedicated server will use this library and a have a curses console. To disable curses detection, pass the --without-curses option to configure.
./configure --with-bullet=/usr/local --enable-static-bullet --without-client --without-curses
You can use the --help option to get a list of all available options:
./configure --help
Building the binaries
Compile the source code:
make
The binaries will be built in the src subdirectory of the main distribution.
Important: make install is not supported. Results are unpredictable.
Running
The client and the dedicated server will look for game data in the data subdirectory of the current working directory. Since the binaries have been built in the src subdirectory, you will have start them with the src/ prefix.
To start the client:
src/osirion
If the client opens a new window and immediatly close it again, it probably could not find the game data and exited. Check your installation.
To start the dedicated server:
src/osiriond
If you are using windows, the binaries will be called osirion.exe and osiriond.exe.
Updating
If you used the subversion repository to build the game, there is no need to re-download the entire distribution when there are updates available. You can update your local copy and rebuild it.
Update the source code:
cd osirion make clean svn update
Update the game data:
cd data svn update cd ..
Build the binaries again:
autoreconf ./configure make
Source data
There is a seperate SVN repository with files that are used to create game data, but are not necessary to run the game. These files include blender models, gimp files and scalable vector graphics. You do not need these filese of you want to try the game or run a dedicated server, but they can be of interest to contributers.
To download the source data subversion repository:
svn checkout svn://osirion.org/osirion-data-src data-src