Mercurial > hg > easyhg
annotate deploy/osx/copy-pyqt.sh @ 723:c39a04fed8b2
Update AppImage excludelist
author | Chris Cannam |
---|---|
date | Fri, 14 Dec 2018 14:58:58 +0000 |
parents | 5afb26b7575a |
children | c59c17665162 |
rev | line source |
---|---|
Chris@722 | 1 #!/bin/bash |
Chris@722 | 2 |
Chris@722 | 3 set -eu |
Chris@722 | 4 |
Chris@722 | 5 app="$1" |
Chris@722 | 6 if [ -z "$app" ]; then |
Chris@722 | 7 echo "Usage: $0 <appname>" |
Chris@722 | 8 echo "Provide appname without the .app extension, please" |
Chris@722 | 9 exit 2 |
Chris@722 | 10 fi |
Chris@722 | 11 |
Chris@722 | 12 PYQT_DIR=/Library/Python/2.7/site-packages/PyQt5 |
Chris@722 | 13 |
Chris@722 | 14 if [ ! -d "$PYQT_DIR" ]; then |
Chris@722 | 15 echo "PyQt directory $PYQT_DIR not found - is it installed?" |
Chris@722 | 16 exit 2 |
Chris@722 | 17 fi |
Chris@722 | 18 |
Chris@722 | 19 if [ ! -f "$PYQT_DIR/sip.so" ]; then |
Chris@722 | 20 echo "sip.so not found in $PYQT_DIR - did you remember --sip-module PyQt5.sip when building sip?" |
Chris@722 | 21 exit 2 |
Chris@722 | 22 fi |
Chris@722 | 23 |
Chris@722 | 24 ENUM_EGG=/Library/Python/2.7/site-packages/enum34-1.1.6-py2.7.egg |
Chris@722 | 25 |
Chris@722 | 26 if [ ! -f "$ENUM_EGG" ]; then |
Chris@722 | 27 echo "Enum module egg $ENUM_EGG not found - install it or update the reference in this script" |
Chris@722 | 28 exit 2 |
Chris@722 | 29 fi |
Chris@722 | 30 |
Chris@722 | 31 pydir="$app.app/Contents/MacOS/Py2.7" |
Chris@722 | 32 mkdir -p "$pydir/PyQt5" |
Chris@722 | 33 mkdir -p "$pydir/enum" |
Chris@722 | 34 |
Chris@722 | 35 echo |
Chris@722 | 36 echo "Copying PyQt libraries..." |
Chris@722 | 37 for library in Qt QtCore QtGui QtWidgets sip; do |
Chris@722 | 38 cp "$PYQT_DIR/$library.so" "$pydir/PyQt5/" |
Chris@722 | 39 done |
Chris@722 | 40 cp "$PYQT_DIR/__init__.py" "$pydir/PyQt5/" |
Chris@722 | 41 |
Chris@722 | 42 echo |
Chris@722 | 43 echo "Copying enum library..." |
Chris@722 | 44 ( cd "$pydir" ; mkdir -p tmp ; cd tmp ; unzip "$ENUM_EGG" ; cp enum/__init__.py ../enum/ ; cd .. ; rm -rf tmp ) |
Chris@722 | 45 |
Chris@722 | 46 echo "Done" |
Chris@722 | 47 |