Merge pull request #313

4b62b8a linux: build with static boost (Jaquee)
3515180 linux deploy scripts (Jaquee)
This commit is contained in:
Riccardo Spagni 2016-12-21 00:32:54 +02:00
commit 4713228d96
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 33 additions and 3 deletions

28
linuxdeploy_helper.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $ROOT_DIR/utils.sh
TARGET=$1
GUI_EXEC=$2
platform=$(get_platform)
# Copy dependencies
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
cp -rv /usr/lib/x86_64-linux-gnu/qt5/qml $TARGET
cp -rv /usr/lib/x86_64-linux-gnu/qt5/plugins $TARGET
mkdir -p $TARGET/libs
ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs
ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs
cp -v /usr/lib/x86_64-linux-gnu/libQt5XmlPatterns.so.5 $TARGET/libs
# Create start script
cat > $TARGET/start-gui.sh <<EOL
#!/bin/bash
export LD_LIBRARY_PATH=\`pwd\`/libs
export QT_PLUGIN_PATH=\`pwd\`/plugins
export QML2_IMPORT_PATH=\`pwd\`/qml
./$GUI_EXEC
EOL

View file

@ -129,9 +129,7 @@ win32 {
} }
linux { linux {
CONFIG(static) { LIBS+= -Wl,-Bstatic
LIBS+= -Wl,-Bstatic
}
LIBS+= \ LIBS+= \
-lboost_serialization \ -lboost_serialization \
-lboost_thread \ -lboost_thread \
@ -263,6 +261,10 @@ win32 {
} }
} }
linux {
deploy.commands += $$escape_expand(\n\t) $$PWD/linuxdeploy_helper.sh $$DESTDIR $$TARGET
}
OTHER_FILES += \ OTHER_FILES += \