Index: /main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml	(revision 21648)
@@ -19,6 +19,6 @@
 	
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="../core/ant-scripts/init.xml"/>
-	<import file="../greenstone2/ant-scripts/rk2-targets.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
+	<import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
 
 	<!-- figure out where the compiled software is coming from -->
Index: /main/trunk/release-kits/kits/derk/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/derk/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/derk/ant-scripts/build.xml	(revision 21648)
@@ -19,5 +19,5 @@
 	
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="../core/ant-scripts/init.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
 
 	<!-- THE MAIN TARGET -->
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21648)
@@ -13,7 +13,7 @@
 
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="${rk.home}/shared/core/ant-scripts/init.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
 	<import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
-	<import file="${rk.home}/shared/greenstone2/ant-scripts/rk2-targets.xml"/>
+	<import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
 
 	<import file="compile.xml"/>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 21648)
@@ -267,6 +267,8 @@
 		<!-- delete unneeded files -->
 		<delete dir="compiled/uninstaller" />
-		<delete file="compiled/gli/.greenstonestore" />
 		<delete file="compiled/bin/java/SignedGatherer.jar" />
+
+		<!-- tidy up gli -->
+		<antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></target>
 
 		<!-- mac and linux: insert export to cdrom package -->
Index: /main/trunk/release-kits/kits/rk3/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk3/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/rk3/ant-scripts/build.xml	(revision 21648)
@@ -13,7 +13,7 @@
 
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="${rk.home}/shared/core/ant-scripts/init.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
 	<import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
-	<import file="${rk.home}/shared/greenstone2/ant-scripts/rk3-targets.xml"/>
+	<import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone3-shared.xml"/>
 
 	<import file="compile.xml"/>
Index: /main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml	(revision 21648)
@@ -3,5 +3,5 @@
 
 	<import file="${basedir}/compiled/resources/xml/components.xml"/>
-	<import file="${rk.home}/core/ant-scripts/init.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
 
 	<target name="create-components">
Index: /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml	(revision 21648)
@@ -19,7 +19,7 @@
 	
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="../core/ant-scripts/init.xml"/>
-	<import file="../core/ant-scripts/operations-on-gli.xml"/>
-	<import file="../greenstone2/ant-scripts/rk2-targets.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
+	<import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
 
 	<!-- THE MAIN TARGET -->
Index: /main/trunk/release-kits/kits/sork3/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/sork3/ant-scripts/build.xml	(revision 21647)
+++ /main/trunk/release-kits/kits/sork3/ant-scripts/build.xml	(revision 21648)
@@ -19,7 +19,7 @@
 	
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="../core/ant-scripts/init.xml"/>
-	<import file="../core/ant-scripts/operations-on-gli.xml"/>
-	<import file="../greenstone3/ant-scripts/rk3-targets.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
+	<import file="${rk.home}/shared/greenstone3/ant-scripts/greenstone3-shared.xml"/>
 
 	<!-- helper constant -->
@@ -73,7 +73,9 @@
 	<target name="insert-winbin">
 		<delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/>
-		<svn>
-			<export srcurl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="distributions/${dist.dirname}/gs2build/bin/windows"/>
-		</svn>
+		<exec executable="svn">
+			<arg value="export"/>
+			<arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
+			<arg value="distributions/${dist.dirname}/gs2build/bin/windows"/>
+		</exec>
 		<delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
 		<delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
Index: in/trunk/release-kits/shared/core/ant-scripts/init.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/init.xml	(revision 21647)
+++ 	(revision )
@@ -1,338 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="rk-init">
-
-	<!-- CHECK PRE-CONDITIONS  -->
-	<target name="init">
-
-		<!-- load in static properties from build.properties -->
-		<property file="${rk.name}-build.properties" />
-
-		<!-- CONSTANTS (overridable in build.properties) -->
-
-		<!-- svn root -->
-		<property name="svn.root" value="http://svn.greenstone.org" />
-
-		<!-- default revision and branch path -->
-		<property name="branch.path" value="trunk" />
-		<property name="branch.revision" value="HEAD" />
-	
-		<!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
-		<property name="java.min.version" value="1.4.0_00"/>
-
-		<!-- create a localised basedir property -->
-		<path id="basedir.path"><pathelement location="${basedir}"/></path>
-		<property name="basedir.local" refid="basedir.path"/>
-
-		<!-- size of resource chunks (windows wrapper) -->
-		<property name="resources.chunksize" value="8388608"/>
-
-		<!-- the extra space for the dmg image in KB (mac wrapper) -->
-        	<property name="dmg.overhead" value="2048"/>
-
-		<!-- current date and time -->
-		<tstamp>
-			<format property="current.month" pattern="MMM"/>
-			<format property="current.year" pattern="yyyy"/>
-			<format property="date" pattern="yyyy.MM.dd"/>
-		</tstamp>
-
-		<!-- BUNDLED JAVA INFO -->
-		<!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
-		<!-- change this info when the bundled version changes -->
-		<property name="java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
-
-		<!-- linux -->
-		<property name="linux-java.installer" value="jre_bin"/>
-		<property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
-		<property name="component.bytesize.linux-java" value="101245987"/> <!-- set this to the size of the extract archive -->
-
-		<!-- windows -->
-		<property name="windows-java.installer" value="jre.exe"/>
-		<property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
-		<property name="component.bytesize.windows-java" value="75000000"/> <!-- set this to the size of the extract archive -->
-
-		<!-- version numbers of other bundled things -->
-		<property name="bundled.version.imagemagick" value="6.4.3"/>
-		<property name="bundled.version.ghostscript" value="8.63"/>
-		<property name="bundled.version.tomcat" value="6.0.20"/>
-	
-		<!-- CLASSPATH -->
-		<path id="project.classpath">
-
-			<!-- our classes -->
-			<fileset dir="${rk.home}/shared/core">
-				<include name="ant-tasks/antelope/AntelopeTasks_3.4.2.jar"/>
-				<include name="ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar"/>
-				<include name="ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar"/>
-				<include name="ant-tasks/greenstone/anttasks.jar"/>
-				<include name="ant-tasks/7z-ant/7z.jar"/>
-				<include name="lib/crypt.jar"/>
-				<include name="lib/serializer.jar"/>
-				<include name="lib/xalan.jar"/>
-				<include name="lib/xercesImpl.jar"/>
-				<include name="lib/xml-apis.jar"/>
-				<include name="ant-installer/lib/ant-installer-ext.jar"/>
-				<include name="ant-installer/lib/ant-installer.jar"/>
-			</fileset>
-
-		</path>
-
-		<!-- SELF DEFINED TASKS AND TYPES -->
-		<taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
-		<taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
-		<taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
-		<taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
-		<taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
-		<typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
-		<typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
-		<typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
-		<typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
-	
-		<!-- DATES IN DIFFERENT LANGUAGES -->
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
-		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
-
-
-		<!-- version number -->
-		<if><bool><not><isset property="version"/></not></bool>
-			<fail>Version number not set. Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail>
-		</if>
-		<property name="app.version" value="${version}"/>
-
-		<!-- work out rk.os -->
-		<if>
-			<bool>
-				<or>
-					<equals arg1="${rk.os}" arg2="linux"/>
-					<equals arg1="${rk.os}" arg2="mac"/>
-					<equals arg1="${rk.os}" arg2="windows"/>
-				</or>
-			</bool>
-			<echo>Using user-specified value for rk.os: '${rk.os}'</echo>
-
-		<else><if>
-			<bool><equals arg1="${os.name}" arg2="Linux"/></bool>
-			<property name="rk.os" value="linux"/>
-
-		<else><if>
-			<bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool>
-			<property name="rk.os" value="mac"/>
-
-		<else><if>
-			<bool>
-				<or>
-					<equals arg1="${os.name}" arg2="Windows 95"/>
-					<equals arg1="${os.name}" arg2="Windows 98"/>
-					<equals arg1="${os.name}" arg2="Windows 2000"/>
-					<equals arg1="${os.name}" arg2="Windows XP"/>
-					<equals arg1="${os.name}" arg2="Windows NT"/>
-					<equals arg1="${os.name}" arg2="Windows ME"/>
-					<equals arg1="${os.name}" arg2="Windows Vista"/>
-				</or>
-			</bool>
-			<property name="rk.os" value="windows"/>
-
-		<else>
-			<fail>Can't work out what to set rk.os to. Please report this to greenstone_team@cs.waikato.ac.nz . 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>
-
-		</else></if></else></if></else></if></else></if>
-
-		<!-- set os.suffix and os.shell -->
-		<if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-			<property name="os.suffix" value="MacOS-intel"/>
-			<property name="os.shell" value="darwin"/>
-		</if>
-		<property name="os.suffix" value="${rk.os}"/>
-		<property name="os.shell" value="${rk.os}"/>
-
-		<!-- set os.script.format -->
-		<if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<property name="os.script.format" value="sh"/>
-		<else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<property name="os.script.format" value="bat"/>
-		</if></else></if>
-
-		<!-- show important properties -->
-		<echo level="info">Version (version): ${version}</echo>
-		<echo level="info">Major Version (version.major): ${version.major}</echo>
-		<echo level="info">Branch Path (branch.path): ${branch.path}</echo>
-		<echo level="info">Date (date): ${date}</echo>
-		<echo level="info">Current Month (current.month): ${current.month}</echo>
-		<echo level="info">Current Year (current.year): ${current.year}</echo>
-		<echo level="info">Operating System (rk.os): ${rk.os}</echo>
-		<echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo>
-		<echo level="info">Operating System Script format (os.script.format): ${os.script.format}</echo>
-		<echo level="info">Operating System Shell (os.shell): ${os.shell}</echo>
-		<!--
-		<echo level="info">Current Date</echo>
-		<echo level="info">ar: ${month.ar} ${current.year}</echo>
-		<echo level="info">ca: ${month.el} ${current.year}</echo>
-		<echo level="info">el: ${month.el} ${current.year}</echo>
-		<echo level="info">es: ${month.es} ${current.year}</echo>
-		<echo level="info">fr: ${month.fr} ${current.year}</echo>
-		<echo level="info">lv: ${month.lv} ${current.year}</echo>
-		<echo level="info">mr: ${month.mr} ${current.year}</echo>
-		<echo level="info">ro: ${month.ro} ${current.year}</echo>
-		<echo level="info">ru: ${month.ru} ${current.year}</echo>
-		<echo level="info">vi: ${month.vi} ${current.year}</echo>
-		<echo level="info">zh: ${month.zh} ${current.year}</echo>
-		<echo level="info">default: (${month.default} ${current.year})</echo>
-		-->
-	</target>
-
-	<!-- show the core properties of all release-kits -->
-	<target name="core-properties">
-		<echo>Required Properties:</echo>
-		<echo>version             the version string for the release</echo>
-		<echo/>
-		<echo>Optional Properties:</echo>
-		<echo>branch.path         the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo>
-		<echo>branch.revision     the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo>
-		<echo/>
-	</target>
-
-	<!-- a target to strip any directory of .svn folders -->
-	<target name="strip-svn-dirs">
-		<delete includeemptydirs="true">
-			<fileset dir="${dir}" defaultexcludes="false">
-				<include name="**/.svn/**" />
-				<include name="**/.svn/" />
-				<include name=".svn/**" />
-				<include name=".svn/" />
-			</fileset>
-		</delete>
-	</target>
-
-	<!-- target to insert the uninstaller into 'compiled' and compile it -->
-	<target name="insert-and-compile-uninstaller">
-
-		<!-- create working build directory -->
-		<mkdir dir="compiled/uninstaller/build/resources" />
-
-		<!-- copile to build -->
-		<javac
-			srcdir="${rk.home}/shared/core/uninstaller"
-			destdir="compiled/uninstaller/build" />
-
-		<!-- copy language bundle into place -->
-		<native2ascii
-			implementation="sun"
-			src="${rk.home}/shared/core/language-strings"
-			dest="compiled/uninstaller/build/resources"/>
-
-		<!-- jar it all up -->
-		<jar
-			destfile="compiled/uninst.jar"
-			manifest="${rk.home}/shared/core/uninstaller/manifest.mf"
-			basedir="compiled/uninstaller/build" />
-
-		<!-- clean up build directory -->
-		<delete dir="compiled/uninstaller"/>
-
-		<!-- put the associated script in place -->
-		<copy file="${rk.home}/shared/core/uninstaller/Uninstall.${os.script.format}" todir="compiled"/>
-
-	</target>
-
-	<!-- target to set all the version numbers in a greenstone2 or gs2build directory -->
-	<target name="gsdl-set-version-numbers">
-
-		<if><bool><available file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h"/></bool>
-			<rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
-		</if>
-
-		<if><bool><available file="${gsdl.basedir}/etc/VERSION"/></bool>
-			<rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
-		</if>
-
-		<if><bool><available file="${gsdl.basedir}/lib/java/server.properties"/></bool>
-			<rsr file="${gsdl.basedir}/lib/java/server.properties" pattern="^(Server2Control.Version[:=]).*" replacement="$1${version}" />
-		</if>
-
-		<if><bool><available file="${gsdl.basedir}/lib/java/log4j.properties.in"/></bool>
-			<rsr file="${gsdl.basedir}/lib/java/log4j.properties.in" pattern="^(log4j.category.org.greenstone.server[:=].*)INFO(.*)" replacement="$1WARN$2" />
-		</if>
-
-		<antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
-
-	</target>
-
-	<!-- target to set dates in readme files -->
-	<target name="gsdl-set-dates-in-readmes">
-
-		<!-- en -->
-		<if><bool><available file="${gsdl.basedir}/READMEen.txt"/></bool>
-			<rsr file="${gsdl.basedir}/READMEen.txt">
-				<job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
-				<job pattern="^(Version\s*)(.*)" replacement="$1${version}" />
-			</rsr>
-		</if>
-
-		<!-- ar -->
-		<if><bool><available file="${gsdl.basedir}/READMEar.txt"/></bool>
-			<rsr file="${gsdl.basedir}/READMEar.txt">
-				<job pattern="(Ø§ÙØªØ§Ø±ÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
-				<job pattern="(Ø§ÙÙØ³Ø®Ù : \s*)(.*)" replacement="$1${version}"/>
-			</rsr>
-		</if>
-
-		<!-- es -->
-		<if><bool><available file="${gsdl.basedir}/READMEes.txt"/></bool>
-			<rsr file="${gsdl.basedir}/READMEes.txt">
-				<job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
-				<job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}"/>
-			</rsr>
-		</if>
-
-		<!-- fr -->
-		<if><bool><available file="${gsdl.basedir}/READMEfr.txt"/></bool>
-			<rsr file="${gsdl.basedir}/READMEfr.txt">
-				<job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
-				<job pattern="^(Version\s*)(.*)" replacement="$1${version}"/>
-			</rsr>
-		</if>
-
-		<!-- ru -->
-		<if><bool><available file="${gsdl.basedir}/READMEru.txt"/></bool>
-			<rsr file="${gsdl.basedir}/READMEru.txt">
-				<job pattern="^(ÐÐ°ÑÐ°\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
-				<job pattern="^(ÐÐµÑÑÐžÑ\s*)(.*)" replacement="$1${version}"/>
-			</rsr>
-		</if>
-
-	</target>
-
-	<!-- target to archive and compress a given component -->
-	<target name="create-component">
-		<mkdir dir="components"/>
-		<zip destfile="components/${component}.comp" compress="false">
-			<zipfileset dir="compiled">
-				<patternset refid="greenstone${version.major}.${component}.component"/>
-			</zipfileset>
-		</zip>
-		<!-- windows -->
-		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<exec executable="${rk.home}/shared/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec>
-		
-		<!-- linux, mac -->
-		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/>
-
-		<!-- else warn -->
-		<else>
-			<fail>this target does not support this os (was a new release-kit os added?)</fail>
-
-		</else></if></else></if>
-	</target>	
-
-</project>
Index: in/trunk/release-kits/shared/core/ant-scripts/operations-on-gli.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/operations-on-gli.xml	(revision 21647)
+++ 	(revision )
@@ -1,50 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="operations-on-gli">
-
-	<target name="gli-set-version-numbers">
-
-			<!-- DICTIOANRY FILES (AboutDialog.Date) -->
-			<echo level="info">Changing AboutDialog.Date in all dictionaries</echo>
-
-			<rsr file="${glibasedir}/classes/dictionary_ar.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ar} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_ca.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ca} de ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_el.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.el} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_es.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.es} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_fr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.fr} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_lv.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.lv} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_mr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.mr} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_ro.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ro} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_ru.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ru} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_vi.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.vi} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary_zh.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.zh} ${current.year})" />
-			<rsr file="${glibasedir}/classes/dictionary.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.default} ${current.year})" />
-
-			<!-- GLI GATHERER -->
-			<echo level="info">Changing version number in gli Gatherer</echo>
-			<rsr file="${glibasedir}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${version}&quot;"/>
-
-			<!-- CONFIG XML FILES -->
-			<echo level="info">Changing configuration version in classes/xml/config.xml</echo>
-			<rsr file="${glibasedir}/classes/xml/config.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
-
-			<echo level="info">Changing configuration version in gli/classes/xml/configRemote.xml</echo>
-			<rsr file="${glibasedir}/classes/xml/configRemote.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
-
-	</target>
-
-	<target name="gli-tidy-for-dist">
-    <!-- delete unneeded things -->
-    <delete dir="${glibasedir}/classes/META-INF"/>
-    <delete dir="${glibasedir}/classes/org"/>
-    <delete dir="${glibasedir}/classes/xml"/>
-    <delete dir="${glibasedir}/classes/images"/>
-    <delete dir="${glibasedir}/metadata"/>
-    <delete dir="${glibasedir}/help"/>
-    <delete dir="${glibasedir}/jar"/>
-    <delete dir="${glibasedir}/lib"/>
-		<if><bool><not><equals arg1="windows" arg2="${rk.os}"/></not></bool>
-	    <delete dir="${glibasedir}/winutil"/>
-		</if>
-	</target>
-
-</project>
Index: /main/trunk/release-kits/shared/core/ant-scripts/shared.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 21648)
+++ /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 21648)
@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="rk-init">
+
+	<!-- CHECK PRE-CONDITIONS  -->
+	<target name="init">
+
+		<!-- load in static properties from build.properties -->
+		<property file="${rk.name}-build.properties" />
+
+		<!-- CONSTANTS (overridable in build.properties) -->
+
+		<!-- svn root -->
+		<property name="svn.root" value="http://svn.greenstone.org" />
+
+		<!-- default revision and branch path -->
+		<property name="branch.path" value="trunk" />
+		<property name="branch.revision" value="HEAD" />
+	
+		<!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
+		<property name="java.min.version" value="1.4.0_00"/>
+
+		<!-- create a localised basedir property -->
+		<path id="basedir.path"><pathelement location="${basedir}"/></path>
+		<property name="basedir.local" refid="basedir.path"/>
+
+		<!-- size of resource chunks (windows wrapper) -->
+		<property name="resources.chunksize" value="8388608"/>
+
+		<!-- the extra space for the dmg image in KB (mac wrapper) -->
+        	<property name="dmg.overhead" value="2048"/>
+
+		<!-- current date and time -->
+		<tstamp>
+			<format property="current.month" pattern="MMM"/>
+			<format property="current.year" pattern="yyyy"/>
+			<format property="date" pattern="yyyy.MM.dd"/>
+		</tstamp>
+
+		<!-- BUNDLED JAVA INFO -->
+		<!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
+		<!-- change this info when the bundled version changes -->
+		<property name="java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
+
+		<!-- linux -->
+		<property name="linux-java.installer" value="jre_bin"/>
+		<property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
+		<property name="component.bytesize.linux-java" value="101245987"/> <!-- set this to the size of the extract archive -->
+
+		<!-- windows -->
+		<property name="windows-java.installer" value="jre.exe"/>
+		<property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
+		<property name="component.bytesize.windows-java" value="75000000"/> <!-- set this to the size of the extract archive -->
+
+		<!-- version numbers of other bundled things -->
+		<property name="bundled.version.imagemagick" value="6.4.3"/>
+		<property name="bundled.version.ghostscript" value="8.63"/>
+		<property name="bundled.version.tomcat" value="6.0.20"/>
+	
+		<!-- CLASSPATH -->
+		<path id="project.classpath">
+
+			<!-- our classes -->
+			<fileset dir="${rk.home}/shared/core">
+				<include name="ant-tasks/antelope/AntelopeTasks_3.4.2.jar"/>
+				<include name="ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar"/>
+				<include name="ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar"/>
+				<include name="ant-tasks/greenstone/anttasks.jar"/>
+				<include name="ant-tasks/7z-ant/7z.jar"/>
+				<include name="lib/crypt.jar"/>
+				<include name="lib/serializer.jar"/>
+				<include name="lib/xalan.jar"/>
+				<include name="lib/xercesImpl.jar"/>
+				<include name="lib/xml-apis.jar"/>
+				<include name="ant-installer/lib/ant-installer-ext.jar"/>
+				<include name="ant-installer/lib/ant-installer.jar"/>
+			</fileset>
+
+		</path>
+
+		<!-- SELF DEFINED TASKS AND TYPES -->
+		<taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
+		<taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
+		<taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
+		<taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
+		<taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
+		<typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
+		<typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
+		<typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
+		<typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
+	
+		<!-- DATES IN DIFFERENT LANGUAGES -->
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
+		<get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
+
+
+		<!-- version number -->
+		<if><bool><not><isset property="version"/></not></bool>
+			<fail>Version number not set. Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail>
+		</if>
+		<property name="app.version" value="${version}"/>
+
+		<!-- work out rk.os -->
+		<if>
+			<bool>
+				<or>
+					<equals arg1="${rk.os}" arg2="linux"/>
+					<equals arg1="${rk.os}" arg2="mac"/>
+					<equals arg1="${rk.os}" arg2="windows"/>
+				</or>
+			</bool>
+			<echo>Using user-specified value for rk.os: '${rk.os}'</echo>
+
+		<else><if>
+			<bool><equals arg1="${os.name}" arg2="Linux"/></bool>
+			<property name="rk.os" value="linux"/>
+
+		<else><if>
+			<bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool>
+			<property name="rk.os" value="mac"/>
+
+		<else><if>
+			<bool>
+				<or>
+					<equals arg1="${os.name}" arg2="Windows 95"/>
+					<equals arg1="${os.name}" arg2="Windows 98"/>
+					<equals arg1="${os.name}" arg2="Windows 2000"/>
+					<equals arg1="${os.name}" arg2="Windows XP"/>
+					<equals arg1="${os.name}" arg2="Windows NT"/>
+					<equals arg1="${os.name}" arg2="Windows ME"/>
+					<equals arg1="${os.name}" arg2="Windows Vista"/>
+				</or>
+			</bool>
+			<property name="rk.os" value="windows"/>
+
+		<else>
+			<fail>Can't work out what to set rk.os to. Please report this to greenstone_team@cs.waikato.ac.nz . 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>
+
+		</else></if></else></if></else></if></else></if>
+
+		<!-- set os.suffix and os.shell -->
+		<if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
+			<property name="os.suffix" value="MacOS-intel"/>
+			<property name="os.shell" value="darwin"/>
+		</if>
+		<property name="os.suffix" value="${rk.os}"/>
+		<property name="os.shell" value="${rk.os}"/>
+
+		<!-- set os.script.format -->
+		<if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
+			<property name="os.script.format" value="sh"/>
+		<else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
+			<property name="os.script.format" value="bat"/>
+		</if></else></if>
+
+		<!-- show important properties -->
+		<echo level="info">Version (version): ${version}</echo>
+		<echo level="info">Major Version (version.major): ${version.major}</echo>
+		<echo level="info">Branch Path (branch.path): ${branch.path}</echo>
+		<echo level="info">Date (date): ${date}</echo>
+		<echo level="info">Current Month (current.month): ${current.month}</echo>
+		<echo level="info">Current Year (current.year): ${current.year}</echo>
+		<echo level="info">Operating System (rk.os): ${rk.os}</echo>
+		<echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo>
+		<echo level="info">Operating System Script format (os.script.format): ${os.script.format}</echo>
+		<echo level="info">Operating System Shell (os.shell): ${os.shell}</echo>
+		<!--
+		<echo level="info">Current Date</echo>
+		<echo level="info">ar: ${month.ar} ${current.year}</echo>
+		<echo level="info">ca: ${month.el} ${current.year}</echo>
+		<echo level="info">el: ${month.el} ${current.year}</echo>
+		<echo level="info">es: ${month.es} ${current.year}</echo>
+		<echo level="info">fr: ${month.fr} ${current.year}</echo>
+		<echo level="info">lv: ${month.lv} ${current.year}</echo>
+		<echo level="info">mr: ${month.mr} ${current.year}</echo>
+		<echo level="info">ro: ${month.ro} ${current.year}</echo>
+		<echo level="info">ru: ${month.ru} ${current.year}</echo>
+		<echo level="info">vi: ${month.vi} ${current.year}</echo>
+		<echo level="info">zh: ${month.zh} ${current.year}</echo>
+		<echo level="info">default: (${month.default} ${current.year})</echo>
+		-->
+	</target>
+
+	<!-- show the core properties of all release-kits -->
+	<target name="core-properties">
+		<echo>Required Properties:</echo>
+		<echo>version             the version string for the release</echo>
+		<echo/>
+		<echo>Optional Properties:</echo>
+		<echo>branch.path         the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo>
+		<echo>branch.revision     the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo>
+		<echo/>
+	</target>
+
+	<!-- a target to strip any directory of .svn folders -->
+	<target name="strip-svn-dirs">
+		<delete includeemptydirs="true">
+			<fileset dir="${dir}" defaultexcludes="false">
+				<include name="**/.svn/**" />
+				<include name="**/.svn/" />
+				<include name=".svn/**" />
+				<include name=".svn/" />
+			</fileset>
+		</delete>
+	</target>
+
+	<!-- target to insert the uninstaller into 'compiled' and compile it -->
+	<target name="insert-and-compile-uninstaller">
+
+		<!-- create working build directory -->
+		<mkdir dir="compiled/uninstaller/build/resources" />
+
+		<!-- copile to build -->
+		<javac
+			srcdir="${rk.home}/shared/core/uninstaller"
+			destdir="compiled/uninstaller/build" />
+
+		<!-- copy language bundle into place -->
+		<native2ascii
+			implementation="sun"
+			src="${rk.home}/shared/core/language-strings"
+			dest="compiled/uninstaller/build/resources"/>
+
+		<!-- jar it all up -->
+		<jar
+			destfile="compiled/uninst.jar"
+			manifest="${rk.home}/shared/core/uninstaller/manifest.mf"
+			basedir="compiled/uninstaller/build" />
+
+		<!-- clean up build directory -->
+		<delete dir="compiled/uninstaller"/>
+
+		<!-- put the associated script in place -->
+		<copy file="${rk.home}/shared/core/uninstaller/Uninstall.${os.script.format}" todir="compiled"/>
+
+	</target>
+
+	<!-- target to set all the version numbers in a greenstone2 or gs2build directory -->
+	<target name="gsdl-set-version-numbers">
+
+		<if><bool><available file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h"/></bool>
+			<rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
+		</if>
+
+		<if><bool><available file="${gsdl.basedir}/etc/VERSION"/></bool>
+			<rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
+		</if>
+
+		<if><bool><available file="${gsdl.basedir}/lib/java/server.properties"/></bool>
+			<rsr file="${gsdl.basedir}/lib/java/server.properties" pattern="^(Server2Control.Version[:=]).*" replacement="$1${version}" />
+		</if>
+
+		<if><bool><available file="${gsdl.basedir}/lib/java/log4j.properties.in"/></bool>
+			<rsr file="${gsdl.basedir}/lib/java/log4j.properties.in" pattern="^(log4j.category.org.greenstone.server[:=].*)INFO(.*)" replacement="$1WARN$2" />
+		</if>
+
+		<antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
+
+	</target>
+
+	<!-- target to set dates in readme files -->
+	<target name="gsdl-set-dates-in-readmes">
+
+		<!-- en -->
+		<if><bool><available file="${gsdl.basedir}/READMEen.txt"/></bool>
+			<rsr file="${gsdl.basedir}/READMEen.txt">
+				<job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
+				<job pattern="^(Version\s*)(.*)" replacement="$1${version}" />
+			</rsr>
+		</if>
+
+		<!-- ar -->
+		<if><bool><available file="${gsdl.basedir}/READMEar.txt"/></bool>
+			<rsr file="${gsdl.basedir}/READMEar.txt">
+				<job pattern="(Ø§ÙØªØ§Ø±ÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
+				<job pattern="(Ø§ÙÙØ³Ø®Ù : \s*)(.*)" replacement="$1${version}"/>
+			</rsr>
+		</if>
+
+		<!-- es -->
+		<if><bool><available file="${gsdl.basedir}/READMEes.txt"/></bool>
+			<rsr file="${gsdl.basedir}/READMEes.txt">
+				<job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
+				<job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}"/>
+			</rsr>
+		</if>
+
+		<!-- fr -->
+		<if><bool><available file="${gsdl.basedir}/READMEfr.txt"/></bool>
+			<rsr file="${gsdl.basedir}/READMEfr.txt">
+				<job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
+				<job pattern="^(Version\s*)(.*)" replacement="$1${version}"/>
+			</rsr>
+		</if>
+
+		<!-- ru -->
+		<if><bool><available file="${gsdl.basedir}/READMEru.txt"/></bool>
+			<rsr file="${gsdl.basedir}/READMEru.txt">
+				<job pattern="^(ÐÐ°ÑÐ°\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
+				<job pattern="^(ÐÐµÑÑÐžÑ\s*)(.*)" replacement="$1${version}"/>
+			</rsr>
+		</if>
+
+	</target>
+
+	<!-- target to set version numbers in gli -->
+	<target name="gli-set-version-numbers">
+
+			<!-- DICTIOANRY FILES (AboutDialog.Date) -->
+			<echo level="info">Changing AboutDialog.Date in all dictionaries</echo>
+
+			<rsr file="${glibasedir}/classes/dictionary_ar.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ar} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_ca.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ca} de ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_el.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.el} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_es.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.es} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_fr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.fr} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_lv.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.lv} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_mr.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.mr} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_ro.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ro} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_ru.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.ru} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_vi.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.vi} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary_zh.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.zh} ${current.year})" />
+			<rsr file="${glibasedir}/classes/dictionary.properties" pattern="AboutDialog.Date:.*" replacement="AboutDialog.Date:(${month.default} ${current.year})" />
+
+			<!-- GLI GATHERER -->
+			<echo level="info">Changing version number in gli Gatherer</echo>
+			<rsr file="${glibasedir}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${version}&quot;"/>
+
+			<!-- CONFIG XML FILES -->
+			<echo level="info">Changing configuration version in classes/xml/config.xml</echo>
+			<rsr file="${glibasedir}/classes/xml/config.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
+
+			<echo level="info">Changing configuration version in gli/classes/xml/configRemote.xml</echo>
+			<rsr file="${glibasedir}/classes/xml/configRemote.xml" pattern="^(\s*&lt;Configuration.* version=&quot;)[^&quot;]*(&quot;.*&gt;)" replacement="$1${version}$2"/>
+
+	</target>
+
+	<!-- target to tidy gli up for distribution -->
+	<target name="gli-tidy-for-dist">
+		<!-- delete unneeded things -->
+		<delete file="${glibasedir}/.greenstonestore"/>		
+		<delete dir="${glibasedir}/classes/META-INF"/>
+		<delete dir="${glibasedir}/classes/org"/>
+		<delete dir="${glibasedir}/classes/xml"/>
+		<delete dir="${glibasedir}/classes/images"/>
+		<delete dir="${glibasedir}/metadata"/>
+		<delete dir="${glibasedir}/help"/>
+		<delete dir="${glibasedir}/jar"/>
+		<delete dir="${glibasedir}/lib"/>
+		<if><bool><not><equals arg1="windows" arg2="${rk.os}"/></not></bool>
+			<delete dir="${glibasedir}/winutil"/>
+		</if>
+	</target>
+
+
+	<!-- target to archive and compress a given component -->
+	<target name="create-component">
+		<mkdir dir="components"/>
+		<zip destfile="components/${component}.comp" compress="false">
+			<zipfileset dir="compiled">
+				<patternset refid="greenstone${version.major}.${component}.component"/>
+			</zipfileset>
+		</zip>
+		<!-- windows -->
+		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
+			<exec executable="${rk.home}/shared/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec>
+		
+		<!-- linux, mac -->
+		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
+			<sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/>
+
+		<!-- else warn -->
+		<else>
+			<fail>this target does not support this os (was a new release-kit os added?)</fail>
+
+		</else></if></else></if>
+	</target>	
+
+</project>
Index: /main/trunk/release-kits/shared/greenstone2/ant-scripts/greenstone2-shared.xml
===================================================================
--- /main/trunk/release-kits/shared/greenstone2/ant-scripts/greenstone2-shared.xml	(revision 21648)
+++ /main/trunk/release-kits/shared/greenstone2/ant-scripts/greenstone2-shared.xml	(revision 21648)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+		..........................................................
+		August 2008
+		Targets for Greenstone2 release kits
+		Oran Fry
+		..........................................................
+-->
+<project name="greenstone2-targets">
+
+	<target name="gs2-init">
+		<property name="server.exe.location" value="http://www.greenstone.org/caveat-emptor/server-${version}-candidate-${date}.exe" />
+		<echo message="server.exe.location:                    ${server.exe.location}"/>
+	</target>
+
+</project>
+	
Index: in/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml
===================================================================
--- /main/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml	(revision 21647)
+++ 	(revision )
@@ -1,17 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-		..........................................................
-		August 2008
-		Targets for Greenstone2 release kits
-		Oran Fry
-		..........................................................
--->
-<project name="greenstone2-targets">
-
-	<target name="gs2-init">
-		<property name="server.exe.location" value="http://www.greenstone.org/caveat-emptor/server-${version}-candidate-${date}.exe" />
-		<echo message="server.exe.location:                    ${server.exe.location}"/>
-	</target>
-
-</project>
-	
Index: /main/trunk/release-kits/shared/greenstone3/ant-scripts/greenstone3-shared.xml
===================================================================
--- /main/trunk/release-kits/shared/greenstone3/ant-scripts/greenstone3-shared.xml	(revision 21648)
+++ /main/trunk/release-kits/shared/greenstone3/ant-scripts/greenstone3-shared.xml	(revision 21648)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+		..........................................................
+		August 2008
+		Targets for Greenstone3 release kits
+		Oran Fry
+		..........................................................
+-->
+
+<project name="greenstone3-targets">
+
+	<target name="gs3-init">
+
+		<!-- don't let greenstone3 block and wait for user input to accept
+			the properties for the build -->
+		<property name="forward.properties.accepted" value="true"/>
+
+		<!-- make sure all c++ compilation is done statically on linux -->
+		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
+			<property name="forward.compile.static" value="true"/>
+		</if>
+
+		<!-- show the property set to be forwarded to greenstone3 -->
+		<echo>Properties to be forwarded to greenstone3 build</echo>
+		<echoproperties><propertyset refid="forward.properties"/></echoproperties>
+
+	</target>
+
+	<target name="greenstone3-set-version-numbers">
+		<rsr
+			file="${greenstone3basedir}/resources/java/global.properties.in"
+			pattern="@gsdl3version@"
+			replacement="${version}" />
+		<rsr
+			file="${greenstone3basedir}/resources/java/server.properties"
+			pattern="^(Server3Control\.Version=).*$"
+			replacement="$1${version}" />
+
+	</target>
+
+	<!--
+		unused. might need to find a way to get the system ant into the release, as ant no longer comes with the release kits
+	-->
+	<target name="insert-ant">
+
+		<!-- remove any existing ant -->
+		<delete dir="compiled/packages/ant"/>
+
+		<!-- windows copy -->
+		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
+			<copy todir="compiled/packages">
+				<fileset dir="${rk.home}/core" includes="ant/**/*"/>
+			</copy>
+
+		<!-- linux, mac copy-->
+		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
+			<exec executable="cp">
+				<arg value="-r"/>
+				<arg value="${rk.home}/core/ant"/>
+				<arg value="compiled/packages"/>
+			</exec>
+
+		<!-- otherwise fail -->
+		<else>
+			<fail>this target does not support the current os</fail>
+
+		</else></if></else></if>
+
+	</target>
+	
+	<!-- unused. this or something similar might need to go back in, to make the forward.properties permanent -->
+	<target name="generate-build-properties">
+		<copy file="${greenstone3.basedir}/build.properties.in" tofile="${greenstone3.basedir}/build.properties"/>
+		<if><bool><istrue value="${install.flax}"/></bool>
+			<rsr file="${greenstone3.basedir}/build.properties" pattern="^#install.flax\s*[=:].*" replacement="install.flax=true"/>
+		</if>
+		<if><bool><isset property="server.default.servlet"/></bool>
+			<rsr file="${greenstone3.basedir}/build.properties" pattern="^#?server.default.servlet\s*[=:].*" replacement="server.default.servlet=${server.default.servlet}"/>
+		</if>
+	</target>
+
+</project>
Index: in/trunk/release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml
===================================================================
--- /main/trunk/release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml	(revision 21647)
+++ 	(revision )
@@ -1,82 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-		..........................................................
-		August 2008
-		Targets for Greenstone3 release kits
-		Oran Fry
-		..........................................................
--->
-
-<project name="greenstone3-targets">
-
-	<target name="gs3-init">
-
-		<!-- don't let greenstone3 block and wait for user input to accept
-			the properties for the build -->
-		<property name="forward.properties.accepted" value="true"/>
-
-		<!-- make sure all c++ compilation is done statically on linux -->
-		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<property name="forward.compile.static" value="true"/>
-		</if>
-
-		<!-- show the property set to be forwarded to greenstone3 -->
-		<echo>Properties to be forwarded to greenstone3 build</echo>
-		<echoproperties><propertyset refid="forward.properties"/></echoproperties>
-
-	</target>
-
-	<target name="greenstone3-set-version-numbers">
-		<rsr
-			file="${greenstone3basedir}/resources/java/global.properties.in"
-			pattern="@gsdl3version@"
-			replacement="${version}" />
-		<rsr
-			file="${greenstone3basedir}/resources/java/server.properties"
-			pattern="^(Server3Control\.Version=).*$"
-			replacement="$1${version}" />
-
-	</target>
-
-	<!--
-		unused. might need to find a way to get the system ant into the release, as ant no longer comes with the release kits
-	-->
-	<target name="insert-ant">
-
-		<!-- remove any existing ant -->
-		<delete dir="compiled/packages/ant"/>
-
-		<!-- windows copy -->
-		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<copy todir="compiled/packages">
-				<fileset dir="${rk.home}/core" includes="ant/**/*"/>
-			</copy>
-
-		<!-- linux, mac copy-->
-		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<exec executable="cp">
-				<arg value="-r"/>
-				<arg value="${rk.home}/core/ant"/>
-				<arg value="compiled/packages"/>
-			</exec>
-
-		<!-- otherwise fail -->
-		<else>
-			<fail>this target does not support the current os</fail>
-
-		</else></if></else></if>
-
-	</target>
-	
-	<!-- unused. this or something similar might need to go back in, to make the forward.properties permanent -->
-	<target name="generate-build-properties">
-		<copy file="${greenstone3.basedir}/build.properties.in" tofile="${greenstone3.basedir}/build.properties"/>
-		<if><bool><istrue value="${install.flax}"/></bool>
-			<rsr file="${greenstone3.basedir}/build.properties" pattern="^#install.flax\s*[=:].*" replacement="install.flax=true"/>
-		</if>
-		<if><bool><isset property="server.default.servlet"/></bool>
-			<rsr file="${greenstone3.basedir}/build.properties" pattern="^#?server.default.servlet\s*[=:].*" replacement="server.default.servlet=${server.default.servlet}"/>
-		</if>
-	</target>
-
-</project>
