-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
165 lines (124 loc) · 4.41 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<project name="BezierCoffeeScriptMode" default="install" basedir="./">
<description>
CoffeeScript mode:
https://github.com/fjenett/coffeescript-mode-processing
CoffeeScript is at:
http://coffeescript.org/
</description>
<property name="src" value="src-versioned" />
<property name="build" value="build" />
<property name="bin" value="bin" />
<property name="dist" value="dist" />
<property name="release" value="0.0.8" />
<property name="lib.name" value="CoffeeScriptMode" />
<property name="java.target.version"
value="1.5" />
<!-- + + + + + + +
+
+ This is really all you should need to edit to compile this ..
+
+ + + + + + + -->
<property name="processing.classes"
location="/Applications/Processing-2.2.1/Processing.app/Contents/Java/" />
<property name="processing.modes"
location="/Users/fjenett/Documents/Processing/modes"/>
<!-- + + + + + + + + -->
<property name="javascript-mode"
location="${processing.modes}/JavaScriptMode/mode" />
<path id="library-classpath">
<fileset dir="${processing.classes}" >
<include name="core.jar" />
<include name="core/library/core.jar" />
<include name="pde.jar" />
</fileset>
<fileset dir="${javascript-mode}">
<include name="JavaScriptMode.jar" />
<include name="js.jar" /> <!-- Rhino 1.7 -->
</fileset>
</path>
<tstamp />
<!-- - - - - - - - - - - - - - - - - - - - - - -
HELP
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="help">
<echo>Needs some help instructions, i know ...</echo>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
BUILD
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="build">
<buildnumber file="lib/build.number"/>
<mkdir dir="${build}" />
<delete dir="${bin}" />
<mkdir dir="${bin}" />
<delete dir="src-versioned" />
<mkdir dir="src-versioned" />
<copy todir="src-versioned">
<fileset dir="src" />
</copy>
<replaceregexp file="${src}/de/bezier/mode/coffeescript/CoffeeScriptMode.java" flags="g"
match="@@version@@" replace="${build.number}" />
<replaceregexp file="${src}/de/bezier/mode/coffeescript/CoffeeScriptMode.java" flags="g"
match="@@build-date@@" replace="${TODAY}" />
<replaceregexp file="${src}/de/bezier/mode/coffeescript/CoffeeScriptMode.java" flags="g"
match="@@pretty-version@@" replace="${release}" />
<javac srcdir="${src}" destdir="${bin}" source="${java.target.version}">
<classpath>
<path refid="library-classpath"/>
</classpath>
</javac>
<delete dir="src-versioned" />
</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="${javascript-mode}/js.jar" />
<fileset file="${javascript-mode}/JavaScriptMode.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}" />
<!-- delete dir="install" / -->
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
CLEAN
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="clean" >
<delete dir="${bin}" />
<delete dir="${lib.name}" />
</target>
</project>