From 9fcf03161e35ebd126addcbd2977239608748422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Fri, 13 Jul 2018 21:04:42 +0200 Subject: [PATCH] Exclude python libs when using linuxdeployqt --- .travis.yml | 9 ++++----- scripts/prepare_python_linux.sh | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8922c162d..af11fde95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,15 +79,14 @@ after_success: export FILE_TO_UPLOAD="Cutter.dmg" ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - sudo make INSTALL_ROOT=appdir install && - sudo chown -R $USER appdir && + make INSTALL_ROOT=appdir install && cp -r /usr/share/radare2 appdir/usr/share/ && "$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" "$CUSTOM_PYTHON_PREFIX" appdir && - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" && + wget -c "https://github.com/thestr4ng3r/linuxdeployqt/releases/download/cutter-v1/linuxdeployqt-continuous-x86_64.AppImage" && chmod a+x linuxdeployqt*.AppImage && unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH && - LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so -verbose=2 && - LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so -verbose=2 && + LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 && + LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 && find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq && export FILE_TO_UPLOAD="Cutter-x86_64.AppImage" ; fi diff --git a/scripts/prepare_python_linux.sh b/scripts/prepare_python_linux.sh index ed5ad9112..c1f330274 100755 --- a/scripts/prepare_python_linux.sh +++ b/scripts/prepare_python_linux.sh @@ -2,11 +2,11 @@ mkdir -p python && cd python || exit 1 +export CUSTOM_PYTHON_PREFIX="`pwd`/prefix" + wget "https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz" || exit 1 tar -xf Python-3.6.4.tar.xz || exit 1 -export CUSTOM_PYTHON_PREFIX="`pwd`/prefix" - cd Python-3.6.4 || exit 1 echo "Building Python to install to prefix $CUSTOM_PYTHON_PREFIX"