author | wenzelm |
Sat, 03 Mar 2018 21:39:24 +0100 | |
changeset 67761 | c07bc12d89f2 |
parent 66908 | 9b074f01a305 |
child 67994 | 11be98cefe92 |
permissions | -rwxr-xr-x |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
2 |
# |
50790 | 3 |
# DESCRIPTION: re-package Isabelle distribution with add-on components |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
4 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
5 |
## diagnostics |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
6 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
7 |
PRG=$(basename "$0") |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
8 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
9 |
function usage() |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
10 |
{ |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
11 |
echo |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
12 |
echo "Usage: isabelle $PRG ARCHIVE PLATFORM_FAMILY [REMOTE_MAC]" |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
13 |
echo |
61000 | 14 |
echo " Re-package Isabelle source distribution with add-on components and" |
66724 | 15 |
echo " post-hoc patches for platform family linux, windows, macos." |
50790 | 16 |
echo |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
17 |
echo " The optional remote Mac OS X system is used for dmg build." |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
18 |
echo |
50790 | 19 |
echo " Add-on components are that of the running Isabelle version!" |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
20 |
echo |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
21 |
exit 1 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
22 |
} |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
23 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
24 |
function fail() |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
25 |
{ |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
26 |
echo "$1" >&2 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
27 |
exit 2 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
28 |
} |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
29 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
30 |
|
50790 | 31 |
## arguments |
32 |
||
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
33 |
[ "$#" -ne 2 -a "$#" -ne 3 ] && usage |
50790 | 34 |
|
35 |
ARCHIVE="$1"; shift |
|
51064
9c425ed4a52c
separate makedist_bundle for each platform family, which is more useful for manual use;
wenzelm
parents:
50961
diff
changeset
|
36 |
PLATFORM_FAMILY="$1"; shift |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
37 |
REMOTE_MAC="$1"; shift |
50790 | 38 |
|
39 |
[ -f "$ARCHIVE" ] || fail "Bad source archive: $ARCHIVE" |
|
40 |
||
41 |
ARCHIVE_DIR="$(cd $(dirname "$ARCHIVE"); echo "$PWD")" |
|
42 |
ISABELLE_NAME="$(basename "$ARCHIVE" .tar.gz)" |
|
43 |
||
44 |
||
45 |
## main |
|
46 |
||
63897
85c83757788c
consolidate implicit use of gnutar, via somewhat fragile dynamic scoping within existing shell scripts;
wenzelm
parents:
63490
diff
changeset
|
47 |
#GNU tar (notably on Mac OS X) |
85c83757788c
consolidate implicit use of gnutar, via somewhat fragile dynamic scoping within existing shell scripts;
wenzelm
parents:
63490
diff
changeset
|
48 |
type -p gnutar >/dev/null && function tar() { gnutar "$@"; } |
85c83757788c
consolidate implicit use of gnutar, via somewhat fragile dynamic scoping within existing shell scripts;
wenzelm
parents:
63490
diff
changeset
|
49 |
|
50794 | 50 |
TMP="/var/tmp/isabelle-makedist$$" |
37315 | 51 |
mkdir "$TMP" || fail "Cannot create directory $TMP" |
52 |
||
50790 | 53 |
ISABELLE_TARGET="$TMP/$ISABELLE_NAME" |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
54 |
|
53418 | 55 |
tar -C "$TMP" -x -z -f "$ARCHIVE" || exit 2 |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
56 |
|
37315 | 57 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
58 |
# distribution classpath (based on educated guesses) |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
59 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
60 |
splitarray ":" "$ISABELLE_CLASSPATH"; CLASSPATH_ENTRIES=("${SPLITARRAY[@]}") |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
61 |
declare -a DISTRIBITION_CLASSPATH=() |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
62 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
63 |
for ENTRY in "${CLASSPATH_ENTRIES[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
64 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
65 |
ENTRY=$(echo "$ENTRY" | perl -n -e " |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
66 |
if (m,$ISABELLE_HOME/(.*)\$,) { print qq{\$1}; } |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
67 |
elsif (m,$USER_HOME/.isabelle/contrib/(.*)\$,) { print qq{contrib/\$1}; } |
64175 | 68 |
elsif (m,/home/isabelle/contrib/(.*)\$,) { print qq{contrib/\$1}; } |
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
69 |
else { print; }; |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
70 |
print qq{\n};") |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
71 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
72 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
73 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
74 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="src/Tools/jEdit/dist/jedit.jar" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
75 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
76 |
echo "classpath" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
77 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
78 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
79 |
echo " $ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
80 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
81 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
82 |
|
50790 | 83 |
# bundled components |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
84 |
|
62041 | 85 |
if [ ! -e "$ARCHIVE_DIR/contrib" ]; then |
86 |
if [ ! -e "$ARCHIVE_DIR/../contrib" ]; then |
|
87 |
mkdir -p "$ARCHIVE_DIR/contrib" |
|
88 |
else |
|
89 |
ln -s "../contrib" "$ARCHIVE_DIR/contrib" |
|
90 |
fi |
|
62037 | 91 |
fi |
50790 | 92 |
|
93 |
echo "#bundled components" >> "$ISABELLE_TARGET/etc/components" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
94 |
|
66724 | 95 |
for CATALOG in main "$PLATFORM_FAMILY" bundled "bundled-$PLATFORM_FAMILY" |
50790 | 96 |
do |
97 |
CATALOG_FILE="$ISABELLE_HOME/Admin/components/$CATALOG" |
|
98 |
if [ -f "$CATALOG_FILE" ] |
|
99 |
then |
|
100 |
echo "catalog ${CATALOG}" |
|
101 |
{ |
|
102 |
while { unset REPLY; read -r; test "$?" = 0 -o -n "$REPLY"; } |
|
103 |
do |
|
104 |
case "$REPLY" in |
|
105 |
\#* | "") ;; |
|
106 |
*) |
|
107 |
COMPONENT="$REPLY" |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
108 |
COMPONENT_DIR="$ISABELLE_TARGET/contrib/$COMPONENT" |
50790 | 109 |
case "$COMPONENT" in |
57443
577f029fde39
ProofGeneral-4.2-2 is optional component (including the traditional helper scripts);
wenzelm
parents:
57084
diff
changeset
|
110 |
jedit_build*) ;; |
50790 | 111 |
*) |
112 |
echo " component $COMPONENT" |
|
113 |
CONTRIB="$ARCHIVE_DIR/contrib/${COMPONENT}.tar.gz" |
|
114 |
if [ ! -f "$CONTRIB" ]; then |
|
63490
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
115 |
type -p curl > /dev/null || fail "Cannot download files: missing curl" |
50790 | 116 |
REMOTE="$ISABELLE_COMPONENT_REPOSITORY/${COMPONENT}.tar.gz" |
63490
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
117 |
echo " downloading $REMOTE" |
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
118 |
curl --fail --silent "$REMOTE" > "$CONTRIB" || \ |
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
119 |
fail "Failed to download \"$REMOTE\"" |
50790 | 120 |
perl -e "exit((stat('${CONTRIB}'))[7] == 0 ? 0 : 1);" && exit 2 |
121 |
fi |
|
122 |
||
53418 | 123 |
tar -C "$ISABELLE_TARGET/contrib" -x -z -f "$CONTRIB" || exit 2 |
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
124 |
if [ -f "$COMPONENT_DIR/etc/settings" -o -f "$COMPONENT_DIR/etc/components" ] |
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
125 |
then |
53418 | 126 |
case "$COMPONENT" in |
127 |
jdk-*) |
|
128 |
mv "$ISABELLE_TARGET/contrib/$COMPONENT" "$ISABELLE_TARGET/contrib/jdk" |
|
129 |
echo "contrib/jdk" >> "$ISABELLE_TARGET/etc/components" |
|
130 |
;; |
|
131 |
*) |
|
132 |
echo "contrib/$COMPONENT" >> "$ISABELLE_TARGET/etc/components" |
|
133 |
;; |
|
134 |
esac |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
135 |
fi |
50790 | 136 |
;; |
137 |
esac |
|
138 |
;; |
|
139 |
esac |
|
140 |
done |
|
141 |
} < "$CATALOG_FILE" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
142 |
fi |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
143 |
done |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
144 |
|
47742
316c67657fd3
move polyml within Cygwin /usr/local to simplify its rebasing;
wenzelm
parents:
47723
diff
changeset
|
145 |
|
52501 | 146 |
# purge other platforms |
147 |
||
61000 | 148 |
function purge_target |
52501 | 149 |
{ |
150 |
( |
|
151 |
cd "$ISABELLE_TARGET" |
|
61000 | 152 |
for DIR in $(eval find "$@" | sort) |
52501 | 153 |
do |
154 |
echo "removing $DIR" |
|
155 |
rm -rf "$DIR" |
|
156 |
done |
|
157 |
) |
|
158 |
} |
|
159 |
||
160 |
||
58792
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
161 |
# purge jdk -- keep only jre |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
162 |
|
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
163 |
function purge_jdk |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
164 |
{ |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
165 |
local DIR="contrib/jdk/$1" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
166 |
( |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
167 |
cd "$ISABELLE_TARGET" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
168 |
if [ -d "$DIR/jre" ]; then |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
169 |
for X in "$DIR"/* |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
170 |
do |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
171 |
case "$X" in |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
172 |
*/jre) ;; |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
173 |
*) |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
174 |
echo "removing $X" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
175 |
rm -rf "$X" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
176 |
;; |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
177 |
esac |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
178 |
done |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
179 |
else |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
180 |
fail "Bad JDK directory: \"$DIR\"" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
181 |
fi |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
182 |
) |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
183 |
} |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
184 |
|
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
185 |
|
53483
74a4685a96c8
generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53473
diff
changeset
|
186 |
# platform-specific setup (inside archive) |
47833
12cb7b5d4b77
more windows-friendly presentation of main text files;
wenzelm
parents:
47760
diff
changeset
|
187 |
|
54661
6ad5242deaa7
specific application name for official bundle (as for Mac OS X);
wenzelm
parents:
54315
diff
changeset
|
188 |
perl -pi -e "s,view.title=Isabelle/jEdit,view.title=${ISABELLE_NAME},g;" \ |
6ad5242deaa7
specific application name for official bundle (as for Mac OS X);
wenzelm
parents:
54315
diff
changeset
|
189 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
6ad5242deaa7
specific application name for official bundle (as for Mac OS X);
wenzelm
parents:
54315
diff
changeset
|
190 |
|
66724 | 191 |
case "$PLATFORM_FAMILY" in |
50790 | 192 |
linux) |
61000 | 193 |
purge_target 'contrib -name "x86*-darwin" -o -name "x86*-cygwin" -o -name "x86*-windows"' |
58792
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
194 |
purge_jdk "x86_64-linux" |
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
195 |
|
66906 | 196 |
( |
197 |
init_component "$JEDIT_HOME" |
|
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
198 |
|
66906 | 199 |
echo "# Java runtime options" |
200 |
eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS)" |
|
201 |
for ARG in "${JAVA_ARGS[@]}" |
|
202 |
do |
|
203 |
echo "$ARG" |
|
204 |
done |
|
205 |
echo "-Disabelle.jedit_server=${ISABELLE_NAME}" |
|
206 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.options" |
|
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
207 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
208 |
LINUX_CLASSPATH="" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
209 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
210 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
211 |
if [ -z "$LINUX_CLASSPATH" ]; then |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
212 |
LINUX_CLASSPATH="\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
213 |
else |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
214 |
LINUX_CLASSPATH="$LINUX_CLASSPATH:\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
215 |
fi |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
216 |
done |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
217 |
|
54315 | 218 |
cat "$ISABELLE_HOME/Admin/Linux/Isabelle.run" | \ |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
219 |
perl -p > "$ISABELLE_TARGET/${ISABELLE_NAME}.run" -e "s,{CLASSPATH},$LINUX_CLASSPATH,;" |
54315 | 220 |
chmod +x "$ISABELLE_TARGET/${ISABELLE_NAME}.run" |
221 |
||
222 |
mv "$ISABELLE_TARGET/contrib/linux_app" "$TMP/." |
|
223 |
cp "$TMP/linux_app/Isabelle" "$ISABELLE_TARGET/$ISABELLE_NAME" |
|
44951
3aa3aeb4980f
specific bundle for x86_64-linux, which is especially important for JRE due to its extra library dependencies;
wenzelm
parents:
44807
diff
changeset
|
224 |
;; |
50790 | 225 |
macos) |
61000 | 226 |
purge_target 'contrib -name "x86*-linux" -o -name "x86*-cygwin" -o -name "x86*-windows"' |
58792
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
227 |
purge_jdk "x86_64-darwin/Contents/Home" |
52677 | 228 |
mv "$ISABELLE_TARGET/contrib/macos_app" "$TMP/." |
50798 | 229 |
|
53883
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
230 |
perl -pi \ |
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
231 |
-e "s,lookAndFeel=.*,lookAndFeel=com.apple.laf.AquaLookAndFeel,g;" \ |
44964 | 232 |
-e "s,delete-line.shortcut=.*,delete-line.shortcut=C+d,g;" \ |
233 |
-e "s,delete.shortcut2=.*,delete.shortcut2=A+d,g;" \ |
|
53883
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
234 |
-e "s,plugin-blacklist.MacOSX.jar=true,plugin-blacklist.MacOSX.jar=,g;" \ |
53463 | 235 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
44807 | 236 |
;; |
50790 | 237 |
windows) |
66726 | 238 |
purge_target 'contrib -name "x86*-linux" -o -name "x86*-darwin" -o -name "x86-cygwin"' |
66724 | 239 |
purge_jdk "x86_64-windows" |
61000 | 240 |
|
52677 | 241 |
mv "$ISABELLE_TARGET/contrib/windows_app" "$TMP/." |
50790 | 242 |
|
58760 | 243 |
perl -pi \ |
244 |
-e "s,lookAndFeel=.*,lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel,g;" \ |
|
245 |
-e "s,foldPainter=.*,foldPainter=Square,g;" \ |
|
53463 | 246 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
50790 | 247 |
|
53484
1100982a071c
generate application ini based on $ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also lib/Tools/java and src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53483
diff
changeset
|
248 |
( |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
249 |
init_component "$JEDIT_HOME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
250 |
|
66906 | 251 |
echo -e "# Java runtime options\r" |
252 |
eval "declare -a JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS)" |
|
53484
1100982a071c
generate application ini based on $ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also lib/Tools/java and src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53483
diff
changeset
|
253 |
for ARG in "${JAVA_ARGS[@]}" |
1100982a071c
generate application ini based on $ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also lib/Tools/java and src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53483
diff
changeset
|
254 |
do |
60994 | 255 |
echo -e "$ARG\r" |
53484
1100982a071c
generate application ini based on $ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also lib/Tools/java and src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53483
diff
changeset
|
256 |
done |
62036 | 257 |
echo -e "-Disabelle.jedit_server=${ISABELLE_NAME}\r" |
60994 | 258 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.l4j.ini" |
259 |
||
260 |
( |
|
261 |
cd "$TMP" |
|
262 |
||
263 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/Windows/launch4j" |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
264 |
|
60994 | 265 |
( |
266 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
|
267 |
do |
|
268 |
ENTRY=$(echo "$ENTRY" | perl -p -e 's,/,\\\\,g;') |
|
60996 | 269 |
echo " <cp>%EXEDIR%\\\\$ENTRY</cp>" |
60994 | 270 |
done |
271 |
) > exe_classpath |
|
272 |
EXE_CLASSPATH="$(cat exe_classpath)" |
|
53484
1100982a071c
generate application ini based on $ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also lib/Tools/java and src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53483
diff
changeset
|
273 |
|
60994 | 274 |
perl -p \ |
275 |
-e "s,{OUTFILE},$ISABELLE_TARGET/${ISABELLE_NAME}.exe,g;" \ |
|
276 |
-e "s,{ICON},$APP_TEMPLATE/isabelle_transparent.ico,g;" \ |
|
277 |
-e "s,{SPLASH},$APP_TEMPLATE/isabelle.bmp,g;" \ |
|
278 |
-e "s,{CLASSPATH},$EXE_CLASSPATH,g;" \ |
|
61160 | 279 |
-e "s,{ISABELLE_NAME},$ISABELLE_NAME,g;" \ |
60994 | 280 |
"$APP_TEMPLATE/isabelle.xml" > isabelle.xml |
281 |
||
282 |
"windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j" isabelle.xml |
|
283 |
||
284 |
cp "$APP_TEMPLATE/manifest.xml" "$ISABELLE_TARGET/${ISABELLE_NAME}.exe.manifest" |
|
285 |
) |
|
50790 | 286 |
|
52501 | 287 |
( |
288 |
cd "$ISABELLE_TARGET" |
|
289 |
||
60994 | 290 |
cp "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Setup.bat" \ |
291 |
"$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Terminal.bat" . |
|
292 |
||
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
293 |
for NAME in postinstall rebaseall |
52501 | 294 |
do |
295 |
cp -a "$ISABELLE_HOME/Admin/Windows/Cygwin/isabelle/$NAME" \ |
|
296 |
"contrib/cygwin/isabelle/." |
|
297 |
done |
|
298 |
||
63058
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
299 |
if [ "$ISABELLE_PLATFORM_FAMILY" = macos ]; then |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
300 |
find . -type f -not -name '*.exe' -not -name '*.dll' -perm +100 \ |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
301 |
-print0 > "contrib/cygwin/isabelle/executables" |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
302 |
else |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
303 |
find . -type f -not -name '*.exe' -not -name '*.dll' -executable \ |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
304 |
-print0 > "contrib/cygwin/isabelle/executables" |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
305 |
fi |
52501 | 306 |
|
52668
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
307 |
find . -type l -exec echo "{}" ";" -exec readlink "{}" ";" \ |
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
308 |
> "contrib/cygwin/isabelle/symlinks" |
62096
8d5f2e3e836d
more uniform treatment of symblinks: avoid confusion when unpacking .tar.gz bundle with NTFS links;
wenzelm
parents:
62041
diff
changeset
|
309 |
find . -type l -exec rm "{}" ";" |
53421 | 310 |
|
311 |
touch "contrib/cygwin/isabelle/uninitialized" |
|
52501 | 312 |
) |
41627
0040e0ea02e7
delete compiled .elc files to improve portability on Linux, notably for GNU Emacs 23.1.x instead of 23.2.x;
wenzelm
parents:
41611
diff
changeset
|
313 |
;; |
0040e0ea02e7
delete compiled .elc files to improve portability on Linux, notably for GNU Emacs 23.1.x instead of 23.2.x;
wenzelm
parents:
41611
diff
changeset
|
314 |
*) |
0040e0ea02e7
delete compiled .elc files to improve portability on Linux, notably for GNU Emacs 23.1.x instead of 23.2.x;
wenzelm
parents:
41611
diff
changeset
|
315 |
;; |
0040e0ea02e7
delete compiled .elc files to improve portability on Linux, notably for GNU Emacs 23.1.x instead of 23.2.x;
wenzelm
parents:
41611
diff
changeset
|
316 |
esac |
41611
f23ce44fbaec
Cygwin: back to ProofGeneral-3.7.1.1 with XEmacs, since PG 4.x with GNU Emacs 23 is painfully slow;
wenzelm
parents:
41555
diff
changeset
|
317 |
|
50798 | 318 |
|
62032
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
319 |
# archive |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
320 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
321 |
BUNDLE_ARCHIVE="${ARCHIVE_DIR}/${ISABELLE_NAME}_${PLATFORM_FAMILY}.tar.gz" |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
322 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
323 |
echo "packaging $(basename "$BUNDLE_ARCHIVE")" |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
324 |
tar -C "$TMP" -c -z -f "$BUNDLE_ARCHIVE" "$ISABELLE_NAME" || exit 2 |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
325 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
326 |
|
53483
74a4685a96c8
generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
53473
diff
changeset
|
327 |
# platform-specific setup (outside archive) |
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
328 |
|
66724 | 329 |
case "$PLATFORM_FAMILY" in |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
330 |
linux) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
331 |
echo "application for $PLATFORM_FAMILY" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
332 |
ln -s "${ISABELLE_NAME}_linux.tar.gz" "${ARCHIVE_DIR}/${ISABELLE_NAME}_app.tar.gz" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
333 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
334 |
macos) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
335 |
echo "application for $PLATFORM_FAMILY" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
336 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
337 |
cd "$TMP" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
338 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
339 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/MacOS" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
340 |
APP="dmg/${ISABELLE_NAME}.app" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
341 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
342 |
mkdir -p "dmg/.background" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
343 |
cp "$APP_TEMPLATE/dmg/background.png" "dmg/.background/" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
344 |
cp "$APP_TEMPLATE/dmg/DS_Store" "dmg/.DS_Store" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
345 |
ln -s /Applications "dmg/." |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
346 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
347 |
for NAME in Java MacOS PlugIns Resources |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
348 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
349 |
mkdir -p "$APP/Contents/$NAME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
350 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
351 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
352 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
353 |
init_component "$JEDIT_HOME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
354 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
355 |
cat "$APP_TEMPLATE/Info.plist-part1" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
356 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
357 |
declare -a OPTIONS=() |
66906 | 358 |
eval "OPTIONS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS)" |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
359 |
for OPT in "${OPTIONS[@]}" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
360 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
361 |
echo "<string>$OPT</string>" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
362 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
363 |
echo "<string>-Disabelle.jedit_server={ISABELLE_NAME}</string>" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
364 |
echo "<string>-Dapple.awt.application.name={ISABELLE_NAME}</string>" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
365 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
366 |
cat "$APP_TEMPLATE/Info.plist-part2" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
367 |
) | perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;" > "$APP/Contents/Info.plist" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
368 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
369 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
370 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
371 |
ln -sf "../Resources/${ISABELLE_NAME}/$ENTRY" "$APP/Contents/Java" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
372 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
373 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
374 |
cp -R "$APP_TEMPLATE/Resources/." "$APP/Contents/Resources/." |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
375 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
376 |
ln -sf "../Resources/${ISABELLE_NAME}/contrib/jdk/x86_64-darwin" \ |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
377 |
"$APP/Contents/PlugIns/bundled.jdk" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
378 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
379 |
cp macos_app/JavaAppLauncher "$APP/Contents/MacOS/." && \ |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
380 |
chmod +x "$APP/Contents/MacOS/JavaAppLauncher" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
381 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
382 |
mv "$ISABELLE_NAME" "$APP/Contents/Resources/." |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
383 |
ln -sf "../../Info.plist" "$APP/Contents/Resources/$ISABELLE_NAME/${ISABELLE_NAME}.plist" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
384 |
ln -sf "Contents/Resources/$ISABELLE_NAME" "$APP/Isabelle" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
385 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
386 |
rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.dmg" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
387 |
tar -C dmg -czf "${ARCHIVE_DIR}/${ISABELLE_NAME}_dmg.tar.gz" . |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
388 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
389 |
if [ -n "$REMOTE_MAC" ] |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
390 |
then |
64176 | 391 |
echo -n "$REMOTE_MAC: building dmg ..." |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
392 |
isabelle remote_dmg -V Isabelle "$REMOTE_MAC" \ |
64147 | 393 |
"${ARCHIVE_DIR}/${ISABELLE_NAME}_dmg.tar.gz" "${ARCHIVE_DIR}/${ISABELLE_NAME}.dmg" && |
64176 | 394 |
echo " done" |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
395 |
fi |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
396 |
) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
397 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
398 |
windows) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
399 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
400 |
cd "$TMP" |
67761 | 401 |
rm -f "$TMP/${ISABELLE_NAME}.7z" |
402 |
7z -y -bd a "$TMP/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" |
|
403 |
[ -f "$TMP/${ISABELLE_NAME}.7z" ] || exit 2 |
|
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
404 |
|
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
405 |
echo "application for $PLATFORM_FAMILY" |
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
406 |
( |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
407 |
cat "windows_app/7zsd_All.sfx" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
408 |
cat "$ISABELLE_HOME/Admin/Windows/Installer/sfx.txt" | \ |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
409 |
perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
410 |
cat "$TMP/${ISABELLE_NAME}.7z" |
66724 | 411 |
) > "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe" |
412 |
chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe" |
|
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
413 |
) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
414 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
415 |
*) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
416 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
417 |
esac |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
418 |
|
52677 | 419 |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
420 |
# clean up |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
421 |
rm -rf "$TMP" |