This guide contains steps required to allow compilation of Cataclysm-DDA on Windows using Visual Studio and vcpkg.
Steps from current guide were tested on Windows 10 (64 bit), Visual Studio 2017 (64 bit) and vcpkg, but should as well work with slight modifications for other versions of Windows and Visual Studio.
- Computer with modern Windows operating system installed (Windows 10, Windows 8.1 or Windows 7);
- NTFS partition with ~15 Gb free space (~10 Gb for Visual Studio, ~1 Gb for vcpkg installation, ~3 Gb for repository and ~1 Gb for build cache);
- Git for Windows (installer can be downloaded from Git homepage);
- Visual Studio 2017 (or 2015 Visual Studio Update 3 and above);
- Latest version of vcpkg (see instructions on vcpkg homepage).
Note: Windows XP is unsupported!
-
Install
Visual Studio
(installer can be downloaded from Visual Studio homepage). -
Install
Git for Windows
(installer can be downloaded from Git homepage). -
Install and configure
vcpkg
using instruction from vcpkg homepage with following command line:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
vcpkg integrate install
- Install (or upgrade) neccessary packages with following command line:
vcpkg --triplet x64-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
or (if you want to build statically linked executable)
vcpkg --triplet x64-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
vcpkg --triplet x86-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
or (if you want to build statically linked executable)
vcpkg --triplet x86-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
vcpkg upgrade
- Clone Cataclysm-DDA repository with following command line:
Note: This will download whole CDDA repository. If you're just testing you should probably add --depth=1
.
git clone https://github.com/CleverRaven/Cataclysm-DDA.git
cd Cataclysm-DDA
- Open one of provided solutions (
msvc-full-features\Cataclysm-vcpkg.sln
for dynamically linked executable ormsvc-full-features\Cataclysm-vcpkg-static.sln
for statically linked executable) inVisual Studio
, select configuration (Release
orDebug
) an platform (x64
orx86
) and build it.
Note: This will compile release version with Sound, Tiles and Localization support (language files won't be automatically compiled).
- See COMPILING.md for detail about building and debugging.