Compiling Source Code

    

(written at Build 2.9.14)
The Microplanet Gravity source code is compiled using Visual Studio 2008 Professional.
It may compile with Visual Studio 2008 Express but we cannot guarantee this, nor can we guarantee that Gravity built this way will work properly.
It should import into later versions of Visual Studio Professional and compile without any problems.
Each version of Gravity that is released has an associated "snapshot" of the source code that was used to build it. This can be downloaded as a single ZIP file. You can also gain read-only CVS access to the Gravity source code repository, please read the relevant SourceForge documents.
If you have downloaded the compressed ZIP file, extract it using your favorite compression utility. This will create a folder called "gravity-source" that contains all the source files required to compile Gravity.
(CVS users : if you have followed the SourceForge instructions you will have downloaded the latest code into a directory called "gravity2.9")
Within this directory you will find the main solution file called "news.sln". Open this in Visual Studio or just double click it.
Then in the Build menu select "Batch Build", click "Select All" and "Build".
Once everything has built the Gravity executables can be found in the Debug and Release directories within the main directory.
Note : You have just built two versions of Gravity, a "Debug" version which contains a great amount of information which is only useful for developers who are trying to find bugs; and a "Release" version which has all this information stripped out to make it much smaller and quicker, and is the version that all end users use.
The installers are in the Setup/OfflineSetup/Debug, Setup/OfflineSetup/Release, Setup/Setup/Debug and Setup/Setup/Release.
Note : There are Online and Offline installers, and Debug and Release versions of each which equals 4 versions of the installer.
These installers are not yet in the single file format that users download from the site, they consist of the main "setup.exe" file, the MSI installer and a directory for each pre-requisite that is included. You can use them this way if you wish. We use a little utility to compress all this lot into a single file so it is far easier to download and less confusing for users to install.
If you want to create the single file installer you will need a utility called "Zip 2 Secure EXE" which is made by a company called ChilliKat Software and may be downloaded from here :- http://www.chilkatsoft.com/chilkatSfx.asp
Next select all the files in either Setup/OfflineSetup/Release or Setup/Setup/Release and add them to a zip file called "Setup.ZIP".
Next run Zip 2 Secure EXE, press the "Load Settings" and load either "Setup/Offline.xml" or "Setup/Online.xml" as required, update the version number if required, check the drive letters are correct (I keep the source files on my "D" drive) and press "Create".
Note : We have only created settings for Zip 2 Secure EXE for the Release builds as the Debug builds are not intended to be distributed so there is no point making a single file installer for them.