Skip to content
Cong edited this page Jan 23, 2015 · 8 revisions

Packaging for Windows is not trivial; the binaries produced by Visual Studio are not compatible with Windows XP, an important target platform. It is theoretically possible to set up Visual Studio to produce XP-compatible binaries, but due to an incompatibility with the SDL libraries, this approach cannot be used. Hence, the packaging instructions here use MinGW to produce the binaries and Visual Studio to complete the package. These steps must be followed carefully and in the exact order shown.

Prerequisites

  • [Visual Studio developer setup](wiki/Developer Getting Started: Visual Studio)
  • [MinGW developer setup](wiki/Developer Getting Started: MinGW)
  • NSIS

Build cdogs-sdl executable

  1. Follow the [MinGW developer setup](wiki/Developer Getting Started: MinGW) instructions to build cdogs-sdl.exe.

Package installer

  1. Follow the [Run CMake section of the Visual Studio developer setup](wiki/Developer Getting Started: Visual Studio#run-cmake) to create Visual Studio projects. Beware the difference in CMake output directories.

  2. Open the Visual Studio solution and build the PACKAGE project, using the Release configuration.

  3. Copy cdogs-sdl.exe built using MinGW to /Release, overwriting the binaries there built by Visual Studio.

  4. In Visual Studio, build the PACKAGE project again. This time the package will be built using the MinGW-compiled binaries. The installer will be in /C-Dogs SDL-VERSION-win32.exe. Make sure to test it in Windows XP and Windows Vista/7/8.