Note that the repository has moved to: https://svn.code.sf.net/p/xgm/code/
Accessing the SVN Repository
To access the repository you will need an SVN client like TortoiseSVN. The address of the repository is http://svn.assembla.com/svn/xgm. Anonymous users have read access, so anyone can check out a copy of the code and build their own version of XGM. Registered users can also commit changes.
Repository Layout
The top level contains three directories:
trunk These are the files that official versions of XGM will be compiled from. For the time being no one should be making commits here.
branches Development versions of XGM. If you want to start making changes and testing them, this is where you should make your own branch of XGM, and make your commits.
tags Snapshots of XGM. Typically these will be published versions. You can add your own snapshots, but ideally you should not make any changes after adding a snapshot.
Starting Work
I'll assume you are using TortoiseSVN and that you are a registered user.
1. Right click on the desktop, and select TortoiseSVN > Repo-browser
2. Open http://svn.assembla.com/svn/xgm
3. Right-click on 'branches' and create a new directory with a suitably informative name
4. Select 'trunk' (or some other version like tags/XGM_5_8_0) then copy the contents into your branch
5. Right click on your branch, select copy to working copy, and choose a folder on your machine
Downloading your first working copy will probably take a while (it's about 500 MB). At this point you can compile your own version of XGM from your working copy, make changes, and commit them back to the repository.
Building XGM
To build XGM you need the Nullsoft Install System, which you can use to compile XGM.nsi. You can edit this script with any text editor. If you want to do more than changing the version number it might be worth trying something that is set up for working with nsi scripts, like HM NIS Edit or EclipseNSIS.
If you stick to editing or adding files in 'Main' then in most circumstances you won't need to edit XGM.nsi, except maybe to change the version number, and the name of the outputfile. To do that you need to change three lines in XGM.nsi, all near the top of the file:
This line sets the version number shown to users.
Code:
!define PRODUCT_VERSION "5.8.0"
This line sets the name of the compiled installer file.
Code:
OutFile "XGM_5_8_0.exe"
This line checks the integrity of the installer and should match the name you choose for the installer file.
Code:
md5dll::GetMD5File "$EXEDIR\XGM_5_8_0.exe"
Soucre Files Layout
The 'trunk' directory and all branches contain two directories and one file.
Extras - Extra or alternative files that are only used for some versions of XGM
Main - Files that appear in all versions of XGM, including the readme
XGM.nsi - The NISI installer script discussed above
'Extras' contains the following folders:
Alex - Files required for use with the Alexander exe
BI - Files required for use of BI battlemap building models
Install - Graphics used by the installer
Landbridge - Files used by the landbridges install option
Prometheus_Cities - Files used by the Prometheus Cities install option
'Main' contains xgm/data, which makes up the bulk of the mod, xgmreadme which contains the images used in the readme file, and xgmreadme.html. In most cases editing, adding, or removing, files in Main/xgm/data will not require changes to the install script. If you want to add files in 'Extras' then you will have to edit the install script to deal with them. Removing files from 'Extras' may break the related install options.
Tracking Changes
To easily see the changes between published versions of XGM go to 'tags' and click on the 'View Changes' button near the bottom left of the page. In the 'from' field put the version you want to start from, in the 'to' field put the current version. Leave the revison number as it is. For example you might want:
From: tags/XGM_5_8_2/
To: tags/XGM_5_8_4/
Which would get you this. You can then click on the 'view diffs' links for text files to see each line that has been changed.