source: main/trunk/release-kits/shared/core/ant-scripts/shared.xml@ 36219

Last change on this file since 36219 was 36219, checked in by kjdon, 23 months ago

updated svn url to use https, and min java version to be 1.8

File size: 21.0 KB
RevLine 
[16173]1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk-init">
3
[35651]4 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpath="${rk.home}/shared/core/lib/AntelopeTasks_3.4.2.jar"/>
5
[20600]6 <!-- CHECK PRE-CONDITIONS -->
7 <target name="init">
8 <!-- load in static properties from build.properties -->
9 <property file="${rk.name}-build.properties" />
[16199]10
[21654]11 <!-- load environment properties -->
12 <property environment="env"/>
[35651]13
14 <if>
15 <bool><isset property="env.JAVACFLAGS"/></bool>
16 <property name="compile.javac.flags" value="${env.JAVACFLAGS}"/>
17 <else>
18 <property name="compile.javac.flags" value=""/>
19 </else>
20 </if>
21
[23525]22 <!-- CLASSPATH -->
23 <path id="project.classpath">
24
25 <!-- our classes -->
26 <fileset dir="${rk.home}/shared/core">
27 <include name="ant-tasks/antelope/AntelopeTasks_3.4.2.jar"/>
28 <include name="ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar"/>
29 <include name="ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar"/>
30 <include name="ant-tasks/greenstone/anttasks.jar"/>
31 <include name="ant-tasks/7z-ant/7z.jar"/>
32 <include name="lib/crypt.jar"/>
33 <include name="lib/serializer.jar"/>
34 <include name="lib/xalan.jar"/>
35 <include name="lib/xercesImpl.jar"/>
36 <include name="lib/xml-apis.jar"/>
37 <include name="ant-installer/lib/ant-installer-ext.jar"/>
38 <include name="ant-installer/lib/ant-installer.jar"/>
39 </fileset>
40
41 </path>
42
43 <!-- SELF DEFINED TASKS AND TYPES -->
44 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
45 <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
46 <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
47 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
48 <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
49 <typedef name="iuv" classname="org.greenstone.anttasks.InsertUniqueValue" classpathref="project.classpath"/>
50 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
51 <typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
52 <typedef name="pstf" classname="org.greenstone.anttasks.PatternSetToFile" classpathref="project.classpath"/>
53 <typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
54 <typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
55
[20600]56 <!-- CONSTANTS (overridable in build.properties) -->
[16173]57
[20600]58 <!-- svn root -->
[36219]59 <property name="svn.root" value="https://svn.greenstone.org" />
[20600]60
61 <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
[36219]62 <property name="java.min.version" value="1.8.0_00"/>
[16173]63
[20600]64 <!-- create a localised basedir property -->
65 <path id="basedir.path"><pathelement location="${basedir}"/></path>
66 <property name="basedir.local" refid="basedir.path"/>
[16199]67
[21593]68 <!-- size of resource chunks (windows wrapper) -->
[21521]69 <property name="resources.chunksize" value="8388608"/>
[21593]70
71 <!-- the extra space for the dmg image in KB (mac wrapper) -->
[29251]72 <property name="dmg.overhead" value="8192"/>
[21593]73
[20600]74 <!-- current date and time -->
75 <tstamp>
76 <format property="current.month" pattern="MMM"/>
77 <format property="current.year" pattern="yyyy"/>
78 <format property="date" pattern="yyyy.MM.dd"/>
79 </tstamp>
[17344]80
[23525]81 <!-- extra features -->
82 <property name="version-extra" value="" />
83 <property name="post.2.83.version" value="true" />
84 <property name="x64" value="false" />
85
86 <if>
87 <bool><equals arg1="${x64}" arg2="true"/></bool>
88 <property name="extension-x64" value="-x64" />
89 <property name="extension_x64" value="_x64" />
90 <else>
91 <property name="extension-x64" value="" />
92 <property name="extension_x64" value="" />
93 </else>
94 </if>
95
[20600]96 <!-- BUNDLED JAVA INFO -->
97 <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
98 <!-- change this info when the bundled version changes -->
[20937]99 <property name="java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
100
[20600]101 <!-- linux -->
[23525]102 <property name="linux-java.installer" value="jre_bin${extension_x64}"/>
[30131]103 <property name="bundled.version.linux-java" value="1.7.0_72"/> <!-- set this to the version number of java in the above archive -->
[20600]104 <property name="component.bytesize.linux-java" value="101245987"/> <!-- set this to the size of the extract archive -->
[17518]105
[20600]106 <!-- windows -->
107 <property name="windows-java.installer" value="jre.exe"/>
[30131]108 <property name="bundled.version.windows-java" value="1.7.0_72"/> <!-- set this to the version number of java in the above archive -->
[20600]109 <property name="component.bytesize.windows-java" value="75000000"/> <!-- set this to the size of the extract archive -->
[17467]110
[30131]111 <!-- mac -->
112 <!-- only a jre_bin for 64 bit macs -->
113 <property name="mac-java.installer" value="jre_bin_x64"/>
114 <property name="bundled.version.mac-java" value="1.7.0_79"/> <!-- set this to the version number of java in the above archive -->
115 <property name="component.bytesize.mac-java" value="30688272"/> <!-- set this to the size of the archive, NOT the extracted archive, since we'll extract it into the /tmp folder -->
116
[20600]117 <!-- version numbers of other bundled things -->
118 <property name="bundled.version.imagemagick" value="6.4.3"/>
119 <property name="bundled.version.ghostscript" value="8.63"/>
[32794]120 <property name="bundled.version.tomcat" value="8.5.35"/>
[16173]121
[22092]122 <!-- default revision and branch path -->
123 <property name="branch.revision" value="HEAD" />
[23525]124 <property name="branch.path" value="trunk" />
125
[20600]126 <!-- DATES IN DIFFERENT LANGUAGES -->
[21388]127 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
128 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
129 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
130 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
131 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
132 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
133 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
134 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
135 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
136 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
137 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
138 <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
[19006]139
[21623]140
[16173]141 <!-- version number -->
[21623]142 <if><bool><not><isset property="version"/></not></bool>
143 <fail>Version number not set. Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail>
[16173]144 </if>
145 <property name="app.version" value="${version}"/>
146
[20337]147 <!-- work out rk.os -->
148 <if>
149 <bool>
150 <or>
151 <equals arg1="${rk.os}" arg2="linux"/>
152 <equals arg1="${rk.os}" arg2="mac"/>
153 <equals arg1="${rk.os}" arg2="windows"/>
154 </or>
155 </bool>
156 <echo>Using user-specified value for rk.os: '${rk.os}'</echo>
157
158 <else><if>
159 <bool><equals arg1="${os.name}" arg2="Linux"/></bool>
160 <property name="rk.os" value="linux"/>
161
162 <else><if>
163 <bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool>
164 <property name="rk.os" value="mac"/>
165
[28301]166 <else><!--<if>
[20337]167 <bool>
168 <or>
169 <equals arg1="${os.name}" arg2="Windows 95"/>
170 <equals arg1="${os.name}" arg2="Windows 98"/>
171 <equals arg1="${os.name}" arg2="Windows 2000"/>
172 <equals arg1="${os.name}" arg2="Windows XP"/>
173 <equals arg1="${os.name}" arg2="Windows NT"/>
174 <equals arg1="${os.name}" arg2="Windows ME"/>
175 <equals arg1="${os.name}" arg2="Windows Vista"/>
[22092]176 <equals arg1="${os.name}" arg2="Windows 7"/>
[20337]177 </or>
178 </bool>
[28301]179 <property name="rk.os" value="windows"/>-->
180 <if>
181 <bool><os family="windows"/></bool>
182 <property name="rk.os" value="windows"/>
183 <else>
[20337]184 <fail>Can't work out what to set rk.os to. Please report this to [email protected] . In the mean time, manually set rk.os to 'windows', 'mac', or 'linux' by reinvoking the release kit with, for example, '-Drk.os=windows'</fail>
185
186 </else></if></else></if></else></if></else></if>
187
[21593]188 <!-- set os.suffix and os.shell -->
[20337]189 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
[23641]190 <exec executable="uname" outputproperty="mac.arch">
191 <arg line="-p"/>
192 </exec>
193
194 <if><bool><equals arg1="${mac.arch}" arg2="powerpc"/></bool>
195 <property name="os.suffix" value="MacOS-ppc"/>
196 <property name="arch" value="-ppc"/>
197 <else>
198 <property name="os.suffix" value="MacOS-intel"/>
199 <property name="arch" value="-intel"/>
200 </else>
201 </if>
202
[21593]203 <property name="os.shell" value="darwin"/>
[20337]204 </if>
[23641]205 <property name="arch" value=""/>
206
[20337]207 <property name="os.suffix" value="${rk.os}"/>
[21593]208 <property name="os.shell" value="${rk.os}"/>
[20337]209
[21623]210 <!-- set os.script.format -->
211 <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
212 <property name="os.script.format" value="sh"/>
213 <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
214 <property name="os.script.format" value="bat"/>
215 </if></else></if>
216
[16681]217 <!-- show important properties -->
[23493]218 <echo level="info">Version (version): ${version}${version-extra}</echo>
[21608]219 <echo level="info">Major Version (version.major): ${version.major}</echo>
[16681]220 <echo level="info">Branch Path (branch.path): ${branch.path}</echo>
[19152]221 <echo level="info">Date (date): ${date}</echo>
[16681]222 <echo level="info">Current Month (current.month): ${current.month}</echo>
223 <echo level="info">Current Year (current.year): ${current.year}</echo>
[20337]224 <echo level="info">Operating System (rk.os): ${rk.os}</echo>
225 <echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo>
[21634]226 <echo level="info">Operating System Script format (os.script.format): ${os.script.format}</echo>
227 <echo level="info">Operating System Shell (os.shell): ${os.shell}</echo>
[21623]228 <!--
229 <echo level="info">Current Date</echo>
230 <echo level="info">ar: ${month.ar} ${current.year}</echo>
231 <echo level="info">ca: ${month.el} ${current.year}</echo>
232 <echo level="info">el: ${month.el} ${current.year}</echo>
233 <echo level="info">es: ${month.es} ${current.year}</echo>
234 <echo level="info">fr: ${month.fr} ${current.year}</echo>
235 <echo level="info">lv: ${month.lv} ${current.year}</echo>
236 <echo level="info">mr: ${month.mr} ${current.year}</echo>
237 <echo level="info">ro: ${month.ro} ${current.year}</echo>
238 <echo level="info">ru: ${month.ru} ${current.year}</echo>
239 <echo level="info">vi: ${month.vi} ${current.year}</echo>
240 <echo level="info">zh: ${month.zh} ${current.year}</echo>
241 <echo level="info">default: (${month.default} ${current.year})</echo>
242 -->
[16173]243 </target>
244
[21630]245 <!-- show the core properties of all release-kits -->
246 <target name="core-properties">
[21652]247 <echo>version (required) the version string for the release</echo>
248 <echo>branch.path (optional) the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo>
249 <echo>branch.revision (optional) the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo>
[21630]250 </target>
251
[21623]252 <!-- a target to strip any directory of .svn folders -->
[29393]253 <target name="strip-svn-dirs" unless="${keep.src}">
[17346]254 <delete includeemptydirs="true">
255 <fileset dir="${dir}" defaultexcludes="false">
256 <include name="**/.svn/**" />
257 <include name="**/.svn/" />
258 <include name=".svn/**" />
259 <include name=".svn/" />
260 </fileset>
261 </delete>
262 </target>
263
[21623]264 <!-- target to insert the uninstaller into 'compiled' and compile it -->
265 <target name="insert-and-compile-uninstaller">
[17589]266
[17898]267 <!-- create working build directory -->
[21623]268 <mkdir dir="compiled/uninstaller/build/resources" />
[23210]269 <mkdir dir="compiled/uninstall"/>
270
[17898]271 <!-- copile to build -->
[35651]272 <javac includeantruntime="false"
273 srcdir="${rk.home}/shared/core/uninstaller"
274 destdir="compiled/uninstaller/build" >
275 <compilerarg line="${compile.javac.flags}"/>
276 </javac>
[17898]277
278 <!-- copy language bundle into place -->
279 <native2ascii
[35651]280 implementation="default"
281 src="${rk.home}/shared/core/language-strings"
282 dest="compiled/uninstaller/build/resources"/>
[17898]283
284 <!-- jar it all up -->
[35651]285 <jar destfile="compiled/uninstall/uninst.jar"
286 manifest="${rk.home}/shared/core/uninstaller/manifest.mf"
287 basedir="compiled/uninstaller/build" />
[17898]288
[21630]289 <!-- clean up build directory -->
290 <delete dir="compiled/uninstaller"/>
291
[21623]292 <!-- put the associated script in place -->
[23210]293 <copy file="${rk.home}/shared/core/uninstaller/Uninstall.${os.script.format}" todir="compiled/uninstall"/>
[17898]294
295 </target>
296
[21623]297 <!-- target to set all the version numbers in a greenstone2 or gs2build directory -->
[20205]298 <target name="gsdl-set-version-numbers">
[19472]299
[20213]300 <if><bool><available file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h"/></bool>
[23493]301 <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}${version-extra}&quot;" />
[21623]302 </if>
[20205]303
[20214]304 <if><bool><available file="${gsdl.basedir}/etc/VERSION"/></bool>
[23493]305 <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}${version-extra}" />
[21623]306 </if>
[20205]307
[20214]308 <if><bool><available file="${gsdl.basedir}/lib/java/server.properties"/></bool>
[23493]309 <rsr file="${gsdl.basedir}/lib/java/server.properties" pattern="^(Server2Control.Version[:=]).*" replacement="$1${version}${version-extra}" />
[21623]310 </if>
[20205]311
[20214]312 <if><bool><available file="${gsdl.basedir}/lib/java/log4j.properties.in"/></bool>
[20213]313 <rsr file="${gsdl.basedir}/lib/java/log4j.properties.in" pattern="^(log4j.category.org.greenstone.server[:=].*)INFO(.*)" replacement="$1WARN$2" />
[21623]314 </if>
[20205]315
316 <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
317
318 </target>
319
[21623]320 <!-- target to set dates in readme files -->
[20213]321 <target name="gsdl-set-dates-in-readmes">
322
323 <!-- en -->
324 <if><bool><available file="${gsdl.basedir}/READMEen.txt"/></bool>
325 <rsr file="${gsdl.basedir}/READMEen.txt">
326 <job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
[23493]327 <job pattern="^(Version\s*)(.*)" replacement="$1${version}${version-extra}" />
[20213]328 </rsr>
329 </if>
330
331 <!-- ar -->
332 <if><bool><available file="${gsdl.basedir}/READMEar.txt"/></bool>
333 <rsr file="${gsdl.basedir}/READMEar.txt">
334 <job pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
[23493]335 <job pattern="(النسخه : \s*)(.*)" replacement="$1${version}${version-extra}"/>
[20213]336 </rsr>
337 </if>
338
339 <!-- es -->
340 <if><bool><available file="${gsdl.basedir}/READMEes.txt"/></bool>
341 <rsr file="${gsdl.basedir}/READMEes.txt">
342 <job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
[23493]343 <job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}${version-extra}"/>
[20213]344 </rsr>
345 </if>
346
347 <!-- fr -->
348 <if><bool><available file="${gsdl.basedir}/READMEfr.txt"/></bool>
349 <rsr file="${gsdl.basedir}/READMEfr.txt">
350 <job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
[23493]351 <job pattern="^(Version\s*)(.*)" replacement="$1${version}${version-extra}"/>
[20213]352 </rsr>
353 </if>
354
355 <!-- ru -->
356 <if><bool><available file="${gsdl.basedir}/READMEru.txt"/></bool>
357 <rsr file="${gsdl.basedir}/READMEru.txt">
358 <job pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
[23493]359 <job pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}${version-extra}"/>
[20213]360 </rsr>
361 </if>
362
363 </target>
364
[21648]365 <!-- target to set version numbers in gli -->
366 <target name="gli-set-version-numbers">
[23811]367 <if><bool><not><equals arg1="${with.gli.and.gems}" arg2="false"/></not></bool>
[21648]368 <!-- DICTIOANRY FILES (AboutDialog.Date) -->
369 <echo level="info">Changing AboutDialog.Date in all dictionaries</echo>
370
371 <rsr file="${glibasedir}/classes/dictionary_ar.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ar} ${current.year})" />
372 <rsr file="${glibasedir}/classes/dictionary_ca.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ca} de ${current.year})" />
373 <rsr file="${glibasedir}/classes/dictionary_el.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.el} ${current.year})" />
374 <rsr file="${glibasedir}/classes/dictionary_es.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.es} ${current.year})" />
375 <rsr file="${glibasedir}/classes/dictionary_fr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.fr} ${current.year})" />
376 <rsr file="${glibasedir}/classes/dictionary_lv.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.lv} ${current.year})" />
377 <rsr file="${glibasedir}/classes/dictionary_mr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.mr} ${current.year})" />
378 <rsr file="${glibasedir}/classes/dictionary_ro.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ro} ${current.year})" />
379 <rsr file="${glibasedir}/classes/dictionary_ru.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ru} ${current.year})" />
380 <rsr file="${glibasedir}/classes/dictionary_vi.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.vi} ${current.year})" />
381 <rsr file="${glibasedir}/classes/dictionary_zh.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.zh} ${current.year})" />
382 <rsr file="${glibasedir}/classes/dictionary.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.default} ${current.year})" />
383
384 <!-- GLI GATHERER -->
385 <echo level="info">Changing version number in gli Gatherer</echo>
[23493]386 <rsr file="${glibasedir}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${version}${version-extra}&quot;"/>
[21648]387
388 <!-- CONFIG XML FILES -->
389 <echo level="info">Changing configuration version in classes/xml/config.xml</echo>
[23493]390 <rsr file="${glibasedir}/classes/xml/config.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}${version-extra}$2"/>
[21648]391
392 <echo level="info">Changing configuration version in gli/classes/xml/configRemote.xml</echo>
[23493]393 <rsr file="${glibasedir}/classes/xml/configRemote.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}${version-extra}$2"/>
[23811]394 </if>
[21648]395 </target>
396
397 <!-- target to tidy gli up for distribution -->
[29393]398 <target name="gli-tidy-for-dist" unless="${keep.src}">
[21648]399 <!-- delete unneeded things -->
400 <delete file="${glibasedir}/.greenstonestore"/>
401 <delete dir="${glibasedir}/classes/META-INF"/>
402 <delete dir="${glibasedir}/classes/org"/>
403 <delete dir="${glibasedir}/classes/images"/>
404 <delete dir="${glibasedir}/jar"/>
405 </target>
406
407
[21623]408 <!-- target to archive and compress a given component -->
409 <target name="create-component">
[23210]410 <mkdir dir="components"/>
[23587]411
[23242]412 <!-- the PatternSet To File task takes one or more patternsets and outputs to a file all of the files it includes -->
413 <pstf dir="compiled" outfile="compiled/uninstall/${component}.uninstall" toplevelonly="true">
[23587]414 <patternset refid="greenstone${version.major}.${component}${ext-x64}.component"/>
[23210]415 </pstf>
416
417 <zip destfile="components/${component}.comp" compress="false">
418 <zipfileset dir="compiled">
[23587]419 <patternset refid="greenstone${version.major}.${component}${ext-x64}.component"/>
[23210]420 </zipfileset>
421 </zip>
[22325]422
[23210]423 <!-- windows -->
424 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
[22145]425 <exec executable="${rk.home}/shared/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec>
426
427 <!-- linux, mac -->
428 <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
429 <sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/>
[20532]430
431 <!-- else warn -->
432 <else>
[22145]433 <fail>this target does not support this os (was a new release-kit os added?)</fail>
434
435 </else></if></else></if>
[23587]436 </target>
[22145]437
[16173]438</project>
Note: See TracBrowser for help on using the repository browser.