For anyone who would like to work on the Megaglest project as a developer we have made good progress on making things easy for you to compile and begin the learning process. Below is a small fact sheet to try to assist anyone who is interested in helping with development or just to learn for your own enjoyment:
Version Control and Getting the code:We host the project at sourceforget.net at:
https://sourceforge.net/projects/megaglest/To get the code you may run the following command from a commandline:
svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest megaglest
Project folder layout:All active development is done in the trunk subfolder. Each release is 'tagged' and a copy resides in the tags folder. Branches are created when required to seperate larger changes from active / stable development.
The following is a description of the next level of folders under trunk (which is usually the same for each release or branch):
data - contains game content like models, textures, xml files, etc which the game loads as required. This is where modders would play most of the time.
docs - contains various readme files, license agreements, etc. This is a good place to start reading for developers.
mk - this is where platform specific project files are kept. currently there are folders for linux and wndoze (spelling mistake on purpose
)
source - all source code for the project lives inside here
Linux Compiling:1. Get the project from SVN using the above commandline or your favorite SVN tool (rabbitvcs or tortoise)
2. Download package dependencies for your Linux distribution (see mk/linux/setupBuildDeps.sh which can do that for Debian, Ubuntu, Fedora and Open SuSE based distro's)
3. Open a terminal window and navigate to mk/linux and type the following:
./autogen.sh
./configure
jam
4. If nothing goes wrong you will see
glest.bin (and other binaries) in the same folder.
5. To test running the game, run the binary in mk/linux like this:
./glest.binThese are some commandline options:
./glest.bin --version ./glest.bin --opengl-infoWindows Compiling:1.
Get the project from SVN using the above commandline or your favorite SVN tool (rabbitvcs or tortoise)
2. Download package dependencies (from
https://sourceforge.net/projects/megaglest/files/win32_deps.7z/download)
3. Decompress the dependency archive into the source folder. You should now see a win32_deps sub-folder with lots of stuff inside. (you will require 7zip from
http://www.7-zip.org/)
4. Open the main solution in Visual Studio (I use VC++ 2008 express,
currently 2010 DOES NOT WORK) located at:
mk/windoze/Glest.sln5. Do a rebuild project.
6. If nothing goes wrong you will see
glest_game.exe (and other binaries) in
data/glest_game (where all the data content lives).
7. To test the game, run the batch file
CopyWindowsRuntimeDlls.bat location in mk\windoze to copy dependency dll's
Installers:Windows Installer:
We use Null Soft Installer NSIS located:
here. Open
MegaGlestInstaller.nsi located in mk/windoze/Installer from the NSIS compiler and compile the installer into an executable. I use a free GUI editor for the installer called HM NIS Edit which can be obtained from here:
http://hmne.sourceforge.net/Linux Installer:
We use the mojosetup installer located:
here. To build a Linux installer, open a terminal window and navigate to mk/linux/mojosetup/megaglest-installer. Edit make.sh and change the version # tag (some example below):
#megaglest_release_folder="trunk"
megaglest_release_folder="release-3.3.5.1"
From this folder run:
./make.shIf everything runs properly, the script will build an installation from the binaries and data location in the svn project specified in the top of the script (typically the trunk branch or a release branch) and the final installer is location in the same folder as make.sh and called: megaglest-installer
Misc Scripts:The following are miscalleneous scripts located in mk/linux:
makedata.sh - makes a data ONLY archive containing game content for a new release
makedata-diff.sh - makea data differences ONLY archive containing data that is different between two release (usually very small. Edit the variable:
OLD_VERSION=3.3.4 to determine which version to compare with)
makerelease.sh - makes a source code archive for a new release
setupBuildDeps.sh - installs required linux dependencies (Ubuntu, Debian, Fedora and open SuSE based)