author | wenzelm |
Thu, 07 Jan 2016 16:50:52 +0100 | |
changeset 62096 | 8d5f2e3e836d |
parent 62041 | 52a87574bca9 |
child 62164 | a12413bec743 |
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 |
51064
9c425ed4a52c
separate makedist_bundle for each platform family, which is more useful for manual use;
wenzelm
parents:
50961
diff
changeset
|
12 |
echo "Usage: isabelle $PRG ARCHIVE PLATFORM_FAMILY" |
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" |
15 |
echo " post-hoc patches for platform family linux, windows, windows64, macos." |
|
50790 | 16 |
echo |
17 |
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
|
18 |
echo |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
19 |
exit 1 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
20 |
} |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
21 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
22 |
function fail() |
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 |
echo "$1" >&2 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
25 |
exit 2 |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
26 |
} |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
27 |
|
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
28 |
|
50790 | 29 |
## arguments |
30 |
||
51064
9c425ed4a52c
separate makedist_bundle for each platform family, which is more useful for manual use;
wenzelm
parents:
50961
diff
changeset
|
31 |
[ "$#" -ne 2 ] && usage |
50790 | 32 |
|
33 |
ARCHIVE="$1"; shift |
|
51064
9c425ed4a52c
separate makedist_bundle for each platform family, which is more useful for manual use;
wenzelm
parents:
50961
diff
changeset
|
34 |
PLATFORM_FAMILY="$1"; shift |
50790 | 35 |
|
61000 | 36 |
if [ "$PLATFORM_FAMILY" = windows64 ]; then |
37 |
PLATFORM_FAM="windows" |
|
38 |
else |
|
39 |
PLATFORM_FAM="$PLATFORM_FAMILY" |
|
40 |
fi |
|
41 |
||
50790 | 42 |
[ -f "$ARCHIVE" ] || fail "Bad source archive: $ARCHIVE" |
43 |
||
44 |
ARCHIVE_DIR="$(cd $(dirname "$ARCHIVE"); echo "$PWD")" |
|
45 |
ISABELLE_NAME="$(basename "$ARCHIVE" .tar.gz)" |
|
46 |
||
47 |
||
48 |
## main |
|
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}; } |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
68 |
else { print; }; |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
69 |
print qq{\n};") |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
70 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
71 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
72 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
73 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="src/Tools/jEdit/dist/jedit.jar" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
74 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
75 |
echo "classpath" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
76 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
77 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
78 |
echo " $ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
79 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
80 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
81 |
|
50790 | 82 |
# bundled components |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
83 |
|
53485
a837df2ceee5
override potential changes in $ISABELLE_HOME_USER/etc/settings;
wenzelm
parents:
53484
diff
changeset
|
84 |
init_component "$JEDIT_HOME" |
a837df2ceee5
override potential changes in $ISABELLE_HOME_USER/etc/settings;
wenzelm
parents:
53484
diff
changeset
|
85 |
|
62041 | 86 |
if [ ! -e "$ARCHIVE_DIR/contrib" ]; then |
87 |
if [ ! -e "$ARCHIVE_DIR/../contrib" ]; then |
|
88 |
mkdir -p "$ARCHIVE_DIR/contrib" |
|
89 |
else |
|
90 |
ln -s "../contrib" "$ARCHIVE_DIR/contrib" |
|
91 |
fi |
|
62037 | 92 |
fi |
50790 | 93 |
|
94 |
echo "#bundled components" >> "$ISABELLE_TARGET/etc/components" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
95 |
|
61000 | 96 |
for CATALOG in main "$PLATFORM_FAM" bundled "bundled-$PLATFORM_FAM" |
50790 | 97 |
do |
98 |
CATALOG_FILE="$ISABELLE_HOME/Admin/components/$CATALOG" |
|
99 |
if [ -f "$CATALOG_FILE" ] |
|
100 |
then |
|
101 |
echo "catalog ${CATALOG}" |
|
102 |
{ |
|
103 |
while { unset REPLY; read -r; test "$?" = 0 -o -n "$REPLY"; } |
|
104 |
do |
|
105 |
case "$REPLY" in |
|
106 |
\#* | "") ;; |
|
107 |
*) |
|
108 |
COMPONENT="$REPLY" |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
109 |
COMPONENT_DIR="$ISABELLE_TARGET/contrib/$COMPONENT" |
50790 | 110 |
case "$COMPONENT" in |
57443
577f029fde39
ProofGeneral-4.2-2 is optional component (including the traditional helper scripts);
wenzelm
parents:
57084
diff
changeset
|
111 |
jedit_build*) ;; |
50790 | 112 |
*) |
113 |
echo " component $COMPONENT" |
|
114 |
CONTRIB="$ARCHIVE_DIR/contrib/${COMPONENT}.tar.gz" |
|
115 |
if [ ! -f "$CONTRIB" ]; then |
|
116 |
REMOTE="$ISABELLE_COMPONENT_REPOSITORY/${COMPONENT}.tar.gz" |
|
117 |
echo " download $REMOTE" |
|
118 |
perl -MLWP::Simple -e "getprint '$REMOTE';" > "$CONTRIB" |
|
119 |
perl -e "exit((stat('${CONTRIB}'))[7] == 0 ? 0 : 1);" && exit 2 |
|
120 |
fi |
|
121 |
||
53418 | 122 |
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
|
123 |
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
|
124 |
then |
53418 | 125 |
case "$COMPONENT" in |
126 |
jdk-*) |
|
127 |
mv "$ISABELLE_TARGET/contrib/$COMPONENT" "$ISABELLE_TARGET/contrib/jdk" |
|
128 |
echo "contrib/jdk" >> "$ISABELLE_TARGET/etc/components" |
|
129 |
;; |
|
130 |
*) |
|
131 |
echo "contrib/$COMPONENT" >> "$ISABELLE_TARGET/etc/components" |
|
132 |
;; |
|
133 |
esac |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
134 |
fi |
50790 | 135 |
;; |
136 |
esac |
|
137 |
;; |
|
138 |
esac |
|
139 |
done |
|
140 |
} < "$CATALOG_FILE" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
141 |
fi |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
142 |
done |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
143 |
|
47742
316c67657fd3
move polyml within Cygwin /usr/local to simplify its rebasing;
wenzelm
parents:
47723
diff
changeset
|
144 |
|
52501 | 145 |
# purge other platforms |
146 |
||
61000 | 147 |
function purge_target |
52501 | 148 |
{ |
149 |
( |
|
150 |
cd "$ISABELLE_TARGET" |
|
61000 | 151 |
for DIR in $(eval find "$@" | sort) |
52501 | 152 |
do |
153 |
echo "removing $DIR" |
|
154 |
rm -rf "$DIR" |
|
155 |
done |
|
156 |
) |
|
157 |
} |
|
158 |
||
159 |
||
58792
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
160 |
# 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
|
161 |
|
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
162 |
function purge_jdk |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
163 |
{ |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
164 |
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
|
165 |
( |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
166 |
cd "$ISABELLE_TARGET" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
167 |
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
|
168 |
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
|
169 |
do |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
170 |
case "$X" in |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
171 |
*/jre) ;; |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
172 |
*) |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
173 |
echo "removing $X" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
174 |
rm -rf "$X" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
175 |
;; |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
176 |
esac |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
177 |
done |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
178 |
else |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
179 |
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
|
180 |
fi |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
181 |
) |
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 |
|
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
|
185 |
# platform-specific setup (inside archive) |
47833
12cb7b5d4b77
more windows-friendly presentation of main text files;
wenzelm
parents:
47760
diff
changeset
|
186 |
|
54661
6ad5242deaa7
specific application name for official bundle (as for Mac OS X);
wenzelm
parents:
54315
diff
changeset
|
187 |
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
|
188 |
"$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
|
189 |
|
61000 | 190 |
case "$PLATFORM_FAM" in |
50790 | 191 |
linux) |
61000 | 192 |
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
|
193 |
purge_jdk "x86-linux" |
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 |
|
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
196 |
for PLATFORM in 32 64 |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
197 |
do |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
198 |
( |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
199 |
echo "# Java runtime options for ${PLATFORM}bit platform" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
200 |
declare -a JAVA_ARGS |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
201 |
if [ "$PLATFORM" = 32 ]; then |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
202 |
eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS32)" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
203 |
else |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
204 |
eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS64)" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
205 |
fi |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
206 |
for ARG in "${JAVA_ARGS[@]}" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
207 |
do |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
208 |
echo "$ARG" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
209 |
done |
62036 | 210 |
echo "-Disabelle.jedit_server=${ISABELLE_NAME}" |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
211 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.options${PLATFORM}" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
212 |
done |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
213 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
214 |
LINUX_CLASSPATH="" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
215 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
216 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
217 |
if [ -z "$LINUX_CLASSPATH" ]; then |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
218 |
LINUX_CLASSPATH="\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
219 |
else |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
220 |
LINUX_CLASSPATH="$LINUX_CLASSPATH:\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
221 |
fi |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
222 |
done |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
223 |
|
54315 | 224 |
cat "$ISABELLE_HOME/Admin/Linux/Isabelle.run" | \ |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
225 |
perl -p > "$ISABELLE_TARGET/${ISABELLE_NAME}.run" -e "s,{CLASSPATH},$LINUX_CLASSPATH,;" |
54315 | 226 |
chmod +x "$ISABELLE_TARGET/${ISABELLE_NAME}.run" |
227 |
||
228 |
mv "$ISABELLE_TARGET/contrib/linux_app" "$TMP/." |
|
229 |
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
|
230 |
;; |
50790 | 231 |
macos) |
61000 | 232 |
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
|
233 |
purge_jdk "x86_64-darwin/Contents/Home" |
52677 | 234 |
mv "$ISABELLE_TARGET/contrib/macos_app" "$TMP/." |
50798 | 235 |
|
53883
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
236 |
perl -pi \ |
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
237 |
-e "s,lookAndFeel=.*,lookAndFeel=com.apple.laf.AquaLookAndFeel,g;" \ |
44964 | 238 |
-e "s,delete-line.shortcut=.*,delete-line.shortcut=C+d,g;" \ |
239 |
-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
|
240 |
-e "s,plugin-blacklist.MacOSX.jar=true,plugin-blacklist.MacOSX.jar=,g;" \ |
53463 | 241 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
44807 | 242 |
;; |
50790 | 243 |
windows) |
61000 | 244 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
245 |
purge_target 'contrib -name x86_64-windows -o -name "x86*-linux" -o -name "x86*-darwin"' |
|
246 |
PLATFORM="x86-windows" |
|
247 |
PLATFORM_IS_64="false" |
|
248 |
PLATFORM_BITS="32" |
|
249 |
else |
|
250 |
purge_target 'contrib -name "x86*-linux" -o -name "x86*-darwin"' |
|
251 |
purge_target 'contrib/jdk -name "x86-windows"' |
|
252 |
PLATFORM="x86_64-windows" |
|
253 |
PLATFORM_IS_64="true" |
|
254 |
PLATFORM_BITS="64" |
|
255 |
fi |
|
256 |
purge_jdk "$PLATFORM" |
|
257 |
||
52677 | 258 |
mv "$ISABELLE_TARGET/contrib/windows_app" "$TMP/." |
50790 | 259 |
|
58760 | 260 |
perl -pi \ |
261 |
-e "s,lookAndFeel=.*,lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel,g;" \ |
|
262 |
-e "s,foldPainter=.*,foldPainter=Square,g;" \ |
|
53463 | 263 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
50790 | 264 |
|
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
|
265 |
( |
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
|
266 |
declare -a JAVA_ARGS=() |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
267 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
268 |
echo -e "# Java runtime options for 32bit platform\r" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
269 |
eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS32)" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
270 |
else |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
271 |
echo -e "# Java runtime options for 64bit platform\r" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
272 |
eval "JAVA_ARGS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS64)" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
273 |
fi |
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
|
274 |
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
|
275 |
do |
60994 | 276 |
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
|
277 |
done |
62036 | 278 |
echo -e "-Disabelle.jedit_server=${ISABELLE_NAME}\r" |
60994 | 279 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.l4j.ini" |
280 |
||
281 |
( |
|
282 |
cd "$TMP" |
|
283 |
||
284 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/Windows/launch4j" |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
285 |
|
60994 | 286 |
( |
287 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
|
288 |
do |
|
289 |
ENTRY=$(echo "$ENTRY" | perl -p -e 's,/,\\\\,g;') |
|
60996 | 290 |
echo " <cp>%EXEDIR%\\\\$ENTRY</cp>" |
60994 | 291 |
done |
292 |
) > exe_classpath |
|
293 |
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
|
294 |
|
60994 | 295 |
perl -p \ |
296 |
-e "s,{OUTFILE},$ISABELLE_TARGET/${ISABELLE_NAME}.exe,g;" \ |
|
297 |
-e "s,{ICON},$APP_TEMPLATE/isabelle_transparent.ico,g;" \ |
|
298 |
-e "s,{SPLASH},$APP_TEMPLATE/isabelle.bmp,g;" \ |
|
299 |
-e "s,{CLASSPATH},$EXE_CLASSPATH,g;" \ |
|
61160 | 300 |
-e "s,{ISABELLE_NAME},$ISABELLE_NAME,g;" \ |
61000 | 301 |
-e "s,{PLATFORM},$PLATFORM,g;" \ |
302 |
-e "s,{PLATFORM_IS_64},$PLATFORM_IS_64,g;" \ |
|
303 |
-e "s,{PLATFORM_BITS},$PLATFORM_BITS,g;" \ |
|
60994 | 304 |
"$APP_TEMPLATE/isabelle.xml" > isabelle.xml |
305 |
||
306 |
"windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j" isabelle.xml |
|
307 |
||
308 |
cp "$APP_TEMPLATE/manifest.xml" "$ISABELLE_TARGET/${ISABELLE_NAME}.exe.manifest" |
|
309 |
) |
|
50790 | 310 |
|
52501 | 311 |
( |
312 |
cd "$ISABELLE_TARGET" |
|
313 |
||
60994 | 314 |
cp "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Setup.bat" \ |
315 |
"$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Terminal.bat" . |
|
316 |
||
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
317 |
for NAME in postinstall rebaseall |
52501 | 318 |
do |
319 |
cp -a "$ISABELLE_HOME/Admin/Windows/Cygwin/isabelle/$NAME" \ |
|
320 |
"contrib/cygwin/isabelle/." |
|
321 |
done |
|
322 |
||
52561 | 323 |
find . -type f -not -name '*.exe' -not -name '*.dll' -perm +100 \ |
324 |
-print0 > "contrib/cygwin/isabelle/executables" |
|
52501 | 325 |
|
52668
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
326 |
find . -type l -exec echo "{}" ";" -exec readlink "{}" ";" \ |
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
327 |
> "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
|
328 |
find . -type l -exec rm "{}" ";" |
53421 | 329 |
|
330 |
touch "contrib/cygwin/isabelle/uninitialized" |
|
52501 | 331 |
) |
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
|
332 |
;; |
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
|
333 |
*) |
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
|
334 |
;; |
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
|
335 |
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
|
336 |
|
50798 | 337 |
|
62032
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
338 |
# archive |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
339 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
340 |
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
|
341 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
342 |
echo "packaging $(basename "$BUNDLE_ARCHIVE")" |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
343 |
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
|
344 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
345 |
|
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
|
346 |
# platform-specific setup (outside archive) |
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
347 |
|
52677 | 348 |
if [ "$ISABELLE_PLATFORM_FAMILY" = linux -a "$PLATFORM_FAMILY" != macos -o "$ISABELLE_PLATFORM_FAMILY" = macos ] |
52668
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
349 |
then |
61000 | 350 |
case "$PLATFORM_FAM" in |
61002 | 351 |
linux) |
352 |
echo "application for $PLATFORM_FAMILY" |
|
62033
e1a4d52d3d53
keep platform bundle for reference, e.g. for headless installation;
wenzelm
parents:
62032
diff
changeset
|
353 |
ln -s "$BUNDLE_ARCHIVE" "${ARCHIVE_DIR}/${ISABELLE_NAME}_app.tar.gz" |
61002 | 354 |
;; |
52677 | 355 |
macos) |
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
356 |
echo "application for $PLATFORM_FAMILY" |
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
357 |
( |
52677 | 358 |
cd "$TMP" |
359 |
||
54392 | 360 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/MacOS" |
57679 | 361 |
APP="dmg/${ISABELLE_NAME}.app" |
362 |
||
363 |
mkdir -p "dmg/.background" |
|
364 |
cp "$APP_TEMPLATE/dmg/background.png" "dmg/.background/" |
|
365 |
cp "$APP_TEMPLATE/dmg/DS_Store" "dmg/.DS_Store" |
|
366 |
ln -s /Applications "dmg/." |
|
52677 | 367 |
|
368 |
for NAME in Java MacOS PlugIns Resources |
|
369 |
do |
|
370 |
mkdir -p "$APP/Contents/$NAME" |
|
371 |
done |
|
372 |
||
53488
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
373 |
( |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
374 |
cat "$APP_TEMPLATE/Info.plist-part1" |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
375 |
|
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
376 |
declare -a OPTIONS=() |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
377 |
eval "OPTIONS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS64)" |
53488
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
378 |
for OPT in "${OPTIONS[@]}" |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
379 |
do |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
380 |
echo "<string>$OPT</string>" |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
381 |
done |
62036 | 382 |
echo "<string>-Disabelle.jedit_server={ISABELLE_NAME}</string>" |
53489 | 383 |
echo "<string>-Dapple.awt.application.name={ISABELLE_NAME}</string>" |
53488
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
384 |
|
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
385 |
cat "$APP_TEMPLATE/Info.plist-part2" |
009d3bcf6907
generate application Info.plist 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:
53485
diff
changeset
|
386 |
) | perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;" > "$APP/Contents/Info.plist" |
52677 | 387 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
388 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
52677 | 389 |
do |
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
390 |
ln -sf "../Resources/${ISABELLE_NAME}/$ENTRY" "$APP/Contents/Java" |
52677 | 391 |
done |
392 |
||
393 |
cp -R "$APP_TEMPLATE/Resources/." "$APP/Contents/Resources/." |
|
394 |
||
53418 | 395 |
ln -sf "../Resources/${ISABELLE_NAME}/contrib/jdk/x86_64-darwin" \ |
61184
554bba935af1
more explicit indication of bundled jdk, which is required for newer versions of JavaAppLauncher;
wenzelm
parents:
61160
diff
changeset
|
396 |
"$APP/Contents/PlugIns/bundled.jdk" |
52677 | 397 |
|
398 |
cp macos_app/JavaAppLauncher "$APP/Contents/MacOS/." && \ |
|
399 |
chmod +x "$APP/Contents/MacOS/JavaAppLauncher" |
|
400 |
||
401 |
mv "$ISABELLE_NAME" "$APP/Contents/Resources/." |
|
61151 | 402 |
ln -sf "../../Info.plist" "$APP/Contents/Resources/$ISABELLE_NAME/${ISABELLE_NAME}.plist" |
52677 | 403 |
ln -sf "Contents/Resources/$ISABELLE_NAME" "$APP/Isabelle" |
404 |
||
52678 | 405 |
rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.dmg" |
57679 | 406 |
|
407 |
cd dmg |
|
57682
648c5ef4876d
proper volume name, such that background image is found in /Volumes/Isabelle/.background;
wenzelm
parents:
57679
diff
changeset
|
408 |
hdiutil create -srcfolder . -volname Isabelle "${ARCHIVE_DIR}/${ISABELLE_NAME}.dmg" |
52677 | 409 |
) |
410 |
;; |
|
411 |
windows) |
|
412 |
( |
|
61000 | 413 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
61034 | 414 |
PLATFORM_SUFFIX="-win32" |
61000 | 415 |
else |
416 |
PLATFORM_SUFFIX="-win64" |
|
417 |
fi |
|
418 |
||
52677 | 419 |
cd "$TMP" |
420 |
rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z" |
|
421 |
7z -y -bd a "$TMP/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" || exit 2 |
|
422 |
||
423 |
echo "application for $PLATFORM_FAMILY" |
|
424 |
( |
|
425 |
cat "windows_app/7zsd_All.sfx" |
|
426 |
cat "$ISABELLE_HOME/Admin/Windows/Installer/sfx.txt" | \ |
|
427 |
perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;" |
|
428 |
cat "$TMP/${ISABELLE_NAME}.7z" |
|
61000 | 429 |
) > "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe" |
430 |
chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe" |
|
52677 | 431 |
) |
432 |
;; |
|
433 |
*) |
|
434 |
;; |
|
435 |
esac |
|
436 |
else |
|
437 |
echo "### Cannot build application for $PLATFORM_FAMILY on $ISABELLE_PLATFORM_FAMILY" |
|
52668
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
438 |
fi |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
439 |
|
52677 | 440 |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
441 |
# clean up |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
442 |
rm -rf "$TMP" |