From fd4c8d8ffcafae644bf6907db7e205730a09c68e Mon Sep 17 00:00:00 2001 From: Automatic Release Builder Date: Mon, 28 Sep 2020 16:29:32 +0100 Subject: [PATCH] AppImage fixes: reduce the size, fix Osg-Plugin search Set OSG_LIBRARY_PATH so our bundled OSG plugins are used by default. Reduce which QtQuick plugins we bundle, and ensure we copy libraries using archive mode to preserve symlinks. Also remove static libs. All of the above should drastically reduce the image size. --- build_appimage.sh | 14 ++++++++++---- build_release_linux.sh | 7 +++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build_appimage.sh b/build_appimage.sh index 99c3b21..6f2971a 100755 --- a/build_appimage.sh +++ b/build_appimage.sh @@ -39,12 +39,17 @@ mkdir -p appdir/usr/ssl #copy everything we need in cp dist/bin/* appdir/usr/bin -cp -d dist/lib64/* appdir/usr/lib + +cp -a dist/lib64/* appdir/usr/lib + +# remove SimGearCore,Scene and any other static libs which leaked +rm appdir/usr/lib/lib*.a + cp -a dist/lib64/osgPlugins-3.4.2 appdir/usr/lib + cp -r dist/share appdir/usr -# FIXME : only copy the QML plugins we actually need -cp -a /usr/lib64/qt5/qml/QtQuick* appdir/usr/qml +cp -a /usr/lib64/qt5/qml/QtQuick.2 appdir/usr/qml cp /usr/lib64/libsoftokn3.* appdir/usr/lib cp /usr/lib64/libnsspem.so appdir/usr/lib @@ -60,7 +65,8 @@ cat << 'EOF' > appdir/AppRun HERE="$(dirname "$(readlink -f "${0}")")" export SIMGEAR_TLS_CERT_PATH=$HERE/usr/ssl/cacert.pem echo SIMGEAR_TLS_CERT_PATH=$SIMGEAR_TLS_CERT_PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HERE}/usr/lib +export LD_LIBRARY_PATH=${HERE}/usr/lib:${LD_LIBRARY_PATH} +export OSG_LIBARARY_PATH=${HERE}/usr/lib echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH exec "${HERE}/usr/bin/fgfs" "$@" EOF diff --git a/build_release_linux.sh b/build_release_linux.sh index 46f1133..a73a36f 100755 --- a/build_release_linux.sh +++ b/build_release_linux.sh @@ -78,8 +78,11 @@ else echo "warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases" fi -# now we uploaded symnbols, strip the binary -strip $WORKSPACE/dist/bin/fgfs +# now we uploaded symnbols, strip the binaries + +strip --strip-debug $WORKSPACE/dist/bin/fgfs +strip --strip-debug $WORKSPACE/dist/bin/fgviewer +strip --strip-debug $WORKSPACE/dist/bin/fgjs #####################################################################################