Skip to content
Newer
Older
100644 164 lines (147 sloc) 5.77 KB
670a435 initial import from internal repository
mars authored Mar 8, 2009
1 <project name="BlipBox" default="all" basedir=".">
2 <description>
3 Simple build file for the Java side of the BlipBox project
4 </description>
5
6 <property file="build.properties"/>
7
8 <!-- set global properties for this build -->
9 <property name="src.dir" location="src"/>
10 <property name="build.dir" location="build"/>
11 <property name="lib.dir" location="lib"/>
12
13 <path id="lib.path">
14 <pathelement location="${lib.dir}"/>
15 <fileset dir="lib">
16 <include name="*.jar"/>
17 </fileset>
18 </path>
19
20 <target name="init">
21 <!-- Create the time stamp -->
22 <tstamp/>
23 <!-- Create the build directory structure used by compile -->
24 <mkdir dir="${build.dir}"/>
25 <mkdir dir="${build.dir}/classes"/>
1c07a27 updated dist target
mars authored Mar 8, 2009
26 <mkdir dir="${build.dir}/dist"/>
670a435 initial import from internal repository
mars authored Mar 8, 2009
27 </target>
28
29 <target name="compile" depends="init"
30 description="compile the source " >
31 <!-- Compile the java code from ${src} into ${build} -->
32 <javac srcdir="${src.dir}" destdir="${build.dir}/classes"
33 debug="${java.debug}"
34 source="${java.source}"
35 target="${java.target}">
36 <classpath>
37 <path refid="lib.path"/>
38 </classpath>
39 </javac>
40 </target>
41
42 <target name="jar" depends="compile">
43 <jar jarfile="${build.dir}/blipbox.jar">
fcc2f8a added licence to dist and jar targets
mars authored Mar 9, 2009
44 <fileset dir="." includes="licence.txt"/>
670a435 initial import from internal repository
mars authored Mar 8, 2009
45 <fileset dir="${build.dir}/classes" includes="**/*.class"/>
46 <manifest>
47 <attribute name="Main-Class" value="${java.main.class}" />
48 <attribute name="Class-Path" value="lib/RXTXcomm.jar lib/log4j.jar lib/mmj.jar lib/log4j.jar"/>
0050ee9 script to convert BDF font files to C structs
mars authored Mar 16, 2009
49 <!-- <attribute name="Icon-Filename" value="webstart/icon.jpg"/> -->
670a435 initial import from internal repository
mars authored Mar 8, 2009
50 <!-- <attribute name="java.library.path" value="lib/librxtxSerial.jnilib"/> -->
51 <!-- <attribute name="Bundle-NativeCode" value="lib/librxtxSerial.jnilib;lib/libmmj.jnilib osname=mac os x;processor=x86;processor=ppc"/> -->
52 </manifest>
53 </jar>
54 </target>
55
56 <target name="native.jar" depends="init">
57 <jar jarfile="${build.dir}/native-macos.jar">
58 <fileset dir="${lib.dir}" includes="*.jnilib"/>
59 </jar>
60 </target>
61
62 <target name="webstart" depends="jar, native.jar">
63 <copy todir="${build.dir}/webstart">
64 <fileset dir="${build.dir}" includes="blipbox.jar native-macos.jar"/>
65 <fileset dir="webstart"/>
66 <!-- <fileset dir="webstart" includes="BlipBox.icns BlipBox.jnlp icon.jpg"/> -->
67 </copy>
68 <copy todir="${build.dir}/webstart/lib">
69 <fileset dir="${lib.dir}"
70 includes="mmj.jar RXTXcomm.jar log4j.jar libmmj.jnilib librxtxSerial.jnilib"/>
71 </copy>
72 <signjar storepass="secret"
73 alias="blipbox"
74 keystore="${java.keystore.dir}">
75 <path>
76 <fileset dir="${build.dir}/webstart" includes="*.jar"/>
77 <fileset dir="${build.dir}/webstart/lib" includes="*.jar"/>
78 </path>
79 </signjar>
80 <copy todir="${build.dir}/lib">
81 <fileset dir="${lib.dir}" includes="*.jnilib"/>
82 </copy>
83 </target>
84
85 <target name="key.generate" depends="init">
86 <!-- to generate a new key, first remove the existing one -->
87 <genkey alias="blipbox" storepass="secret"
88 keystore="keystore/pingdynasty.keystore"
89 validity="356">
90 <dname>
91 <param name="CN" value="www.blipbox.org"/>
92 <param name="OU" value="BlipBox"/>
93 <param name="O" value="Pingdynasty"/>
94 <param name="C" value="UK"/>
95 </dname>
96 </genkey>
97 </target>
98
1c07a27 updated dist target
mars authored Mar 8, 2009
99 <target name="dist.src" depends="init">
100 <property name="prefix" value="BlipBox-${version.num}-src"/>
101 <zip destfile="${build.dir}/dist/BlipBox-${version.num}-src.zip">
102 <zipfileset dir="." prefix="BlipBox-${version.num}-src">
fcc2f8a added licence to dist and jar targets
mars authored Mar 9, 2009
103 <include name="build.properties"/>
104 <include name="build.xml"/>
105 <include name="licence.txt"/>
1c07a27 updated dist target
mars authored Mar 8, 2009
106 <include name="src/**"/>
107 <include name="firmware/**"/>
108 </zipfileset>
109 </zip>
110 </target>
111
112 <target name="dist.bin" depends="compile"
670a435 initial import from internal repository
mars authored Mar 8, 2009
113 description="generate the distribution" >
114 <!-- Create the distribution directory -->
1c07a27 updated dist target
mars authored Mar 8, 2009
115 <jar jarfile="${build.dir}/dist/BlipBox-${version.num}-bin.jar">
fcc2f8a added licence to dist and jar targets
mars authored Mar 9, 2009
116 <fileset dir="." includes="licence.txt"/>
670a435 initial import from internal repository
mars authored Mar 8, 2009
117 <fileset dir="${build.dir}/classes" includes="**/*.class"/>
1c07a27 updated dist target
mars authored Mar 8, 2009
118 <!-- <fileset dir="${lib.dir}" includes="*.jnilib"/> -->
119 <!-- <zipfileset src="${lib.dir}/mmj.jar"/> -->
120 <!-- <zipfileset src="${lib.dir}/RXTXcomm.jar"/> -->
121 <!-- <zipfileset src="${lib.dir}/log4j.jar"/> -->
670a435 initial import from internal repository
mars authored Mar 8, 2009
122 <manifest>
123 <attribute name="Main-Class" value="${java.main.class}" />
124 <attribute name="Bundle-NativeCode" value="librxtxSerial.jnilib;libmmj.jnilib osname=mac os x;processor=x86;processor=ppc"/>
125 </manifest>
126 </jar>
127 </target>
128
1c07a27 updated dist target
mars authored Mar 8, 2009
129 <target name="dist" depends="dist.src, dist.bin"/>
130
670a435 initial import from internal repository
mars authored Mar 8, 2009
131 <target name="run.class" depends="init">
132 <java fork="true" classname="${class}"
133 failonerror="true">
134 <classpath path="${build.dir}/classes"/>
135 <classpath refid="lib.path" />
136 <arg line="${args}"/>
137 <assertions>
138 <enable package="com.pingdynasty"/>
139 </assertions>
140 <!-- <sysproperty key="java.util.logging.config.file" file="${etc.dir}/logging.properties"/> -->
141 <!-- <sysproperty key="java.endorsed.dirs" file="${lib.dir}/endorsed"/> -->
142 <sysproperty key="java.library.path" file="${lib.dir}"/>
143 <!-- <sysproperty key="java.library.path" file="lib"/> -->
144 </java>
145 </target>
146
147 <target name="all" depends="init">
148 <antcall target="jar"/>
149 <!-- <antcall target="dist"/> -->
150 </target>
151
152 <target name="blip" depends="compile">
153 <antcall target="run.class">
154 <param name="class" value="com.pingdynasty.blipbox.BlipBoxDataHandler"/>
155 <param name="args" value="${args}"/>
156 </antcall>
157 </target>
158
159 <target name="clean"
160 description="clean up" >
161 <delete dir="${build.dir}"/>
162 </target>
163
164 </project>
Something went wrong with that request. Please try again.