Difference between revisions of "Installation"

From Mineserver Wiki
Jump to navigation Jump to search
m
===Prerequisites===
===Prerequisites===
−
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
+
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
===General===
 
====Windows====
====Windows====
−
(needs to be filled in)
+
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported). Visual Studio 2008 Express (C++ version) works as well, but you need to create project files manually (for now, until we have a CMake fix)
====Debian and Similar====
====Debian and Similar====
 
  sudo /sbin/ldconfig
  sudo /sbin/ldconfig
 +
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
 +
 +
  change directory to your mineserver src directory
 +
  mkdir libnoise
 +
  cp -R /path/to/libnoise/src/* ./
 +
  make
 +
 +
====BSD Variants====
 +
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
 +
 +
  ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
 +
====Arch Linux====
====Arch Linux====
 
To build the mineserver binary, use the following commands. The output should be very similar to that below.
To build the mineserver binary, use the following commands. The output should be very similar to that below.
−
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
+
  # Run cmake to generate makefile
−
+
  user@workstation:~/mineserver$ cmake .
−
# Change to the source directory
+
# Run make all to build the binary
−
user@workstation:~/mineserver$ cd src
+
user@workstation:~/mineserver/src$ make all
−
# Run make to build the binary
+
(Lots of compile output here)
−
  user@workstation:~/mineserver/src$ make
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o mineserver.o mineserver.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o map.o map.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o chat.o chat.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o commands.o commands.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o config.o config.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o constants.o constants.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o logger.o logger.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o mapgen.o mapgen.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o nbt.o nbt.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o packets.o packets.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o physics.o physics.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o sockets.o sockets.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o tools.o tools.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o user.o user.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o noiseutils.o noiseutils.cpp
 
−
  g++  -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib   -c -o mersenne.o mersenne.cpp
 
−
  g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise  mineserver.o map.o chat.o commands.o
 
−
  config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
 
−
  noiseutils.o mersenne.o   -o mineserver
 
  # Done!
  # Done!
−
user@workstation:~/mineserver/src$
+
# Run make install to move all necessary files to bin
 +
  user@workstation:~/mineserver/src$ make install
If you receive errors referring to missing files like this:
If you receive errors referring to missing files like this:
 
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
−
=====Arch Linux=====
+
=====Arch Linux (This might be outdated?)=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
 
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
 +
 +
==Directory Structure==
 +
 +
{| class="wikitable" style="font-size:90%"
 +
|-
 +
!
 +
! Unix install
 +
! Unix distribution
 +
! Windows
 +
|-
 +
! Install Prefix
 +
| <code>$HOME</code> or <code>~</code>
 +
| <code>/usr</code>
 +
| <code>C:\Program Files\mineserver</code>
 +
|-
 +
! Configuration<sup>1</sup>
 +
| <code>$HOME/.mineserver</code>
 +
| <code>/etc/mineserver</code>
 +
| <code>%AppData%\.mineserver</code>
 +
|-
 +
! Working Directory<sup>2</sup>
 +
| <code>$HOME/.mineserver</code>
 +
| <code>/var/lib/mineserver</code>
 +
| <code>%AppData%\.mineserver</code>
 +
|-
 +
! Binaries
 +
| colspan="2" | <code>$PREFIX/bin</code>
 +
| <code>%PREFIX%\bin</code>
 +
|-
 +
! Plugins
 +
| colspan="2" | <code>$PREFIX/lib/mineserver</code>
 +
| <code>%PREFIX%\bin</code>
 +
|-
 +
! Resources
 +
| colspan="2" | <code>$PREFIX/share/mineserver</code>
 +
| <code>%PREFIX%\share</code>
 +
|-
 +
|}
 +
* <sup>1</sup> Specified through the [[Command Line]] arguments
 +
* <sup>2</sup> Specified in [[Configuration]] file