author | wenzelm |
Sat, 24 Mar 2012 20:24:16 +0100 | |
changeset 47113 | b5a5662528fb |
parent 47009 | 97b68d61de2e |
child 47115 | 1a05adae1cc9 |
permissions | -rwxr-xr-x |
34333 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
34664 | 3 |
# Author: Makarius |
4 |
# |
|
5 |
# DESCRIPTION: Isabelle/jEdit interface wrapper |
|
6 |
||
34333 | 7 |
|
43285 | 8 |
## sources |
9 |
||
43320 | 10 |
declare -a SOURCES=( |
43285 | 11 |
"src/dockable.scala" |
12 |
"src/document_model.scala" |
|
13 |
"src/document_view.scala" |
|
14 |
"src/html_panel.scala" |
|
15 |
"src/isabelle_encoding.scala" |
|
16 |
"src/isabelle_hyperlinks.scala" |
|
17 |
"src/isabelle_options.scala" |
|
45665
129db1416717
renamed Isabelle_Markup to Isabelle_Rendering to emphasize its meaning and make room for Pure Isabelle_Markup module;
wenzelm
parents:
45158
diff
changeset
|
18 |
"src/isabelle_rendering.scala" |
43285 | 19 |
"src/isabelle_sidekick.scala" |
44577
96b6388d06c4
separate module for jEdit primitives for loading theory files;
wenzelm
parents:
44565
diff
changeset
|
20 |
"src/jedit_thy_load.scala" |
43285 | 21 |
"src/output_dockable.scala" |
22 |
"src/plugin.scala" |
|
23 |
"src/protocol_dockable.scala" |
|
24 |
"src/raw_output_dockable.scala" |
|
25 |
"src/scala_console.scala" |
|
26 |
"src/session_dockable.scala" |
|
43381 | 27 |
"src/text_area_painter.scala" |
46572 | 28 |
"src/text_overview.scala" |
43414 | 29 |
"src/token_markup.scala" |
43285 | 30 |
) |
31 |
||
43320 | 32 |
declare -a RESOURCES=( |
43286 | 33 |
"src/actions.xml" |
34 |
"src/dockables.xml" |
|
35 |
"src/Isabelle.props" |
|
36 |
"src/services.xml" |
|
43285 | 37 |
) |
38 |
||
39 |
||
34333 | 40 |
## diagnostics |
41 |
||
34664 | 42 |
PRG="$(basename "$0")" |
43 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
44 |
function usage() |
34333 | 45 |
{ |
46 |
echo |
|
34664 | 47 |
echo "Usage: isabelle $PRG [OPTIONS] [FILES ...]" |
34333 | 48 |
echo |
49 |
echo " Options are:" |
|
50 |
echo " -J OPTION add JVM runtime option" |
|
34409 | 51 |
echo " (default JEDIT_JAVA_OPTIONS=$JEDIT_JAVA_OPTIONS)" |
43285 | 52 |
echo " -b build only" |
34691 | 53 |
echo " -d enable debugger" |
43285 | 54 |
echo " -f fresh build" |
34333 | 55 |
echo " -j OPTION add jEdit runtime option" |
56 |
echo " (default JEDIT_OPTIONS=$JEDIT_OPTIONS)" |
|
57 |
echo " -l NAME logic image name (default ISABELLE_LOGIC=$ISABELLE_LOGIC)" |
|
58 |
echo " -m MODE add print mode for output" |
|
59 |
echo |
|
34664 | 60 |
echo "Start jEdit with Isabelle plugin setup and opens theory FILES" |
44862 | 61 |
echo "(default Scratch.thy)." |
34333 | 62 |
echo |
63 |
exit 1 |
|
64 |
} |
|
65 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
66 |
function fail() |
34333 | 67 |
{ |
68 |
echo "$1" >&2 |
|
69 |
exit 2 |
|
70 |
} |
|
71 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
72 |
function failed() |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
73 |
{ |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
74 |
fail "Failed!" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
75 |
} |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
76 |
|
34333 | 77 |
|
78 |
## process command line |
|
79 |
||
80 |
# options |
|
81 |
||
43285 | 82 |
BUILD_ONLY=false |
83 |
BUILD_JARS="jars" |
|
34333 | 84 |
JEDIT_LOGIC="$ISABELLE_LOGIC" |
85 |
JEDIT_PRINT_MODE="" |
|
86 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
87 |
function getoptions() |
34780 | 88 |
{ |
89 |
OPTIND=1 |
|
45158 | 90 |
while getopts "J:bdfj:l:m:" OPT |
34780 | 91 |
do |
92 |
case "$OPT" in |
|
93 |
J) |
|
94 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="$OPTARG" |
|
95 |
;; |
|
43285 | 96 |
b) |
97 |
BUILD_ONLY=true |
|
98 |
;; |
|
34780 | 99 |
d) |
100 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Xdebug" |
|
101 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Xrunjdwp:transport=dt_socket,server=y,suspend=n" |
|
102 |
;; |
|
43285 | 103 |
f) |
104 |
BUILD_JARS="jars_fresh" |
|
105 |
;; |
|
34780 | 106 |
j) |
107 |
ARGS["${#ARGS[@]}"]="$OPTARG" |
|
108 |
;; |
|
109 |
l) |
|
110 |
JEDIT_LOGIC="$OPTARG" |
|
111 |
;; |
|
112 |
m) |
|
113 |
if [ -z "$JEDIT_PRINT_MODE" ]; then |
|
114 |
JEDIT_PRINT_MODE="$OPTARG" |
|
115 |
else |
|
116 |
JEDIT_PRINT_MODE="$JEDIT_PRINT_MODE,$OPTARG" |
|
117 |
fi |
|
118 |
;; |
|
119 |
\?) |
|
120 |
usage |
|
121 |
;; |
|
122 |
esac |
|
123 |
done |
|
124 |
} |
|
34581
abab3a577e10
slightly more robust treatment of options via arrays;
wenzelm
parents:
34412
diff
changeset
|
125 |
|
38257
f0fd14a9c11f
clarified JEDIT_JAVA_OPTIONS vs. JEDIT_SYSTEM_OPTIONS -- discontinued JEDIT_APPLE_PROPERTIES;
wenzelm
parents:
34881
diff
changeset
|
126 |
declare -a JAVA_ARGS; eval "JAVA_ARGS=($JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS)" |
34843
eb8806a2e348
define scala.home, for more robust startup of Scala tools, notably the compiler;
wenzelm
parents:
34790
diff
changeset
|
127 |
[ -n "$SCALA_HOME" ] && JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Dscala.home=$SCALA_HOME" |
eb8806a2e348
define scala.home, for more robust startup of Scala tools, notably the compiler;
wenzelm
parents:
34790
diff
changeset
|
128 |
|
34780 | 129 |
declare -a ARGS; eval "ARGS=($JEDIT_OPTIONS)" |
34333 | 130 |
|
34780 | 131 |
declare -a OPTIONS; eval "OPTIONS=($ISABELLE_JEDIT_OPTIONS)" |
132 |
getoptions "${OPTIONS[@]}" |
|
133 |
||
134 |
getoptions "$@" |
|
34333 | 135 |
shift $(($OPTIND - 1)) |
136 |
||
137 |
||
138 |
# args |
|
139 |
||
44485
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
140 |
if [ "$#" -eq 0 ]; then |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
141 |
ARGS["${#ARGS[@]}"]="Scratch.thy" |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
142 |
else |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
143 |
while [ "$#" -gt 0 ]; do |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
144 |
ARGS["${#ARGS[@]}"]="$(jvmpath "$1")" |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
145 |
shift |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
146 |
done |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
147 |
fi |
34333 | 148 |
|
149 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
150 |
## dependencies |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
151 |
|
43413 | 152 |
[ -e "$ISABELLE_HOME/Admin/build" ] && \ |
153 |
{ "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; } |
|
154 |
||
43523 | 155 |
PURE_JAR="$ISABELLE_HOME/lib/classes/ext/Pure.jar" |
43413 | 156 |
|
43285 | 157 |
pushd "$JEDIT_HOME" >/dev/null || failed |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
158 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
159 |
JEDIT_JAR="$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/jedit.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
160 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
161 |
JEDIT_JARS=( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
162 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/Console.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
163 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/ErrorList.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
164 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/Hyperlinks.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
165 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/SideKick.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
166 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/cobra.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
167 |
"$ISABELLE_JEDIT_BUILD_HOME/contrib/js.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
168 |
) |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
169 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
170 |
SCALA_JARS=( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
171 |
"$SCALA_HOME/lib/scala-compiler.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
172 |
"$SCALA_HOME/lib/scala-library.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
173 |
"$SCALA_HOME/lib/scala-swing.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
174 |
) |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
175 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
176 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
177 |
# target |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
178 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
179 |
TARGET="dist/jars/Isabelle-jEdit.jar" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
180 |
|
43384 | 181 |
declare -a UPDATED=() |
182 |
||
43285 | 183 |
if [ "$BUILD_JARS" = jars_fresh ]; then |
184 |
OUTDATED=true |
|
185 |
else |
|
186 |
OUTDATED=false |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
187 |
if [ ! -e "$TARGET" ]; then |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
188 |
OUTDATED=true |
43384 | 189 |
else |
190 |
if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then |
|
43454 | 191 |
declare -a DEPS=("$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "${SOURCES[@]}" "${RESOURCES[@]}") |
43384 | 192 |
else |
43454 | 193 |
declare -a DEPS=("$PURE_JAR" "${SOURCES[@]}" "${RESOURCES[@]}") |
43384 | 194 |
fi |
195 |
for DEP in "${DEPS[@]}" |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
196 |
do |
43384 | 197 |
[ ! -e "$DEP" ] && fail "Missing file: $DEP" |
198 |
[ "$DEP" -nt "$TARGET" ] && { |
|
199 |
OUTDATED=true |
|
200 |
UPDATED["${#UPDATED[@]}"]="$DEP" |
|
201 |
} |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
202 |
done |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
203 |
fi |
43285 | 204 |
fi |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
205 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
206 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
207 |
# build |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
208 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
209 |
if [ "$OUTDATED" = true ] |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
210 |
then |
43405 | 211 |
echo "### Building Isabelle/jEdit ..." |
212 |
||
43384 | 213 |
[ "${#UPDATED[@]}" -gt 0 ] && { |
43405 | 214 |
echo "Changed files:" |
43384 | 215 |
for FILE in "${UPDATED[@]}" |
216 |
do |
|
217 |
echo " $FILE" |
|
218 |
done |
|
219 |
} |
|
220 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
221 |
[ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \ |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
222 |
fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
223 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
224 |
rm -rf dist || failed |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
225 |
mkdir -p dist dist/classes || failed |
43287 | 226 |
|
46502
3d43d4d4d071
more uniform / portable representation of the idea of "copy_dir" (NB: cp -f dereferences symlinks on GNU/Linux, but does not on old-school Unixen including BSD/Mac OS X);
wenzelm
parents:
45665
diff
changeset
|
227 |
cp -p -R -f "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/. |
3d43d4d4d071
more uniform / portable representation of the idea of "copy_dir" (NB: cp -f dereferences symlinks on GNU/Linux, but does not on old-school Unixen including BSD/Mac OS X);
wenzelm
parents:
45665
diff
changeset
|
228 |
cp -p -R -f "${RESOURCES[@]}" dist/classes/. |
43287 | 229 |
cp src/jEdit.props dist/properties/. |
46502
3d43d4d4d071
more uniform / portable representation of the idea of "copy_dir" (NB: cp -f dereferences symlinks on GNU/Linux, but does not on old-school Unixen including BSD/Mac OS X);
wenzelm
parents:
45665
diff
changeset
|
230 |
cp -p -R -f src/modes/. dist/modes/. |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
231 |
|
43391 | 232 |
perl -i -e 'while (<>) { |
233 |
if (m/NAME="javacc"/) { |
|
234 |
print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,; |
|
235 |
print qq,<MODE NAME="isabelle-session" FILE="isabelle-session.xml" FILE_NAME_GLOB="session.root"/>\n\n,; } |
|
236 |
elsif (m/NAME="scheme"/) { |
|
237 |
print qq,<MODE NAME="scala" FILE="scala.xml" FILE_NAME_GLOB="*.scala" />\n\n,; } |
|
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
238 |
print; }' dist/modes/catalog |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
239 |
|
46502
3d43d4d4d071
more uniform / portable representation of the idea of "copy_dir" (NB: cp -f dereferences symlinks on GNU/Linux, but does not on old-school Unixen including BSD/Mac OS X);
wenzelm
parents:
45665
diff
changeset
|
240 |
cp -p -R -f "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar" dist/jars/. || failed |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
241 |
( |
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
43454
diff
changeset
|
242 |
for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$SCALA_HOME/lib/scala-compiler.jar" |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
243 |
do |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
244 |
CLASSPATH="$CLASSPATH:$JAR" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
245 |
done |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
246 |
CLASSPATH="$(jvmpath "$CLASSPATH")" |
47009 | 247 |
exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d dist/classes "${SOURCES[@]}" |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
248 |
) || fail "Failed to compile sources" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
249 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
250 |
cd dist/classes |
47113
b5a5662528fb
ISABELLE_JDK_HOME settings variable points to JDK with javac and jar (not just JRE);
wenzelm
parents:
47009
diff
changeset
|
251 |
"$ISABELLE_JDK_HOME/bin/jar" cf "../jars/Isabelle-jEdit.jar" * || failed |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
252 |
cd ../.. |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
253 |
rm -rf dist/classes |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
254 |
fi |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
255 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
256 |
popd >/dev/null |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
257 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
258 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
259 |
## main |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
260 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
261 |
# perspective |
34880 | 262 |
|
263 |
mkdir -p "$JEDIT_SETTINGS/DockableWindowManager" |
|
264 |
||
265 |
if [ ! -e "$JEDIT_SETTINGS/perspective.xml" ]; then |
|
266 |
cat > "$JEDIT_SETTINGS/DockableWindowManager/perspective-view0.xml" <<EOF |
|
40155
0b57e3d9bc62
dock isabelle-session at bottom (again, cf. 37bdc2220cf8) to ensure that controls are fully visible;
wenzelm
parents:
39815
diff
changeset
|
267 |
<DOCKING LEFT="" TOP="" RIGHT="" BOTTOM="isabelle-session" LEFT_POS="0" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" /> |
34880 | 268 |
EOF |
269 |
cat > "$JEDIT_SETTINGS/perspective.xml" <<EOF |
|
270 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
271 |
<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd"> |
|
272 |
<PERSPECTIVE> |
|
273 |
<VIEW PLAIN="FALSE"> |
|
274 |
<GEOMETRY X="0" Y="35" WIDTH="1072" HEIGHT="787" EXT_STATE="0" /> |
|
275 |
</VIEW> |
|
276 |
</PERSPECTIVE> |
|
277 |
EOF |
|
278 |
fi |
|
279 |
||
280 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
281 |
# run |
34333 | 282 |
|
43285 | 283 |
[ "$BUILD_ONLY" = true ] || { |
284 |
case "$JEDIT_LOGIC" in |
|
285 |
/*) |
|
286 |
;; |
|
287 |
*/*) |
|
288 |
JEDIT_LOGIC="$(pwd -P)/$JEDIT_LOGIC" |
|
289 |
;; |
|
290 |
esac |
|
34333 | 291 |
|
45158 | 292 |
export JEDIT_LOGIC JEDIT_PRINT_MODE |
34333 | 293 |
|
43285 | 294 |
exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" \ |
295 |
-jar "$(jvmpath "$JEDIT_HOME/dist/jedit.jar")" \ |
|
296 |
"-settings=$(jvmpath "$JEDIT_SETTINGS")" "${ARGS[@]}" |
|
297 |
} |