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.
This commit is contained in:
Automatic Release Builder 2020-09-28 16:29:32 +01:00
parent 714c4ac51c
commit fd4c8d8ffc
2 changed files with 15 additions and 6 deletions

View File

@ -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

View File

@ -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
#####################################################################################