mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-23 05:16:11 +00:00
8bfa653909
* Use cutter-deps for Linux * Update CMakeLists.txt for newer PySide2 * Add llvm-config --libdir to LD_LIBRARY_PATH in Travis * Update cutter-deps * Fix Python Prefix for Deploy * Update cutter-deps * Install Jupyter in Travis * Add update_deps.py and update * Enable Python Bindings for qmake in Travis * Use absolute path for src_list.py in qmake * Use python directly for src_list.py in qmake * Keep env for linuxdeployqt * Embed PySide2 in AppImage * Fix appimage_embed_python.sh
38 lines
948 B
Bash
Executable File
38 lines
948 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if ! [[ $# -eq 1 ]]; then
|
|
echo "Usage: $0 [appdir]"
|
|
exit 1
|
|
fi
|
|
|
|
python_version=python3.6
|
|
|
|
python_prefix=$(pkg-config --variable=prefix python3)
|
|
appdir=$1
|
|
|
|
echo "Embedding Python from prefix $python_prefix in appdir $appdir"
|
|
|
|
mkdir -p "$appdir/usr"
|
|
cd "$appdir/usr/" || exit 1
|
|
|
|
cp -RT "$python_prefix" "." || exit 1
|
|
echo "Cleaning up embedded Python"
|
|
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
|
rm -r lib/$python_version/test lib/$python_version/idlelib lib/$python_version/curses lib/$python_version/lib2to3
|
|
|
|
echo "Checking if PySide2 is available"
|
|
|
|
pyside_prefix=$(pkg-config --variable=prefix pyside2)
|
|
if [ $? -ne 0 ]; then
|
|
echo "PySide2 is not available, ignoring."
|
|
exit 0
|
|
fi
|
|
|
|
echo "PySide is at $pyside_prefix"
|
|
|
|
if [ "$pyside_prefix" == "$python_prefix" ]; then
|
|
echo "Prefixes are equal, not copying anything from lib"
|
|
else
|
|
cp -RT "$pyside_prefix/lib/$python_version" "lib/$python_version" || exit 1
|
|
fi
|