BuildingOnWindows.wiki
changeset 1968 ae2af57be656
parent 1967 adf0a1ba96c8
child 1969 93991afec8b1
equal deleted inserted replaced
1967:adf0a1ba96c8 1968:ae2af57be656
     9 
     9 
    10 == Required Tools ==
    10 == Required Tools ==
    11 Choose either 32-bit or 64-bit depending on your system and which build you want to make.
    11 Choose either 32-bit or 64-bit depending on your system and which build you want to make.
    12 
    12 
    13   * CMake: click either *Windows win32-x86 Installer* or *Windows win64-x64 Installer*
    13   * CMake: click either *Windows win32-x86 Installer* or *Windows win64-x64 Installer*
    14     Link: https://cmake.org/download/
    14     * Link: https://cmake.org/download/
    15   * Visual Studio: click *Download Visual Studio → Community 2019* (earlier version starting from Community 2015 Update 3 might also work)
    15   * Visual Studio: click *Download Visual Studio → Community 2019* (earlier version starting from Community 2015 Update 3 might also work)
    16     Link: https://visualstudio.microsoft.com/
    16     * Link: https://visualstudio.microsoft.com/
    17   * Vcpkg
    17   * Vcpkg
    18     Link: https://github.com/Microsoft/vcpkg
    18     Link: https://github.com/Microsoft/vcpkg
    19   * !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*)
    19   * !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*)
    20     Link: https://www.freepascal.org/download.html
    20     * Link: https://www.freepascal.org/download.html
    21   * Mercurial: pick one (!TortoiseHg has a GUI and is more user-friendly)
    21   * Mercurial: pick one (!TortoiseHg has a GUI and is more user-friendly)
    22     # !TortoiseHg: Chose one based on your OS version
    22     * !TortoiseHg: Chose one based on your OS version
    23       Link: https://tortoisehg.bitbucket.io/
    23       * Link: https://tortoisehg.bitbucket.io/
    24     # Command-line mercurial
    24     * Command-line mercurial
    25       Link: http://mercurial.selenic.com/downloads/
    25       * Link: http://mercurial.selenic.com/downloads/
    26 
    26 
    27 == Setup ==
    27 == Setup ==
    28  # 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.
    28   * 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.
    29  # Install !FreePascal and if necessary the 64-bit cross-compiler plugin (the one with `cross.x86_64-win64` in the file name).
    29   * Install !FreePascal and if necessary the 64-bit cross-compiler plugin (the one with `cross.x86_64-win64` in the file name).
    30  # Install Visual Studio, ensuring the *Workloads → Desktop development with C++* and *Language packs → English* options are selected.
    30   * Install Visual Studio, ensuring the *Workloads → Desktop development with C++* and *Language packs → English* options are selected.
    31  # 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.
    31   * 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.
    32  # Install !TortoiseHg / Mercurial
    32   * Install !TortoiseHg / Mercurial
    33  # Restart the computer
    33   * Restart the computer
    34  # Download the Hedgewars source code:
    34   * Download the Hedgewars source code:
    35   # Using !TortoiseHg:
    35     * Using !TortoiseHg:
    36    * Right-click in any folder on your computer
    36       * Right-click in any folder on your computer
    37    * Select Tortoise HG → Clone.
    37       * Select Tortoise HG → Clone.
    38    * In the _Source_ textbox, enter: https://hg.hedgewars.org/hedgewars/
    38       * In the _Source_ textbox, enter: https://hg.hedgewars.org/hedgewars/
    39    * Press "clone"
    39       * Press "clone"
    40   # Using command-line Mercurial
    40     * Using command-line Mercurial
    41    * Shift + Right-click in the folder where you want to download the source and select "Open Command Prompt Window Here" or "Open PowerShell window here".   
    41       * Shift + Right-click in the folder where you want to download the source and select "Open Command Prompt Window Here" or "Open PowerShell window here".   
    42    * Type and execute (The initial clone of the repository will take a while): `hg clone https://hg.hedgewars.org/hedgewars/ trunk`
    42       * Type and execute (The initial clone of the repository will take a while): `hg clone https://hg.hedgewars.org/hedgewars/ trunk`
    43  # 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:
    43   * 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:
    44   * 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`
    44     * 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`
    45   * 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`
    45     * 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`
    46  # Build Hedgewars
    46   * Build Hedgewars
    47   * From the Start menu run either "x86 Native Tools Command Prompt for VS 2019" or "x64 Native Tools Command Prompt for VS 2019" (if you want Hedgewars to install to the default location in `C:\Program Files`, run it as administrator).  
    47     * From the Start menu run either "x86 Native Tools Command Prompt for VS 2019" or "x64 Native Tools Command Prompt for VS 2019" (if you want Hedgewars to install to the default location in `C:\Program Files`, run it as administrator).  
    48   * Navigate to `<hedgewars_root>\tools` where `<hedgewars_root>` is the directory where you cloned the repository source to.
    48     * Navigate to `<hedgewars_root>\tools` where `<hedgewars_root>` is the directory where you cloned the repository source to.
    49   * Run `build_vcpkg.bat` script
    49     * Run `build_vcpkg.bat` script
    50  # After building, you can run Hedgewars from the installed location (default is `C:\Program Files\hedgewars\hedgewars.exe`)
    50   * After building, you can run Hedgewars from the installed location (default is `C:\Program Files\hedgewars\hedgewars.exe`)
    51 
    51 
    52  == Additional options ==
    52  == Additional options ==
    53  Check the top section of `build_vcpkg.bat` to change some of build options.
    53  Check the top section of `build_vcpkg.bat` to change some of build options.