Commit graph

71 commits

Author SHA1 Message Date
07cda261ee
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 01:21:21 +01:00
1338c40b46
CMakeLists.txt: Add HOMEPAGE_URL to project
This is later used by CPack for its CPACK_PACKAGE_HOMEPAGE_URL. [1]
This requires CMake >= 3.12, which was released circa 2018. [2]

[1]: https://cmake.org/cmake/help/latest/module/CPack.html#variable:CPACK_PACKAGE_HOMEPAGE_URL
[2]: https://cmake.org/files/v3.12/
2025-01-11 23:21:35 +01:00
7700b68d87
CMakeLists.txt: Reduce version to 2.3.0
Some checks failed
/ build (pull_request) Has been cancelled
Until version 2.4.0 is not released, it is better to keep it as 2.3.0
since `git describe --tags --dirty` would return `v2.3.0-...` until the
`v2.4.0` tag is created.

Accordingly, speed-dreams-data also reduced its version to 2.3.0. [1]

[1]: 5c58ce805d
2025-01-07 00:18:47 +01:00
198f96295a
CMakeLists.txt: Introduce SD_ASSUME_DATADIR
This repository depends on the speed-dreams-data package in order to
generate a working package. However, in the context of CI/CD, it is
desirable to build this package without depending on the
speed-dreams-data, and instead assume it would be found on a standard
location.

Therefore, this would allow the generation of artifacts that install to
standard locations, such as Debian packages.
2025-01-04 11:55:19 +01:00
95f0bb57e6
CMakeLists.txt: Move call to project() to the top
Otherwise, references to standard CMake variables such as
CMAKE_INSTALL_PREFIX [1] would return an empty string.

Note: for some reason, CMake only documents this behaviour for other
variables such as PROJECT_SOURCE_DIR or PROJECT_BINARY_DIR, but not
CMAKE_INSTALL_PREFIX. [2] However, it was reproducible.

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html
[2]: https://cmake.org/cmake/help/latest/command/project.html
2025-01-04 11:51:37 +01:00
bd2880e37b
Look up SD_DATADIR_ABS if SD_DATADIR not found
Commit 744677c3a6f3e6c1c463fe55b7b5408355ffe89b from speed-dreams-data
replaced the definition for SD_DATADIR from an absolute path to a
relative path. This was done in order to allow a relative path to be
looked up first by GfApplication::parseOptions() (as required by Windows
and macOS builds), and then look SD_DATADIR_ABS if not found (as
required by in-tree builds).
2024-12-31 08:34:49 +01:00
ef04856f25
cmake: Replace SVN versioning with git-describe(1)
Now that the project has been migrated from SVN to Git,
the complex logic to determine the project version is now no longer
needed, since Git can achieve the same effect with git-describe(1). [1]

TODO: CPack-related code should be also updated accordingly.

[1]: https://git-scm.com/docs/git-describe
2024-12-31 06:50:42 +01:00
58a4692905
CMakeLists.txt: Remove obsolete < 3.0.2 checks
CMake 3.0.2 was released over ten years ago. [1] It is therefore assumed
that more modern CMake versions are already widely available.

[1]: https://cmake.org/files/v3.0/
2024-12-31 06:25:57 +01:00
6fb613cc89
cmake: Do not install anything as DATA
Since the migration from SVN to Git, the data/ directory was put into a
separate repository, so that the engine repository should never install
anything there.
2024-12-31 06:14:07 +01:00
e93d3a9900
cmake: Leave SD_DATADIR empty if undefined
Otherwise, if the speed-dreams-data package is not found, SD_DATADIR
would expand to "/", which is a valid directory that the game would
attempt to look up.
2024-12-31 06:14:06 +01:00
522022fe1f
Remove xmlversion
This command line tool was meant to generate a XML file (typically,
version.xml) containing the version numbers for a list of files defined
by the SD_INSTALL_FILES CMake macro. Then, the game would read this XML
file and copy files around if an update was needed.

Unfortunately, this introduced a circular dependency between the engine
and data repositories, as the engine repository would rely on the data
directory to know the file list, and the data repository would rely on
the xmlversion executable to be available, and therefore the engine
repository.

Ultimately, none of this was needed: it is much simpler to define a
static, line-separated list of files in the data repository, and then
let the game figure out the versioning by itself. This renders
xmlversion entirely redundant, and therefore breaks the circular
dependency. As a bonus, some overly complex CMake stuff could be
removed.
2024-12-31 06:14:06 +01:00
cf18241a16
cmake: Get SD_DATADIR from speed-dreams-data package
So far, the game assets were located in the same repository as the game
engine. Since data and engine are split into different repositories, now
this project requires users to assign the CMAKE_PREFIX_PATH variable [1]
to indicate the location, only in the case of non-standard locations.

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
2024-12-31 06:14:06 +01:00
7bd0fe9fa9
CMakeLists.txt: Do not depend on data/ 2024-12-31 05:23:42 +01:00
da0953da0e CMakeLists.txt: Ensure LF-terminated
Former-commit-id: d9c509125842c707c489868cf76b53701be6bbfe
Former-commit-id: 1dfc1324ddbbd0620a1c1ec16e149e4c769bca3d
2024-12-25 07:37:58 +01:00
xavi92
4681971d6d Remove svn:keywords property from the repository
These properties are not transmitted with git-svn(1) [1], which might
then cause failed patches when modifying lines close to these
properties.


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9554 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6ed21e1fe12d01a370842418c35722c75117a30a
Former-commit-id: 8ecd21b7c0211cd000b10b3f0032980f63c06398
2024-10-02 15:30:18 +00:00
xavi92
6d7ca06e02 String trailing whitespaces
The following shell script was used:

while read f
do
        sed -Ei 's/[[:space:]]+$//g' "$f"
done <<EOF
$(svn ls -R | grep \
        -e '.\cpp$' \
        -e '\.cmake$' \
        -e '\.txt$' \
        -e '\.cppcheck$' \
        -e '\.frag$' \
        -e '\.h$' \
        -e '\.hpp$' \
        -e '\.vert$' \
        -e '\.xml$' \
        -e '\.java$' \
        -e '\.c$')
EOF

As a side effect, this has also converted some files from CRLF line
endings to LF.

File extensions such as .ac or .osg were intentionally left out because
those usually are very large files generated by tools.



git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9507 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6c1e5ab34415982ec77fc92a77e1b1c149518eca
Former-commit-id: c6cf9480ae7c1d2f9a999eb6c6b976eef8bae3ba
2024-07-30 21:45:07 +00:00
beaglejoe
42316114fa Add option to create portable app for Windows
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9208 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: cc1671f4a8010971f5a01ae4d699d4b2b7baca35
Former-commit-id: 711be01c72c5ad62a50fde24d5cf3d339bb06226
2023-11-05 22:25:58 +00:00
beaglejoe
83565828e5 Fix CMake warning
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9184 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d767d2e273538fbb3f51cb9632b84462d65a3837
Former-commit-id: 7712f03f8b70b077da09ed4b995b99118a44a36a
2023-10-29 15:54:29 +00:00
beaglejoe
751cf65e5d revert 9177 Fix CMake warning
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9180 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: cf9b7feb0db60fe1d617f9900488a8cc56e63318
Former-commit-id: 029caa6b8e22275e350c019be31fba69a521b890
2023-10-29 13:07:05 +00:00
beaglejoe
2bfedd240e Fix CMake warning
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9177 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 59426cc4dc59ad452929c0514a2fbcbd0dfda814
Former-commit-id: d84e8e5fe208350a93e072625757a0f15c2c91eb
2023-10-28 21:32:39 +00:00
beaglejoe
d69955106b Fix build on Mac
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8883 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a15c6026767444f296c32d675913166f6a57fd2f
Former-commit-id: 1c07da907f61e4792a0b0981574c1246f49c0cec
2023-04-17 13:40:26 +00:00
beaglejoe
6db40f4f9b Update version for future release
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8787 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 248de937c21e6b0f4d415778a27691fe090f0fdc
Former-commit-id: e959ab70654b5b24ff5013c77e7f6db648637a2f
2023-03-13 13:45:07 +00:00
beaglejoe
db7867f5e9 revert last change for version update
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8775 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6fb1762d42ae824fb2eea0e926aa612335f7b1d1
Former-commit-id: 4939546c2c7e09a58b4c9d3fac7e32ec0fde62ae
2023-03-09 19:12:58 +00:00
beaglejoe
6aa894034f Update version for future release
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8774 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f77782a2d4802b7cff480ea1c0e90792b67621ac
Former-commit-id: fac40f424ed30548144e0d1232c23f5b5c219e94
2023-03-09 18:20:35 +00:00
beaglejoe
6187546ca3 Update version
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8574 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8a7d7eaff802c4849f23c099930b9e0790c4bd24
Former-commit-id: b90fbfc47b6d9db7e3a27b107ccb87a7b9d6b7fe
2022-10-09 20:14:26 +00:00
beaglejoe
84935cd39e Added checks for CMake version for newer features
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8325 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 6a1de35b6d38fe05880bbcefcb730a8e7c7b6015
Former-commit-id: 5e6ed948d6cae672ed3f25d5ebe4b42e6f3a0193
2022-07-20 03:23:27 +00:00
beaglejoe
a1ec191819 Add OPTION_ALL_IN_ONE_PACKAGING to make one big installer for Windows(off by default)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8322 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 582464d0e8cc5d0012201ef40649cc4d2d997787
Former-commit-id: 35e68c900e120d7990fa1cc0e84378e7e96d759e
2022-07-18 23:55:34 +00:00
beaglejoe
e572043dfd Quiet a CMake warning
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8264 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 49af63e67eecd3521d5c0fc69c78ed4f36c5c37c
Former-commit-id: b6553b366ad61dadab845e432678d32c1f174ec2
2022-06-26 14:52:13 +00:00
beaglejoe
20c550ff1a Change version to 2.2.4
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7620 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 67c4145b972958de13cc4311c42104a8d55cafcc
Former-commit-id: 9f06d8483107046652e8d707fb7e9801acdabab2
2021-08-07 22:45:25 +00:00
beaglejoe
e459b96cc0 WIP for Build automation Ticket #1069
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7574 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 334b33415226ffeee7549f6205cf0bcf1bbc52b5
Former-commit-id: 5e5a5669e39daace115af8558b9e5abc8ee39e91
2021-06-16 16:18:54 +00:00
beaglejoe
16d432a04a Re-enable INSTALL_SD_CMAKE() but only for in-source builds,as it installs to the source directory
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7551 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 71b4fe2e292910a5900a5f733e7b2f64b09cb60f
Former-commit-id: a4848ff058c100cfead5fdec55e96d48269f50b5
2021-06-06 13:38:54 +00:00
beaglejoe
cc94fba714 Disable INSTALL_SD_CMAKE() for non-Linux platforms as it installs to the source directory
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7528 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5b73c0f63c6408fba6b050b8bf1883685e0d65bf
Former-commit-id: 8c8a70d42c898050ea178f546ccfb0da026b5c7c
2021-05-25 17:15:54 +00:00
beaglejoe
c74256375e Automated some Installer variables
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7469 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 3ce2201bb8f895e7bd1c813b55a40f29ef2512ac
Former-commit-id: f6d8d5996dbcd50c1136d6a33cafcb2f60538fe8
2021-04-30 15:44:43 +00:00
iobyte
9102d353fc fix cmake warning when both old and new opengl libraries are available
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7231 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 524b36026f2d8e248de997d1970d3d3170695b00
Former-commit-id: 3315d5a90f3eeef45d35eb3177ea803654c16019
2020-12-03 18:35:19 +00:00
beaglejoe
c8c7cbd950 Add install step for missing files for packaging
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7155 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 5b99038053fd1a7afe2d49002de484b6f9bfb044
Former-commit-id: a0d89099d1de7c11258463c042348d6cfaa6495c
2020-07-13 12:09:48 +00:00
beaglejoe
ccec0ee45f WIP for ticket 1047 Automate the Build and Package cycle for MacOS
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6928 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 4f47f101cd9c62184e1469496a0e2bb3eeca6525
Former-commit-id: 8b036490454775236451f00caf9f78684e8d1181
2020-04-20 02:34:33 +00:00
beaglejoe
92af989750 Add code to display CMake version
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6881 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 68c517383dcac457bba36ae17c314f9c936a5d8f
Former-commit-id: 3c1b67593ea846b7317cbb39c3d561479e2dd5b7
2020-04-01 19:01:27 +00:00
beaglejoe
2fa9b091dc Ticket #1021 wip
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6874 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8711e4e3683d9dd5f3ff93a8766e2e34a67842fe
Former-commit-id: 85966ce188f4633263d543c737ffc3bdbbe483a3
2020-03-30 05:21:39 +00:00
beaglejoe
179862189e Ticket #1021 wip
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6789 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 1ae932c7f9e50efffa7174403b2cfc1ad1f938af
Former-commit-id: 56213313c02ad55fd2b53d4f33c85d7497c5dd47
2019-12-06 19:40:01 +00:00
beaglejoe
89bc5be2f2 Added OPTION_PACKAGING to control custom packaging (WIP)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6669 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 9200871e0e429b1d8103da1458d43562d13c698a
Former-commit-id: 543947e5437cec8cdfcb8d2e7e358450f1643e70
2019-06-04 00:55:22 +00:00
beaglejoe
000366914a Fixed CMake warnings
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6568 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 0a976ae353ab2da3d68c1b715fad80944b0880c0
Former-commit-id: c5df2c9380a0c5e2495a758717ed8885d178d4e8
2018-11-28 05:06:03 +00:00
beaglejoe
d6813cb317 Updated Version to 2.3.0
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6567 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 753a56bf0f9771a9130d647738710e1ffd83826e
Former-commit-id: 00bf4af8c1c30ebbb1fcfca3d8473694aaef44cd
2018-11-22 01:06:58 +00:00
beaglejoe
a3bc3be036 Changed Next Version to 2.2
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5802 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 125a9292160e139fa90ed784caa484313ea49148
Former-commit-id: e6448213012155ca3f7172a78b3d54c0065790b8
2014-07-09 15:33:31 +00:00
mungewell
e917b8605a Fix CMake error re TODO.txt
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5776 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 171217660c87142e52c40ce817c252b2e765cd30
Former-commit-id: 9e44c462dc3899605373014ea35c0d25659329b3
2014-06-18 01:57:09 +00:00
beaglejoe
c64a3d83c2 Fixed OPTION_AUTOVERSION for new sourceforge url
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5406 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: f22a0e29c56a93b9ef342e5145274e0ac79fbf4f
Former-commit-id: ddbf69297cd5fd70585321445c303d2ecc06153a
2013-04-14 00:30:45 +00:00
pouillot
72754a9537 Re #58 Fixed crash on loading credits menu + QtCreator+MinGW build + CMake configuration polishing
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5364 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 03630704ca851d833f367cc29b6e5e1a99051b4e
Former-commit-id: 7847f54e8747e1bca7678ab3f6e0d941266e0e40
2013-03-25 19:40:53 +00:00
pouillot
f288dade73 Re #58 Last steps completed (works under Linux)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5349 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c4340c47cbe3d000186c1305c3505453bd7e0732
Former-commit-id: 600818482cc83f3dfbf26d34d93b52e15a4db5e8
2013-03-23 17:59:22 +00:00
pouillot
160f4ce957 Re #721 Made most useful source files appear in QtCreator and MSVC IDEs, for easy editing (+ cleaned up commented CMake code)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4959 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: b6c2771d4747303d13da23edd8eb692e35de6a6e
Former-commit-id: 7a90e9ab3670aa2da45001ca04b7bc080df03c7b
2012-09-23 11:22:50 +00:00
pouillot
fd5ace6e31 Re #307 Split the big macros.cmake into several smaller and better readable files
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4943 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 97d27758fb627b375f108915683eecd782b9ac59
Former-commit-id: 80a7b425c51272694d4d9518aed18d732474b938
2012-09-14 18:39:40 +00:00
pouillot
361db1099a Re #721 Added support for building with QtCreator + MinGW 4.7 (using the 'MinGW Makefiles' CMake generator)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4928 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: d9cb38ad77b18715f68da04d3095e2028e667ae6
Former-commit-id: 0dbec0c92e15ffa411e15e8ab45b1daedc99d4d4
2012-09-09 08:37:40 +00:00