-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild-distjs.xml
71 lines (55 loc) · 2.35 KB
/
build-distjs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<project name="JSmol" default="todist" basedir=".">
<property name="site.path" value="site/" />
<property name="dist.path" value="dist/" />
<property name="Jmol-SwingJS.zip" value="${dist.path}Jmol-SwingJS.zip" />
<target name="todist" id="todist">
<echo> Zipping up ${Jmol-SwingJS.zip} </echo>
<zip destfile="${Jmol-SwingJS.zip}" basedir="${site.path}"
includes="
swingjs/*.html,
swingjs/j2s/_**/*,
swingjs/j2s/jme/**,
swingjs/j2s/org/jspecview/**,
swingjs/j2s/org/jmol/**,
swingjs/j2s/org/openscience/jmol/**,
swingjs/j2s/javajs/awt/**"
excludes="
"
/>
<!-- make core files
<echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
<echo>reading core class list from file coreclasses</echo>
<loadresource property="coreclasses">
<file file="coreclasses"/>
</loadresource>
<antcall target="call-core">
<param name="call-core.name" value="${core.name}" />
<param name="call-core.list" value="
core/coreswingjs.js
${coreclasses}
" />
</antcall>
<echo>......Now copy an html file in site/ and add core:"core${core.name}", to the Info block.</echo>
-->
</target>
<target name="call-core" id="call-core">
<echo>......Creating core${call-core.name}.js</echo>
<concat destfile="${site.path}/js/core/tmp.js">
<filelist dir="${site.path}/j2s" files="${call-core.list}" />
</concat>
<replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz." value="Clazz_"/>
<replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz__" value="Clazz._"/>
<echo>......Generating ${site.path}/j2s/core/core${call-core.name}.js</echo>
<concat destfile="${site.path}/j2s/core/core${call-core.name}.js"><filelist dir="${site.path}/js" files="
core/coretop2.js
core/tmp.js
core/corebottom2.js
" />
</concat>
<echo>......Generating ${site.path}/j2s/core/core${call-core.name}.z.js</echo>
<java jar="tools/closure_compiler.jar" fork="true" dir="${site.path}/j2s/core" failonerror="false">
<arg line="--js core${call-core.name}.js --js_output_file core${call-core.name}.z.js" />
</java>
<delete quiet="true" file="${site.path}/js/core/tmp.js" />
</target>
</project>