speed-dreams-code/cmake
Xavier Del Campo Romero 2e250d0b91
Revamp Debian and NSIS packaging
The existing scripts for Debian and NSIS packaging were too complex and
dealt unnecessarily with lower level details that should be already
handled by CMake and CPack.

- Packaging-related scripts have been moved to the new cpack/ directory.
There, CPack variables common to all generators are defined in
cpack/common.cmake, and then generator-specific variables are defined
independently (e.g.: cpack/debian.cmake and cpack/nsis.cmake).

- Packaging is now optionally done at a second stage, by running
`cpack -G <generator>` on the build directory. This removes the
requirement to branch based on the system name, and instead all CPack
variables are assigned unconditionally.

- Since now only one version of the game is packaged, there is no need
to maintain the complex scripts in packaging/ and packaging/windows that
used to deal with all variants (e.g.: "wip-cars-and-tracks",
"hq-cars-and-tracks", etc.).

- The use of CPACK_NSIS_EXTRA_INSTALL_COMMANDS,
CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS and CPACK_NSIS_CREATE_ICONS_EXTRA
should not be required, let alone modifying the HKLM registry manually,
since CPack already provides everything required to set up the
installer, the uninstaller and shortcuts.

- $INSTDIR is not required, since NSIS would already prepend the
target installation directory.

- PROJECT_VERSION_METADATA is not a standard CMake variable.
CMAKE_PROJECT_VERSION_TWEAK is instead meant for this purpose. [1]

- OPTION_PACKAGING and OPTION_ALL_IN_ONE_PACKAGING were removed since
packaging will always be available, yet optional. Packagers must then
run CPack on a second stage, as described above.

- Outdated comments were removed to avoid confusion.

TODO:

- Add shortcut to track editor on NSIS.

- dmg packaging was not revamped because of lacking compatible
hardware, but still it has been moved to cpack/dmg.cmake.

- Windows portable packaging (OPTION_PORTABLE_PACKAGING) has been left
out since it required 7z and relied on several hacks to work.
Furthermore, portable versions of the game were already not released on
the latest release, either. [2]

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_VERSION_TWEAK.html
[2]: https://sourceforge.net/projects/speed-dreams/files/2.3.0/
2025-01-12 22:47:36 +01:00
..
checks.cmake guiscreen.cpp: Reduce minimum required OpenGL version 2025-01-07 00:28:46 +01:00
CMakeLists.txt add FindcJSON.cmake 2024-07-31 14:26:04 +00:00
config.h.in.cmake Look up SD_DATADIR_ABS if SD_DATADIR not found 2024-12-31 08:34:49 +01:00
customthirdparty.cmake customthirdparty.cmake: Optionally install libwinpthread 2024-10-28 05:56:09 +00:00
doxygenconfig.in.cmake String trailing whitespaces 2024-07-30 21:45:07 +00:00
FindcJSON.cmake fix for FindCJSON.cmake from Joe 2024-08-04 17:38:07 +00:00
FindENET.cmake String trailing whitespaces 2024-07-30 21:45:07 +00:00
FindGLM.cmake String trailing whitespaces 2024-07-30 21:45:07 +00:00
Findminizip.cmake cmake: Set INTERFACE_* properties 2024-10-27 08:00:07 +00:00
FindOGG.cmake Simplified and made to work on OS X 2015-08-22 17:00:14 +00:00
FindPLIB.cmake FindPLIB.cmake: Add ssgAux as name hint 2024-10-27 07:39:00 +00:00
Findrhash.cmake cmake: Set INTERFACE_* properties 2024-10-27 08:00:07 +00:00
FindSDL2.cmake FindSDL2.cmake: Do not require mingw32 library 2024-10-27 08:00:54 +00:00
FindSDL2_mixer.cmake Redo musicplayer to use sdl2_mixer 2021-08-31 15:49:49 +00:00
FindSOLID.cmake 3rdParty-devel: Find libbroad and libmoto 2024-10-27 08:05:35 +00:00
FindSQLITE3.cmake String trailing whitespaces 2024-07-30 21:45:07 +00:00
FindTinyGLTF.cmake String trailing whitespaces 2024-07-30 21:45:07 +00:00
FindVORBIS.cmake Simplified and made to work on OS X 2015-08-22 17:00:14 +00:00
FindVORBISFILE.cmake Simplified and made to work on OS X 2015-08-22 17:00:14 +00:00
fixbundle.cmake.in Cleaned up some MacOS install code 2020-04-12 21:41:22 +00:00
install.cmake cmake: Do not install anything as DATA 2024-12-31 06:14:07 +01:00
internaldeps.cmake internaldeps.cmake: Deprecate legacy macros 2024-10-27 07:59:26 +00:00
macros.cmake cmake: Get SD_DATADIR from speed-dreams-data package 2024-12-31 06:14:06 +01:00
options.cmake Revamp Debian and NSIS packaging 2025-01-12 22:47:36 +01:00
prerelease.cmake Remove $Id$ 2024-09-30 05:17:15 +00:00
prereleaseutils.cmake Fix trailing whitespaces and ending newlines 2024-09-30 05:23:49 +00:00
robot.cmake cmake: Do not install anything as DATA 2024-12-31 06:14:07 +01:00
robot.def.in.cmake Re #307 Split the big macros.cmake into several smaller and better readable files 2012-09-14 18:39:40 +00:00
speed-dreams-2.rc.in.cmake Set executable icon 2025-01-12 22:46:34 +01:00
splitargn.cmake Remove svn:keywords property from the repository 2024-10-02 15:30:18 +00:00
thirdpartydeps.cmake cmake: Rely on CURL::libcurl instead of CURL_LIBRARY 2024-10-27 07:54:00 +00:00
uninstall.cmake Fixed #59 : add uninstall target to the build system + generate clobber.sh/bat script for full in-source build files cleanup + moved files to the cmake folder 2010-09-07 21:34:19 +00:00