Move Python embedding for AppImage to scripts/

This commit is contained in:
Florian Märkl 2018-04-14 15:21:35 +02:00
parent d2b5eaffb8
commit 6ea813a9f6
2 changed files with 19 additions and 5 deletions

View File

@ -84,11 +84,7 @@ after_success:
sudo make INSTALL_ROOT=appdir install && sudo make INSTALL_ROOT=appdir install &&
sudo chown -R $USER appdir && sudo chown -R $USER appdir &&
cp -r /usr/share/radare2 appdir/usr/share/ && cp -r /usr/share/radare2 appdir/usr/share/ &&
cp -RT "$CUSTOM_PYTHON_PREFIX" appdir/usr/ && "$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" "$CUSTOM_PYTHON_PREFIX" appdir &&
cd appdir/usr/ &&
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf &&
rm -r lib/python3.6/test lib/python3.6/idlelib lib/python3.6/curses lib/python3.6/lib2to3 &&
cd ../.. &&
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" && wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" &&
chmod a+x linuxdeployqt*.AppImage && chmod a+x linuxdeployqt*.AppImage &&
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH && unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH &&

View File

@ -0,0 +1,18 @@
#!/bin/bash
if ! [[ $# -eq 2 ]]; then
echo "Usage: $0 [Python prefix] [appdir]"
exit 1
fi
python_prefix=$1
appdir=$2
echo "Embedding Python from prefix $python_prefix in appdir $appdir"
cp -RT "$python_prefix" "$appdir/usr/" || exit 1
cd "$appdir/usr/" || exit 1
echo "Cleaning up embedded Python"
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
rm -r lib/python3.6/test lib/python3.6/idlelib lib/python3.6/curses lib/python3.6/lib2to3