blob: 7b69032174cb46c724347b02c86a618b70712cb6 [file] [log] [blame]
Christophe Cornuf7e6d922005-04-07 19:51:12 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project name="org.eclipse.swt.gtk.solaris.sparc" default="build.jars" basedir=".">
3
4 <target name="init" depends="properties">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +00005 <property name="compilerArg" value="" />
6 <property name="ws" value="gtk" />
7 <property name="os" value="solaris" />
8 <property name="arch" value="sparc" />
9 <property name="fragment" value="org.eclipse.swt.gtk.solaris.sparc" />
10 <property name="version.suffix" value="3.5.0" />
11 <property name="full.name" value="${fragment}_${version.suffix}" />
12 <property name="temp.folder" value="${basedir}/temp.folder" />
13 <property name="plugin.destination" value="${basedir}" />
14 <property name="build.result.folder" value="${basedir}" />
15 <property name="destination" value="${basedir}" />
16 <property name="plugindir" value="../org.eclipse.swt" />
17 <property name="bootclasspath" value="" />
18 <property name="javacVerbose" value="false" />
19 <property name="logExtension" value=".xml" />
20 <property name="javacSource" value="1.3" />
21 <property name="javacTarget" value="1.2" />
Veronika Irvinebac9c682006-05-03 19:13:48 +000022 <path id="path_bootclasspath">
23 <fileset dir="${java.home}/lib">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000024 <include name="*.jar" />
25 </fileset>
26 </path>
27 <property name="bootclasspath" refid="path_bootclasspath" />
28 <condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
29 <isset property="CDC-1.0/Foundation-1.0" />
30 </condition>
31 <condition property="bundleBootClasspath" value="${J2SE-1.3}">
32 <isset property="J2SE-1.3" />
33 </condition>
34 <property name="bundleJavacSource" value="${javacSource}" />
35 <property name="bundleJavacTarget" value="${javacTarget}" />
36 <property name="bundleBootClasspath" value="${bootclasspath}" />
37 <condition property="p2.publish.parts" value="true">
38 <istrue value="${p2.gathering}" />
39 </condition>
Christophe Cornuf7e6d922005-04-07 19:51:12 +000040 </target>
41
42 <target name="properties" if="eclipse.running">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000043 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000044 </target>
45
46 <target name="build.update.jar" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000047 <delete dir="${temp.folder}" />
48 <mkdir dir="${temp.folder}" />
49 <antcall target="build.jars" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000050 <antcall target="gather.bin.parts">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000051 <param name="destination.temp.folder" value="${temp.folder}/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000052 </antcall>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000053 <zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
54 <delete dir="${temp.folder}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000055 </target>
56
57 <target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000058 <property name="destdir" value="${temp.folder}/@dot.bin" />
59 <property name="debug" value="true" />
60 <property name="jar.filename" value="swt.jar" />
61 <delete dir="${temp.folder}/@dot.bin" />
62 <mkdir dir="${temp.folder}/@dot.bin" />
Grant Gayed2c55ade2007-04-17 17:57:04 +000063 <javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000064 <src path="${plugindir}/Eclipse SWT/cairo/" />
65 <src path="${plugindir}/Eclipse SWT/common/" />
66 <src path="${plugindir}/Eclipse SWT/common_j2se/" />
67 <src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
68 <src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
69 <src path="${plugindir}/Eclipse SWT/gtk/" />
70 <src path="${plugindir}/Eclipse SWT Accessibility/common/" />
71 <src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
72 <src path="${plugindir}/Eclipse SWT AWT/common/" />
73 <src path="${plugindir}/Eclipse SWT AWT/gtk/" />
74 <src path="${plugindir}/Eclipse SWT Browser/common/" />
75 <src path="${plugindir}/Eclipse SWT Mozilla/common/" />
76 <src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
77 <src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
78 <src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
79 <src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
80 <src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
81 <src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
82 <src path="${plugindir}/Eclipse SWT OpenGL/common/" />
83 <src path="${plugindir}/Eclipse SWT PI/cairo/" />
84 <src path="${plugindir}/Eclipse SWT PI/common/" />
85 <src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
86 <src path="${plugindir}/Eclipse SWT PI/gtk/" />
87 <src path="${plugindir}/Eclipse SWT Printing/common/" />
88 <src path="${plugindir}/Eclipse SWT Printing/gtk/" />
89 <src path="${plugindir}/Eclipse SWT Program/cde/" />
90 <src path="${plugindir}/Eclipse SWT Program/common/" />
91 <src path="${plugindir}/Eclipse SWT Program/gnome/" />
92 <src path="${plugindir}/Eclipse SWT Program/gtk/" />
93 <src path="${plugindir}/Eclipse SWT Theme/gtk/" />
94 <compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
95 <compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000096 </javac>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +000097 <property name="includes" value="" />
98 <property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +000099 <copy todir="${temp.folder}/@dot.bin">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000100 <fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
101 <fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
102 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
103 <fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
104 <fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
105 <fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
106 <fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
107 <fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
108 <fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
109 <fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
110 <fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
111 <fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
112 <fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
113 <fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
114 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
115 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
116 <fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
117 <fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
118 <fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
119 <fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
120 <fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
121 <fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
122 <fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
123 <fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
124 <fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
125 <fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
126 <fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
127 <fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
128 <fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
129 <fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000130 </copy>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000131 <antcall target="copy.translationfiles" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000132
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000133 <mkdir dir="${build.result.folder}/@dot" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000134 <copy todir="${build.result.folder}/@dot" failonerror="true">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000135 <fileset dir="${temp.folder}/@dot.bin" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000136 </copy>
137 <!-- prepare a jar file solely for the download target -->
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000138 <jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
139 <delete dir="${temp.folder}/@dot.bin" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000140 </target>
141
142 <target name="build.jars" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000143 <available property="@dot" file="${build.result.folder}/@dot" />
144 <antcall target="@dot" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000145 </target>
146
147 <target name="src.zip" depends="init" unless="src.zip">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000148 <mkdir dir="${build.result.folder}/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000149 <zip zipfile="${build.result.folder}/src.zip">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000150 <fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
151 <fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
152 <fileset dir="${plugindir}/Eclipse SWT/common/library/" />
153 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
154 <fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
155 <fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
156 <fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
157 <fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
158 <fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
159 <fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
160 <fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
161 <fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
162 <fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
163 <fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
164 <fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
165 <fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
166 <fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
167 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
168 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
169 <fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
170 <fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
171 <fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
172 <fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
173 <fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
174 <fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
175 <fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
176 <fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
177 <fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
178 <fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
179 <fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
180 <fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
181 <fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
182 <fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
183 <fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
184 <fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
185 <fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
186 <fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
187 <fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
188 <fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
189 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
190 <fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
191 <fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000192 </zip>
193 </target>
194
Grant Gayedcb564732007-11-08 15:17:40 +0000195 <target name="copy.src" depends="init">
196 <copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000197 <fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
198 <fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
199 <fileset dir="${plugindir}/Eclipse SWT/common/library/" />
200 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
201 <fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
202 <fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
203 <fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
204 <fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
205 <fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
206 <fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
207 <fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
208 <fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
209 <fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
210 <fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
211 <fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
212 <fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
213 <fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
214 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
215 <fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
216 <fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
217 <fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
218 <fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
219 <fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
220 <fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
221 <fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
222 <fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
223 <fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
224 <fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
225 <fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
226 <fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
227 <fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
228 <fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
229 <fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
230 <fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
231 <fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
232 <fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
233 <fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
234 <fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
235 <fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
236 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
237 <fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
238 <fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
Grant Gayedcb564732007-11-08 15:17:40 +0000239 </copy>
240 </target>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000241
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000242 <target name="build.sources" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000243 <available property="src.zip" file="${build.result.folder}/src.zip" />
244 <antcall target="src.zip" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000245 </target>
246
247 <target name="build.zips" depends="init">
248 </target>
249
250 <target name="gather.sources" depends="init" if="destination.temp.folder">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000251 <mkdir dir="${destination.temp.folder}/${full.name}" />
252 <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000253 <copy todir="${destination.temp.folder}/${full.name}">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000254 <fileset dir="${basedir}" includes="about.html,about_files/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000255 </copy>
256 </target>
257
Grant Gayedcb564732007-11-08 15:17:40 +0000258 <target name="gather.individual.sources" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000259 <antcall target="copy.src" />
Grant Gayedcb564732007-11-08 15:17:40 +0000260 <copy todir="${destination.temp.folder}">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000261 <fileset dir="${basedir}" includes="about.html,about_files/" />
Grant Gayedcb564732007-11-08 15:17:40 +0000262 </copy>
263 </target>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000264
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000265 <target name="gather.logs" depends="init" if="destination.temp.folder">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000266 <mkdir dir="${destination.temp.folder}/${full.name}" />
267 <copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
268 </target>
269
270 <target name="publish.bin.parts" depends="init" if="p2.publish.parts">
271 <antcall target="gather.bin.parts">
272 <param name="destination.temp.folder" value="${build.result.folder}" />
273 </antcall>
274 <eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000275 </target>
276
277 <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000278 <mkdir dir="${destination.temp.folder}/${full.name}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000279 <copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000280 <fileset dir="${build.result.folder}/@dot" includes="**" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000281 </copy>
282 <copy todir="${destination.temp.folder}/${full.name}">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000283 <fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000284 </copy>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000285 <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
286 <eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
Kevin Barnes1882da22009-05-04 17:05:30 +0000287 <antcall target="apitools.generation">
288 <param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
289 <param name="projectLocation" value="${basedir}"/>
290 <param name="binary.folders" value="${build.result.folder}/@dot"/>
291 <param name="projectName" value="${full.name}"/>
292 <param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
293 <param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
294 </antcall>
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000295 </target>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000296
297 <target name="swtdownload" depends="init">
298 <delete dir="${temp.folder}" />
299 <delete dir="${build.result.folder}/@dot" />
300 <!-- ensure entry into @dot target -->
301 <mkdir dir="${temp.folder}/swtdownload/" />
302 <property name="includetranslationfiles" value="true" />
Grant Gayed2c55ade2007-04-17 17:57:04 +0000303 <antcall target="build.jars">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000304 <param name="debug" value="true" />
305 <param name="jar.filename" value="swt-debug.jar" />
Grant Gayed2c55ade2007-04-17 17:57:04 +0000306 </antcall>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000307 <jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
308 <copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
309 <delete dir="${build.result.folder}/@dot" />
310 <!-- this is needed to re-enter @dot -->
Grant Gayed2c55ade2007-04-17 17:57:04 +0000311 <antcall target="build.jars">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000312 <param name="debug" value="false" />
313 <param name="jar.filename" value="swt.jar" />
Grant Gayed2c55ade2007-04-17 17:57:04 +0000314 </antcall>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000315 <jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
316 <copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
317 <antcall target="build.sources" />
318 <copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
319 <copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
320 <copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000321 <copy todir="${temp.folder}/swtdownload">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000322 <fileset dir="${basedir}" includes="about.html,about_files/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000323 </copy>
Billy Biggsb433bfc2005-11-24 21:41:31 +0000324 <zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000325 <zipfileset dir="${temp.folder}/swtdownload/" />
Billy Biggsb433bfc2005-11-24 21:41:31 +0000326 </zip>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000327 <delete dir="${temp.folder}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000328 </target>
329
330 <target name="clean" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000331 <delete dir="${build.result.folder}/@dot" />
332 <delete file="${build.result.folder}/src.zip" />
333 <delete file="${plugin.destination}/${full.name}.jar" />
334 <delete file="${plugin.destination}/${full.name}.zip" />
335 <delete dir="${temp.folder}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000336 </target>
337
338 <target name="refresh" depends="init" if="eclipse.running">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000339 <eclipse.refreshLocal resource="${fragment}" depth="infinite" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000340 </target>
341
342 <target name="zip.plugin" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000343 <delete dir="${temp.folder}" />
344 <mkdir dir="${temp.folder}" />
345 <antcall target="build.jars" />
346 <antcall target="build.sources" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000347 <antcall target="gather.bin.parts">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000348 <param name="destination.temp.folder" value="${temp.folder}/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000349 </antcall>
350 <antcall target="gather.sources">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000351 <param name="destination.temp.folder" value="${temp.folder}/" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000352 </antcall>
353 <delete>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000354 <fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000355 </delete>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000356 <zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
357 <delete dir="${temp.folder}" />
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000358 </target>
Grant Gayed9c108142008-05-26 18:40:56 +0000359
360 <target name="copy.translationfiles" if="includetranslationfiles">
361 <copy todir="${temp.folder}/@dot.bin" overwrite="true">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000362 <fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
Grant Gayed9c108142008-05-26 18:40:56 +0000363 </copy>
364 <move todir="${temp.folder}/@dot.bin" overwrite="true">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000365 <fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
366 <mapper type="glob" from="*._properties" to="*.properties" />
Grant Gayed9c108142008-05-26 18:40:56 +0000367 </move>
368 </target>
Grant Gayedb43ad7c2008-06-19 17:52:36 +0000369
370 <target name="jar.plugin" depends="init">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000371 <delete dir="${temp.folder}" />
372 <mkdir dir="${temp.folder}" />
373 <antcall target="build.jars" />
Grant Gayedb43ad7c2008-06-19 17:52:36 +0000374 <antcall target="gather.bin.parts">
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000375 <param name="destination.temp.folder" value="${temp.folder}/" />
Grant Gayedb43ad7c2008-06-19 17:52:36 +0000376 </antcall>
Kevin Barnes9f5cc1f2009-03-23 15:00:49 +0000377 <jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" />
378 <delete dir="${temp.folder}" />
Grant Gayedb43ad7c2008-06-19 17:52:36 +0000379 </target>
Kevin Barnes1882da22009-05-04 17:05:30 +0000380
381 <target name="apitools.generation" if="generateAPIDescription">
382 <apitooling.apigeneration
383 projectName="${projectName}"
384 project="${projectLocation}"
385 binary="${binary.folders}"
386 target="${target.folder}"
387 extraManifests="${extraManifests}"
388 extraSourceLocations="${extraSourceLocations}"/>
389 </target>
Christophe Cornuf7e6d922005-04-07 19:51:12 +0000390</project>