mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-24 20:49:24 +00:00
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
This commit is contained in:
parent
7f8d4ac3d2
commit
4eedef048d
2 changed files with 28 additions and 4 deletions
|
@ -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
|
||||||
|
|
6
utils.sh
6
utils.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue