From cd37d45e98df47a47a5c515881a9e6000a184efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 23 Oct 2013 22:57:09 +0200 Subject: [PATCH] Added fallback qt5 libs in 'make package' result --- Makefile | 5 ++++- dist/collectlib.sh | 11 +++++++++++ dist/paysages3d.sh | 9 ++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 dist/collectlib.sh diff --git a/Makefile b/Makefile index 0bd6671..c80ff4f 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ profile_cli:debug package:release rm -rf paysages3d-linux - rm -f paysages3d-linux.tar.gz + rm -f paysages3d-linux.tar.bz2 mkdir paysages3d-linux mkdir paysages3d-linux/lib mkdir paysages3d-linux/cache @@ -64,6 +64,9 @@ package:release cp -r cache/*.cache paysages3d-linux/cache/ cp dist/paysages3d.sh paysages3d-linux/ chmod +x paysages3d-linux/paysages3d.sh + cp dist/collectlib.sh paysages3d-linux/ + chmod +x paysages3d-linux/collectlib.sh + cd paysages3d-linux && ./collectlib.sh && rm collectlib.sh && cd - tar -cjvvf paysages3d-linux.tar.bz2 paysages3d-linux/ .PHONY:all clean release build diff --git a/dist/collectlib.sh b/dist/collectlib.sh new file mode 100644 index 0000000..f66c7f3 --- /dev/null +++ b/dist/collectlib.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +mkdir lib/collected +for lib in `ldd lib/paysages-gui lib/libpaysages_*.so | grep '/qt/' | cut -f 2 | cut -f 3 -d ' ' | sort | uniq` +do + cp ${lib} lib/collected + qtpath=$(dirname ${lib}) +done +mkdir lib/platforms +cp ${qtpath}/../plugins/platforms/libqxcb.so lib/platforms + diff --git a/dist/paysages3d.sh b/dist/paysages3d.sh index 5d0bf57..b679c74 100644 --- a/dist/paysages3d.sh +++ b/dist/paysages3d.sh @@ -1,7 +1,10 @@ -#!/bin/sh +#!/bin/bash SCRIPT_PATH=$(dirname $0) +export LD_LIBRARY_PATH=${SCRIPT_PATH}/lib:"${LD_LIBRARY_PATH}" cd ${SCRIPT_PATH} -LD_LIBRARY_PATH=${SCRIPT_PATH}/lib ${SCRIPT_PATH}/lib/paysages-gui -cd - +COLLECT_NEEDED=$(ldd lib/paysages-gui | grep -c 'not found') +[ $COLLECT_NEEDED -gt 0 ] && export LD_LIBRARY_PATH=${SCRIPT_PATH}/lib/collected:"${LD_LIBRARY_PATH}" +${SCRIPT_PATH}/lib/paysages-gui +cd - > /dev/null