MG/Windows Compiling

This page explains how to compile MegaGlest for Windows.

Compiling from source

 * 1) Install Visual Studio. It is recommended that Visual C++ 2008 WITH Service Pack 1 (direct download of VC++ 2008 Express Edition) be used. VC++ 2010 project files are also included and may work but are not the primary environment used by MegaGlest developers, i.e. they may not be up to date and you may need to tweak them to make them work for you.
 * 2) Get the project from MegaGlest's subversion repository using the command line (Slik SVN is recommended because the batchfile compile function is dependant on this program) or your favorite subversion utility. If you are going to use subversion on 64-bit Windows 7 and get error messages like The file or directory is corrupted and unreadable then that's because your OS's only primary file system is buggy.
 * 3) Download the build dependencies archive.
 * 4) Decompress (using 7-zip) the dependency archive into the folder named source. You should now see a win32_deps sub-folder with many files inside.
 * 5) Open the main solution in Visual Studio, located in mk/windoze/Glest.sln
 * 6) Perform a rebuild project.
 * 7) If nothing goes wrong you will see megaglest.exe (and other binaries) in data/glest_game (where all the data content lives).
 * 8) To test the game, run the batch file CopyWindowsRuntimeDlls.bat located in mk\windoze to copy dependency dll's to the runtime binary folder.

Windows Compiling in a Batch
There is a convenient batch file (which assumes you have installed SlikSVN for subversion command line use) which will:


 * 1) Update the branch you are working in with the latest subversion code
 * 2) Touch the game_util.cpp file with the latest date/time
 * 3) Compile all projects from command line

This batch file exists within with mk\windoze folder and is called: build-mg.bat</tt>

Usefull Infomation
The Megaglest Trunk SVN is:https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk