Mercurial > hg > easyhg
changeset 731:2cb03c4665aa
Include kdiff3 executable in bundle on macOS
author | Chris Cannam |
---|---|
date | Mon, 17 Dec 2018 11:18:55 +0000 |
parents | f1dc72b940d5 |
children | 66284838b373 |
files | deploy/osx/copy-kdiff3.sh deploy/osx/copy-pyqt.sh deploy/osx/copy-qt.sh deploy/osx/deploy.sh |
diffstat | 4 files changed, 46 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/osx/copy-kdiff3.sh Mon Dec 17 11:18:55 2018 +0000 @@ -0,0 +1,37 @@ +#!/bin/bash + +app="$1" +if [ -z "$app" ]; then + echo "Usage: $0 <appname>" + echo "Provide appname without the .app extension, please" + exit 2 +fi + +set -eu + +qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) + +if [ ! -d "$qtdir" ]; then + echo "Failed to discover Qt installation directory from Makefile, exiting" + exit 2 +fi + +kdiff_dir=easyhg-kdiff3 + +if [ ! -d "$kdiff_dir" ]; then + echo + echo "Directory $kdiff_dir not found: cloning and building it..." + hg clone https://code.soundsoftware.ac.uk/hg/easyhg-kdiff3 "$kdiff_dir" + cd "$kdiff_dir"/kdiff3/src-QT4 + "$qtdir"/bin/qmake -r kdiff3.pro + make + cd ../../.. +fi + +echo +echo "Copying in kdiff3 executable..." + +cp "$kdiff_dir"/kdiff3/src-QT4/kdiff3.app/Contents/MacOS/kdiff3 "$app.app/Contents/MacOS/easyhg-kdiff3" + +echo "Done" +
--- a/deploy/osx/copy-pyqt.sh Mon Dec 17 10:54:29 2018 +0000 +++ b/deploy/osx/copy-pyqt.sh Mon Dec 17 11:18:55 2018 +0000 @@ -1,7 +1,5 @@ #!/bin/bash -set -eu - app="$1" if [ -z "$app" ]; then echo "Usage: $0 <appname>" @@ -9,6 +7,8 @@ exit 2 fi +set -eu + PYQT_DIR=/Library/Python/2.7/site-packages/PyQt5 if [ ! -d "$PYQT_DIR" ]; then
--- a/deploy/osx/copy-qt.sh Mon Dec 17 10:54:29 2018 +0000 +++ b/deploy/osx/copy-qt.sh Mon Dec 17 11:18:55 2018 +0000 @@ -1,8 +1,5 @@ - #!/bin/bash -set -eu - app="$1" if [ -z "$app" ]; then echo "Usage: $0 <appname>" @@ -10,6 +7,8 @@ exit 2 fi +set -eu + frameworks="QtCore QtNetwork QtGui QtWidgets QtPrintSupport QtDBus" plugins="gif icns ico jpeg tga tiff wbmp webp cocoa macstyle minimal offscreen"
--- a/deploy/osx/deploy.sh Mon Dec 17 10:54:29 2018 +0000 +++ b/deploy/osx/deploy.sh Mon Dec 17 11:18:55 2018 +0000 @@ -30,6 +30,11 @@ esac echo +echo "Copying in kdiff3 program." + +deploy/osx/copy-kdiff3.sh "$app" || exit 2 + +echo echo "Copying in frameworks and plugins from Qt installation directory." deploy/osx/copy-qt.sh "$app" || exit 2