When retrieving the source from git, the version string is not known
in advance, and git is invoked to compute it. In some environments
such as Guix, there is no git metadata kept during the build as this
would introduce non-determinism; it is thus necessary to be able to
manually set the version (which is displayed when the game launches).
* CMakeLists.txt (VERSION_LONG): Make it a cache variable, so that
users can override it using e.g., -DVERSION:STRING=2.4.0.
This doesn't apply to every system. For those systems on which it
does apply, their tooling should be setting CMAKE_INSTALL_RPATH to
their system-global locations.
* CMakeLists.txt (CMAKE_INSTALL_RPATH): Remove /usr/${SD_LIBDIR}/lib.
The <SOLID/solid.h> header would not be made available when using a
pkg-config discovered FreeSOLID library.
* cmake/FindSOLID.cmake: Add IMPORTED_TARGET argument to
'pkg_check_modules' calls.
[PKGCONFIG_FOUND && SOLID_FOUND]: Alias 'solid' to PkgConfig::SOLID.
Fixes: #45
6df4b6bf introduced a workaround to allow Ubuntu and Debian packages to
work with default flags, since CPack does not adjust the rpath of the
package executables according to its CPACK_PACKAGING_INSTALL_PREFIX. [1]
However, this workaround caused a regression on those distributions not
using /usr as their CPACK_PACKAGING_INSTALL_PREFIX, such as Guix.
Until CPack is fixed, removing this line forces build-deb.yml to set a
non-default CMAKE_INSTALL_PREFIX that matches
CPACK_PACKAGING_INSTALL_PREFIX.
[1]: https://cmake.org/cmake/help/latest/variable/CPACK_PACKAGING_INSTALL_PREFIX.html
Forgejo does not give access to the repository secrets to forked
repositories, which means it is not possible to upload artifacts.
As a workaround, skip the complete step.
Calling git-clone(1) alone to fetch the repository is not enough under
some circumstances:
- If a pull request is created from a forked repository,
GITHUB_REPOSITORY would not point to the forked repository, but the
upstream repository. [1]
- GITHUB_HEAD_REF is undefined on push or workflow_dispatch events. [1]
In order to circumvent these issues, most people would use
actions/checkout@v4 [2], but we have some limitations that do not allow
us to take that approach:
- We want to avoid downloading OCI images from DockerHub, since we
consider it a non-free network. However, actions/checkout@v4 requires
the `node` image. [3]
- Even if we wanted to use such image, it requires over 2 GiB of disk
space (!) just to perform actions that could be easily replaced with
a simple shell script.
- And, more importantly, our disk space is currently limited.
Forgejo Actions writes a JSON file into GITHUB_EVENT_PATH, which means
the CI/CD must perform some trivial lookups using jq(1) to extract the
information.
Therefore, in order to abstract those implementation details away from
the CI/CD, forgejo-clone(1) [4] was created and bundled with the images.
[1]: https://forgejo.org/docs/latest/user/actions/#env-1
[2]: https://code.forgejo.org/actions/checkout
[3]: cbb722410c/action.yml (L107)
[4]: https://forge.a-lec.org/speed-dreams/forgejo-clone
This commit fixes a regression introduced by the cvs2git conversion and
ultimately caused by an untracked release of FreeSOLID.
commit 208c6e20311d6669ab0c74ace71a1fa34afb2e0e
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Fri Jan 31 00:22:17 2025 +0100
Synchronise with 2.1.2 release
Otherwise, if no drivers are generated by GfDrivers::ensure_min(), the
driver type (e.g.: dandroid) would not be available from the driver
selection menu because its parameter file (e.g.: dandroid.xml) would not
be available.
The following commit provides a fix:
commit 06aadb301f081ce837a11a6bdcc89d77fa258c5d
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Thu Jan 30 23:00:35 2025 +0100
simplix: Remove obsolete simplix.xml
This was a leftover from the dynamic driver generation feature. Now that
drivers are generated from GfLocalDir(), simplix.xml is not consumed
from GfDataDir() any more.
As opposed to POSIX, Windows lacks a rpath mechanism, which means that
shared libraries (aka dlls) must reside next to the executable. [1]
Since freesolid is no longer built by the 3rdParty build system (i.e.,
it is now a submodule), CMake must copy its libraries to the bin/
directory so simuv5 and friends can find them.
Note that no modifications were required for the install step, since
libraries would be already installed by the submodule.
Fixes #42
[1]: https://stackoverflow.com/questions/3272383/linking-with-r-and-rpath-switches-on-windows
The qualification mode relies on running the race loop as fast as
possible, in order to reproduce the race results in a much shorter time.
However, the maximum frame rate limitations introduced by the commit
below caused a regression to the qualification mode, because now the
game would GfSleep most of the time and only run the race loop once
every frame (e.g.: every 1/60 seconds):
commit 9914e9d24c
Author: xavi92 <xavi92@30fe4595-0a0c-4342-8851-515496e4dcbd>
Date: Mon Jul 15 02:52:31 2024 +0000
Implement maximum frame rate limit
Therefore, since it is required to run the physics loop as many times as
possible, the recompute callback variant with `unsigned ms` is used so
that it is run in a loop until the time available to the callback
expires.
Fixes#37 [1].
[1]: #37
Because of this commit:
commit aa2d7c17c135a6abb00dff9bde7bc896bd573e12
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Mon Jan 27 22:09:22 2025 +0100
menu: Remove OnlineButton and NetworkButton
Networked multiplayer is considered too immature for production, so this
commit suggests to remove it from the menus in order to avoid confusion
and frustration from players, at least until a proper implementation is
in place.
These physics engines were removed by previous commits:
commit 999eeed320
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Sat Jan 25 01:37:16 2025 +0100
Remove simuv2
commit 022b19a141
Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
Date: Sun Jan 26 23:33:49 2025 +0100
Remove simuv2.1, add FreeSOLID as a submodule
Also, make simuv5 the default value.
As opposed to simu >= 3.0, simu 2.1 did not consider air or wheel
temperatures. This would have several consequences:
- Some drivers such as shadow rely on these parameters to calculate tire
grip. If temperature air is zero (i.e., 0K), no grip is assumed
and therefore speeds are also assigned to zero, making the driver not to
move at all.
- Invalid temperature values (i.e., 0K) would be shown on the UI, both
in ssg and OSG.
Unfortunately, simuv2.1 bundled the SOLID-2.0 library (aka FreeSOLID)
because the library is not available from most GNU/Linux distributions
yet.
In order to solve this situation, the FreeSOLID library was migrated
from CVS to Git [1] so it could be used as a submodule, and therefore
let the build system decide whether to optionally use the in-tree copy.
That said, packaging/3rdParty-devel has dropped FreeSOLID in favour of
the submodule, since it must always be built from source anyway.
[1]: https://forge.a-lec.org/speed-dreams/freesolid
${{ env.GITHUB_HEAD_REF }} is not available to workflow_dispatch [1],
so the branch name must be manually extracted from
${{ env.GITHUB_EVENT_PATH }}.
[1]: https://forgejo.org/docs/latest/user/actions/#env-1