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