aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-01-22 12:17:57 -0500
committerRiccardo Spagni <ric@spagni.net>2017-01-22 12:17:57 -0500
commit955d13ef0a0935acc204552cfa5682b1f5ba4bde (patch)
tree8d43779f25ebd60a3aac1e0a150e2370736cebe1
parent2d907c02f05c9b20a0fa12e056bcced25e82648b (diff)
parent4eedef048dd06ab501a592203f51b0d71b92ff58 (diff)
downloadmonzero-gui-955d13ef0a0935acc204552cfa5682b1f5ba4bde.tar.gz
monzero-gui-955d13ef0a0935acc204552cfa5682b1f5ba4bde.tar.xz
monzero-gui-955d13ef0a0935acc204552cfa5682b1f5ba4bde.zip
Merge pull request #420
4eedef0 allow QT location to be set with an environment variable (pigeons)
-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