comparison deploy/linux/deploy-appimage.sh @ 725:48e746f45bde

Include the kdiff3 executable
author Chris Cannam
date Mon, 17 Dec 2018 09:25:11 +0000
parents 21e4df9865af
children
comparison
equal deleted inserted replaced
724:c59c17665162 725:48e746f45bde
1 #!/bin/bash 1 #!/bin/bash
2 2
3 set -eu 3 set -eu
4 4
5 program=EasyMercurial 5 program=EasyMercurial
6 kdiff=easyhg-kdiff3
7 merge=easyhg-merge.sh
8 extdiff=easyhg-extdiff.sh
9
10 programs="$program $kdiff $merge $extdiff"
6 11
7 get_id() { 12 get_id() {
8 if [ -d .hg ]; then 13 if [ -d .hg ]; then
9 hg id | sed 's/[+ ].*$//' 14 hg id | sed 's/[+ ].*$//'
10 elif [ -d .git ]; then 15 elif [ -d .git ]; then
20 if [ ! -x ./appimagetool-x86_64.AppImage ]; then 25 if [ ! -x ./appimagetool-x86_64.AppImage ]; then
21 echo "Failed to find executable ./appimagetool-x86_64.AppImage, please provide that first" 26 echo "Failed to find executable ./appimagetool-x86_64.AppImage, please provide that first"
22 exit 2 27 exit 2
23 fi 28 fi
24 29
30 for p in $programs; do
31 if [ ! -x "$p" ]; then
32 echo "Failed to find executable ./$p, please build and check"
33 exit 2
34 fi
35 done
36
25 targetdir="${program}.AppDir" 37 targetdir="${program}.AppDir"
26 38
27 echo "Target dir is $targetdir" 39 echo "Target dir is $targetdir"
28 40
29 if [ -d "$targetdir" ]; then 41 if [ -d "$targetdir" ]; then
34 mkdir "$targetdir" 46 mkdir "$targetdir"
35 47
36 mkdir -p "$targetdir"/usr/bin 48 mkdir -p "$targetdir"/usr/bin
37 mkdir -p "$targetdir"/usr/lib 49 mkdir -p "$targetdir"/usr/lib
38 50
39 cp "$program" "$targetdir"/usr/bin/ 51 cp $programs "$targetdir"/usr/bin/
40 52
41 add_dependencies() { 53 add_dependencies() {
42 54
43 local binary="$1" 55 local binary="$1"
44 56
69 fi 81 fi
70 done 82 done
71 } 83 }
72 84
73 add_dependencies "$program" 85 add_dependencies "$program"
86 add_dependencies "$kdiff"
74 87
75 qtplugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen xcb" 88 qtplugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen xcb"
76 qtlibdirs="/usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt" 89 qtlibdirs="/usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt"
77 90
78 QTDIR=${QTDIR:-} 91 QTDIR=${QTDIR:-}