From 4eedef048dd06ab501a592203f51b0d71b92ff58 Mon Sep 17 00:00:00 2001 From: pigeons Date: Mon, 16 Jan 2017 11:58:17 -0800 Subject: [PATCH] allow QT location to be set with an environment variable variable for libQt5XmlPatterns path QTXML_DIR is same relative path on some systems, use that as default use utils.sh for platform default paths fix dumb copypasta --- linuxdeploy_helper.sh | 26 +++++++++++++++++++++++--- utils.sh | 6 +++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/linuxdeploy_helper.sh b/linuxdeploy_helper.sh index 49f68b81..7bd16d71 100755 --- a/linuxdeploy_helper.sh +++ b/linuxdeploy_helper.sh @@ -9,14 +9,34 @@ GUI_EXEC=$2 platform=$(get_platform) +if [[ "$platform" == "linux64" ]]; then + PLAT_DIR="/usr/lib/x86_64-linux-gnu" +elif [[ "$platform" == "linux32" ]]; then + PLAT_DIR="/usr/lib/i386-linux-gnu" +elif [[ "$platform" == "linuxarmv7" ]]; then + PLAT_DIR="/usr/lib/arm-linux-gnueabihf" +elif [[ "$platform" == "linuxarmv8" ]]; then + PLAT_DIR="/usr/lib/aarch64-linux-gnu" +else + PLAT_DIR="/usr/lib" +fi + +if [ -z "$QT_DIR" ]; then + QT_DIR=$PLAT_DIR/qt5 +fi + +if [ -z "$QTXML_DIR" ]; then + QTXML_DIR=$PLAT_DIR +fi + # Copy dependencies EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread' -cp -rv /usr/lib/x86_64-linux-gnu/qt5/qml $TARGET || exit -cp -rv /usr/lib/x86_64-linux-gnu/qt5/plugins $TARGET || exit +cp -rv $QT_DIR/qml $TARGET || exit +cp -rv $QT_DIR/plugins $TARGET || exit mkdir -p $TARGET/libs || exit ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit -cp -v /usr/lib/x86_64-linux-gnu/libQt5XmlPatterns.so.5 $TARGET/libs || exit +cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit # Create start script cat > $TARGET/start-gui.sh <