doc/compiling/windows.md
It is highly recommended to use vcpkg as package manager.
After you successfully built vcpkg you can easily install the required libraries:
vcpkg install zlib zstd curl[ssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp gettext[tools] sdl2 --triplet x64-windows
curl[ssl] is optional, but required to use many online features.openal-soft, libvorbis and libogg are optional, but required to use sound.luajit is optional, it replaces the integrated Lua interpreter with a faster just-in-time interpreter.gmp and jsoncpp are optional, otherwise the bundled versions will be compiledgettext is optional, but required to use translations.There are other optional libraries, but they are not tested if they can build and link correctly.
Use --triplet to specify the target triplet, e.g. x64-windows or x86-windows.
D:/vcpkg/scripts/buildsystems/vcpkg.cmakeRun the following script in PowerShell:
cmake . -G"Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CURSES=OFF
cmake --build . --config Release
Make sure that the right compiler is selected and the path to the vcpkg toolchain is correct.
Requirements:
In the Visual Studio 2017 Installer select Optional Features -> WiX Toolset.
Build the binaries as described above, but make sure you unselect RUN_IN_PLACE.
Open the generated project file with Visual Studio. Right-click Package and choose Generate. It may take some minutes to generate the installer.