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