BuildingOnWindows.wiki
author Wuzzy <almikes@aol.com>
Thu, 03 May 2018 00:07:59 +0200
changeset 1354 7cfa7d94d014
parent 798 30c5f1ebd552
child 1891 8c23bd1647de
permissions -rw-r--r--
Add Lua library: SimpleMission
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
652
0f7445a72880 Big fat warning about these instructions being outdated
Wuzzy
parents: 594
diff changeset
     1
#summary Instructions for building Hedgewars on Windows (Currently outdated)
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
     2
#labels Phase-Implementation,Phase-Design,Phase-Support
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
     3
774
86e81308d67d BuildingOnWindows: Edited via web interface
unC0Rr
parents: 757
diff changeset
     4
= Building on Windows =
757
0ac49c33cf3e BuildingOnWindows: Add title, fix header levels
Wuzzy
parents: 652
diff changeset
     5
== Warning! ==
652
0f7445a72880 Big fat warning about these instructions being outdated
Wuzzy
parents: 594
diff changeset
     6
These build instructions are very outdated. Try to build under [BuildingOnLinux GNU/Linux], if you can.
0f7445a72880 Big fat warning about these instructions being outdated
Wuzzy
parents: 594
diff changeset
     7
798
30c5f1ebd552 global replace of http with https for hedgewars.org wiki links
nemo
parents: 774
diff changeset
     8
If you have managed to get a successful Windows build for a recent Hedgewars build, please get in touch with us (Try the forums, for example: https://hedgewars.org/forum)
652
0f7445a72880 Big fat warning about these instructions being outdated
Wuzzy
parents: 594
diff changeset
     9
757
0ac49c33cf3e BuildingOnWindows: Add title, fix header levels
Wuzzy
parents: 652
diff changeset
    10
== Things to download ==
187
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    11
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.
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    12
187
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    13
 # CMake - download the *Windows (Win32 Installer)* 
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    14
  * Link: http://cmake.org/cmake/resources/software.html
192
9a34387a4262 Update the turotial so ppls won't have to download the entire QT Sdk :)
ovibalea@gmail.com
parents: 191
diff changeset
    15
 # FreePascal - download the *Download as installer* 
266
76e82a7897f1 updated qt, fpc and hg links
vittorio.giovara@gmail.com
parents: 212
diff changeset
    16
  * Link: http://sourceforge.net/projects/freepascal/files/Win32/2.6.0/fpc-2.6.0.i386-win32.exe/download
318
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    17
 # Qt SDK - Select the online installer, as it will save you ~1 GB of bandwidth. Nokia will also require you to register an account to download it.
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    18
  * Link: http://www.developer.nokia.com/info/sw.nokia.com/id/da8df288-e615-443d-be5c-00c8a72435f8/Qt_SDK.html
187
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    19
 # Mercurial - pick one (TortoiseHg has a GUI and is more user-friendly)
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    20
  # TortoiseHg - Chose one based on your OS version
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    21
   * Link: http://tortoisehg.bitbucket.org/download/index.html
192
9a34387a4262 Update the turotial so ppls won't have to download the entire QT Sdk :)
ovibalea@gmail.com
parents: 191
diff changeset
    22
  # Command-line mercurial
266
76e82a7897f1 updated qt, fpc and hg links
vittorio.giovara@gmail.com
parents: 212
diff changeset
    23
   * Link: http://mercurial.selenic.com/downloads/
187
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    24
 # _Windows building archive_ - it contains everything you need to compile Hedgewars on Windows.
212
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    25
   * Link: http://hedgewars.googlecode.com/files/hedgewars-win32-buildscripts.zip
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    26
757
0ac49c33cf3e BuildingOnWindows: Add title, fix header levels
Wuzzy
parents: 652
diff changeset
    27
== Setup ==
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    28
 # 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.
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    29
 # Install FreePascal.
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    30
 # Install Qt SDK, with the "Custom" option:
192
9a34387a4262 Update the turotial so ppls won't have to download the entire QT Sdk :)
ovibalea@gmail.com
parents: 191
diff changeset
    31
  * Click the *DESELECT ALL* button. We will then check only what we need
9a34387a4262 Update the turotial so ppls won't have to download the entire QT Sdk :)
ovibalea@gmail.com
parents: 191
diff changeset
    32
  * Check *Qt SDK/Miscellaneous/MinGW <any version>*
318
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    33
  * Check *Qt SDK/Development Tools/Desktop Qt/Qt <newest version>/Desktop Qt <newest version> - Mingw*
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    34
  * !!If there are any error message boxes, just press ignore until they are all gone. :)
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    35
 # Install TortoiseHg / Mercurial
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    36
 # Restart the computer
187
fc67aa71e6ed Make the tutorial a bit more user friendly :P
ovibalea@gmail.com
parents: 186
diff changeset
    37
 # Download the Hedgewars source:
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    38
  # Using TortoiseHg
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    39
   * Right-click in any folder on your computer
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    40
   * Select Tortoise HG -> Clone.
798
30c5f1ebd552 global replace of http with https for hedgewars.org wiki links
nemo
parents: 774
diff changeset
    41
   * In the _Source_ textbox enter: https://hg.hedgewars.org/hedgewars/
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    42
   * Press clone
318
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    43
  # Using command-line Mercurial
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    44
   * 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.
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    45
   * Start _Run..._ ( WINDOWS Key + R , or Start -> Run... )
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    46
   * Enter:
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    47
{{{
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    48
cmd.exe
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    49
}}} 
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    50
   * Navigate to where you want to download the source
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    51
   * Type and execute ( The initial clone of the repository will take a while, is about 550MiB or so... ):
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    52
{{{
798
30c5f1ebd552 global replace of http with https for hedgewars.org wiki links
nemo
parents: 774
diff changeset
    53
hg clone https://hg.hedgewars.org/hedgewars/ trunk
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    54
}}}
318
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    55
 # Navigate to the where you cloned the repository source to.
193
f94b00c2ff70 Update the wiki to reflect the latest directory changes.
ovibalea@gmail.com
parents: 192
diff changeset
    56
 # Go to the "tools/build_windows.bat" file, and modify the following:
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    57
  * 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\)
318
b5c9ee17f621 Updating the QtSDK link *again*. This time it does actually link to the QtSDK and it really does work.
Caironater@gmail.com
parents: 316
diff changeset
    58
  * SET SET QTDIR=<path to the QtSDK\Desktop\Qt\<your version>> (for example: c:\QtSDK\Desktop\Qt\4.8.1\)
193
f94b00c2ff70 Update the wiki to reflect the latest directory changes.
ovibalea@gmail.com
parents: 192
diff changeset
    59
 # You can now build hedgewars, by running the *tools/build_windows.bat* command.
194
05262f15ad20 Mention the shortcut
ovibalea@gmail.com
parents: 193
diff changeset
    60
 # After building it, you can run it from the Desktop - using the *Hedgewars* shortcut.
185
859277aa45f2 Add windows building wiki page.
ovibalea@gmail.com
parents:
diff changeset
    61
757
0ac49c33cf3e BuildingOnWindows: Add title, fix header levels
Wuzzy
parents: 652
diff changeset
    62
== Additional setup for Visual Studio 2010 ==
212
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    63
To build Hedgewars using Visual Studio 2010, you will need to update a few SDL files using this zip file (http://hedgewars.googlecode.com/files/hedgewars-VS2010-additional.zip). Just download and overwrite it into your currect hedgewars project folder. This is mainly an update to SDL_mixer (updating it to version 1.2.12), and changing the SDLconfig.h file to work with the sperate platform headers instead of the current one.
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    64
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    65
Next you will need to change some project settings. If you don't have the SDL directives set correctly in CMake then your project files will be incorect (they still may be incorrect even if you did get them set right). You need to change the following Project Settings for the 'hedgewars' project.
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    66
 # Make sure that under C/C++ => Additional Include Directories you have \hedgewars\misc\winutils\include\.
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    67
 # Change the Linker => Input => Additional Dependencies option to have the following at the end:
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    68
  * \hedgewars\misc\winutils\lib\SDL.lib
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    69
  * \hedgewars\misc\winutils\lib\SDLmain.lib
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    70
  * \hedgewars\misc\winutils\lib\SDL_mixer.lib
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    71
 # Adjust the Output Directory under the General settings to be just \hedgewars\bin\.
d47acc7f7185 additional instruction for vs2010 by adam.madram (issue 379)
vittorio.giovara@gmail.com
parents: 195
diff changeset
    72
757
0ac49c33cf3e BuildingOnWindows: Add title, fix header levels
Wuzzy
parents: 652
diff changeset
    73
== Building process ==
594
sheepluva
parents: 592
diff changeset
    74
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.