Add speed-dreams-data as submodule #18

Merged
xavi merged 5 commits from data-submodule into main 2025-01-15 07:17:06 +01:00
Owner

There were several reasons behind splitting the old SVN monorepo in two
Git repositories:

  • It made packaging for GNU/Linux distributions easier, since
    speed-dreams-data would be often considered as a separate,
    portable package, as typically done in other video games. For example,
    0ad and 0ad-data, cube2 and cube2-data, and so on.

  • It reduced the repository size for the engine repository as much as
    possible, which is often desirable for CI/CD runs and developers with
    poor connectivity and/or who only want to perform quick changes to the
    source code. After all, speed-dreams-data is around 294 MiB as of the
    time of this writing, whereas speed-dreams-code is around 36 MiB.

However, there are situations where having both repositories together is
desirable or even mandatory:

  • In the case of Windows builds, both repositories must be configured by
    the same top-level CMakeLists.txt so that files and targets from both
    repositories are installed simultaneously, and therefore packaged into
    the NSIS-based installers. Otherwise, it would require users to run two
    separate installers, one for speed-dreams-code and another for
    speed-dreams-data.

  • Having a submodule makes which version from speed-dreams-data is
    compatible with speed-dreams-code clearer.

  • Not having a submodule required developers to both fetch the
    speed-dreams-data repository and install it, which means double disk
    space usage.

  • Some users might still prefer to work on a monorepo and not have to
    worry about installing speed-dreams-data beforehand.

There were several reasons behind splitting the old SVN monorepo in two Git repositories: - It made packaging for GNU/Linux distributions easier, since speed-dreams-data would be often considered as a separate, portable package, as typically done in other video games. For example, 0ad and 0ad-data, cube2 and cube2-data, and so on. - It reduced the repository size for the engine repository as much as possible, which is often desirable for CI/CD runs and developers with poor connectivity and/or who only want to perform quick changes to the source code. After all, speed-dreams-data is around 294 MiB as of the time of this writing, whereas speed-dreams-code is around 36 MiB. However, there are situations where having both repositories together is desirable or even mandatory: - In the case of Windows builds, both repositories must be configured by the same top-level CMakeLists.txt so that files and targets from both repositories are installed simultaneously, and therefore packaged into the NSIS-based installers. Otherwise, it would require users to run two separate installers, one for speed-dreams-code and another for speed-dreams-data. - Having a submodule makes which version from speed-dreams-data is compatible with speed-dreams-code clearer. - Not having a submodule required developers to both fetch the speed-dreams-data repository and install it, which means double disk space usage. - Some users might still prefer to work on a monorepo and not have to worry about installing speed-dreams-data beforehand.
xavi added 5 commits 2025-01-15 06:37:26 +01:00
There were several reasons behind splitting the old SVN monorepo in two
Git repositories:

- It made packaging for GNU/Linux distributions easier, since
speed-dreams-data would be often considered as a separate,
portable package, as typically done in other video games. For example,
0ad and 0ad-data, cube2 and cube2-data, and so on.

- It reduced the repository size for the engine repository as much as
possible, which is often desirable for CI/CD runs and developers with
poor connectivity and/or who only want to perform quick changes to the
source code. After all, speed-dreams-data is around 294 MiB as of the
time of this writing, whereas speed-dreams-code is around 36 MiB.

However, there are situations where having both repositories together is
desirable or even mandatory:

- In the case of Windows builds, both repositories must be configured by
the same top-level CMakeLists.txt so that files and targets from both
repositories are installed simultaneously, and therefore packaged into
the NSIS-based installers. Otherwise, it would require users to run two
separate installers, one for speed-dreams-code and another for
speed-dreams-data.

- Having a submodule makes which version from speed-dreams-data is
compatible with speed-dreams-code clearer.

- Not having a submodule required developers to both fetch the
speed-dreams-data repository and install it, which means double disk
space usage.

- Some users might still prefer to work on a monorepo and not have to
worry about installing speed-dreams-data beforehand.
Now that speed-dreams-data is available as a submodule, this allows the
build system to choose it for in-tree builds. Therefore, CMake will
perform in the following order:

1. Do not search the speed-dreams-data package if SD_ASSUME_DATADIR is
   set.
2. Otherwise, do an in-tree build if the submodule has been updated.
3. Otherwise, search for the speed-dreams-data package on standard
   locations and CMAKE_PREFIX_PATH and/or CMAKE_FIND_ROOT_PATH.
4. Otherwise, return an error message.

SD_HAS_DATADIR was rendered redundant, so it has been removed. However,
SD_DATADIR_INSTALL_PREFIX was introduced because it would not equal
SD_DATADIR_ABS for in-tree builds, where an installed version of the
speed-dreams-data package is not required.

In-tree builds now allow to generate NSIS installers with both code and
data.
build-w64-mingw32.yml: Clone repository recursively
All checks were successful
/ build (pull_request) Successful in 21m18s
babc991bce
Now that speed-dreams-data is provided as a submodule, this workflow can
package a NSIS installer that contains both code and data.
xavi force-pushed data-submodule from babc991bce to 8cb2219134 2025-01-15 07:16:51 +01:00 Compare
xavi merged commit bd5f11b80b into main 2025-01-15 07:17:06 +01:00
xavi deleted branch data-submodule 2025-01-15 07:17:07 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: speed-dreams/speed-dreams-code#18
No description provided.