Menu

Supported packaging formats

benblan

Overall description

The packaging of a release is managed by CMake/CPack.
In the main CMakeLists.txt file, we include packing instructions only if we are in release mode :

if(CMAKE_BUILD_TYPE STREQUAL "Release")
    include(Packing)
endif()

This will include the file Packing.cmake in the cmake directory.
This file defines variables that CPack will use to generate the two configuration files :
- CPackConfig.cmake : for binary packages
- CPackSourceConfig.cmake : for source package

To define what package to generate based on the platform, there is a section in Packing.cmake :

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
  set(CPACK_GENERATOR ZIP)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
  set(CPACK_GENERATOR DragNDrop)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
  set(CPACK_GENERATOR DEB)
else ()
  set(CPACK_GENERATOR TGZ)
endif ()

Source Package

For the source, we include everything that is in the root directory. This is managed by CPack.
We only remove the build directory, .git files and the game/version.h file which is generated at configuration time.
The format for packaging the source code is ZIP as it is managed on all platforms.

Debian package (Linux)

  • We deploy the applications and assets under the /usr/local directory
  • There are specific files for the debian package in the packaging/debian directory

DMG package (MacOs)

  • This package is a dmg format with a Bundle app for Freesynd
  • All assets are inside the bundle
  • Specific files for packaging the dmg is in packaging/dmg directory

Zip package (Windows)

  • The zip files contains the binaries
  • The dll libs are delivered in the zip file