Added fallback qt5 libs in 'make package' result

This commit is contained in:
Michaël Lemaire 2013-10-23 22:57:09 +02:00
parent d407177d34
commit cd37d45e98
3 changed files with 21 additions and 4 deletions

View file

@ -51,7 +51,7 @@ profile_cli:debug
package:release package:release
rm -rf paysages3d-linux rm -rf paysages3d-linux
rm -f paysages3d-linux.tar.gz rm -f paysages3d-linux.tar.bz2
mkdir paysages3d-linux mkdir paysages3d-linux
mkdir paysages3d-linux/lib mkdir paysages3d-linux/lib
mkdir paysages3d-linux/cache mkdir paysages3d-linux/cache
@ -64,6 +64,9 @@ package:release
cp -r cache/*.cache paysages3d-linux/cache/ cp -r cache/*.cache paysages3d-linux/cache/
cp dist/paysages3d.sh paysages3d-linux/ cp dist/paysages3d.sh paysages3d-linux/
chmod +x paysages3d-linux/paysages3d.sh 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/ tar -cjvvf paysages3d-linux.tar.bz2 paysages3d-linux/
.PHONY:all clean release build .PHONY:all clean release build

11
dist/collectlib.sh vendored Normal file
View file

@ -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

9
dist/paysages3d.sh vendored
View file

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/bash
SCRIPT_PATH=$(dirname $0) SCRIPT_PATH=$(dirname $0)
export LD_LIBRARY_PATH=${SCRIPT_PATH}/lib:"${LD_LIBRARY_PATH}"
cd ${SCRIPT_PATH} cd ${SCRIPT_PATH}
LD_LIBRARY_PATH=${SCRIPT_PATH}/lib ${SCRIPT_PATH}/lib/paysages-gui COLLECT_NEEDED=$(ldd lib/paysages-gui | grep -c 'not found')
cd - [ $COLLECT_NEEDED -gt 0 ] && export LD_LIBRARY_PATH=${SCRIPT_PATH}/lib/collected:"${LD_LIBRARY_PATH}"
${SCRIPT_PATH}/lib/paysages-gui
cd - > /dev/null