Select your OS and compiler:
Building PS:
Source Dates
Working Directory
Install Tools
Download Sources
Compile Sources
Get PS Art
Setup Server (optional)
Mini Scripts (optional)
Mounting External Art (optional)
Getting Help
Currently compatible with Laanx:
PS CVS date: PS_SOURCE_DATE
CS SVN revision: CS_SOURCE_REV
CEL SVN revision: CEL_SOURCE_REV
/home/user/development/
c:\development\
We have no Mac guide at this time... go poke dfryer. ;)
/c/development/
We will place our source checkouts in sub-dirs named cs, cel, planeshift, etc.
This step is necessary if you are using VC8 Express Edition.
You should download and install the Platform SDK at this location:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Remember to follow all the listed steps to get things working; include the needed dirs and edit corewin_express.vsprops as indicated.
The MinGW package contains the compiler, header and lib files.
The MSYS package contains the shell and make utility.
The MSYSDTK package contains autoconf, automake, libtool, autogen, guile, cvs,
openssl, openssh, inetutils, perl and vim.
Because autoconf and automake will be outdated, we will manually update them.
Also, With MinGW version 4.1.0.0, some of the BinUtils included are broken by default so we're fixing that.
First, we'll get MinGW and a few necessary dependencies.
Note: These are the minimum required packages for the MinGW build.
Go here: http://prdownloads.sourceforge.net/mingw/ and fetch:
MinGW [bin] MinGW-4.1.0.exe
MSYS [bin] MSYS-1.0.10.exe
MSYS DTK [bin] msysDTK-1.0.1.exe
GDB [bin] gdb-5.2.1-1.exe (Optional)
MSYS Autoconf [bin] msys-autoconf-2.59.tar.bz2
MSYS Automake [bin] msys-automake-1.8.2.tar.bz2
BinUtils [bin] binutils-2.16.91-20060119-1.tar.gz
Run the exe files in the order they were downloaded to install the compiler and unzip the conf/make utilities in c:\msys\1.0\.
Then unzip the BinUtils to the c:\mingw directory.
This allows MSYS to setup the MinGW paths correctly.
The installation program should also add an icon for MSYS to your start menu.
Click the "MSYS" icon and it should open up a shell window. Type "exit" to close the shell window again.
Download the following dependencies from the same site, but do not install these yet. Their install instructions are included:
Create and place these dependencies into /usr/src. Also, create the /usr/local directory.
freetype-2.1.9-mingwPORT.tar.bz2
jpeg-6b-mingwPORT.tar.bz2
zlib-1.2.3-mingwPORT.tar.bz2
wget-1.9.1-mingwPORT.tar.bz2
Rather than having to install CS dependant components manually, Microsoft Visual C++, MinGW/MSYS, and Cygwin users can download a single package which contains all common headers, pre-built library files, and dynamic link libraries in pre-compiled form from the Crystal Space website.
The latest version is available at: http://crystalspace3d.org/support/win32/
The currently used CS revision needs version 21; newer CS is needed for version 22. Don't mix up the versions!
Run the program and install the libraries. The Default name is fine. When it asks you for the CS directory, enter C:\development\CS When you have to select the components window you can select from the menu which kind of installation you prefer. Be sure that you are installing both DirectX 9 headers and libraries files (there should be a check box that you have to check). Continue the installation. If this is your first time (and you do not yet have an SVN checkout) uncheck 'Copy DLL's to CS directory' when prompted, otherwise check the box and set the dir to c:\development\cs. To copy the files later, do so via the option in the created start menu folder.
Right-Click My Computer on your desktop and choose Properties. Under Advanced choose Environmental Variables. Click New under either User or System variables depending on how you want it setup. If you choose System, you will have to log off to make the changes.
Variable Name: CRYSTAL (all caps)
Variable Value: C:\development\cs
Variable Name: CEL (all caps)
Variable Value: C:\development\cel
Before compiling each time in MinGW, you will also need to enter at the MSYS prompt:
You will need a tool called Jam. Jam is a replacement for make. It's a bit easier to maintain and create custom builds. If you do not already have Jam, you can find it at ftp://ftp.perforce.com/pub/jam/ - install it system wide.
To build the updater, you need the libcURL library. This is library that is used for HTTP protocol. It is what the updater application uses to update the client. It can be obtained at http://curl.haxx.se/.
You will also need a CVS client. Depending on your linux distribution, it may already be installed. If it is not, this should be obtained from your package manager or Linux distribution's website.
CS and CEL use SVN for their source repositories, so you'll need that too.
You can find the software at: http://subversion.tigris.org/
A GUI is available at: http://esvn.umputun.com/
If you want to download the updates from the server, this is required.
To build the updater, you will need to build cURL first, as MinGW does not have a compatible libcURL library available for download.
This is the library that is used for the HTTP protocol. It is what the updater application uses to update the client.
It can be obtained at http://curl.haxx.se/.
Since you are building cURL, go ahead and get the latest version available.
Do not get a binary. For this example, we will be using curl-7.15.5.tar.bz2. Place the file in /usr/src.
Make sure to read all the available support options available for cURL.
The updater only uses a small subset of them, but feel free to install
more if you have other uses for it.
curl version: 7.15.5
Host setup: i686-pc-mingw32
Install prefix: /usr/local
Compiler: gcc
SSL support: no (--with-ssl / --with-gnutls)
zlib support: enabled
krb4 support: no (--with-krb4*)
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
c-ares support: no (--enable-ares)
ipv6 support: no (--enable-ipv6)
IDN support: no (--with-libidn)
Build libcurl: Shared=yes, Static=yes
Built-in manual: no (--enable-manual)
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
ca cert path: no
To build the updater, you need the libcURL library. This is the library that is used for the HTTP protocol. It is what the updater application uses to update the client. It can be obtained at http://curl.haxx.se/. The current windows package that's (easily) compatable with us is in the "Old Releases" page. Scroll down the list and download: libcurl-7.15.0-win32-msvc.zip
The 2 CVS clients recommended for Windows are WinCVS and TortoiseCVS. Both provide a GUI to access the CVS repositories.
CS and CEL use SVN for their source repositories, so you'll need that too.
The SVN client for Windows is TortoiseSVN.
To build the updater, you need the libcURL library. This is library that is used for HTTP protocol. It is what the updater application uses to update the client. It can be obtained at http://curl.haxx.se/.
Note: This section is incomplete and untested, but contains the Gentoo specific build information that was previously in the manual.
Due to the number of dependencies needed, if you wish to read the homepage listing, or dependency description please select Linux's generic dropdown selection.
via portage: #emerge curl
via portage: #emerge jam
Note: This section is incomplete and untested, but contains the Slackware specific build information that was previously in the manual.
Due to the number of dependencies needed, if you wish to read the homepage listing, or dependency description please select Linux's generic dropdown selection.
You will need also a CVS client. It should be already installed, if not you can find it in the directory slackware/d/ on your SlackWare CD or at: ftp://ftp.slackware.at/
The instructions here are tested using Ubuntu Dapper Linux.
Since Dapper is installed by default with minimal packages, many required packages for this project are not available.
To correct this, you will first need to enable the universe and multiverse repositories.
To enable these, do the following:
# sudo gedit /etc/apt/sources.list
Delete everything in the file that you have not added yourself.# sudo apt-get update
Once that is complete, we can fetch all the required packages using the following command:Note: This section is incomplete and untested, but contains the Debian specific build information that was previously in the manual.
Due to the number of dependencies needed, if you wish to read the homepage listing, or dependency description please select Linux's generic dropdown selection.
via app-get: #apt-get install libcurl3-dev
via app-get: #apt-get install jam
If you are using Debian testing (which uses X.Org), then you need xlibmesa-gl-dev instead of xlibmesa-glu-dev.
Debian: #apt-get install xlibmesa-glu-dev
Testing: #apt-get install xlibmesa-gl-dev
Also, if you have flex, bison or automake other than automake1.8 installed, they should be uninstalled. They would conflict with the older versions flex-old, bison1.35 and automake1.8 needed to compile Planeshift.
#apt-get install bison-1.35 flex-old autoconf automake1.8
#apt-get install libmng-dev libmikmod2-dev libogg-dev libvorbis-dev zlib1g-dev libpng3-dev libjpeg62-dev python2.3-dev
Since Crystal Space needs it (independently from your graphic card, so even if you have an ATI card), you should download from www.nvidia.com the nvidia-toolkit. Use version 1.4.1. Make sure to use the appropriate file based on your chipset. To install the file, place it in the root directory and use the following command, then delete the tar.gz file.
tar -zxvf Cg-1.4.1_x86.tar.gz
tar -zxvf Cg-1.4.1_x86.tar.gz
tar -zxvf Cg-1.4.1_x86.tar.gz
# sudo tar -zxvf Cg-1.4.1_x86.tar.gz
via portage: #emerge ">=nvidia-cg-toolkit-1.4"
MySQL:
If you have the intentions to run the server you have to install MySQL as well.
PlaneShift uses MySQL version 5.0.
via apt-get:
via portage: #emerge mysql
I recommend to select the "Without Installer version". Unzip the file in c:\ and rename the folder (which should resemble mysql-5.0.19) to simply mysql. At the end you should have: c:\mysql\
Also, we need to create MinGW compatible libraries from the standard
Microsoft compatible libraries that ship with MySQL. Read the
FAQ for mingw32
under the section "How can an MSVC program call a MinGW DLL, and vice versa?"
You will find reimp here: http://wyw.dcweb.cn/reimp_new.zip
Copy the reimp.exe file to your /c/mingw/bin directory.
Open an msys prompt, cd to the /c/mysql/lib/debug directory and do the following:
via apt-get: # sudo apt-get --assume-yes install wordnet-base wordnet
We need to build cal3d from source before we can start on Crystal Space. Cal3d is a library that is used for handling skeleton systems. This is a very nice system and can allow for fluid transformations between animations. This needs to be built/installed first because when we configure Crystal Space it has to find the cal3d libraries so it can know to build the sprcal3d plugin. Cal3D doesn't change much, so we'll just checkout latest:
/home/user/development$ cvs -d:pserver:anonymous@cal3d.cvs.sourceforge.net:/cvsroot/cal3d login (just hit enter for password)
/home/user/development$ cvs -z3 -d:pserver:anonymous@cal3d.cvs.sourceforge.net:/cvsroot/cal3d co cal3d
Crystal Space 3D SDK is the engine that we use for rendering and sound.
/home/user/development$ svn co -r CS_SOURCE_REV https://svn.sourceforge.net/svnroot/crystal/CS/trunk/ cs
CEL is a layer on top of Crystal Space that is used for entity and behavior control.
/home/user/development$ svn co -r CEL_SOURCE_REV https://svn.sourceforge.net/svnroot/cel/cel/trunk/ cel
Lastly, download our source:
/home/user/development$ cvs -d:pserver:anonymous@planeshift.cvs.sourceforge.net:/cvsroot/planeshift login (just hit enter for password)
/home/user/development$ cvs -z3 -d:pserver:anonymous@planeshift.cvs.sourceforge.net:/cvsroot/planeshift co -D PS_SOURCE_DATE planeshift
If in the future you have the intentions to update cal3d, CS, CEL or PS because the team has decided to use another date or because you feel like you want to update it, instead of doing a checkout you have simply to update. Please, remember that cal3d, CS, and CEL must be of the same date while PS can be newer. Don't mix up versions and dates!
If you want to update to a new date:Crystal Space 3D SDK is the engine that we use for rendering and sound.
Right-click on the development directory and select "SVN Checkout". Specify the URL as:
https://svn.sourceforge.net/svnroot/crystal/CS/trunk/
Specify the checkout directory as "c:\development\cs", select "Revision", and paste the current CS revision number: CS_SOURCE_REVYou should now copy your CS Win Libs DLLs over to your new CS directory. Goto the start menu and do "CrystalSpace Win32 libraries"->"Copy DLLs to a CS directory". Set the directiory to c:\development\cs when prompted.
CEL is a layer on top of Crystal Space that is used for entity and behaviour control.
Right-click on the development directory and select "SVN Checkout". Specify the URL as:
https://svn.sourceforge.net/svnroot/cel/cel/trunk/
Specify the checkout directory as "c:\development\cel", select "Revision", and paste the current CEL revision number: CEL_SOURCE_REVLastly, download our source:
Right-click on the development directory and select "Checkout Module" or "CVS Checkout".
Enter "planeshift" for the module name, and set CVSROOT to:
:pserver:anonymous@planeshift.cvs.sourceforge.net:/cvsroot/planeshift
(for WinCVS, the local folder to checkout to must be C:\development\)If in the future you have the intentions to update CS, CEL, or PS because the team has decided to use another date or because you feel like you want to update it, instead of doing a checkout you simply have to update. Please, remember that CS and CEL must be of the same date while PS can be newer. Don't mix up versions and dates!
CS and CEL SVNs:
Right-click on the folder of the module you want and goto TortoiseSVN->"Update to Revision".
Enter a new revsion number or select HEAD to get latest. Click ok, and the files will be updated.
PS CVS:
Right-click on the folder of the module you want and goto CVS->"Update Special". (TODO: WinCVS?)
To update to a new date, select "Get date/time" and enter the requested date. Make sure "create missing subfolders"
is checked and "if no revision is found, use the most recent one" is NOT checked. Click ok, and the files will be updated.
To update to present time (HEAD) or to a branch/tag within a module, select "Get tag/branch/revision" and type
in the requested entry's name instead.
Since cal3d is a library in development we probably don't want to 'install' this one as root since there is a good possibility it will change in the future. Instead we will 'install' it into our working directory. This is done by using the -prefix option when we configure it.
Many people with more recent versions of automake need to open cal3d/src/cal3d/Makefile.am and either comment out or remove the line with all_libraries = @all_libraries@. Without doing that cal3d won't build.
On newer versions of Gentoo the detection of autoconf-2.60 can fail. Open cal3d's autogen.sh and search for the line listing autoconf versions. Add "autoconf-2.60" at the end of the "for" statment. Go down a few lines and change the "2.5?" to a "2.6?". Then follow the normal process below.
export LD_LIBRARY_PATH=/home/user/development/cal3d/src/cal3d/.libs/:$LD_LIBRARY_PATH
Now we can build it (in debug mode) and use the configure line to tell it where we installed the cal3d libraries. To do this, use the prefix line that was used for Cal3d above.
If you are using GCC 4, you will see many warnings about virtual functions during compilation. It is safe to ignore them.
We should add the CRYSTAL environment variable to the .bashrc file so applications outside the Crystal Space tree know where to find the .so's.export CRYSTAL=/home/user/development/cs
export CEL=/home/user/development/cel
/home/user/development/planeshift$ jam -aq dbmysql client server
If you want to build the extra tools, just do "jam -a". Some tools may not build.Run MSYS from the start menu to open the shell.
Switch to the Crystal Space source dir using 'cd /c/development/cs'. Configure to debug mode and jam. (if you wish to build in optimized mode, just run configure without any arguments) If you chose to build cal3d, rather than use it from the CS win libs, you can specify it's location with: --with-cal3d=/c/development/cal3d/
Change your working directory to CEL's, and do:
Change your working directory to PS's, and do:
If you want to build the extra tools, just do "jam -a". Some tools may not build.
This should compile PlaneShift.
Note: MSVC 2005 (Full Edition Only): Make sure the "Show all settings" checkbox is checked in
Tools->Options before continuing.
Here we will add all the directories, containing all the include and lib files that we will need to
use during this compile. Under Tools->Options in you MSVC look on the left hand side for the Projects
folder. Under Projects choose "VC++ Directories". In the Show Directories for: choose "Include Files".
Click the new folder icon to dd the following directories:
C:\development\CS\include
C:\development\CS\include\csutil\win32
C:\development\cel\include
C:\development\curl\include
C:\mysql\include
In the Show Directories for: choose "Library Files". Click the new folder icon to add the following directories:
C:\mysql\lib\opt
C:\development\curl\
Make sure that your specific 'msvc' folder has the 'read only' box unchecked before continuing.
If you have MSVC 7.0 open C:\development\CS\mk\msvc7\wkstypical.sln
If you have MSVC 7.1 open C:\development\CS\mk\msvc71\wkstypical.sln
If you have MSVC 8.0 open C:\development\CS\mk\msvc8\wkstypical.sln
Go into the 'Build' menu, and select 'configuration manager'. Change the 'Active Solution Configuration' to 'Debug'. Right click on the solution and select 'Build Solution'. To test the build of CS, run the walktest.exe in C:\development\CS. If you encounter any errors, check you have done everything correctly, and then if the problem persists, you can ask for help in the CS IRC channel: irc.freenode.net #crystalspace
Make sure that your specific 'msvc' folder has the 'read only' box unchecked before continuing.
If you have MSVC 7.0 open C:\development\cel\msvc\7\wkscel.sln
If you have MSVC 7.1 open C:\development\cel\msvc\71\wkscel.sln
If you have MSVC 8.0 open C:\development\cel\msvc\8\wkscel.sln
Build the solution. Just ignore any Python errors.
Under Tools->Options in you MSVC look on the left hand side for the Projects folder. Under Projects choose "VC++ Directories". In the Show Directories for: choose "Library Files". Click the new folder icon to add the following directories:
C:\development\CS\out\debugX\libs
C:\development\cel\out\debugX\libs
You have to change X (in the path concerning CS and cel libraries) to these values, depending from the version you have of MSVC:
7 for MSVC 7
71 for Visual Studio .NET 2003/MSVC 7.1
8 for Visual Studio .NET 2005/MSVC 8
If you have MSVC.NET 7.0 open C:\development\planeshift\mk\msvc7\wkspstypical.sln
If you have MSVC.NET 2003/VC 7.1 open C:\development\planeshift\mk\msvc71\wkspstypical.sln
If you have MSVC.NET 2005/VC 8.0 open c:\development\planeshift\mk\msvc8\wkspstypical.sln
Do the following if you put mysql somewhere else than C:\mysql:
Right-click plgdbmysql, under properties->linker->general, change the "C:\mysql\lib\opt"
in Additional Library Directories to whatever your location of mysql is.
Build solution.
Note: You might have to copy a few DLL files from other build directories to your PlaneShift directory if you get problems. You usually need libz-cs.dll, libcurl.dll (or similar), and libmySQL.dll.
Now before you can debug the programs, you need to change some the of the project properties.
For each application:
Right-Click on the project. Under properties->debugging change:
Command to: C:\development\planeshift\(name).exe
Working directory to: C:\development\planeshift\
You should be good to go now.
The artwork for PlaneShift is not included in the CVS. However this is what the updater application is for. (If you have previously downloaded a release package, you can simply copy over your art directory, everything in your data directory except for gui, and skip this step.) This connects to our update central site and downloads all the missing material. All you need is updated art and data files. This is done by editing the updaterconfig.xml file and first setting the correct mirrors to use. Our current mirror list is:
Now adjust the <modules> section to only have art and data, and set the <autoinclude_os> value to 0.
Once this is complete, set a skin in psSetup and PS should be ready to run. Be sure to create your account first at our registration page if you wish to connect to the public server.
Simply copy the dictionary files from your \WordNet\2.1\dict folder to the \PlaneShift\data\dict folder.
Simply copy the dictionary files from your /usr/share/wordnet folder to the /home/user/development/planeshift/data/dict folder.
Make sure that MySQL is running.
# /etc/init.d/mysql start
Then login to the MySQL client using (default username with no password):$ mysql -u username -ppassword
The default username is root with no password.C:\mysql\bin\mysqld
Then login to the MySQL client using (The default username is root with no password):C:\mysql\bin\mysql -u root
NOTE: If you have upgraded MySQL server to 4.1 (while the client is still 4.0) please write this in your MySQL console:
UPDATE planeshift@localhost SET Password = OLD_PASSWORD('planeshift');
Note: If you get any problems with psserver, make sure you have the latest version of MySQL 5.0 and that your libMySQL.dll file in windows\system32 is the same as the one in mysql\lib\opt.
Additional maps can be listed with the "maplist" command, and loaded via the "loadmap" command. To see a list of all available psserver commands, type "help". You can shut down the server with "quit".
You should now be able to start psclient and log in. (The server is localhost on port 13331). The following accounts are in the CVS DB:
Username | Password | Access Group |
---|---|---|
vengeance | keith | full GM (30) |
acraig | andrew | normal (0) |
guest | guest | full GM (30) |
To perform server actions while logged in, as a GM character, first execute the /admin command. You will be given the list of available commands for your account's security group. When logged in with this account, you can goto the in-game help to view the full list of available commands and syntax. If you loaded any maps other than the test map "npcroom", you may teleport to them by using the command: "/teleport me map [mapname]"
You might want to create some script so that you don't have to manually type in the environment variables every time. In this way you can also have multiple versions of CS + CEL coexisting peacefully.
If you plan to do development work, or would just like to not need to copy over most of the art, you can mount the data straight from its existing location. This is highly recommended for developers using the internal art SVN.
Open up the vfs.cfg file in the PlaneShift dir. Find the list of mount points (VFS.Mount.* lines) and add a mount for each custom dir you wish to use. For this example, I will mount a pre-installed package. Using the VFS syntax key at the top, add a mount as follows:
VFS.Mount.bins = $/development$/PSbins$/
I have named the mount "bins" and the dir I am using is at "/development/PSbins/".
On Windows this will be equivalent to c:\development\PSbins\
Open the cfg file of the PS application you want to use a mount. To continue the above example, I can set the CVS build client to use the installed package's maps by editing the Planeshift.Mount.zipmapdir line in psclient.cfg:
Planeshift.Mount.zipmapdir = /bins/art/world/
If you wish the server and NPC client to use these as well, modify/add that line to their cfg files too.
You can use the same mount as many times as needed, using different sub-dirs:
PS mounts such as Planeshift.Mount.characterszip take a VFS path to a ZIP file, as opposed to a dir. If you wish to mount from an uncompressed dir, you need to add a slash to the end of the path:
Planeshift.Mount.characterszip = /svn/planeshift/art/characters.zip\
Planeshift.Mount.characterszip = /svn/planeshift/art/characters.zip/
Planeshift.Mount.characterszip = /svn/planeshift/art/characters.zip/
You can use the above method to easily mount most art. The full list of mounts used is as follows:
Planeshift.Mount.zipmapdir
Planeshift.Mount.characterszip
Planeshift.Mount.npcszip
Planeshift.Mount.weaponzip
Planeshift.Mount.itemzip
Planeshift.Mount.azurezip
Planeshift.Mount.bluezip
Planeshift.Mount.brownzip
Planeshift.Mount.crystalzip
Planeshift.Mount.darkzip
Planeshift.Mount.redzip
Planeshift.Mount.potionszip
Planeshift.Mount.moneyzip
Planeshift.Mount.bookszip
Planeshift.Mount.shieldszip
Planeshift.Mount.toolszip
Planeshift.Mount.naturalreszip
Planeshift.Mount.foodzip
Planeshift.GUI.Skin.Base
Planeshift.GUI.Skin.Dir
Note that the first and last mount to a directory, while the others must mount to a ZIP file unless the trailing slash is added as stated above. Also note that this isn't everything; you will still have to copy some files from the package or updater, namely your data dir and all art not mounted. This includes effects, music, sounds, apps.zip, soundlib.xml, etc. However, these things change less often than the above, and mounting the main portion of the art makes keeping things in sync much easier.
If you have trouble getting any of this to work, please feel free to contact us and we will do our best to help.
There is an IRC channel dedicated to providing help with building PlaneShift:
Server: irc.freenode.com
Channel: #planeshift-build