-
Notifications
You must be signed in to change notification settings - Fork 1
Building Mineserver for Mac Tutorial
This tutorial assumes you have no build software ie. a C++ compiler, git, cmake installed yet.
The objective of this page is to get you up and running with the tools needed to build and run Mineserver 2 in its early development stages.
I'll try to make this as easy as possible (possibly too easy) so if you already have some of the software installed such as Xcode just skip along.
Xcode installs the GNU C++ compiler which is included on the Mac OSX Install DVD. I have OSX 10.6 (Snow Leopard) but the install process should be the same if you are running 10.7 (Lion) or an older version.
- First find your 'Mac OS X Install' DVD.
- If that failed you'll have to download it here: http://developer.apple.com/xcode/ Annoyingly you'll have to get an Apple developer account to sign in get access to the free download link; so it's better if you use the disk and save yourself 2GB ;)
This is a screenshot of my installation DVD
Open the 'Optional Installs' Folder and run Xcode.mpkg
Simply click the 'Continue' button until the install is complete. There are no special options you need to select.
CMake is a clever tool that searches for files to be 'linked' when it comes to the stage of building your mineserver binary file.
- Download cmake-x.x.x.dmg from http://www.cmake.org/cmake/resources/software.html
- Open it and run the cmake.x.x.x.pkg installer.
- We will be using it in the terminal when we are about to compile.
All the source code to Minserver 2 is stored in our GitHub repository where code can be quickly and easily 'cloned' or 'merged' when multiple developers are working on it.
- Download git from http://git-scm.com/
- Same install steps as CMake.
Mineserver currently uses 4 libraries provided by Boost. We have to compile them so that Mineserver will build and run.
- Download boost from http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.bz2/download
- Double click the file so that it extracts in your Downloads folder.
- Open terminal (Applications -> Utilities -> Terminal) and run these commands individually.
The 3rd command will ask for your password because it's installing libraries into your system. It will take a quite a while to complete.
cd ~/Downloads/boost_*
./bootstrap.sh --with-libraries=thread,signals,system,filesystem
sudo ./b2 install
TIP: If you have a processor with multiple cores you can add -j(number of cpu cores) to make it happen faster e.g. sudo ./b2 install -j4
So far you have;
- Installed the C++ compiler (That came with Xcode).
- Installed CMake.
- Installed Git.
Now you can compile the latest bleeding edge source code with these easy commands. For simplicity just your home (~) directory to store mineserver2 (unless you want to put is elsewhere).
cd ~
git clone https://github.com/Mineserver/mineserver2.git
You now have a folder called mineserver2
cd mineserver2
cmake .
make
If no errors appeared all went well! To run Mineserver;
cd bin
./mineserver
Currently there is no config file. All configurations are 'hardcoded'.


