aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpigeons <pigeons>2017-01-16 11:58:17 -0800
committerpigeons <pigeons>2017-01-19 11:14:55 -0800
commit4eedef048dd06ab501a592203f51b0d71b92ff58 (patch)
tree800453ac9f8ff7eb2bddc2d0a36ff07aca8a7b81
parent7f8d4ac3d200afdf421b705076f888ba25641981 (diff)
downloadmonzero-gui-4eedef048dd06ab501a592203f51b0d71b92ff58.tar.gz
monzero-gui-4eedef048dd06ab501a592203f51b0d71b92ff58.tar.xz
monzero-gui-4eedef048dd06ab501a592203f51b0d71b92ff58.zip
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
-rwxr-xr-xlinuxdeploy_helper.sh26
-rwxr-xr-xutils.sh6
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 <<EOL
diff --git a/utils.sh b/utils.sh
index d3d9fb35..ae0159ac 100755
--- a/utils.sh
+++ b/utils.sh
@@ -10,7 +10,11 @@ function get_platform {
platform="linux64"
elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then
platform="linux32"
- else
+ elif [ "$(expr substr $(uname -m) 1 6)" == "armv7l" ]; then
+ platform="linuxarmv7"
+ elif [ "$(expr substr $(uname -m) 1 7)" == "aarch64" ]; then
+ platform="linuxarmv8"
+ else
platform="linux"
fi
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then