1 --- build.xml.orig 2009-12-26 09:11:39.211850481 +0100
2 +++ build.xml 2009-12-26 09:12:52.782683274 +0100
4 <exclude name="**/icon?*.png"/>
7 - <!-- detect current platform -->
8 - <condition property="platform" value="linux">
9 - <os name="Linux" arch="i386"/>
11 - <condition property="platform" value="linux64">
13 - <os name="Linux" arch="amd64"/>
14 - <os name="Linux" arch="ia64"/>
15 - <os name="Linux" arch="x86_64"/>
18 - <condition property="platform" value="mac">
21 - <condition property="platform" value="win32">
22 - <os family="windows"/>
24 - <condition property="platform" value="unknown">
26 - <isset property="platform"/>
30 - <target name="all" depends="clean,compile,compile-tests,test,package,clean_end"/>
31 - <target name="linux" depends="clean,compile-linux,package-linux,clean_end"/>
32 - <target name="linux64" depends="clean,compile-linux64,package-linux64,clean_end"/>
33 - <target name="mac" depends="clean,compile-mac,package-mac,clean_end"/>
34 - <target name="win32" depends="clean,compile-win32,package-win32,clean_end"/>
35 - <target name="current">
36 - <antcall target="${platform}"/>
39 - <!-- this is run by cruise control continous integration -->
40 - <target name="cruise" depends="clean,compile,compile-tests,package,clean_end"/>
42 + <!-- detect current platform -->
43 + <condition property="platform" value="linux">
44 + <os name="Linux" arch="i386"/>
46 + <condition property="platform" value="linux64">
48 + <os name="Linux" arch="amd64"/>
49 + <os name="Linux" arch="ia64"/>
50 + <os name="Linux" arch="x86_64"/>
53 + <condition property="platform" value="mac">
56 + <condition property="platform" value="win32">
57 + <os family="windows"/>
59 + <condition property="platform" value="unknown">
61 + <isset property="platform"/>
65 + <target name="all" depends="clean,compile,compile-tests,test,package,clean_end"/>
66 + <target name="linux" depends="clean,compile-linux,package-linux,clean_end"/>
67 + <target name="linux64" depends="clean,compile-linux64,package-linux64,clean_end"/>
68 + <target name="mac" depends="clean,compile-mac,package-mac,clean_end"/>
69 + <target name="win32" depends="clean,compile-win32,package-win32,clean_end"/>
70 + <target name="current">
71 + <antcall target="${platform}"/>
74 + <!-- this is run by cruise control continous integration -->
75 + <target name="cruise" depends="clean,compile,compile-tests,package,clean_end"/>
78 - <echo message="This script will build ${name} ${version}"/>
79 + <echo message="This script will build ${name} ${version}"/>
80 <echo message="Targets (some may work only on Linux):"/>
81 <echo message=" all - runs tests and builds binaries for all OSs"/>
82 - <echo message=" linux - builds only Linux 32-bit binary"/>
83 + <echo message=" linux - builds only Linux 32-bit binary"/>
84 <echo message=" linux64 - builds only Linux 64-bit binary"/>
85 <echo message=" mac - builds only Mac binary"/>
86 - <echo message=" win32 - builds only Windows binary"/>
87 + <echo message=" win32 - builds only Windows binary"/>
88 <echo message=" current = ${platform}"/>
91 - <target name="clean">
93 + <target name="clean">
94 <delete dir="${dist}"/>
95 - <antcall target="clean_end"/>
96 + <antcall target="clean_end"/>
99 - <target name="clean_end">
100 - <delete dir="${bin}"/>
101 - <delete dir="${testbin}"/>
102 - <delete dir="${bin}.linux"/>
103 - <delete dir="${bin}.linux64"/>
104 - <delete dir="${bin}.win32"/>
105 - <delete dir="${bin}.mac"/>
106 - <delete dir="${testresults}"/>
108 + <target name="clean_end">
109 + <delete dir="${bin}"/>
110 + <delete dir="${testbin}"/>
111 + <delete dir="${bin}.linux"/>
112 + <delete dir="${bin}.linux64"/>
113 + <delete dir="${bin}.win32"/>
114 + <delete dir="${bin}.mac"/>
115 + <delete dir="${testresults}"/>
118 <macrodef name="compile">
119 @@ -167,18 +167,18 @@
121 <path location="${testbin}"/>
122 <fileset dir="${swt}" includes="swt-${platform}.jar"/>
123 - <fileset dir="${ext}/junit" includes="*.jar"/>
124 + <fileset dir="${ext}/junit" includes="*.jar"/>
125 <fileset dir="${ext}/easymock" includes="*.jar"/>
126 - <fileset dir="${ext}/picocontainer" includes="*.jar"/>
127 + <fileset dir="${ext}/picocontainer" includes="*.jar"/>
128 <path refid="emma.lib"/>
130 <formatter type="xml"/>
131 <batchtest todir="${testresults}">
132 <fileset dir="${testbin}" includes="**/*Test.class"/>
136 - report: no valid input data files have been specified
139 + report: no valid input data files have been specified
141 <report sourcepath="${src}" encoding="UTF-8">
142 <fileset dir="${basedir}" includes="coverage.ec"/>
143 @@ -213,11 +213,11 @@
144 <macrodef name="package-for">
145 <attribute name="platform"/>
146 <attribute name="librocksaw"/>
149 <mkdir dir="${dist}"/>
150 <unzip src="${ext}/picocontainer/picocontainer-1.0.jar" dest="${bin}.@{platform}"/>
151 <unzip src="${swt}/swt-@{platform}.jar" dest="${bin}.@{platform}"/>
152 - <copy file="${ext}/rocksaw/lib/@{librocksaw}" todir="${bin}.@{platform}"/>
153 + <copy file="${ext}/rocksaw/lib/@{librocksaw}" todir="${bin}.@{platform}"/>
154 <copy file="${ext}/winping/lib/winping.dll" todir="${bin}.win32"/>
155 <delete includeemptydirs="true" failonerror="false">
156 <fileset dir="${bin}.@{platform}/images" includes="**/*.svg"/>
157 @@ -284,14 +284,14 @@
158 <include name="Color*"/>
159 <include name="Link*"/>
160 <include name="Tracker*"/>
161 - <include name="Date*"/>
162 + <include name="Date*"/>
163 <include name="Tray*"/>
164 <include name="Tree*"/>
165 <include name="DateTime*"/>
166 <include name="Sash*"/>
168 <fileset dir="${bin}.@{platform}/org/eclipse/swt/awt"/>
171 <jar destfile="${dist}/${ant.project.name}-@{platform}-orig.jar" >
173 <attribute name="Main-Class" value="${main.class}"/>
174 @@ -342,49 +342,50 @@
176 % *Proc(int, int, int);
182 <delete file="${dist}/${ant.project.name}-@{platform}-orig.jar"/>
186 <target name="package-linux" depends="svn-info">
187 - <package-for platform="linux" librocksaw="librocksaw.so"/>
189 - <!-- now create deb package for Ubuntu and such -->
190 + <package-for platform="linux" librocksaw="librocksaw.so"/>
192 + <!-- now create deb package for Ubuntu and such
193 <antcall target="package-linux-deb-rpm"/>
196 - <target name="package-linux64" depends="svn-info">
197 - <package-for platform="linux64" librocksaw="librocksaw.so"/>
200 - <target name="package-linux-deb-rpm" if="isRunningOnLinux">
201 - <mkdir dir="${dist}/deb"/>
202 - <copy todir="${dist}/deb">
203 - <fileset dir="${ext}/deb-bundle"/>
206 - <copy file="${dist}/${ant.project.name}-linux-${version}.jar" todir="${dist}/deb/usr/lib/ipscan"/>
207 - <copy file="resources/images/icon.png" tofile="${dist}/deb/usr/share/pixmaps/ipscan.png"/>
209 - <replace file="${dist}/deb/DEBIAN/control">
210 - <replacefilter token="VERSION" value="${version}"/>
213 - <exec executable="chmod" dir="${dist}">
214 - <arg line="a+x deb/usr/bin/ipscan deb/usr/lib/ipscan/${ant.project.name}-linux-${version}.jar"/>
216 - <echo message="Trying to build .deb package using dpkg..."/>
217 - <exec executable="dpkg" dir="${dist}">
218 - <arg line="-b deb ${ant.project.name}_${version}_i386.deb"/>
220 - <echo message="Trying to build .rpm package using alien..."/>
221 - <exec executable="alien" dir="${dist}">
222 - <arg line="--to-rpm ${ant.project.name}_${version}_i386.deb"/>
225 - <delete dir="${dist}/deb"/>
229 + <target name="package-linux64" depends="svn-info">
230 + <package-for platform="linux64" librocksaw="librocksaw.so"/>
233 + <target name="package-linux-deb-rpm" if="isRunningOnLinux">
234 + <mkdir dir="${dist}/deb"/>
235 + <copy todir="${dist}/deb">
236 + <fileset dir="${ext}/deb-bundle"/>
239 + <copy file="${dist}/${ant.project.name}-linux-${version}.jar" todir="${dist}/deb/usr/lib/ipscan"/>
240 + <copy file="resources/images/icon.png" tofile="${dist}/deb/usr/share/pixmaps/ipscan.png"/>
242 + <replace file="${dist}/deb/DEBIAN/control">
243 + <replacefilter token="VERSION" value="${version}"/>
246 + <exec executable="chmod" dir="${dist}">
247 + <arg line="a+x deb/usr/bin/ipscan deb/usr/lib/ipscan/${ant.project.name}-linux-${version}.jar"/>
249 + <echo message="Trying to build .deb package using dpkg..."/>
250 + <exec executable="dpkg" dir="${dist}">
251 + <arg line="-b deb ${ant.project.name}_${version}_i386.deb"/>
253 + <echo message="Trying to build .rpm package using alien..."/>
254 + <exec executable="alien" dir="${dist}">
255 + <arg line="--to-rpm ${ant.project.name}_${version}_i386.deb"/>
258 + <delete dir="${dist}/deb"/>
261 <target name="package-win32" depends="svn-info">