BuildingOnWindows.wiki
author kyberneticist@gmail.com
Sun, 26 Feb 2012 17:39:27 +0000
changeset 202 47363108b6b6
parent 195 a4eb962ff8a3
child 212 d47acc7f7185
permissions -rw-r--r--
Edited wiki page LuaAPI through web user interface.

#summary Instructions for building Hedgewars on Windows
#labels Phase-Implementation,Phase-Design,Phase-Support

= Things to download =
First of all, please use this guide over here ( http://windows.microsoft.com/en-US/windows7/find-out-32-or-64-bit) to see whether your OS is 32 or 64 bit. You will need it while doing the setup.

 # CMake - download the *Windows (Win32 Installer)* 
  * Link: http://cmake.org/cmake/resources/software.html
 # FreePascal - download the *Download as installer* 
  * Link: http://www.freepascal.org/down/i386/win32-ftp.freepascal.org.var
 # Qt SDK 
  * Link: http://qt.nokia.com/downloads/sdk-windows-cpp
 # Mercurial - pick one (TortoiseHg has a GUI and is more user-friendly)
  # TortoiseHg - Chose one based on your OS version
   * Link: http://tortoisehg.bitbucket.org/download/index.html
  # Command-line mercurial
   * Link (OS 32 bits): http://mercurial.selenic.com/release/windows/Mercurial-2.0.2.exe
   * Link (OS 64 bits): http://mercurial.selenic.com/release/windows/Mercurial-2.0.2-x64.exe
 # _Windows building archive_ - it contains everything you need to compile Hedgewars on Windows.
   * Link: http://hedgewars.org/download/hedgewars-win32-buildscripts.zip

= Setup =
 # Install CMake, but please *ensure* you select "Add CMake to the system PATH for all users", so you can run CMake directly from command line.
 # Install FreePascal.
 # Install Qt SDK, with the "Custom" option:
  * Click the *DESELECT ALL* button. We will then check only what we need
  * Check *Qt SDK/Miscellaneous/MinGW <any version>*
  * Check *Qt SDK/Development Tools/Desktop Qt/Qt <newest version>/Desktop Qt <newest version> - Mingw* (it's the first checkbox)
  * !!If there will be any error message boxes, just press ignore until it won't show anymore :)
 # Install TortoiseHg / mercurial
 # Restart the computer
 # Download the Hedgewars source:
  # Using TortoiseHg
   * Right-click in any folder on your computer
   * Select Tortoise HG -> Clone.
   * In the _Source_ textbox enter: https://hedgewars.googlecode.com/hg/
   * Press clone
  # Using Command-line mercurial
   * If you have Windows 7 skip the next 3 steps, and instead, SHIFT + Right click in the folder where you want to download the source.
   * Start _Run..._ ( WINDOWS Key + R , or Start -> Run... )
   * Enter:
{{{
cmd.exe
}}} 
   * Navigate to where you want to download the source
   * Type and execute ( The initial clone of the repository will take a while, is about 550MiB or so... ):
{{{
hg clone https://hedgewars.googlecode.com/hg/ trunk
}}}
 # Extract the _Windows Building Archive_ to the hedgewars source folder, in the root source directory - where there are the bin, misc, tools, etc. directories.
 # Go to the "tools/build_windows.bat" file, and modify the following:
  * SET PASCAL=<put the path to the directory that contains fpc's executable (fpc.exe)> (for example: c:\FPC\2.4.4\bin\i386-win32\)
  * SET SET QTDIR=<path to the QtSDK\Desktop\Qt\<your version>> (for example: c:\QtSDK\Desktop\Qt\4.7.3\)
 # You can now build hedgewars, by running the *tools/build_windows.bat* command.
 # After building it, you can run it from the Desktop - using the *Hedgewars* shortcut.

= Building process =
Run the *tools/build_windows.bat* file each time you want to build the source. Please note that there might some incompatibilities with the environment paths of this script in case that you are running MinSYS or Cygwin: we are quite confident that if you use such software you're quite able to correctly set up any paths.