-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
143 lines (111 loc) · 3.83 KB
/
build.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<project name="ProcessingJavaScriptMode" default="install" basedir="./">
<description>
This used to be "ProcessingJS Tool", has been "JavaScript Mode" in
Processing 2.0 beta for a while and now lives a life of it's own
here ... waiting to be reincluded at some point in the future.
JavaScript mode:
https://github.com/fjenett/javascript-mode-processing
</description>
<!-- +
+
+ This is really all you should need to set to compile:
+
+ -->
<property name="processing.classes"
location="/Applications/Processing-3.0/Processing.app/Contents/Java/" />
<property name="processing.modes"
location="/Users/fjenett/Documents/Processing-3/modes"/>
<property name="src" value="src" />
<property name="build" value="build" />
<property name="bin" value="bin" />
<property name="dist" value="dist" />
<property name="release" value="0.4.0" />
<property name="lib.name" value="JavaScriptMode" />
<property name="java.target.version"
value="1.7" />
<path id="library-classpath">
<fileset dir="${processing.classes}" >
<include name="core.jar" />
<include name="core/library/core.jar" />
<include name="pde.jar" />
<include name="modes/java/mode/antlr.jar" />
<include name="modes/java/mode/JavaMode.jar" />
</fileset>
<fileset dir="lib" >
<!-- Rhino 1.7 -->
<include name="js.jar" />
</fileset>
</path>
<!-- - - - - - - - - - - - - - - - - - - - - - -
HELP
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="help">
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
BUILD
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="build">
<buildnumber file="lib/build.number"/>
<mkdir dir="${build}" />
<delete dir="${bin}" />
<mkdir dir="${bin}" />
<javac srcdir="${src}" destdir="${bin}" source="${java.target.version}">
<classpath>
<path refid="library-classpath"/>
</classpath>
</javac>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
PACKAGE
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="package" depends="build">
<delete dir="${dist}" />
<mkdir dir="${dist}" />
<mkdir dir="${dist}/mode" />
<jar jarfile="${dist}/mode/${lib.name}.jar" basedir="${bin}"/>
<!--zip destfile="${dist}/mode/${lib.name}.jar" excludes="**/*.MF">
<zipgroupfileset dir="lib" includes="*.jar" />
</zip-->
<copy todir="${dist}/mode">
<fileset file="lib/js.jar" />
<fileset file="${processing.classes}/modes/java/mode/antlr.jar" />
<fileset file="${processing.classes}/modes/java/mode/JavaMode.jar" />
</copy>
<copy todir="${dist}">
<fileset dir="resources/" />
</copy>
<replaceregexp file="${dist}/mode.properties" flags="g"
match="@@version@@" replace="${build.number}" />
<replaceregexp file="${dist}/mode.properties" flags="g"
match="@@pretty-version@@" replace="${release}" />
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
INSTALL
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="install" depends="package" >
<delete dir="${processing.modes}/${lib.name}" />
<mkdir dir="${processing.modes}/${lib.name}" />
<copy todir="${processing.modes}/${lib.name}">
<fileset dir="${dist}" />
</copy>
<delete dir="${lib.name}" />
<copy todir="${lib.name}">
<fileset dir="${dist}" />
</copy>
<zip destfile="release/${lib.name}.zip" >
<zipfileset dir="${dist}" prefix="${lib.name}" excludes="**/_DS.Store" />
</zip>
<copy tofile="release/${lib.name}.txt">
<fileset file="${dist}/mode.properties" />
</copy>
<delete dir="${dist}" />
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
CLEAN
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="clean" >
<delete dir="${bin}" />
<delete dir="${build}" />
<delete dir="${lib.name}" />
</target>
</project>