author | wenzelm |
Mon, 28 Aug 2017 19:06:00 +0200 | |
changeset 66529 | f39e01e9c489 |
parent 64176 | 35644caa62a7 |
child 66724 | 1e1f9f603385 |
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" |
15 |
echo " post-hoc patches for platform family linux, windows, windows64, 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 |
|
61000 | 39 |
if [ "$PLATFORM_FAMILY" = windows64 ]; then |
40 |
PLATFORM_FAM="windows" |
|
41 |
else |
|
42 |
PLATFORM_FAM="$PLATFORM_FAMILY" |
|
43 |
fi |
|
44 |
||
50790 | 45 |
[ -f "$ARCHIVE" ] || fail "Bad source archive: $ARCHIVE" |
46 |
||
47 |
ARCHIVE_DIR="$(cd $(dirname "$ARCHIVE"); echo "$PWD")" |
|
48 |
ISABELLE_NAME="$(basename "$ARCHIVE" .tar.gz)" |
|
49 |
||
50 |
||
51 |
## main |
|
52 |
||
63897
85c83757788c
consolidate implicit use of gnutar, via somewhat fragile dynamic scoping within existing shell scripts;
wenzelm
parents:
63490
diff
changeset
|
53 |
#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
|
54 |
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
|
55 |
|
50794 | 56 |
TMP="/var/tmp/isabelle-makedist$$" |
37315 | 57 |
mkdir "$TMP" || fail "Cannot create directory $TMP" |
58 |
||
50790 | 59 |
ISABELLE_TARGET="$TMP/$ISABELLE_NAME" |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
60 |
|
53418 | 61 |
tar -C "$TMP" -x -z -f "$ARCHIVE" || exit 2 |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
62 |
|
37315 | 63 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
64 |
# distribution classpath (based on educated guesses) |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
65 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
66 |
splitarray ":" "$ISABELLE_CLASSPATH"; CLASSPATH_ENTRIES=("${SPLITARRAY[@]}") |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
67 |
declare -a DISTRIBITION_CLASSPATH=() |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
68 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
69 |
for ENTRY in "${CLASSPATH_ENTRIES[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
70 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
71 |
ENTRY=$(echo "$ENTRY" | perl -n -e " |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
72 |
if (m,$ISABELLE_HOME/(.*)\$,) { print qq{\$1}; } |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
73 |
elsif (m,$USER_HOME/.isabelle/contrib/(.*)\$,) { print qq{contrib/\$1}; } |
64175 | 74 |
elsif (m,/home/isabelle/contrib/(.*)\$,) { print qq{contrib/\$1}; } |
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
75 |
else { print; }; |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
76 |
print qq{\n};") |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
77 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
78 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
79 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
80 |
DISTRIBITION_CLASSPATH["${#DISTRIBITION_CLASSPATH[@]}"]="src/Tools/jEdit/dist/jedit.jar" |
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 |
echo "classpath" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
83 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
84 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
85 |
echo " $ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
86 |
done |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
87 |
|
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
88 |
|
50790 | 89 |
# bundled components |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
90 |
|
62041 | 91 |
if [ ! -e "$ARCHIVE_DIR/contrib" ]; then |
92 |
if [ ! -e "$ARCHIVE_DIR/../contrib" ]; then |
|
93 |
mkdir -p "$ARCHIVE_DIR/contrib" |
|
94 |
else |
|
95 |
ln -s "../contrib" "$ARCHIVE_DIR/contrib" |
|
96 |
fi |
|
62037 | 97 |
fi |
50790 | 98 |
|
99 |
echo "#bundled components" >> "$ISABELLE_TARGET/etc/components" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
100 |
|
61000 | 101 |
for CATALOG in main "$PLATFORM_FAM" bundled "bundled-$PLATFORM_FAM" |
50790 | 102 |
do |
103 |
CATALOG_FILE="$ISABELLE_HOME/Admin/components/$CATALOG" |
|
104 |
if [ -f "$CATALOG_FILE" ] |
|
105 |
then |
|
106 |
echo "catalog ${CATALOG}" |
|
107 |
{ |
|
108 |
while { unset REPLY; read -r; test "$?" = 0 -o -n "$REPLY"; } |
|
109 |
do |
|
110 |
case "$REPLY" in |
|
111 |
\#* | "") ;; |
|
112 |
*) |
|
113 |
COMPONENT="$REPLY" |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
114 |
COMPONENT_DIR="$ISABELLE_TARGET/contrib/$COMPONENT" |
50790 | 115 |
case "$COMPONENT" in |
57443
577f029fde39
ProofGeneral-4.2-2 is optional component (including the traditional helper scripts);
wenzelm
parents:
57084
diff
changeset
|
116 |
jedit_build*) ;; |
50790 | 117 |
*) |
118 |
echo " component $COMPONENT" |
|
119 |
CONTRIB="$ARCHIVE_DIR/contrib/${COMPONENT}.tar.gz" |
|
120 |
if [ ! -f "$CONTRIB" ]; then |
|
63490
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
121 |
type -p curl > /dev/null || fail "Cannot download files: missing curl" |
50790 | 122 |
REMOTE="$ISABELLE_COMPONENT_REPOSITORY/${COMPONENT}.tar.gz" |
63490
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
123 |
echo " downloading $REMOTE" |
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
124 |
curl --fail --silent "$REMOTE" > "$CONTRIB" || \ |
9416333a17c2
prefer curl: presumably more portable and versatile;
wenzelm
parents:
63058
diff
changeset
|
125 |
fail "Failed to download \"$REMOTE\"" |
50790 | 126 |
perl -e "exit((stat('${CONTRIB}'))[7] == 0 ? 0 : 1);" && exit 2 |
127 |
fi |
|
128 |
||
53418 | 129 |
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
|
130 |
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
|
131 |
then |
53418 | 132 |
case "$COMPONENT" in |
133 |
jdk-*) |
|
134 |
mv "$ISABELLE_TARGET/contrib/$COMPONENT" "$ISABELLE_TARGET/contrib/jdk" |
|
135 |
echo "contrib/jdk" >> "$ISABELLE_TARGET/etc/components" |
|
136 |
;; |
|
137 |
*) |
|
138 |
echo "contrib/$COMPONENT" >> "$ISABELLE_TARGET/etc/components" |
|
139 |
;; |
|
140 |
esac |
|
50891
d1a0335b4231
do not register quasi-components, notably cygwin;
wenzelm
parents:
50863
diff
changeset
|
141 |
fi |
50790 | 142 |
;; |
143 |
esac |
|
144 |
;; |
|
145 |
esac |
|
146 |
done |
|
147 |
} < "$CATALOG_FILE" |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
148 |
fi |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
149 |
done |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
150 |
|
47742
316c67657fd3
move polyml within Cygwin /usr/local to simplify its rebasing;
wenzelm
parents:
47723
diff
changeset
|
151 |
|
52501 | 152 |
# purge other platforms |
153 |
||
61000 | 154 |
function purge_target |
52501 | 155 |
{ |
156 |
( |
|
157 |
cd "$ISABELLE_TARGET" |
|
61000 | 158 |
for DIR in $(eval find "$@" | sort) |
52501 | 159 |
do |
160 |
echo "removing $DIR" |
|
161 |
rm -rf "$DIR" |
|
162 |
done |
|
163 |
) |
|
164 |
} |
|
165 |
||
166 |
||
58792
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
167 |
# 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
|
168 |
|
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
169 |
function purge_jdk |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
170 |
{ |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
171 |
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
|
172 |
( |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
173 |
cd "$ISABELLE_TARGET" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
174 |
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
|
175 |
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
|
176 |
do |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
177 |
case "$X" in |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
178 |
*/jre) ;; |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
179 |
*) |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
180 |
echo "removing $X" |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
181 |
rm -rf "$X" |
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 |
esac |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
184 |
done |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
185 |
else |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
186 |
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
|
187 |
fi |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
188 |
) |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
189 |
} |
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
190 |
|
d6d9bb806bb5
JRE is sufficient for official release -- javac and jar are only needed for self-build;
wenzelm
parents:
58760
diff
changeset
|
191 |
|
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
|
192 |
# platform-specific setup (inside archive) |
47833
12cb7b5d4b77
more windows-friendly presentation of main text files;
wenzelm
parents:
47760
diff
changeset
|
193 |
|
54661
6ad5242deaa7
specific application name for official bundle (as for Mac OS X);
wenzelm
parents:
54315
diff
changeset
|
194 |
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
|
195 |
"$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
|
196 |
|
61000 | 197 |
case "$PLATFORM_FAM" in |
50790 | 198 |
linux) |
61000 | 199 |
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
|
200 |
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
|
201 |
purge_jdk "x86_64-linux" |
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
202 |
|
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
203 |
for PLATFORM in 32 64 |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
204 |
do |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
205 |
( |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
206 |
init_component "$JEDIT_HOME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
207 |
|
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
208 |
echo "# Java runtime options for ${PLATFORM}bit platform" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
209 |
declare -a JAVA_ARGS |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
210 |
if [ "$PLATFORM" = 32 ]; then |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
211 |
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
|
212 |
else |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
213 |
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
|
214 |
fi |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
215 |
for ARG in "${JAVA_ARGS[@]}" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
216 |
do |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
217 |
echo "$ARG" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
218 |
done |
62036 | 219 |
echo "-Disabelle.jedit_server=${ISABELLE_NAME}" |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
220 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.options${PLATFORM}" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
221 |
done |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
222 |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
223 |
LINUX_CLASSPATH="" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
224 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
225 |
do |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
226 |
if [ -z "$LINUX_CLASSPATH" ]; then |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
227 |
LINUX_CLASSPATH="\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
228 |
else |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
229 |
LINUX_CLASSPATH="$LINUX_CLASSPATH:\\\$ISABELLE_HOME/$ENTRY" |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
230 |
fi |
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
231 |
done |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
232 |
|
54315 | 233 |
cat "$ISABELLE_HOME/Admin/Linux/Isabelle.run" | \ |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
234 |
perl -p > "$ISABELLE_TARGET/${ISABELLE_NAME}.run" -e "s,{CLASSPATH},$LINUX_CLASSPATH,;" |
54315 | 235 |
chmod +x "$ISABELLE_TARGET/${ISABELLE_NAME}.run" |
236 |
||
237 |
mv "$ISABELLE_TARGET/contrib/linux_app" "$TMP/." |
|
238 |
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
|
239 |
;; |
50790 | 240 |
macos) |
61000 | 241 |
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
|
242 |
purge_jdk "x86_64-darwin/Contents/Home" |
52677 | 243 |
mv "$ISABELLE_TARGET/contrib/macos_app" "$TMP/." |
50798 | 244 |
|
53883
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
245 |
perl -pi \ |
f1c5f857df3d
include MacOSX plugin by default -- disabled by default to avoid multiplatform confusion;
wenzelm
parents:
53581
diff
changeset
|
246 |
-e "s,lookAndFeel=.*,lookAndFeel=com.apple.laf.AquaLookAndFeel,g;" \ |
44964 | 247 |
-e "s,delete-line.shortcut=.*,delete-line.shortcut=C+d,g;" \ |
248 |
-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
|
249 |
-e "s,plugin-blacklist.MacOSX.jar=true,plugin-blacklist.MacOSX.jar=,g;" \ |
53463 | 250 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
44807 | 251 |
;; |
50790 | 252 |
windows) |
61000 | 253 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
254 |
purge_target 'contrib -name x86_64-windows -o -name "x86*-linux" -o -name "x86*-darwin"' |
|
255 |
PLATFORM="x86-windows" |
|
256 |
PLATFORM_IS_64="false" |
|
257 |
PLATFORM_BITS="32" |
|
258 |
else |
|
259 |
purge_target 'contrib -name "x86*-linux" -o -name "x86*-darwin"' |
|
260 |
purge_target 'contrib/jdk -name "x86-windows"' |
|
261 |
PLATFORM="x86_64-windows" |
|
262 |
PLATFORM_IS_64="true" |
|
263 |
PLATFORM_BITS="64" |
|
264 |
fi |
|
265 |
purge_jdk "$PLATFORM" |
|
266 |
||
52677 | 267 |
mv "$ISABELLE_TARGET/contrib/windows_app" "$TMP/." |
50790 | 268 |
|
58760 | 269 |
perl -pi \ |
270 |
-e "s,lookAndFeel=.*,lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel,g;" \ |
|
271 |
-e "s,foldPainter=.*,foldPainter=Square,g;" \ |
|
53463 | 272 |
"$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props" |
50790 | 273 |
|
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 |
( |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
275 |
init_component "$JEDIT_HOME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
276 |
|
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 |
declare -a JAVA_ARGS=() |
61134
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
278 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
279 |
echo -e "# Java runtime options for 32bit platform\r" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
280 |
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
|
281 |
else |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
282 |
echo -e "# Java runtime options for 64bit platform\r" |
80ac5e17772d
clarified Java runtime options for 32 vs. 64 bit;
wenzelm
parents:
61132
diff
changeset
|
283 |
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
|
284 |
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
|
285 |
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
|
286 |
do |
60994 | 287 |
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
|
288 |
done |
62036 | 289 |
echo -e "-Disabelle.jedit_server=${ISABELLE_NAME}\r" |
60994 | 290 |
) > "$ISABELLE_TARGET/${ISABELLE_NAME}.l4j.ini" |
291 |
||
292 |
( |
|
293 |
cd "$TMP" |
|
294 |
||
295 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/Windows/launch4j" |
|
53581
c0ad478abf50
generate distribution classpath for cold-start application wrappers;
wenzelm
parents:
53489
diff
changeset
|
296 |
|
60994 | 297 |
( |
298 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
|
299 |
do |
|
300 |
ENTRY=$(echo "$ENTRY" | perl -p -e 's,/,\\\\,g;') |
|
60996 | 301 |
echo " <cp>%EXEDIR%\\\\$ENTRY</cp>" |
60994 | 302 |
done |
303 |
) > exe_classpath |
|
304 |
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
|
305 |
|
60994 | 306 |
perl -p \ |
307 |
-e "s,{OUTFILE},$ISABELLE_TARGET/${ISABELLE_NAME}.exe,g;" \ |
|
308 |
-e "s,{ICON},$APP_TEMPLATE/isabelle_transparent.ico,g;" \ |
|
309 |
-e "s,{SPLASH},$APP_TEMPLATE/isabelle.bmp,g;" \ |
|
310 |
-e "s,{CLASSPATH},$EXE_CLASSPATH,g;" \ |
|
61160 | 311 |
-e "s,{ISABELLE_NAME},$ISABELLE_NAME,g;" \ |
61000 | 312 |
-e "s,{PLATFORM},$PLATFORM,g;" \ |
313 |
-e "s,{PLATFORM_IS_64},$PLATFORM_IS_64,g;" \ |
|
314 |
-e "s,{PLATFORM_BITS},$PLATFORM_BITS,g;" \ |
|
60994 | 315 |
"$APP_TEMPLATE/isabelle.xml" > isabelle.xml |
316 |
||
317 |
"windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j" isabelle.xml |
|
318 |
||
319 |
cp "$APP_TEMPLATE/manifest.xml" "$ISABELLE_TARGET/${ISABELLE_NAME}.exe.manifest" |
|
320 |
) |
|
50790 | 321 |
|
52501 | 322 |
( |
323 |
cd "$ISABELLE_TARGET" |
|
324 |
||
60994 | 325 |
cp "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Setup.bat" \ |
326 |
"$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Terminal.bat" . |
|
327 |
||
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
328 |
for NAME in postinstall rebaseall |
52501 | 329 |
do |
330 |
cp -a "$ISABELLE_HOME/Admin/Windows/Cygwin/isabelle/$NAME" \ |
|
331 |
"contrib/cygwin/isabelle/." |
|
332 |
done |
|
333 |
||
63058
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
334 |
if [ "$ISABELLE_PLATFORM_FAMILY" = macos ]; then |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
335 |
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
|
336 |
-print0 > "contrib/cygwin/isabelle/executables" |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
337 |
else |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
338 |
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
|
339 |
-print0 > "contrib/cygwin/isabelle/executables" |
8804faa80bc9
more portable: GNU find no longer supports "-perm +mode";
wenzelm
parents:
62164
diff
changeset
|
340 |
fi |
52501 | 341 |
|
52668
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
342 |
find . -type l -exec echo "{}" ";" -exec readlink "{}" ";" \ |
a467a6b4376c
produce 7z archive for windows and preserve symlinks separately;
wenzelm
parents:
52561
diff
changeset
|
343 |
> "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
|
344 |
find . -type l -exec rm "{}" ";" |
53421 | 345 |
|
346 |
touch "contrib/cygwin/isabelle/uninitialized" |
|
52501 | 347 |
) |
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
|
348 |
;; |
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
|
349 |
*) |
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
|
350 |
;; |
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
|
351 |
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
|
352 |
|
50798 | 353 |
|
62032
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
354 |
# archive |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
355 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
356 |
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
|
357 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
358 |
echo "packaging $(basename "$BUNDLE_ARCHIVE")" |
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
359 |
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
|
360 |
|
620d3f63ead1
keep generic archive for all platforms -- required for Admin/Release/build_library;
wenzelm
parents:
61521
diff
changeset
|
361 |
|
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
|
362 |
# platform-specific setup (outside archive) |
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
363 |
|
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
364 |
case "$PLATFORM_FAM" in |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
365 |
linux) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
366 |
echo "application for $PLATFORM_FAMILY" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
367 |
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
|
368 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
369 |
macos) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
370 |
echo "application for $PLATFORM_FAMILY" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
371 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
372 |
cd "$TMP" |
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 |
APP_TEMPLATE="$ISABELLE_HOME/Admin/MacOS" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
375 |
APP="dmg/${ISABELLE_NAME}.app" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
376 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
377 |
mkdir -p "dmg/.background" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
378 |
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
|
379 |
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
|
380 |
ln -s /Applications "dmg/." |
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 |
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
|
383 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
384 |
mkdir -p "$APP/Contents/$NAME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
385 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
386 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
387 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
388 |
init_component "$JEDIT_HOME" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
389 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
390 |
cat "$APP_TEMPLATE/Info.plist-part1" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
391 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
392 |
declare -a OPTIONS=() |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
393 |
eval "OPTIONS=($ISABELLE_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS64)" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
394 |
for OPT in "${OPTIONS[@]}" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
395 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
396 |
echo "<string>$OPT</string>" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
397 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
398 |
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
|
399 |
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
|
400 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
401 |
cat "$APP_TEMPLATE/Info.plist-part2" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
402 |
) | 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
|
403 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
404 |
for ENTRY in "${DISTRIBITION_CLASSPATH[@]}" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
405 |
do |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
406 |
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
|
407 |
done |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
408 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
409 |
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
|
410 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
411 |
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
|
412 |
"$APP/Contents/PlugIns/bundled.jdk" |
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 |
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
|
415 |
chmod +x "$APP/Contents/MacOS/JavaAppLauncher" |
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 |
mv "$ISABELLE_NAME" "$APP/Contents/Resources/." |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
418 |
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
|
419 |
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
|
420 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
421 |
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
|
422 |
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
|
423 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
424 |
if [ -n "$REMOTE_MAC" ] |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
425 |
then |
64176 | 426 |
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
|
427 |
isabelle remote_dmg -V Isabelle "$REMOTE_MAC" \ |
64147 | 428 |
"${ARCHIVE_DIR}/${ISABELLE_NAME}_dmg.tar.gz" "${ARCHIVE_DIR}/${ISABELLE_NAME}.dmg" && |
64176 | 429 |
echo " done" |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
430 |
fi |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
431 |
) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
432 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
433 |
windows) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
434 |
( |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
435 |
if [ "$PLATFORM_FAMILY" = windows ]; then |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
436 |
PLATFORM_SUFFIX="-win32" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
437 |
else |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
438 |
PLATFORM_SUFFIX="-win64" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
439 |
fi |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
440 |
|
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
441 |
cd "$TMP" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
442 |
rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
443 |
7z -y -bd a "$TMP/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" || exit 2 |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
444 |
|
52670
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
445 |
echo "application for $PLATFORM_FAMILY" |
57a00f274130
build Windows application on the spot, using Unix tools;
wenzelm
parents:
52668
diff
changeset
|
446 |
( |
64144
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
447 |
cat "windows_app/7zsd_All.sfx" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
448 |
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
|
449 |
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
|
450 |
cat "$TMP/${ISABELLE_NAME}.7z" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
451 |
) > "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
452 |
chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe" |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
453 |
) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
454 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
455 |
*) |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
456 |
;; |
ef20d2da71af
makedist_bundle works on Linux as well: build dmg on remote Mac;
wenzelm
parents:
63897
diff
changeset
|
457 |
esac |
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
458 |
|
52677 | 459 |
|
33907
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
460 |
# clean up |
473f859e1c29
re-package Isabelle distribution with add-on components;
wenzelm
parents:
diff
changeset
|
461 |
rm -rf "$TMP" |