Switch Appimages to net 5.

This commit is contained in:
Paul Chote
2020-12-30 15:21:39 +00:00
committed by abcdefg30
parent 2fae69c0ba
commit 69ffd70d3f
7 changed files with 11 additions and 80 deletions

View File

@@ -2,43 +2,15 @@
HERE="$(dirname "$(readlink -f "${0}")")"
# Stash original environment values so they can be restored
# when switching to other mods using restore-environment
export OPENRA_ORIG_PATH="${PATH}"
export OPENRA_ORIG_XDG_DATA_DIRS="${XDG_DATA_DIRS}"
export OPENRA_ORIG_DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}"
export OPENRA_ORIG_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
export OPENRA_ORIG_MONO_PATH="${MONO_PATH}"
export OPENRA_ORIG_MONO_CFG_DIR="${MONO_CFG_DIR}"
export OPENRA_ORIG_MONO_CONFIG="${MONO_CONFIG}"
# Override runtime paths to use bundled mono and shared libraries
export PATH="${HERE}/usr/bin:${PATH}"
export XDG_DATA_DIRS="${HERE}/usr/share:${XDG_DATA_DIRS}"
export DYLD_LIBRARY_PATH="${HERE}/usr/lib:${DYLD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
export MONO_PATH="${HERE}/usr/lib/mono/4.5"
export MONO_CFG_DIR="${HERE}/etc"
export MONO_CONFIG="${HERE}/etc/mono/config"
# Update/create the mono certificate store to enable https web queries
if [ -f "/etc/pki/tls/certs/ca-bundle.crt" ]; then
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/pki/tls/certs/ca-bundle.crt
elif [ -f "/etc/ssl/certs/ca-certificates.crt" ]; then
mono "${HERE}/usr/lib/mono/4.5/cert-sync.exe" --quiet --user /etc/ssl/certs/ca-certificates.crt
else
echo "WARNING: Unable to sync system certificate store - https requests will fail"
fi
# Run the game or server
if [ -n "$1" ] && [ "$1" = "--server" ]; then
# Drop the --server argument
shift
exec "openra-{MODID}-server" "$@"
"${HERE}/usr/bin/openra-{MODID}-server" "$@"
elif [ -n "$1" ] && [ "$1" = "--utility" ]; then
# Drop the --utility argument
shift
exec "openra-{MODID}-utility" "$@"
"${HERE}/usr/bin/openra-{MODID}-utility" "$@"
else
exec "openra-{MODID}" "$@"
"${HERE}/usr/bin/openra-{MODID}" "$@"
fi