FAQ development

This article covers questions regarding development of PvPGN, e.g. using SVN, downloading the source, setting up compilers, etc..

What can I do to contribute to the project?

 * This depends on your talents. If you are good at coding, you might want to help implementing new features or fixing bugs. Also other help is always welcome, like translating to other languages, drawing graphics, writing this manual, or make sounds and musics.

What language is PvPGN written in?

 * The stable branch of PvPGN is programmed in C; whereas, the development branch is programmed in C++. Read the coding guidelines for reference how your code should be structured.

I've fixed a bug / added a feature. How can I submit it to the codebase?

 * Make a diff file (aka patch file) of your changes and submit it to Patches. Please watch the patch tracker carefully to see if the developers have any suggestions. If everything is OK with your patch, it will get merged into the SVN tree.

I want to become an official PvPGN developer! How?

 * The only way to get there is by constantly making patches, especially for fixing bugs. When the amount of time you spend with coding PvPGN reaches our level, chances are high that you'll receive a SVN account and get added to the list.

What is source code?

 * Don't worry about it, and don't bother reading the rest of this.

How can I obtain the source code?

 * Latest release version: Get from the website
 * Most up-to-date source code using SVN: svn://svn.berlios.de/pvpgn/trunk

What is the SVN version?

 * SVN aka Subversion is a version control system like CVS. Basically it tracks changes to the source code of the server. The SVN version is the latest (bleeding edge) source code for the server.

What operating systems does Subversion run on?

 * All modern flavours of Unix, Win32, BeOS, OS/2, MacOS X. Subversion is written in ANSI C and uses APR, the Apache Portable Runtime library, as a portability layer. The Subversion client will run anywhere APR runs, which is most places.

How do I get the SVN version then?

 * First you need to download the client software for you operating system which will connect to the SVN server and download the source code. You can get it from the SVN project homepage at http://subversion.tigris.org/. If you are using Windows you may want to get TortoiseSVN as it integrates with Explorer nicely and you won't have to run command line stuff. Next you need to set up the client to use the repository url which is "svn://svn.berlios.de/pvpgn/trunk". This will depend on which software you get, but you can find out how to do this with the documentation included with it.  On Linux (Unix) you can use command "svn co svn://svn.berlios.de/pvpgn/trunk/".

Subversion has not been ported to my platform / I don't want to install more software - is there any other way I can get to the source code?

 * You can view the repository online at http://svn.berlios.de/svnroot/repos/pvpgn, you can also checkout copies so you will be able to get a complete set of source code.

Now I have got the source code how can I compile it?

 * Compiling PvPGN on Windows using BuildOTTD
 * Compiling PvPGN on Windows using Cygwin
 * Compiling PvPGN on Windows using Microsoft Visual C++
 * Compiling PvPGN on Windows using MinGW
 * Compiling PvPGN on Windows using Dev-C++
 * Compiling PvPGN on Linux
 * Compiling PvPGN on MacOS X
 * Compiling PvPGN on Solaris

I had a problem compiling! What should I do?

 * This is not a compiling FAQ, try to ask your compiler vendor for help.

Why did the developers decide to use SVN instead of something more common such as CVS?

 * SVN is more advanced and easier to use. Also a lot of the developers don't like CVS any more now they know SVN.

What is the point of a version control system? Why don't they just upload the source code to an FTP directory?

 * Version control systems keep track of all the changes, when they were made and by who. If the developers later find out something they did was a mistake and broke something important they may have to rewrite it from scratch. With this they can just 'checkout' a revision from when it was working. It also allows the developers to add comments so they know what changes have been done.

How do I make a diff file to share my changes with other coders?

 * In Linux, use the command "svn diff > mypatch.diff" from the source directory to create a diff file.
 * In Windows, you can do the same from the command prompt, or, if you have Tortoise SVN, right button in the source directory and press Create Patch. It will ask for a location and filename.

How to apply a patch?
It's usually best to apply patches to the latest SVN revision.


 * Linux: Type the following line into a console (replace patch_name with the filename of the patch):
 * . However, in some cases you might need.


 * Windows: Make sure you have TortoiseSVN installed.
 * Right-click on the folder with the PvPGN source code, open the TortoiseSVN submenu and select 'Apply Patch...'. Browse to the patch file and select it. Then, right click on the 'File Patches' window and click on 'Patch All'. After you're done, close the TortoiseMerge window.