author | wenzelm |
Tue, 14 Jun 2011 11:36:08 +0200 | |
changeset 43381 | 806878ae2219 |
parent 43369 | 4c86b3405010 |
child 43384 | 9c228b8953f2 |
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_markup.scala" |
|
18 |
"src/isabelle_options.scala" |
|
19 |
"src/isabelle_sidekick.scala" |
|
20 |
"src/output_dockable.scala" |
|
21 |
"src/plugin.scala" |
|
22 |
"src/protocol_dockable.scala" |
|
23 |
"src/raw_output_dockable.scala" |
|
24 |
"src/scala_console.scala" |
|
25 |
"src/session_dockable.scala" |
|
43381 | 26 |
"src/text_area_painter.scala" |
43285 | 27 |
) |
28 |
||
43320 | 29 |
declare -a RESOURCES=( |
43286 | 30 |
"src/actions.xml" |
31 |
"src/dockables.xml" |
|
32 |
"src/Isabelle.props" |
|
33 |
"src/services.xml" |
|
43285 | 34 |
) |
35 |
||
36 |
||
34333 | 37 |
## diagnostics |
38 |
||
34664 | 39 |
PRG="$(basename "$0")" |
40 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
41 |
function usage() |
34333 | 42 |
{ |
43 |
echo |
|
34664 | 44 |
echo "Usage: isabelle $PRG [OPTIONS] [FILES ...]" |
34333 | 45 |
echo |
46 |
echo " Options are:" |
|
47 |
echo " -J OPTION add JVM runtime option" |
|
34409 | 48 |
echo " (default JEDIT_JAVA_OPTIONS=$JEDIT_JAVA_OPTIONS)" |
43285 | 49 |
echo " -b build only" |
34691 | 50 |
echo " -d enable debugger" |
43285 | 51 |
echo " -f fresh build" |
34333 | 52 |
echo " -j OPTION add jEdit runtime option" |
53 |
echo " (default JEDIT_OPTIONS=$JEDIT_OPTIONS)" |
|
54 |
echo " -l NAME logic image name (default ISABELLE_LOGIC=$ISABELLE_LOGIC)" |
|
55 |
echo " -m MODE add print mode for output" |
|
56 |
echo |
|
34664 | 57 |
echo "Start jEdit with Isabelle plugin setup and opens theory FILES" |
34333 | 58 |
echo |
59 |
exit 1 |
|
60 |
} |
|
61 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
62 |
function fail() |
34333 | 63 |
{ |
64 |
echo "$1" >&2 |
|
65 |
exit 2 |
|
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 failed() |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
69 |
{ |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
70 |
fail "Failed!" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
71 |
} |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
72 |
|
34333 | 73 |
|
74 |
## process command line |
|
75 |
||
76 |
# options |
|
77 |
||
43285 | 78 |
BUILD_ONLY=false |
79 |
BUILD_JARS="jars" |
|
34333 | 80 |
JEDIT_LOGIC="$ISABELLE_LOGIC" |
81 |
JEDIT_PRINT_MODE="" |
|
82 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
83 |
function getoptions() |
34780 | 84 |
{ |
85 |
OPTIND=1 |
|
43285 | 86 |
while getopts "J:bdfj:l:m:" OPT |
34780 | 87 |
do |
88 |
case "$OPT" in |
|
89 |
J) |
|
90 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="$OPTARG" |
|
91 |
;; |
|
43285 | 92 |
b) |
93 |
BUILD_ONLY=true |
|
94 |
;; |
|
34780 | 95 |
d) |
96 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Xdebug" |
|
97 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="-Xrunjdwp:transport=dt_socket,server=y,suspend=n" |
|
98 |
;; |
|
43285 | 99 |
f) |
100 |
BUILD_JARS="jars_fresh" |
|
101 |
;; |
|
34780 | 102 |
j) |
103 |
ARGS["${#ARGS[@]}"]="$OPTARG" |
|
104 |
;; |
|
105 |
l) |
|
106 |
JEDIT_LOGIC="$OPTARG" |
|
107 |
;; |
|
108 |
m) |
|
109 |
if [ -z "$JEDIT_PRINT_MODE" ]; then |
|
110 |
JEDIT_PRINT_MODE="$OPTARG" |
|
111 |
else |
|
112 |
JEDIT_PRINT_MODE="$JEDIT_PRINT_MODE,$OPTARG" |
|
113 |
fi |
|
114 |
;; |
|
115 |
\?) |
|
116 |
usage |
|
117 |
;; |
|
118 |
esac |
|
119 |
done |
|
120 |
} |
|
34581
abab3a577e10
slightly more robust treatment of options via arrays;
wenzelm
parents:
34412
diff
changeset
|
121 |
|
38257
f0fd14a9c11f
clarified JEDIT_JAVA_OPTIONS vs. JEDIT_SYSTEM_OPTIONS -- discontinued JEDIT_APPLE_PROPERTIES;
wenzelm
parents:
34881
diff
changeset
|
122 |
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
|
123 |
[ -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
|
124 |
|
34780 | 125 |
declare -a ARGS; eval "ARGS=($JEDIT_OPTIONS)" |
34333 | 126 |
|
34780 | 127 |
declare -a OPTIONS; eval "OPTIONS=($ISABELLE_JEDIT_OPTIONS)" |
128 |
getoptions "${OPTIONS[@]}" |
|
129 |
||
130 |
getoptions "$@" |
|
34333 | 131 |
shift $(($OPTIND - 1)) |
132 |
||
133 |
||
134 |
# args |
|
135 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
136 |
while [ "$#" -gt 0 ] |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
137 |
do |
40574
226563829580
refrain from opening Scratch.thy by default, to avoid bombing the editor with old/long theory text;
wenzelm
parents:
40565
diff
changeset
|
138 |
ARGS["${#ARGS[@]}"]="$(jvmpath "$1")" |
226563829580
refrain from opening Scratch.thy by default, to avoid bombing the editor with old/long theory text;
wenzelm
parents:
40565
diff
changeset
|
139 |
shift |
226563829580
refrain from opening Scratch.thy by default, to avoid bombing the editor with old/long theory text;
wenzelm
parents:
40565
diff
changeset
|
140 |
done |
34333 | 141 |
|
142 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
143 |
## dependencies |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
144 |
|
43285 | 145 |
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
|
146 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
147 |
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
|
148 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
149 |
JEDIT_JARS=( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
150 |
"$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
|
151 |
"$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
|
152 |
"$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
|
153 |
"$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
|
154 |
"$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
|
155 |
"$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
|
156 |
) |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
157 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
158 |
SCALA_JARS=( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
159 |
"$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
|
160 |
"$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
|
161 |
"$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
|
162 |
) |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
163 |
|
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 |
# target |
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 |
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
|
168 |
|
43285 | 169 |
if [ "$BUILD_JARS" = jars_fresh ]; then |
170 |
OUTDATED=true |
|
171 |
else |
|
172 |
OUTDATED=false |
|
43368
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
173 |
if [ ! -e "$TARGET" ]; then |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
174 |
OUTDATED=true |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
175 |
elif [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
176 |
for SOURCE in "${SOURCES[@]}" "${RESOURCES[@]}" "$JEDIT_JAR" "${JEDIT_JARS[@]}" |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
177 |
do |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
178 |
[ ! -e "$SOURCE" ] && fail "Missing file: $SOURCE" |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
179 |
[ "$SOURCE" -nt "$TARGET" ] && OUTDATED=true |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
180 |
done |
0dc67b3cf8a5
check source dependencies only if jedit_build component is available;
wenzelm
parents:
43320
diff
changeset
|
181 |
fi |
43285 | 182 |
fi |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
183 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
184 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
185 |
# build |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
186 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
187 |
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
|
188 |
then |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
189 |
[ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
190 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
191 |
[ -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
|
192 |
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
|
193 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
194 |
[ -e "$ISABELLE_HOME/Admin/build" ] && \ |
43285 | 195 |
{ "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; } |
196 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
197 |
|
43285 | 198 |
echo "###" |
199 |
echo "### Building Isabelle/jEdit ..." |
|
200 |
echo "###" |
|
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
201 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
202 |
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
|
203 |
mkdir -p dist dist/classes || failed |
43287 | 204 |
|
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
205 |
cp -a "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/. |
43320 | 206 |
cp -a "${RESOURCES[@]}" dist/classes/. |
43287 | 207 |
cp src/jEdit.props dist/properties/. |
208 |
cp -a 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
|
209 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
210 |
perl -i -e 'while (<>) { if (m/NAME="javacc"/) { |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
211 |
print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,; |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
212 |
print qq,<MODE NAME="isabelle-session" FILE="isabelle-session.xml" FILE_NAME_GLOB="session.root"/>\n\n,; } |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
213 |
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
|
214 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
215 |
cp -a "${JEDIT_JARS[@]}" "${SCALA_JARS[@]}" "$ISABELLE_HOME/lib/classes/Pure.jar" \ |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
216 |
dist/jars/. || failed |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
217 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
218 |
( |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
219 |
for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$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
|
220 |
do |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
221 |
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
|
222 |
done |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
223 |
CLASSPATH="$(jvmpath "$CLASSPATH")" |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
224 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
225 |
exec "$SCALA_HOME/bin/scalac" -unchecked -deprecation \ |
43320 | 226 |
-d dist/classes -target:jvm-1.5 "${SOURCES[@]}" |
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
227 |
) || 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
|
228 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
229 |
cd dist/classes |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
230 |
jar cf "../jars/Isabelle-jEdit.jar" * || failed |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
231 |
cd ../.. |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
232 |
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
|
233 |
fi |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
234 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
235 |
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
|
236 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
237 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
238 |
## main |
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
239 |
|
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
240 |
# perspective |
34880 | 241 |
|
242 |
mkdir -p "$JEDIT_SETTINGS/DockableWindowManager" |
|
243 |
||
244 |
if [ ! -e "$JEDIT_SETTINGS/perspective.xml" ]; then |
|
245 |
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
|
246 |
<DOCKING LEFT="" TOP="" RIGHT="" BOTTOM="isabelle-session" LEFT_POS="0" TOP_POS="0" RIGHT_POS="250" BOTTOM_POS="250" /> |
34880 | 247 |
EOF |
248 |
cat > "$JEDIT_SETTINGS/perspective.xml" <<EOF |
|
249 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
250 |
<!DOCTYPE PERSPECTIVE SYSTEM "perspective.dtd"> |
|
251 |
<PERSPECTIVE> |
|
252 |
<VIEW PLAIN="FALSE"> |
|
253 |
<GEOMETRY X="0" Y="35" WIDTH="1072" HEIGHT="787" EXT_STATE="0" /> |
|
254 |
</VIEW> |
|
255 |
</PERSPECTIVE> |
|
256 |
EOF |
|
257 |
fi |
|
258 |
||
259 |
||
43284
04d473e883df
build jedit as part of regular startup script (in that case depending on jedit_build component);
wenzelm
parents:
41380
diff
changeset
|
260 |
# run |
34333 | 261 |
|
43285 | 262 |
[ "$BUILD_ONLY" = true ] || { |
263 |
case "$JEDIT_LOGIC" in |
|
264 |
/*) |
|
265 |
;; |
|
266 |
*/*) |
|
267 |
JEDIT_LOGIC="$(pwd -P)/$JEDIT_LOGIC" |
|
268 |
;; |
|
269 |
esac |
|
34333 | 270 |
|
43285 | 271 |
export JEDIT_LOGIC JEDIT_PRINT_MODE |
34333 | 272 |
|
43285 | 273 |
exec "$ISABELLE_TOOL" java "${JAVA_ARGS[@]}" \ |
274 |
-jar "$(jvmpath "$JEDIT_HOME/dist/jedit.jar")" \ |
|
275 |
"-settings=$(jvmpath "$JEDIT_SETTINGS")" "${ARGS[@]}" |
|
276 |
} |