change windows build instructions to use fpc cross-compiler
authoralfadur
Thu, 22 Aug 2019 23:09:43 +0300
changeset 1965 25554a6a7b03
parent 1964 f597999c9599
child 1966 4804d8c23fba
change windows build instructions to use fpc cross-compiler
BuildingOnWindows.wiki
--- a/BuildingOnWindows.wiki	Thu Aug 22 18:47:55 2019 +0300
+++ b/BuildingOnWindows.wiki	Thu Aug 22 23:09:43 2019 +0300
@@ -4,22 +4,19 @@
 = Building on Windows =
 
 == Things to download ==
-First of all, figure out whether your system is a 32-bit or a 64-bit system. You can use the guide at [http://windows.microsoft.com/en-US/windows7/find-out-32-or-64-bit]. You will only be able to make a 64-bit build on a 64-bit system. 32-bit builds can be made on both 32-bit and 64-bit systems.
+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.
 
 == Required Tools ==
 Choose either 32-bit or 64-bit depending on your system and which build you want to make.
 
- # CMake: click either *Windows win64-x64 Installer* or *Windows win32-x86 Installer*
+ # CMake: click either *Windows win32-x86 Installer* or *Windows win64-x64 Installer*
   * Link: https://cmake.org/download/
  # Visual Studio: click *Download Visual Studio → Community 2019* (earlier version starting from Community 2015 Update 3 might also work)
   * Link: https://visualstudio.microsoft.com/
  # Vcpkg
   * Link: https://github.com/Microsoft/vcpkg
- # !FreePascal
-  * 32-bit compiler: click *Windows 32-bit*
-   * Link: https://www.freepascal.org/download.html
-  * 64-bit compiler (necessary for 64-bit builds, bundled with Lazarus IDE): click *Windows (64-bit)*
-   * Link: https://www.lazarus-ide.org/index.php?page=downloads
+ # !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)
+  * Link: https://www.freepascal.org/download.html
  # Mercurial: pick one (!TortoiseHg has a GUI and is more user-friendly)
   * !TortoiseHg: Chose one based on your OS version
    * Link: https://tortoisehg.bitbucket.io/
@@ -28,8 +25,8 @@
 
 == Setup ==
  # 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.
- # Install !FreePascal / Lazarus IDE. Add the directory containing `fpc.exe` to the `PATH` environment variable (either user or system).
- # Install !VisualStudio, ensuring the *Workloads → Desktop development with C++* and *Language packs → English* options are selected.
+ # Install !FreePascal and if necessary the 64-bit cross-compiler plugin (the one with `cross.x86_64-win64` in the file name).
+ # Install Visual Studio, ensuring the *Workloads → Desktop development with C++* and *Language packs → English* options are selected.
  # 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.
  # Install !TortoiseHg / Mercurial
  # Restart the computer
@@ -53,7 +50,4 @@
   * 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`
   * Navigate to `<hedgewars_root>\tools` where `<hedgewars_root>` is the directory where you cloned the repository source to.
   * Run `build_vcpkg.bat` script
- # After building, you can run Hedgewars from the installed location (default is `C:\Program Files (x86)\hedgewars\hedgewars.exe`)
-
-== Caveats ==
- # The linker from 64-bit FPC included in the Lazarus IDE might occasionally fail, producing `hwengine.exe` filled with zeroes. If this happens, just delete it and re-run `tools\build_vcpkg.bat` again (or run `nmake hedgewars` in the root directory to only rebuild the engine)
+ # After building, you can run Hedgewars from the installed location (default is `C:\Program Files (x86)\hedgewars\hedgewars.exe`)
\ No newline at end of file