author | wenzelm |
Tue, 14 Aug 2012 11:37:58 +0200 | |
changeset 48791 | 9e8f30bfbdca |
parent 48603 | a37463482e5f |
child 48921 | 5d8d409b897e |
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" |
|
48014
63021e59cbf0
separate README dockable, which allows to make it more prominent first and remove it later;
wenzelm
parents:
47995
diff
changeset
|
25 |
"src/readme_dockable.scala" |
43285 | 26 |
"src/scala_console.scala" |
27 |
"src/session_dockable.scala" |
|
48021
d899be1cfe6d
separate syslog dockable -- discontinued tendency of sub-window management via tabs;
wenzelm
parents:
48014
diff
changeset
|
28 |
"src/syslog_dockable.scala" |
43381 | 29 |
"src/text_area_painter.scala" |
46572 | 30 |
"src/text_overview.scala" |
43414 | 31 |
"src/token_markup.scala" |
43285 | 32 |
) |
33 |
||
43320 | 34 |
declare -a RESOURCES=( |
43286 | 35 |
"src/actions.xml" |
36 |
"src/dockables.xml" |
|
37 |
"src/Isabelle.props" |
|
38 |
"src/services.xml" |
|
43285 | 39 |
) |
40 |
||
41 |
||
34333 | 42 |
## diagnostics |
43 |
||
34664 | 44 |
PRG="$(basename "$0")" |
45 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
46 |
function usage() |
34333 | 47 |
{ |
48 |
echo |
|
34664 | 49 |
echo "Usage: isabelle $PRG [OPTIONS] [FILES ...]" |
34333 | 50 |
echo |
51 |
echo " Options are:" |
|
52 |
echo " -J OPTION add JVM runtime option" |
|
34409 | 53 |
echo " (default JEDIT_JAVA_OPTIONS=$JEDIT_JAVA_OPTIONS)" |
43285 | 54 |
echo " -b build only" |
48791 | 55 |
echo " -d DIR include session directory" |
43285 | 56 |
echo " -f fresh build" |
34333 | 57 |
echo " -j OPTION add jEdit runtime option" |
58 |
echo " (default JEDIT_OPTIONS=$JEDIT_OPTIONS)" |
|
59 |
echo " -l NAME logic image name (default ISABELLE_LOGIC=$ISABELLE_LOGIC)" |
|
60 |
echo " -m MODE add print mode for output" |
|
61 |
echo |
|
34664 | 62 |
echo "Start jEdit with Isabelle plugin setup and opens theory FILES" |
44862 | 63 |
echo "(default Scratch.thy)." |
34333 | 64 |
echo |
65 |
exit 1 |
|
66 |
} |
|
67 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
68 |
function fail() |
34333 | 69 |
{ |
70 |
echo "$1" >&2 |
|
71 |
exit 2 |
|
72 |
} |
|
73 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
74 |
function 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 |
fail "Failed!" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
77 |
} |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
78 |
|
34333 | 79 |
|
80 |
## process command line |
|
81 |
||
82 |
# options |
|
83 |
||
43285 | 84 |
BUILD_ONLY=false |
85 |
BUILD_JARS="jars" |
|
48791 | 86 |
JEDIT_SESSION_DIRS="" |
34333 | 87 |
JEDIT_LOGIC="$ISABELLE_LOGIC" |
88 |
JEDIT_PRINT_MODE="" |
|
89 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
90 |
function getoptions() |
34780 | 91 |
{ |
92 |
OPTIND=1 |
|
48791 | 93 |
while getopts "J:bd:fj:l:m:" OPT |
34780 | 94 |
do |
95 |
case "$OPT" in |
|
96 |
J) |
|
97 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="$OPTARG" |
|
98 |
;; |
|
43285 | 99 |
b) |
100 |
BUILD_ONLY=true |
|
101 |
;; |
|
48791 | 102 |
d) |
103 |
if [ -z "$JEDIT_SESSION_DIRS" ]; then |
|
104 |
JEDIT_SESSION_DIRS="$OPTARG" |
|
105 |
else |
|
106 |
JEDIT_SESSION_DIRS="$JEDIT_SESSION_DIRS:$OPTARG" |
|
107 |
fi |
|
108 |
;; |
|
43285 | 109 |
f) |
110 |
BUILD_JARS="jars_fresh" |
|
111 |
;; |
|
34780 | 112 |
j) |
113 |
ARGS["${#ARGS[@]}"]="$OPTARG" |
|
114 |
;; |
|
115 |
l) |
|
116 |
JEDIT_LOGIC="$OPTARG" |
|
117 |
;; |
|
118 |
m) |
|
119 |
if [ -z "$JEDIT_PRINT_MODE" ]; then |
|
120 |
JEDIT_PRINT_MODE="$OPTARG" |
|
121 |
else |
|
122 |
JEDIT_PRINT_MODE="$JEDIT_PRINT_MODE,$OPTARG" |
|
123 |
fi |
|
124 |
;; |
|
125 |
\?) |
|
126 |
usage |
|
127 |
;; |
|
128 |
esac |
|
129 |
done |
|
130 |
} |
|
34581
abab3a577e10
slightly more robust treatment of options via arrays;
wenzelm
parents:
34412
diff
changeset
|
131 |
|
38257
f0fd14a9c11f
clarified JEDIT_JAVA_OPTIONS vs. JEDIT_SYSTEM_OPTIONS -- discontinued JEDIT_APPLE_PROPERTIES;
wenzelm
parents:
34881
diff
changeset
|
132 |
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
|
133 |
[ -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
|
134 |
|
34780 | 135 |
declare -a ARGS; eval "ARGS=($JEDIT_OPTIONS)" |
34333 | 136 |
|
34780 | 137 |
declare -a OPTIONS; eval "OPTIONS=($ISABELLE_JEDIT_OPTIONS)" |
138 |
getoptions "${OPTIONS[@]}" |
|
139 |
||
140 |
getoptions "$@" |
|
34333 | 141 |
shift $(($OPTIND - 1)) |
142 |
||
143 |
||
144 |
# args |
|
145 |
||
44485
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
146 |
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
|
147 |
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
|
148 |
else |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
149 |
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
|
150 |
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
|
151 |
shift |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
152 |
done |
2f0a34fc4d2d
back to tradition Scratch.thy default -- execution wrt. perspective overcomes the main problems of 226563829580;
wenzelm
parents:
43695
diff
changeset
|
153 |
fi |
34333 | 154 |
|
155 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
156 |
## dependencies |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
157 |
|
43413 | 158 |
[ -e "$ISABELLE_HOME/Admin/build" ] && \ |
159 |
{ "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; } |
|
160 |
||
43523 | 161 |
PURE_JAR="$ISABELLE_HOME/lib/classes/ext/Pure.jar" |
43413 | 162 |
|
43285 | 163 |
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
|
164 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
165 |
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
|
166 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
167 |
JEDIT_JARS=( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
168 |
"$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
|
169 |
"$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
|
170 |
"$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
|
171 |
"$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
|
172 |
"$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
|
173 |
"$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
|
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[@]}") |
47666
cf5fe7eb6793
pretend jedit is up-to-date if this is not a repository -- avoid accidental build attempts after touching files etc.;
wenzelm
parents:
47115
diff
changeset
|
192 |
elif [ -e "$ISABELLE_HOME/Admin/build" ]; then |
cf5fe7eb6793
pretend jedit is up-to-date if this is not a repository -- avoid accidental build attempts after touching files etc.;
wenzelm
parents:
47115
diff
changeset
|
193 |
declare -a DEPS=("$PURE_JAR" "${SOURCES[@]}" "${RESOURCES[@]}") |
43384 | 194 |
else |
47666
cf5fe7eb6793
pretend jedit is up-to-date if this is not a repository -- avoid accidental build attempts after touching files etc.;
wenzelm
parents:
47115
diff
changeset
|
195 |
declare -a DEPS=() |
43384 | 196 |
fi |
197 |
for DEP in "${DEPS[@]}" |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
198 |
do |
43384 | 199 |
[ ! -e "$DEP" ] && fail "Missing file: $DEP" |
200 |
[ "$DEP" -nt "$TARGET" ] && { |
|
201 |
OUTDATED=true |
|
202 |
UPDATED["${#UPDATED[@]}"]="$DEP" |
|
203 |
} |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
204 |
done |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
205 |
fi |
43285 | 206 |
fi |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
207 |
|
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 |
# build |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
210 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
211 |
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
|
212 |
then |
43405 | 213 |
echo "### Building Isabelle/jEdit ..." |
214 |
||
43384 | 215 |
[ "${#UPDATED[@]}" -gt 0 ] && { |
43405 | 216 |
echo "Changed files:" |
43384 | 217 |
for FILE in "${UPDATED[@]}" |
218 |
do |
|
219 |
echo " $FILE" |
|
220 |
done |
|
221 |
} |
|
222 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
223 |
[ -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
|
224 |
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
|
225 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
226 |
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
|
227 |
mkdir -p dist dist/classes || failed |
43287 | 228 |
|
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
|
229 |
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
|
230 |
cp -p -R -f "${RESOURCES[@]}" dist/classes/. |
43287 | 231 |
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
|
232 |
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
|
233 |
|
43391 | 234 |
perl -i -e 'while (<>) { |
235 |
if (m/NAME="javacc"/) { |
|
236 |
print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,; |
|
48366 | 237 |
print qq,<MODE NAME="isabelle-options" FILE="isabelle-options.xml"/>\n\n,; |
48575 | 238 |
print qq,<MODE NAME="isabelle-root" FILE="isabelle-root.xml" FILE_NAME_GLOB="ROOT"/>\n\n,; } |
43391 | 239 |
elsif (m/NAME="scheme"/) { |
240 |
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
|
241 |
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
|
242 |
|
47995
72f52cd7c633
include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
wenzelm
parents:
47849
diff
changeset
|
243 |
cp -p -R -f "${JEDIT_JARS[@]}" 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
|
244 |
( |
43521
d477b92109b8
provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents:
43454
diff
changeset
|
245 |
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
|
246 |
do |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
247 |
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
|
248 |
done |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
249 |
CLASSPATH="$(jvmpath "$CLASSPATH")" |
47009 | 250 |
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
|
251 |
) || 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
|
252 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
253 |
cd dist/classes |
47115
1a05adae1cc9
more robust command invocation via ISABELLE_JDK_HOME or SCALA_HOME (NB: bash exec requires genuine executable, not function);
wenzelm
parents:
47113
diff
changeset
|
254 |
isabelle_jdk 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
|
255 |
cd ../.. |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
256 |
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
|
257 |
fi |
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 |
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
|
260 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
261 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
262 |
## main |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
263 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
264 |
# perspective |
34880 | 265 |
|
266 |
mkdir -p "$JEDIT_SETTINGS/DockableWindowManager" |
|
267 |
||
268 |
if [ ! -e "$JEDIT_SETTINGS/perspective.xml" ]; then |
|
269 |
cat > "$JEDIT_SETTINGS/DockableWindowManager/perspective-view0.xml" <<EOF |
|
48014
63021e59cbf0
separate README dockable, which allows to make it more prominent first and remove it later;
wenzelm
parents:
47995
diff
changeset
|
270 |
<DOCKING LEFT="" TOP="" RIGHT="" BOTTOM="isabelle-readme" LEFT_POS="0" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" /> |
34880 | 271 |
EOF |
272 |
cat > "$JEDIT_SETTINGS/perspective.xml" <<EOF |
|
273 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
274 |
<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd"> |
|
275 |
<PERSPECTIVE> |
|
276 |
<VIEW PLAIN="FALSE"> |
|
277 |
<GEOMETRY X="0" Y="35" WIDTH="1072" HEIGHT="787" EXT_STATE="0" /> |
|
278 |
</VIEW> |
|
279 |
</PERSPECTIVE> |
|
280 |
EOF |
|
281 |
fi |
|
282 |
||
283 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
284 |
# run |
34333 | 285 |
|
43285 | 286 |
[ "$BUILD_ONLY" = true ] || { |
287 |
case "$JEDIT_LOGIC" in |
|
288 |
/*) |
|
289 |
;; |
|
290 |
*/*) |
|
291 |
JEDIT_LOGIC="$(pwd -P)/$JEDIT_LOGIC" |
|
292 |
;; |
|
293 |
esac |
|
34333 | 294 |
|
48791 | 295 |
export JEDIT_SESSION_DIRS JEDIT_LOGIC JEDIT_PRINT_MODE |
34333 | 296 |
|
43285 | 297 |
exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" \ |
298 |
-jar "$(jvmpath "$JEDIT_HOME/dist/jedit.jar")" \ |
|
299 |
"-settings=$(jvmpath "$JEDIT_SETTINGS")" "${ARGS[@]}" |
|
300 |
} |