orbitersim / orbiter

Open-source repository of Orbiter Space Flight Simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve build process

dimitry-ishenko opened this issue · comments

commented

Current situation:

  1. 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.

  2. 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:

  1. 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.

  2. These submodules should be cloned into orbitersim first, and Orbiter should depend on the local clones.

commented

The dependencies I've identified are:

There are also binary deps, which are already part of Orbiter:

And there is irrKlang which is used by XRsound:

if (IRRKLANG_DOWNLOAD)
# Try downloading the irrKlang library on the fly
set(IRRKLANG_DOWNLOAD_DIR ${ORBITER_BINARY_ROOT_DIR}/Extern/irrKlang/${ARCH}/)
if (BUILD64)
set(IRRKLANG_URL "https://www.ambiera.at/downloads/irrKlang-64bit-1.6.0.zip")
set(IRRKLANG_DIR ${IRRKLANG_DOWNLOAD_DIR}/irrKlang-64bit-1.6.0)
else()
set(IRRKLANG_URL "https://www.ambiera.at/downloads/irrKlang-32bit-1.6.0.zip")
set(IRRKLANG_DIR ${IRRKLANG_DOWNLOAD_DIR}/irrKlang-1.6.0)
endif()
if (EXISTS ${IRRKLANG_DIR})
message(STATUS "Found a previously downloaded irrKlang package.")
else()
message(STATUS "Downloading irrKlang ...")
file(MAKE_DIRECTORY ${IRRKLANG_DOWNLOAD_DIR})
file(DOWNLOAD ${IRRKLANG_URL} ${IRRKLANG_DOWNLOAD_DIR}/irrKlang.zip)
file(ARCHIVE_EXTRACT INPUT ${IRRKLANG_DOWNLOAD_DIR}/irrKlang.zip
DESTINATION ${IRRKLANG_DOWNLOAD_DIR})
endif()
endif()

commented

As a first step, could someone with write-access to orbitersim please fork the following repos:

Next, we will try to turn them into submodules.

commented

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.

commented

PR #347 was merged. Closing.