Improve build process
dimitry-ishenko opened this issue · comments
Current situation:
-
Currently the build process involves fetching Lua, zlib and possibly other things from the Internet.
So, every time someone wants to do a clean build, these packages have to be re-downloaded. This is a waste of time and electrons. Also, if a person is offline, they can't even do a build.
-
The above dependencies (Lua, zlib, etc.) are located in external repositories. This means if the author decides to take it down or move it, the build process is snafu.
Therefore, I would like to propose the following:
-
The external dependencies become git submodules, so they can be fetched once with the Orbiter and don't have to re-downloaded on each clean build.
-
These submodules should be cloned into orbitersim first, and Orbiter should depend on the local clones.
The dependencies I've identified are:
- Lua
orbiter/Extern/lua/CMakeLists.txt
Lines 5 to 9 in f3feab8
- zlib
orbiter/Extern/zlib/CMakeLists.txt
Lines 5 to 9 in f3feab8
- Catch2
Lines 3 to 7 in f3feab8
There are also binary deps, which are already part of Orbiter:
And there is irrKlang which is used by XRsound:
orbiter/Sound/XRSound/CMakeLists.txt
Lines 3 to 22 in f3feab8
As a first step, could someone with write-access to orbitersim please fork the following repos:
- Lua: https://github.com/lua/lua.git
- zlib: https://github.com/madler/zlib.git
- Catch2: https://github.com/catchorg/Catch2.git
Next, we will try to turn them into submodules.
I've submitted PR #347 which converts Lua, zlib and Catch2 into submodules.
@Xyon and/or @dbeachy1 if one of you could please fork the above 3 repos, we can change the submodules to point to local forks instead. This will guarantee continuity of the species in case any of those repos go offline in the future.