## Offline build

OGS can be built on systems without internet connection when the following files can be made available on the system:

• The OGS source code. Just archive the full OGS source code directory (also containing the git repository in .git) and un-archive on the target system.
• The CPM source cache. It can be obtained via the OGS package registry (see below).
• Optional: The external dependencies (for MFront, PETSc or LIS) source cache. It can be obtained via the OGS package registry

## CPM

The CPM source cache may change over time. To get the required file id check the package_file_id field in web/data/versions.json, e.g. with:

$jq -r '.cpm.package_file_id' web/data/versions.json 193 # <-- current version on master Now simply download the file with: curl https://gitlab.opengeosys.org/ogs/ogs/-/package_files/[insert ID here]/download --output cpm.tar.gz Un-archive the CPM cache into a directory. Configure OGS as usual but point to the extracted CPM cache: cmake --preset release -DCPM_SOURCE_DIR=./path/to/cpm There will be some CMake warnings from CPM regarding missing git repositories in the cache. You can ignore them. ## External dependencies The external dependencies source cache may change over time. To get the required version check the cache_hash field in web/data/versions.json, e.g. with: $ jq -r '.ext.cache_hash' web/data/versions.json
e6f3f1f4c29c6c5f096f89785e6e245bdf39ac1a # <-- current version on master

On the external dependencies package page download the file ext.tar.gz with the specified version.

Extract the external dependencies cache into a directory. Configure OGS as usual but point to the extracted external dependencies cache:

cmake --preset release -DOGS_EXTERNAL_DEPENDENCIES_CACHE=./path/to/ext

This article was written by Lars Bilke. If you are missing something or you find an error please let us know.
Generated with Hugo 0.101.0 in CI job 237559 | Last revision: September 7, 2022