author | alfadur |
Thu, 22 Aug 2019 23:12:07 +0300 | |
changeset 1966 | 4804d8c23fba |
parent 1965 | 25554a6a7b03 |
child 1967 | adf0a1ba96c8 |
permissions | -rw-r--r-- |
1955 | 1 |
#summary Instructions for building Hedgewars on Windows |
185 | 2 |
#labels Phase-Implementation,Phase-Design,Phase-Support |
3 |
||
774 | 4 |
= Building on Windows = |
652
0f7445a72880
Big fat warning about these instructions being outdated
Wuzzy
parents:
594
diff
changeset
|
5 |
|
757 | 6 |
== Things to download == |
1965
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
7 |
First of all, figure out whether your system is a 32-bit or a 64-bit system. You can use the guide at [https://support.microsoft.com/en-us/help/15056/windows-32-64-bit-faq]. On a 64-bit system both 32-bit and 64-bit builds can be made, although 64-bit is preferred. Making a 64-bit build on a 32-bit system might be possible, but hasn't been tested. |
1891 | 8 |
|
1955 | 9 |
== Required Tools == |
1956 | 10 |
Choose either 32-bit or 64-bit depending on your system and which build you want to make. |
185 | 11 |
|
1965
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
12 |
# CMake: click either *Windows win32-x86 Installer* or *Windows win64-x64 Installer* |
1893 | 13 |
* Link: https://cmake.org/download/ |
1956 | 14 |
# Visual Studio: click *Download Visual Studio → Community 2019* (earlier version starting from Community 2015 Update 3 might also work) |
1955 | 15 |
* Link: https://visualstudio.microsoft.com/ |
16 |
# Vcpkg |
|
17 |
* Link: https://github.com/Microsoft/vcpkg |
|
1966 | 18 |
# !FreePascal: click *Windows 32-bit*, then download *fpc-<version>-win32.exe* (for 64-bit builds also download *fpc-<version>.i386-win32.cross.x86_64-win64.exe*) |
1965
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
19 |
* Link: https://www.freepascal.org/download.html |
1956 | 20 |
# Mercurial: pick one (!TortoiseHg has a GUI and is more user-friendly) |
21 |
* !TortoiseHg: Chose one based on your OS version |
|
1893 | 22 |
* Link: https://tortoisehg.bitbucket.io/ |
1895 | 23 |
* Command-line mercurial |
266 | 24 |
* Link: http://mercurial.selenic.com/downloads/ |
185 | 25 |
|
757 | 26 |
== Setup == |
1955 | 27 |
# Install CMake, but please *ensure* you select "Add CMake to the system PATH for all users", so you can run CMake directly from the command line. |
1965
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
28 |
# Install !FreePascal and if necessary the 64-bit cross-compiler plugin (the one with `cross.x86_64-win64` in the file name). |
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
29 |
# Install Visual Studio, ensuring the *Workloads → Desktop development with C++* and *Language packs → English* options are selected. |
1961 | 30 |
# Install Vcpkg by following the instructions under *Quick Start* section on the project page. If you don't have Git, use the *Clone or download → Download ZIP* option and extract the ZIP file. Create `VCPKG_ROOT` environment variable pointing to the directory you've cloned/extracted it to. |
1956 | 31 |
# Install !TortoiseHg / Mercurial |
185 | 32 |
# Restart the computer |
1956 | 33 |
# Download the Hedgewars source code: |
34 |
# Using !TortoiseHg: |
|
185 | 35 |
* Right-click in any folder on your computer |
1956 | 36 |
* Select Tortoise HG → Clone. |
37 |
* In the _Source_ textbox, enter: https://hg.hedgewars.org/hedgewars/ |
|
38 |
* 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
|
39 |
# Using command-line Mercurial |
1956 | 40 |
* If you have Windows 7 or later, skip the next 3 steps, and instead, use Shift + Right-click in the folder where you want to download the source. |
41 |
* Start _Run..._ ( Press Windows key + R, or click on the Start menu, then on "Run ..." ) |
|
1957 | 42 |
* Enter: `cmd.exe` |
185 | 43 |
* Navigate to where you want to download the source |
1957 | 44 |
* Type and execute (The initial clone of the repository will take a while): `hg clone https://hg.hedgewars.org/hedgewars/ trunk` |
1961 | 45 |
# Navigate to the Vcpkg directory in the command line and build the necessary libraries (this will also take a while, especially for Qt). The command is: |
1964 | 46 |
* For 32-bit builds: `.\vcpkg.exe install sdl2 sdl2-image sdl2-ttf sdl2-mixer sdl2-mixer[libvorbis] sdl2-net physfs openssl qt5-base qt5-tools ffmpeg` |
47 |
* For 64-bit builds: `.\vcpkg.exe install sdl2:x64-windows sdl2-image:x64-windows sdl2-ttf:x64-windows sdl2-mixer:x64-windows sdl2-mixer[libvorbis]:x64-windows sdl2-net:x64-windows physfs:x64-windows openssl:x64-windows qt5-base:x64-windows qt5-tools:x64-windows ffmpeg:x64-windows` |
|
1955 | 48 |
# Build Hedgewars |
1958 | 49 |
* Run the Developer Command Prompt for VS 2019 (or other installed version) from the Start menu (if you want Hedgewars to install to the default location in `C:\Program Files (x86)`, run it as administrator). |
1957 | 50 |
* For 64-bit builds, in the dev command prompt run the following command (not necessary for 32-bit builds): `VC\Auxiliary\Build\vcvarsall.bat amd64` |
1958 | 51 |
* Navigate to `<hedgewars_root>\tools` where `<hedgewars_root>` is the directory where you cloned the repository source to. |
1956 | 52 |
* Run `build_vcpkg.bat` script |
1965
25554a6a7b03
change windows build instructions to use fpc cross-compiler
alfadur
parents:
1964
diff
changeset
|
53 |
# After building, you can run Hedgewars from the installed location (default is `C:\Program Files (x86)\hedgewars\hedgewars.exe`) |