Merge pull request #420

4eedef0 allow QT location to be set with an environment variable (pigeons)
This commit is contained in:
Riccardo Spagni 2017-01-22 12:17:57 -05:00
commit 955d13ef0a
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 28 additions and 4 deletions

View file

@ -9,14 +9,34 @@ GUI_EXEC=$2
platform=$(get_platform) 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 # Copy dependencies
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread' EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
cp -rv /usr/lib/x86_64-linux-gnu/qt5/qml $TARGET || exit cp -rv $QT_DIR/qml $TARGET || exit
cp -rv /usr/lib/x86_64-linux-gnu/qt5/plugins $TARGET || exit cp -rv $QT_DIR/plugins $TARGET || exit
mkdir -p $TARGET/libs || 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/$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 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 # Create start script
cat > $TARGET/start-gui.sh <<EOL cat > $TARGET/start-gui.sh <<EOL

View file

@ -10,7 +10,11 @@ function get_platform {
platform="linux64" platform="linux64"
elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then
platform="linux32" 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" platform="linux"
fi fi
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then