Mercurial > hg > easyhg
comparison deploy/osx/copy-kdiff3.sh @ 731:2cb03c4665aa
Include kdiff3 executable in bundle on macOS
author | Chris Cannam |
---|---|
date | Mon, 17 Dec 2018 11:18:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
730:f1dc72b940d5 | 731:2cb03c4665aa |
---|---|
1 #!/bin/bash | |
2 | |
3 app="$1" | |
4 if [ -z "$app" ]; then | |
5 echo "Usage: $0 <appname>" | |
6 echo "Provide appname without the .app extension, please" | |
7 exit 2 | |
8 fi | |
9 | |
10 set -eu | |
11 | |
12 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) | |
13 | |
14 if [ ! -d "$qtdir" ]; then | |
15 echo "Failed to discover Qt installation directory from Makefile, exiting" | |
16 exit 2 | |
17 fi | |
18 | |
19 kdiff_dir=easyhg-kdiff3 | |
20 | |
21 if [ ! -d "$kdiff_dir" ]; then | |
22 echo | |
23 echo "Directory $kdiff_dir not found: cloning and building it..." | |
24 hg clone https://code.soundsoftware.ac.uk/hg/easyhg-kdiff3 "$kdiff_dir" | |
25 cd "$kdiff_dir"/kdiff3/src-QT4 | |
26 "$qtdir"/bin/qmake -r kdiff3.pro | |
27 make | |
28 cd ../../.. | |
29 fi | |
30 | |
31 echo | |
32 echo "Copying in kdiff3 executable..." | |
33 | |
34 cp "$kdiff_dir"/kdiff3/src-QT4/kdiff3.app/Contents/MacOS/kdiff3 "$app.app/Contents/MacOS/easyhg-kdiff3" | |
35 | |
36 echo "Done" | |
37 |