Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 530 lines (481 sloc) 20.652 kb
e697386 Jonathan Feinberg add copyright and license information
authored
1 <?xml version="1.0" encoding="UTF-8"?>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
2 <!-- ======================================================================
decf4f5 google-feinberg working build!
google-feinberg authored
3 processing.py
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
4 Write processing sketches in Python.
5
af94a34 Jonathan Feinberg Clean up the build.
authored
6 This ant build file contains targets both for "Python Mode" for the
7 Processing Development Environment and for the standalone processing.py
8 distribution.
decf4f5 google-feinberg working build!
google-feinberg authored
9
af94a34 Jonathan Feinberg Clean up the build.
authored
10 This has been tested on Mac OSX and linux. It is not expected to work at
11 all on Windows.
12
13 -jdf
14a0b3b Ralf Biedert Added note to self.
ralfbiedert authored
14
1289c21 Ralf Biedert Updated note to self.
ralfbiedert authored
15 Run
af94a34 Jonathan Feinberg Clean up the build.
authored
16 ant test - to run unit tests.
17 ant mode.zip - to create a Python Mode zip file.
18 ant make-all-distributions - to create a processing.py release.
19 ant -Dplatform=macosx make-distribution - to create the OSX processing.py release.
14a0b3b Ralf Biedert Added note to self.
ralfbiedert authored
20
e697386 Jonathan Feinberg add copyright and license information
authored
21 ====================================================================== -->
af94a34 Jonathan Feinberg Clean up the build.
authored
22 <project name="processing.py" default="mode.zip">
7ec0693 Jonathan Feinberg New ant build process, with JRE auto-download.
authored
23 <description>Write Processing sketches in Python</description>
24
af94a34 Jonathan Feinberg Clean up the build.
authored
25 <!--
26 You can specify the location of the Processing source code by passing
27 it to ant via -Dprocessing=/path/to/processing
28 By default, we'll look in a directory next to this one.
9ff2d4c Wrestle ant into submission.
James Gilles authored
29 The same goes for processing-video (https://github.com/processing/processing-video).
af94a34 Jonathan Feinberg Clean up the build.
authored
30 -->
a45a5d2 Jonathan Feinberg Give a useful default value to processing location in build.xml.
authored
31 <property name="processing" value="../processing"/>
9ff2d4c Wrestle ant into submission.
James Gilles authored
32 <property name="processing-video" value="../processing-video"/>
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
33
af94a34 Jonathan Feinberg Clean up the build.
authored
34 <!-- for <if> and <foreach> tags. -->
35 <taskdef
36 resource="net/sf/antcontrib/antcontrib.properties"
37 classpath="buildtime/lib/java/ant-contrib.jar"/>
1ae66d9 Ralf Biedert Started to work on the launcher feature.
ralfbiedert authored
38
8c4e6d2 Jonathan Feinberg Fix some inconsistencies in the build.
authored
39 <property name="pdejar" value="${processing}/app/pde.jar"/>
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
40 <property name="corejar" value="${processing}/core/library/core.jar"/>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
41 <property name="jython" value="buildtime/lib/jython/jython.jar"/>
b34f649 Jonathan Feinberg Build rules for PythonMode.
authored
42 <property name="jython.license" value="buildtime/lib/jython/LICENSE.txt"/>
3165b0c Jonathan Feinberg Add Google Guava as a dependency.
authored
43 <property name="guava" value="buildtime/lib/java/guava-17.0.jar"/>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
44
af94a34 Jonathan Feinberg Clean up the build.
authored
45 <taskdef name="bundleapp"
46 classname="com.oracle.appbundler.AppBundlerTask"
47 classpath="buildtime/lib/java/appbundler-1.0.jar"/>
7ec0693 Jonathan Feinberg New ant build process, with JRE auto-download.
authored
48
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
49 <macrodef name="rm-rf">
50 <attribute name="target"/>
51 <sequential>
52 <exec executable="/bin/rm" failonerror="true">
b08d1ab Ralf Biedert Macro rm-rf now uses two arguments instead of a combined one.
ralfbiedert authored
53 <arg value="-rf"/>
54 <arg value="${basedir}/@{target}"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
55 </exec>
56 </sequential>
57 </macrodef>
671cc57 Jonathan Feinberg Fix processing.py build.
authored
58
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
59 <macrodef name="push">
60 <attribute name="srcfile"/>
61 <sequential>
62 <echo message="Pushing @{srcfile} to py.processing.org..." />
63 <exec executable="/bin/sh" failonerror="true">
64 <arg value="-c"/>
65 <arg value="scp -i ~/.ssh/id_rsa-processing.org -r @{srcfile} jdf@py.processing.org:/var/www/py" />
66 </exec>
67 </sequential>
68 </macrodef>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
69
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
70 <target name="bumpversion">
71 <propertyfile
72 file="runtime/src/jycessing/build.properties"
73 comment="Python mode build number">
74 <entry key="build.date" type="date" value="now"/>
75 <entry key="build.number" type="int" default="0300" operation="+" pattern="0000"/>
76 </propertyfile>
978f389 Jonathan Feinberg Build 0325.
authored
77 <property file="runtime/src/jycessing/build.properties" prefix="jycessing"/>
78 <echo message="Bumped to version ${jycessing.build.number}."></echo>
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
79 </target>
671cc57 Jonathan Feinberg Fix processing.py build.
authored
80
af94a34 Jonathan Feinberg Clean up the build.
authored
81 <target name="mode.jar" depends="build">
82 <jar destfile="work/PythonMode.jar">
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
83 <fileset dir="bin" excludes="jycessing/build/**,test/**"/>
84 </jar>
85 </target>
86
af94a34 Jonathan Feinberg Clean up the build.
authored
87 <target name="mode.dist" depends="mode.jar">
88 <delete dir="work/modedist" />
89 <property name="bundle" value="work/modedist/PythonMode"/>
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
90 <mkdir dir="${bundle}" />
b9a291f Jonathan Feinberg Fix re-initialization show-stopper.
authored
91 <copy todir="${bundle}" file="LICENSE.txt"/>
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
92
b9a291f Jonathan Feinberg Fix re-initialization show-stopper.
authored
93 <mkdir dir="${bundle}/mode" />
af94a34 Jonathan Feinberg Clean up the build.
authored
94 <copy todir="${bundle}/mode" file="work/PythonMode.jar"/>
3165b0c Jonathan Feinberg Add Google Guava as a dependency.
authored
95 <copy todir="${bundle}/mode" file="${guava}"/>
b9a291f Jonathan Feinberg Fix re-initialization show-stopper.
authored
96 <copy todir="${bundle}/mode" file="${jython}"/>
b34f649 Jonathan Feinberg Build rules for PythonMode.
authored
97 <copy tofile="${bundle}/mode/LICENSE.jython" file="${jython.license}"/>
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
98
99 <copy todir="${bundle}">
100 <fileset dir="mode/" />
101 </copy>
102
9da4fd8 Add splash screen to exported sketches
James Gilles authored
103 <copy todir="${bundle}/theme" file="libraries/runtime/splash.png"/>
104
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
105 <zip destfile="${bundle}/src.zip" basedir="."
106 includes="runtime/src/**,testing/src/**,testing/resources/**"
107 excludes="**/_DS.Store" />
108
109 <property file="runtime/src/jycessing/build.properties" prefix="jycessing"/>
671cc57 Jonathan Feinberg Fix processing.py build.
authored
110
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
111 <replaceregexp file="${bundle}/mode.properties" flags="g"
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
112 match="@@version@@" replace="${jycessing.build.number}" />
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
113 <replaceregexp file="${bundle}/mode.properties" flags="g"
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
114 match="@@pretty-version@@"
115 replace="Build ${jycessing.build.number}, built ${jycessing.build.date}" />
671cc57 Jonathan Feinberg Fix processing.py build.
authored
116
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
117 <copy tofile="work/modedist/PythonMode.txt" file="${bundle}/mode.properties"/>
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
118 </target>
af94a34 Jonathan Feinberg Clean up the build.
authored
119
120 <target name="mode.zip" depends="mode.dist">
23da81d Jonathan Feinberg Add links to Help menu; override base editor indent behavior.
authored
121 <zip destfile="work/PythonMode.zip" basedir="work/modedist"
122 excludes="PythonMode.txt,**/_DS.Store" />
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
123 <property file="runtime/src/jycessing/build.properties" prefix="jycessing"/>
124 <copy file="work/PythonMode.zip" tofile="work/PythonMode_${jycessing.build.number}.zip" />
6381e03 Jonathan Feinberg Separate target for mode zipping.
authored
125 </target>
126
af94a34 Jonathan Feinberg Clean up the build.
authored
127 <target name="mode.upload" depends="mode.zip">
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
128 <push srcfile="work/PythonMode.zip"/>
129 <property file="runtime/src/jycessing/build.properties" prefix="jycessing"/>
130 <push srcfile="work/PythonMode_${jycessing.build.number}.zip"/>
131 <push srcfile="work/modedist/PythonMode.txt"/>
978f389 Jonathan Feinberg Build 0325.
authored
132 <echo message="Uploaded build ${jycessing.build.number}"></echo>
b34f649 Jonathan Feinberg Build rules for PythonMode.
authored
133 </target>
134
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
135 <target name="jar" depends="build">
af94a34 Jonathan Feinberg Clean up the build.
authored
136 <jar destfile="work/processing-py.jar">
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
137 <fileset dir="bin" excludes="jycessing/build/**,test/**"/>
3165b0c Jonathan Feinberg Add Google Guava as a dependency.
authored
138 <zipgroupfileset file="${guava}"/>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
139 <zipgroupfileset file="${jython}"/>
140 <zipgroupfileset file="${corejar}"/>
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
141 <zipgroupfileset file="${processing}/core/library/gluegen-rt.jar"/>
142 <zipgroupfileset file="${processing}/core/library/jogl-all.jar"/>
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
143 <manifest>
144 <attribute name="Main-Class" value="jycessing.Runner"/>
145 </manifest>
146 </jar>
af94a34 Jonathan Feinberg Clean up the build.
authored
147 <foreach
148 list="macosx-universal,linux-i586,linux-amd64,windows-i586,windows-amd64"
149 param="natives.platform"
150 target="jar.natives"/>
151 </target>
152
153 <target name="jar.natives">
154 <jar destfile="work/processing-py-natives-${natives.platform}.jar">
155 <zipgroupfileset
156 file="${processing}/core/library/gluegen-rt-natives-${natives.platform}.jar"/>
157 <zipgroupfileset
158 file="${processing}/core/library/jogl-all-natives-${natives.platform}.jar"/>
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
159 </jar>
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
160 </target>
22ee420 Jonathan Feinberg Create ant targets for making distributions.
authored
161
9ff2d4c Wrestle ant into submission.
James Gilles authored
162 <target name="build" depends="build-processing,build-pde,build-video">
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
163 <mkdir dir="bin"/>
3dbb99b Jonathan Feinberg Add Fisica library.
authored
164 <javac destdir="bin" includeantruntime="false">
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
165 <src path="runtime/src"/>
3dbb99b Jonathan Feinberg Add Fisica library.
authored
166 <classpath>
167 <pathelement location="${jython}"/>
168 <pathelement location="${corejar}"/>
4638cd8 Jonathan Feinberg Enough of the mode is hooked up to press the run button.
authored
169 <pathelement location="${pdejar}"/>
3165b0c Jonathan Feinberg Add Google Guava as a dependency.
authored
170 <pathelement location="${guava}"/>
14a0b3b Ralf Biedert Added note to self.
ralfbiedert authored
171 </classpath>
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
172 </javac>
173 <copy todir="bin">
174 <fileset dir="runtime/src" excludes="**/*.java"/>
175 </copy>
176 <!-- Update the internal launch script with the external one-->
177 <copy tofile="processing-py.app/Contents/Resources/script" file="processing-py.sh"/>
178 <chmod file="processing-py.app/Contents/MacOS/processing-py" perm="755"/>
d6aec5f Jonathan Feinberg tifying
authored
179 </target>
22ee420 Jonathan Feinberg Create ant targets for making distributions.
authored
180
8c4e6d2 Jonathan Feinberg Fix some inconsistencies in the build.
authored
181 <target name="check-pde-needs-build">
182 <uptodate property="pde-is-uptodate"
183 targetfile="${pdejar}">
184 <srcfiles dir="${processing}/app/src/processing/app"/>
185 </uptodate>
186 </target>
187 <target name="build-pde"
188 depends="check-pde-needs-build"
189 unless="pde-is-uptodate">
190 <echo message="Building pde." />
191 <ant dir="${processing}/build" target="build"/>
192 </target>
193
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
194 <target name="check-processing-needs-build">
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
195 <uptodate property="processing-is-uptodate"
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
196 targetfile="${corejar}">
197 <srcfiles dir="${processing}/core/src/processing/core"/>
198 </uptodate>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
199 </target>
200 <target name="build-processing"
201 depends="check-processing-needs-build"
202 unless="processing-is-uptodate">
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
203 <echo message="Building processing." />
af94a34 Jonathan Feinberg Clean up the build.
authored
204 <ant dir="${processing}/build" target="build" inheritAll="false"/>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
205 </target>
9ff2d4c Wrestle ant into submission.
James Gilles authored
206 <target name="check-video-needs-build">
207 <uptodate property="video-is-uptodate"
208 targetfile="${processing-video}/library/video.jar">
209 <srcfiles dir="${processing-video}/src/processing/video"/>
210 </uptodate>
211 </target>
212 <target name="build-video"
213 depends="check-video-needs-build"
214 unless="video-is-uptodate">
215 <echo message="Building processing-video." />
216 <ant dir="${processing-video}" target="build"/>
217 </target>
2b38d5f Jonathan Feinberg Update ant build to use processing submodule. TODO: Also get runtime lib...
authored
218
193a0a4 remove useless path manipulation, add ant target for smaller clean, fix ...
James Gilles authored
219 <target name="clean-self">
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
220 <rm-rf target="bin"/>
221 <rm-rf target="dist"/>
222 <rm-rf target=".cache"/>
193a0a4 remove useless path manipulation, add ant target for smaller clean, fix ...
James Gilles authored
223 <rm-rf target="work"/>
c67862b Jonathan Feinberg Improve ant clean.
authored
224 <delete>
225 <fileset dir="buildtime/py" includes="*.class"/>
226 </delete>
7ec0693 Jonathan Feinberg New ant build process, with JRE auto-download.
authored
227 <exec executable="find" failonerror="true">
228 <arg line=". -name .DS_Store -depth -exec rm {} ;"/>
c67862b Jonathan Feinberg Improve ant clean.
authored
229 </exec>
3aa4f2f Jonathan Feinberg Cleanup ant file
authored
230 </target>
22ee420 Jonathan Feinberg Create ant targets for making distributions.
authored
231
193a0a4 remove useless path manipulation, add ant target for smaller clean, fix ...
James Gilles authored
232 <target name="clean" depends="clean-self">
233 <ant dir="${processing}/build" target="clean"/>
234 </target>
235
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
236 <!--
237 At the moment creating this launcher requires a few manual steps:
238 1) Run this target ("ant launcher.mac")
239 2.1) Remove the content of the contained "Java" folder
240 2.2) Adjust the included Info.plist so our python code recognizes it (TODO!)
241 3) Zip the app folder
242 4) Place the zip into the runtime's deployment folder.
243 -->
244 <target name="launcher.mac">
245 <mkdir dir="launcher.mac"/>
246 <touch file="Info.plist"/>
247 <bundleapp outputdirectory="launcher.mac" name="Processing" displayname="Processing.py Launcher" identifier="processing.py.launcher" shortversion="1.0" applicationCategory="public.app-category.developer-tools" mainclassname="jycessing.Runner">
248 <argument value="--internal"/>
249 <classpath file="processing-py.jar"/>
250 </bundleapp>
251 <delete>
252 <fileset file="Info.plist"/>
253 </delete>
254 </target>
255
256 <!--
257 The following macros define properties for building, compressing, and distributing
258 platform-specific distributions.
259 -->
260 <macrodef name="for-platform">
261 <attribute name="platform"/>
262 <attribute name="target"/>
263 <element name="actions" implicit="true"/>
264 <sequential>
265 <local name="dist.name"/>
671cc57 Jonathan Feinberg Fix processing.py build.
authored
266 <property file="runtime/src/jycessing/build.properties" prefix="jycessing"/>
267 <property name="dist.name" value="processing.py-${jycessing.build.number}-@{platform}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
268 <local name="compression"/>
269 <if>
270 <matches pattern="^windows.*$" string="@{platform}"/>
271 <then>
272 <property name="compression" value="zip"/>
273 </then>
274 <else>
275 <property name="compression" value="tgz"/>
276 </else>
277 </if>
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
278 <local name="gl.platform"/>
279 <switch value="@{platform}">
280 <case value="macosx"><property name="gl.platform" value="macosx-universal"/></case>
281 <case value="linux32"><property name="gl.platform" value="linux-i586"/></case>
282 <case value="linux64"><property name="gl.platform" value="linux-amd64"/></case>
283 <case value="windows32"><property name="gl.platform" value="windows-i586"/></case>
284 <case value="windows64"><property name="gl.platform" value="windows-amd64"/></case>
285 </switch>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
286 <echo message="Executing target @{target} for platform @{platform}."/>
287 <antcall target="@{target}">
288 <param name="platform" value="@{platform}"/>
289 <param name="dist.name" value="${dist.name}"/>
290 <param name="dist.compressed" value="${dist.name}.${compression}"/>
291 <param name="dist.dir" value="dist/${dist.name}"/>
292 <param name="dist.jre" value="dist/${dist.name}/jre"/>
74beeb3 Jonathan Feinberg New JRE for standalone runtime.
authored
293 <param name="jre.remote" value="http://processing.py.s3.amazonaws.com/jre-7u72-@{platform}.tgz"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
294 <param name="jre.local.dir" value="JREs/@{platform}"/>
295 <param name="jre.local.compressed" value="JREs/@{platform}.tgz"/>
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
296 <param name="gl.platform" value="${gl.platform}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
297 </antcall>
298 </sequential>
299 </macrodef>
300
301 <macrodef name="for-all-platforms">
302 <attribute name="target"/>
303 <sequential>
304 <for-platform platform="macosx" target="@{target}"/>
305 <for-platform platform="linux32" target="@{target}"/>
306 <for-platform platform="linux64" target="@{target}"/>
307 <for-platform platform="windows32" target="@{target}"/>
308 <for-platform platform="windows64" target="@{target}"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
309 </sequential>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
310 </macrodef>
311
312 <!-- For debugging the platform macros. -->
313 <target name="dump-platform">
314 <echo message="Dumping ${platform}:"/>
315 <echo message=" $${dist.name} = ${dist.name}"/>
316 <echo message=" $${dist.dir} = ${dist.dir}"/>
317 <echo message=" $${dist.compressed} = ${dist.compressed}"/>
318 <echo message=" $${dist.jre} = ${dist.jre}"/>
319 <echo message=" $${jre.remote} = ${jre.remote}"/>
320 <echo message=" $${jre.local.dir} = ${jre.local.dir}"/>
321 <echo message=" $${jre.local.compressed} = ${jre.local.compressed}"/>
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
322 <echo message=" $${gl.platform} = ${gl.platform}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
323 </target>
324 <target name="dump-all-platforms">
325 <for-all-platforms target="dump-platform"/>
326 </target>
327
328 <!--
329 The following targets can only be run for particular platforms, as in
330 <for-platform platform="windows64" target="targetname"/>
331 They all refer to properties defined by the for-platform macro.
332 -->
333 <target name="getjre">
334 <if>
335 <not><available file="JREs/${platform}"/></not>
336 <then>
337 <echo message="Fetching JRE for ${platform}" />
cdf577a Jonathan Feinberg Fix some build bugs.
authored
338 <get src="${jre.remote}" dest="${jre.local.compressed}" usetimestamp="true"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
339 <mkdir dir="${jre.local.dir}"/>
340 <exec executable="tar" dir="JREs">
cdf577a Jonathan Feinberg Fix some build bugs.
authored
341 <arg line="zxf ${platform}.tgz -C ${platform} --strip-components 1 "/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
342 </exec>
343 <if>
344 <equals arg1="${platform}" arg2="macosx"/>
345 <then>
346 <echo message="Moving mac JRE to sane location."/>
347 <exec executable="/bin/sh" dir="${jre.local.dir}" failonerror="true">
348 <arg value="-c"/>
349 <arg value="mv Contents/Home/* ."/>
350 </exec>
351 </then>
352 </if>
353 </then>
354 </if>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
355 <chmod dir="${jre.local.dir}/bin" includes="*" perm="755"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
356 </target>
357
358 <macrodef name="compress">
359 <attribute name="from"/>
360 <attribute name="to"/>
361 <attribute name="dir"/>
362 <sequential>
363 <if>
364 <matches pattern="^.*zip$" string="@{to}"/>
365 <then>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
366 <echo message="Creating zip archive @{to}."/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
367 <exec executable="zip" dir="@{dir}">
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
368 <arg line="-q -r @{to} @{from}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
369 </exec>
370 </then>
371 <else>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
372 <echo message="Creating gzipped tar archive @{to}."/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
373 <exec executable="tar" dir="@{dir}">
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
374 <arg line="zcfh @{to} @{from}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
375 </exec>
376 </else>
377 </if>
378 </sequential>
379 </macrodef>
380
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
381 <macrodef name="copy-processing-library">
382 <attribute name="library"/>
383 <attribute name="dir"/>
384 <sequential>
385 <mkdir dir="@{dir}/@{library}"/>
386 <copy todir="@{dir}/@{library}">
387 <!--
388 The business about ${platform}/**, ${platform}64/** is for
389 catching both macosx/*.dylib and macosx64/*.dylib, for those
390 libraries that still have legacy OSX DLLs. Right now, that's
391 only video.
392 -->
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
393 <fileset dir="${processing}/java/libraries/@{library}/library"
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
394 includes="*.txt,*.jar,${platform}/**,${platform}64/**"/>
395 </copy>
396 </sequential>
397 </macrodef>
398
399 <target name="check-for-platform-lib-cache">
9ff2d4c Wrestle ant into submission.
James Gilles authored
400 <condition property="platform-lib-cache-exists">
401 <and>
402 <uptodate srcfile="${processing}/core/library/gluegen-rt.jar"
403 targetfile=".cache/libs/${platform}/opengl/gluegen-rt.jar"/>
404 <uptodate srcfile="${processing-video}/library/video.jar"
405 targetfile=".cache/libs/${platform}/video/video.jar"/>
406 </and>
407 </condition>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
408 </target>
409 <target name="platform-lib-cache"
410 depends="check-for-platform-lib-cache"
411 unless="platform-lib-cache-exists">
412 <local name="cache"/>
413 <property name="cache" value=".cache/libs/${platform}"/>
414 <mkdir dir="${cache}"/>
415 <mkdir dir="${cache}/opengl"/>
416 <copy todir="${cache}/opengl">
424a4f6 Jonathan Feinberg Stop using submodule for processing. Add a double-exit test.
authored
417 <fileset dir="${processing}/core/library" includes="*.jar" excludes="core.jar"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
418 </copy>
9ff2d4c Wrestle ant into submission.
James Gilles authored
419 <copy todir="${cache}/video">
420 <fileset dir="${processing-video}/library"
421 includes="*.txt,*.jar,${platform}/**,${platform}64/**"/>
422 </copy>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
423 <copy-processing-library dir="${cache}" library="dxf"/>
424 <copy-processing-library dir="${cache}" library="lwjgl"/>
425 <copy-processing-library dir="${cache}" library="net"/>
426 <copy-processing-library dir="${cache}" library="pdf"/>
427 <copy-processing-library dir="${cache}" library="serial"/>
428 </target>
429
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
430 <target name="make-one-distribution" depends="jar,platform-lib-cache">
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
431 <echo message="Building distribution for ${platform}" />
432 <for-platform platform="${platform}" target="getjre"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
433 <rm-rf target="${dist.dir}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
434 <mkdir dir="${dist.dir}"/>
435 <copy todir="${dist.dir}">
436 <fileset file="LICENSE.txt"/>
437 <fileset dir="." includes="workspace/**"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
438 <fileset dir="." includes="libraries/**"/>
439 <fileset dir="." includes="*.sh,*.bat,processing-py.app/**"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
440 </copy>
441 <chmod file="${dist.dir}/processing-py.sh" perm="755"/>
442 <chmod file="${dist.dir}/processing-py.bat" perm="755"/>
cdf577a Jonathan Feinberg Fix some build bugs.
authored
443 <chmod file="${dist.dir}/processing-py.app/Contents/Resources/script" perm="755"/>
444 <chmod file="${dist.dir}/processing-py.app/Contents/MacOS/processing-py" perm="755"/>
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
445
446 <symlink resource="${basedir}/.cache/libs/${platform}"
447 link="${basedir}/${dist.dir}/libraries/processing"/>
448 <symlink resource="${basedir}/${jre.local.dir}" link="${basedir}/${dist.jre}"/>
449 <symlink resource="${basedir}/examples.py" link="${basedir}/${dist.dir}/examples.py"/>
af94a34 Jonathan Feinberg Clean up the build.
authored
450 <symlink resource="${basedir}/work/processing-py.jar" link="${basedir}/${dist.dir}/processing-py.jar"/>
451 <symlink resource="${basedir}/work/processing-py-natives-${gl.platform}.jar"
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
452 link="${basedir}/${dist.dir}/processing-py-natives-${gl.platform}.jar"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
453
454 <compress from="${dist.name}" to="${dist.compressed}" dir="dist"/>
455 </target>
456
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
457 <target name="make-all-distributions">
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
458 <for-all-platforms target="make-one-distribution"/>
459 </target>
460
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
461 <!--
7f2cbda Jonathan Feinberg Make all JRE binaries +x.
authored
462 $ ant –Dplatform=macosx make-distribution
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
463 -->
5be9870 Jonathan Feinberg Simplify runtime classpath manipulation.
authored
464 <target name="make-distribution">
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
465 <for-platform platform="${platform}" target="make-one-distribution"/>
466 </target>
467
468 <target name="upload-one-distribution">
c4fcdf0 Jonathan Feinberg Prepare PythonMode for distribution through normal channels.
authored
469 <push srcfile="dist/${dist.compressed}"/>
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
470 </target>
471
472 <target name="upload-all-distributions">
473 <echo message="If you're not feinberg, this target will fail for you."/>
474 <for-all-platforms target="upload-one-distribution"/>
475 </target>
476
71ea339 Jonathan Feinberg Greatly speed up ant build.
authored
477 <!--
7f2cbda Jonathan Feinberg Make all JRE binaries +x.
authored
478 $ ant –Dplatform=macosx upload-distribution
6338eb9 Jonathan Feinberg Only copy platform-appropriate library jars. Use processing project subm...
authored
479 -->
480 <target name="upload-distribution" depends="jar">
481 <for-platform platform="${platform}" target="upload"/>
482 </target>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
483
484 <!--
485 Testing-related targets.
486 -->
487 <target name="build-tests" depends="jar">
488 <mkdir dir="testing/bin"/>
af94a34 Jonathan Feinberg Clean up the build.
authored
489 <javac
490 classpath="testing/library/junit-4.11.jar:work/processing-py.jar"
491 destdir="testing/bin"
34eb455 Jonathan Feinberg Add filter() builtin/Processing pun.
authored
492 includeantruntime="false" deprecation="true">
10b9cc8 Jonathan Feinberg Renamed testing directories.
authored
493 <src path="testing/src"/>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
494 </javac>
495 </target>
b9a291f Jonathan Feinberg Fix re-initialization show-stopper.
authored
496 <target name="test.standalone" depends="build-tests">
f1c664d Jonathan Feinberg Fix unit tests, which hadn't kept up to date with SketchInfo changes.
authored
497 <junit fork="true" haltonfailure="true">
13de65a Jonathan Feinberg Use junit target instead of manually running tests from jvm.
authored
498 <test name="test.jycessing.JycessingTests">
499 <formatter type="plain" usefile="false"/>
500 </test>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
501 <classpath>
502 <pathelement location="testing/bin"/>
af94a34 Jonathan Feinberg Clean up the build.
authored
503 <pathelement location="work/processing-py.jar"/>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
504 <pathelement location="testing/library/junit-4.11.jar"/>
505 <pathelement location="testing/library/hamcrest-core-1.3.jar"/>
506 </classpath>
13de65a Jonathan Feinberg Use junit target instead of manually running tests from jvm.
authored
507 </junit>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
508 </target>
2462c1b Jonathan Feinberg Fix mode.test build. Thanks, Travis!
authored
509 <target name="test.mode" depends="build-tests,mode.jar">
f1c664d Jonathan Feinberg Fix unit tests, which hadn't kept up to date with SketchInfo changes.
authored
510 <junit fork="true" haltonfailure="true">
511 <test name="test.jycessing.JycessingTests">
512 <formatter type="plain" usefile="false"/>
513 </test>
514 <classpath>
515 <pathelement location="testing/bin"/>
516 <pathelement location="${corejar}"/>
517 <pathelement location="${processing}/core/library/gluegen-rt.jar"/>
518 <pathelement location="${processing}/core/library/jogl-all.jar"/>
519 <pathelement location="work/PythonMode.jar"/>
3165b0c Jonathan Feinberg Add Google Guava as a dependency.
authored
520 <pathelement location="${guava}"/>
f1c664d Jonathan Feinberg Fix unit tests, which hadn't kept up to date with SketchInfo changes.
authored
521 <pathelement location="${jython}"/>
522 <pathelement location="testing/library/junit-4.11.jar"/>
523 <pathelement location="testing/library/hamcrest-core-1.3.jar"/>
524 </classpath>
13de65a Jonathan Feinberg Use junit target instead of manually running tests from jvm.
authored
525 </junit>
b9a291f Jonathan Feinberg Fix re-initialization show-stopper.
authored
526 </target>
527 <target name="test" depends="test.mode,test.standalone"/>
5dd0a2e Jonathan Feinberg Fix tests in Eclipse, and add "ant test".
authored
528
e697386 Jonathan Feinberg add copyright and license information
authored
529 </project>
Something went wrong with that request. Please try again.