Free and open source motorsport sim - Engine source code https://www.speed-dreams.net/
Find a file
Xavier Del Campo Romero 8af4015db8
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-13 00:07:01 +01:00
.forgejo/workflows Add build.yml Forgejo workflow 2025-01-04 13:00:28 +01:00
cmake Revamp Debian and NSIS packaging 2025-01-13 00:07:01 +01:00
cpack Revamp Debian and NSIS packaging 2025-01-13 00:07:01 +01:00
doc download-manager/README.md: Update driver info 2024-12-31 10:42:07 +01:00
packaging Revamp Debian and NSIS packaging 2025-01-13 00:07:01 +01:00
src Set executable icon 2025-01-12 22:46:34 +01:00
.gitignore Add .gitignore 2024-12-31 05:23:42 +01:00
CHANGES.txt Remove trailing newlines 2024-07-30 22:17:48 +00:00
CMakeLists.txt Revamp Debian and NSIS packaging 2025-01-13 00:07:01 +01:00
INSTALL.txt INSTALL.txt: Add new dependencies 2024-07-31 22:41:00 +00:00
LICENSE Rename COPYING.txt to LICENSE 2024-12-31 06:14:05 +01:00
README.md cmake: Get SD_DATADIR from speed-dreams-data package 2024-12-31 06:14:06 +01:00
TODO.txt String trailing whitespaces 2024-07-30 21:45:07 +00:00
unix64.cppcheck add cppcheck config for unix64 2024-06-10 16:34:31 +00:00
win64.cppcheck String trailing whitespaces 2024-07-30 21:45:07 +00:00

Speed Dreams

Speed Dreams is a free and open source motorsport simulator. Originally a fork of the TORCS project, it has evolved into a higher level of maturity, featuring realistic physics with tens of high-quality cars and tracks to choose from.

This repository only contains the engine source code. End users are expected to download the pre-built packages listed below.

The assets repository is located on https://forge.a-lec.org/speed-dreams/speed-dreams-data/

A collage of in-game screenshots

Pre-built packages

Speed Dreams binaries are available for the following platforms:

  • Debian/Ubuntu (TODO)
  • Microsoft Windows (TODO)

Building from source

Speed Dreams can be built from source using the conventional build process in CMake projects:

cmake -B build
cmake --build build/ # Optionally, add -j8 or any other number for faster builds

This assumes the speed-dreams-data package is already installed on a well-known location. If not, use the CMAKE_PREFIX_PATH variable to indicate CMake where to locate an installed version of the speed-dreams-data package:

cmake -B build -DCMAKE_PREFIX_PATH=<path-to-speed-dreams-data>

And then build the project as usual.

If the speed-dreams-data package is not found, the game should still be able to build, but it would not be able to run.

Dependencies

Debian/Ubuntu

sudo apt install git cmake build-essential libopenscenegraph-dev libcurl4-gnutls-dev libsdl2-dev libsdl2-mixer-dev librhash-dev libenet-dev libpng-dev libjpeg-dev zlib1g-dev libminizip-dev libopenal-dev libplib-dev libexpat1-dev libcjson-dev openjdk-17-jdk openjdk-17-jre

The version for the openjdk-* packages might change among distributions.

License

By default, Speed Dreams code is licensed under the GPLv2-or-later license, as specified by the LICENSE file, whereas non-functional data is licensed under the Free Art License by default.

However, some sections of the code and some other assets are distributed under various free (as in freedom) licenses. Please read their license files located in their respective directories for further reference.

Trademark disclaimer

Windows is a registered trademark of Microsoft Corporation.

Ubuntu is a registered trademark of Canonical Ltd.