-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·122 lines (95 loc) · 4.27 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
<?xml version="1.0"?>
<project name="py-mode" default="install" basedir="./">
<description>Template for extending Java Mode in Processing >2.0a5</description>
<!-- name of your mode package (will be used as dir name) -->
<property name="lib.name" value="PythonMode" />
<!-- version -->
<property name="release" value="0.0.1" />
<!-- java version -->
<property name="java.target.version" value="1.6" />
<!-- location of processing jars (core.jar, pde.jar, ..) -->
<property name="processing.classes" location="/Users/mlg/Documents/NetbeansProjects/p5-svn/svn/processing/build/macosx/work/Processing.app/Contents/Resources/Java/" />
<!-- folder to install modes in (probably a folder called "modes" inside your sketchbook folder) -->
<property name="processing.modes" location="/Users/mlg/Documents/Processing/modes"/>
<!-- path to your processing executable. -->
<property name="processing.executable" location="/Users/mlg/Documents/NetbeansProjects/p5-svn/svn/processing/build/macosx/work/Processing.app/Contents/MacOS/JavaApplicationStub"/>
<!-- - - - - - - - - - - - - - - - - - - - - - - -->
<property name="src" value="src" />
<property name="build" value="build" />
<property name="bin" value="bin" />
<property name="dist" value="dist" />
<path id="library-classpath">
<fileset dir="${processing.classes}" >
<include name="core/library/*.jar" />
<include name="lib/*.jar" />
</fileset>
<fileset dir="lib" >
<include name="*.jar" />
</fileset>
</path>
<!-- - - - - - - - - - - - - - - - - - - - - - -
HELP
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="help">
<echo>HEELP!</echo>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
BUILD
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="build">
<echo>${ant.version}</echo>
<propertyfile file="build.number" /> <!-- create the build.number file if it doesn't exist -->
<buildnumber file="build.number" />
<mkdir dir="${build}" />
<javac srcdir="${src}" destdir="${build}" source="${java.target.version}" includeantruntime="false">
<classpath>
<path refid="library-classpath"/>
</classpath>
</javac>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
PACKAGE
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="package" depends="build">
<delete dir="${dist}" />
<property name="bundle" value="${dist}/${lib.name}"/>
<mkdir dir="${bundle}" />
<mkdir dir="${bundle}/mode" />
<jar jarfile="${bundle}/mode/${lib.name}.jar" basedir="build"/>
<!--zip destfile="${dist}/mode/${lib.name}.jar" excludes="**/*.MF">
<zipgroupfileset dir="lib" includes="*.jar" />
</zip-->
<copy todir="${bundle}">
<fileset dir="resources/" />
</copy>
<copy todir="${bundle}/mode">
<fileset dir="lib/" />
</copy>
<replaceregexp file="${bundle}/mode.properties" flags="g"
match="@@version@@" replace="${build.number}" />
<replaceregexp file="${bundle}/mode.properties" flags="g"
match="@@pretty-version@@" replace="${release}" />
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
INSTALL
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="install" depends="package" >
<delete dir="${processing.modes}/${lib.name}" />
<copy todir="${processing.modes}/">
<fileset dir="${dist}" />
</copy>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
CLEAN
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="clean" >
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -
RUN
- - - - - - - - - - - - - - - - - - - - - - - -->
<target name="run" depends="install">
<exec executable="${processing.executable}" spawn="false" />
</target>
</project>