Index: main/trunk/release-kits/kits/rk2/ant-scripts/build.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21623)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21630)
@@ -9,4 +9,6 @@
 
 <project name="rk2-build" default="rk2">
+
+	<property name="version.major" value="2"/>
 
 	<!-- IMPORT OTHER ANT SCRIPTS -->
@@ -26,47 +28,6 @@
 	<target name="rk2" depends="init,gs2-init,compile,create-components,create-installer,wrap,create-cdrom-components"/>
 
-	<target name="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>
-
-	<!-- TODO: Move the targets below to the xml file that calls it -->
-
-	<target name="create-binary-zip-unix">
-		<property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
-
-		<delete dir="${binzip.dir}"/>
-		<exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
-
-		<!-- delete sourcecode -->
-		<delete dir="${binzip.dir}/common-src"/>
-		<delete dir="${binzip.dir}/build-src"/>
-		<delete dir="${binzip.dir}/runtime-src"/>
-
-		<!-- delete loose files -->
-		<delete>
-			<fileset
-				dir="${binzip.dir}"
-				includes="README*.txt,Uninstall.sh,uninst.jar,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in"
-				excludes="READMEen.txt"/>
-		</delete>
-
-	</target>
-
-	<target name="dist-unzip-packages">
-		<untar src="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/distributions/web/common-src/packages/sqlite" compression="gzip"/>
-		<delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
-	</target>
-
-	<target name="copy-greenstone2-installer-files">
-		<!-- the installer descriptors -->
-		<copy todir="installer" file="${rk.home}/kits/rk2/installer/antinstall-config.xml" overwrite="true"/>
-		<copy todir="installer" file="${rk.home}/kits/rk2/installer/build.xml" overwrite="true"/>
-	</target>
+	<!-- target to show properties in rk2-build.properties -->
+	<target name="properties" depends="core-properties"/>
 
 </project>
Index: main/trunk/release-kits/kits/rk2/ant-scripts/wrap.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/wrap.xml	(revision 21623)
+++ 	(revision )
@@ -1,168 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="rk2-wrap" default="wrap">
-
-	<target name="wrap" depends="init,gs2-init">
-
-		<mkdir dir="products"/>
-
-		<!-- windows -->
-		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-
-			<!--create a directory to build the wrapped installer in -->
-			<mkdir dir="${basedir}/wrapped-installer"/>
-
-			<!-- copy wrapper source into place -->
-			<copy todir="wrapped-installer" overwrite="true">
-				<fileset dir="${rk.home}/shared/windows/wrapper"/>
-				<fileset dir="${rk.home}/shared/greenstone2/wrapper" includes="*.bmp"/>
-				<fileset dir="${rk.home}/shared/greenstone2/icon" includes="icon.ico"/>
-				<fileset dir="${rk.home}/shared/core/search4j" includes="libsearch4j.cpp,libsearch4j.h"/>
-			</copy>
-
-			<!-- tweak files for wrapping -->
-			<rsr file="${basedir}/wrapped-installer/wrapper.cpp">
-				<job pattern="@java.installer@" replacement="${windows-java.installer}"/>
-				<job pattern="@java.min.version@" replacement="${java.min.version}"/>
-				<job pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
-				<job pattern="@java.extracted@" replacement="${java.extracted}"/>
-			</rsr>
-
-			<!-- split the resources into chunks, creating a resource script of the chunks -->
-			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/windows/wrapper/wrapper.rc" overwrite="true"/>
-			<rsplit
-				resource="${rk.home}/shared/windows/wrapper/${windows-java.installer}"
-				outputDir="${basedir}/wrapped-installer"					
-				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
-				resourceName="JAVA"
-				resourceType="EXE"
-				chunkSize="${resources.chunksize}"/>
-			<rsplit
-				resource="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar"
-				outputDir="${basedir}/wrapped-installer"
-				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
-				resourceName="JAR"
-				resourceType="JAR"
-				chunkSize="${resources.chunksize}"
-				/>
-				
-			<!-- compile the resources -->
-			<exec executable="rc" dir="${basedir}/wrapped-installer">
-				<arg line="wrapper.rc"/>
-			</exec>
-
-			<!-- compile the wrapper -->
-			<exec executable="cl" dir="${basedir}/wrapped-installer">
-				<arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/>
-			</exec>
-
-			<exec executable="cl" dir="${basedir}/wrapped-installer">
-				<arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/>
-			</exec>
-
-			<!-- link the wrapper -->
-			<exec executable="link" dir="${basedir}/wrapped-installer">
-				<arg line="/OUT:..\products\Greenstone-${version}-${os.suffix}.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
-			</exec>
-
-		<!-- linux -->
-		<else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<!-- create and setup the build directory -->
-			<mkdir dir="${basedir}/wrapped-installer"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/linux/wrapper.cpp"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/core/search4j/libsearch4j.cpp"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/core/search4j/libsearch4j.h"/>
-
-			<!-- copy bundled files -->
-			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/linux/${linux-java.installer}"/>
-			<copy tofile="${basedir}/wrapped-installer/greenstone2.jar" file="${basedir}/installer/Greenstone-${version}-linux.jar"/>
-
-			<!-- substitute in real values -->
-			<rsr file="${basedir}/wrapped-installer/wrapper.cpp">
-				<job pattern="@java.installer@" replacement="${linux-java.installer}"/>
-				<job pattern="@installer.name@" replacement="greenstone2"/>
-				<job pattern="@java.extracted@" replacement="${java.extracted}"/>
-				<job pattern="@java.min.version@" replacement="${java.min.version}"/>
-			</rsr>
-
-			<!-- create an object file (extension .o) for each file to bundle -->
-			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer">
-				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_jar_start=greenstone2jar --readonly-text greenstone2.jar greenstone2.jar.o"/>
-			</exec>
-			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer">
-				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_${linux-java.installer}_start=java --readonly-text ${linux-java.installer} java.o"/>
-			</exec>
-
-			<!-- compile libsearch4j -->
-			<exec executable="g++" dir="wrapped-installer">
-				<arg line="-Wall -static -static-libgcc -c -o libsearch4j.o libsearch4j.cpp"/>
-			</exec>
-
-			<!-- figure out jar size (web jar) -->
-			<exec executable="ls" dir="wrapped-installer" outputproperty="greenstone2.jar.ls"><arg line="-l greenstone2.jar"/></exec>
-			<exec executable="sed" inputstring="${greenstone2.jar.ls}" outputproperty="greenstone2.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
-
-			<!-- figure out java size -->
-			<exec executable="ls" dir="wrapped-installer" outputproperty="java.ls"><arg line="-l ${linux-java.installer}"/></exec>
-			<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
-
-			<!-- creating wrapper header file -->
-			<delete file="wrapper.h"/>
-			<exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2.jar.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
-
-			<!-- compile the wrapper program -->
-			<exec executable="g++" dir="wrapped-installer">
-				<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
-			</exec>
-
-			<!-- link the compiled code and bundled files -->
-			<exec executable="g++" dir="${basedir}/wrapped-installer">
-				<arg line="-static -static-libgcc -o ../products/Greenstone-${version}-linux wrapper.o libsearch4j.o greenstone2.jar.o java.o"/>
-			</exec>
-
-		<!-- mac -->
-		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-
-			<!-- create and setup the build directory -->
-			<delete dir="${basedir}/wrapped-installer"/>
-			<mkdir dir="${basedir}/wrapped-installer"/>
-
-			<!-- create app for main installer -->
-			<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${rk.home}/shared/mac/Wrapper.app"/></copy>
-			<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${rk.home}/shared/greenstone2/icon/icon.icns"/>
-			<chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
-
-			<!-- copy bundled files -->
-			<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/>
-
-			<!-- substitute in real values -->
-			<rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/>
-			<rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/>
-
-			<!-- turn app into a dmg -->
-
-			<!-- get size of app -->
-			<exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec>
-			<echo>app.du: ${app.du}</echo>
-			<exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
-			<echo>app.size: ${app.size}</echo>
-			<math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
-			<echo>dmg.size: ${dmg.size}</echo>
-
-
-			<!-- create disk image -->
-			<property name="dmg.name" value="Greenstone-${version}-${os.suffix}"/>
-			<exec dir="${basedir}/products" executable="hdiutil"><arg line="create -ov -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec>
-			<!-- mount it -->
-			<exec executable="hdiutil" dir="${basedir}/products"><arg line="attach ${dmg.name}.dmg"/></exec>
-			<!-- copy file into it -->
-			<exec executable="cp"><arg line="-r ${basedir}/wrapped-installer/Greenstone${version}.app /Volumes/${dmg.name}"/></exec>
-			<!-- unmount it-->
-			<exec executable="hdiutil"><arg line="detach /Volumes/${dmg.name}"/></exec>
-		</if></else></if></else></if>
-
-	</target>
-
-
-</project>
Index: main/trunk/release-kits/kits/rk3/ant-scripts/build.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/build.xml	(revision 21623)
+++ main/trunk/release-kits/kits/rk3/ant-scripts/build.xml	(revision 21630)
@@ -10,18 +10,13 @@
 <project name="rk3-build" default="rk3">
 
-	<!-- CONSTANTS -->
-
-	<!-- for the benefit of the shared scripts, set release-kit home -->
-	<property name="rk.name" value="rk3"/>
-	<property name="rk.home" value="${rk3.home}" />
+	<property name="version.major" value="3"/>
 
 	<!-- 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/init.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="compile.xml"/>
-	<import file="create-distribution.xml"/>
-	<import file="create-installer.xml"/>
+	<import file="${rk.home}/shared/core/ant-scripts/create-installer.xml"/>
 	<import file="wrap.xml"/>
 
@@ -29,22 +24,20 @@
 	<target name="rk3" depends="init,gs3-init">
 		<antcall target="compile"/>
-		<antcall target="create-distribution"/>
-		<ant inheritRefs="true" dir="." antfile="${rk3.home}/ant-scripts/create-components.xml" target="create-components"/>
+		<ant inheritRefs="true" dir="." antfile="${rk.home}/kits/${rk.name}/ant-scripts/create-components.xml" target="create-components"/>
 		<antcall target="create-installer"/>
 		<antcall target="wrap"/>
-		<antcall target="create-minimal-distribution"/>
-
 	</target>
 
-	<target name="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 Greenstone3 to make a release of. Eg: tags/2.81. Default: trunk.</echo>
-		<echo>branch.revision     the revision of Greenstone3 to make a release of. Eg: 18273. Default: HEAD.</echo>
-		<echo/>
-	</target>
+	<!-- target to show properties in rk3-build.properties -->
+	<target name="properties" depends="core-properties"/>
 
+	<!-- create the property set to be forwarded to greenstone3 -->
+	<propertyset id="forward.properties">
+		<propertyref prefix="forward."/>
+		<mapper type="glob" from="forward.*" to="*"/>
+		<propertyref name="app.version"/>
+		<propertyref name="branch.path"/>
+		<propertyref name="branch.revision"/>
+	</propertyset>
 
 </project>
Index: main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml	(revision 21623)
+++ main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml	(revision 21630)
@@ -3,18 +3,25 @@
 
 	<target name="compile">
-		<antcall target="checkout-greenstone3"/>
+
+		<!-- checkout greenstone3 -->
+		<exec executable="svn">
+			<arg value="checkout"/>
+			<arg value="${svn.root}/main/${branch.path}/greenstone3"/>
+			<arg value="compiled"/>
+			<arg value="-r"><arg value="${branch.revision}"/>
+		</exec>
+
+		<!-- run greenstone3's ant prepare -->
 		<ant dir="compiled" inheritAll="false">
 			<target name="prepare"/>
 			<propertyset refid="forward.properties"/>
 		</ant>
-		<antcall target="greenstone3-set-version-numbers">
-			<param name="greenstone3basedir" value="compiled"/>
-		</antcall>
-		<antcall target="gli-set-version-numbers">
-			<param name="glibasedir" value="compiled/gli"/>
-		</antcall>
-		<antcall target="gsdl-set-version-numbers">
-			<param name="gsdl.basedir" value="compiled/gs2build"/>
-		</antcall>
+
+		<!-- set all version numbers -->
+		<antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
+		<antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
+
+		<!-- run greenstone3's ant install and ant dist-tidy -->
 		<ant dir="compiled" inheritAll="false">
 			<target name="install"/>
@@ -22,17 +29,67 @@
 			<propertyset refid="forward.properties"/>
 		</ant>
-		<antcall target="insert-xml-parser"/>
-		<antcall target="insert-ant"/>
-		<antcall target="insert-documented-examples"/>
-		<antcall target="compile-uninstaller" />
-		<antcall target="prepare-documentation"/>
 
-		<!-- windows only -->
+		<!-- insert an xml parser -->
+		<copy todir="compiled/gs2build/perllib/cpan">
+			<fileset dir="${rk.home}/shared/greenstone3" includes="XML-Parser/**/*"/>
+		</copy>
+
+		<!-- TODO: insert-ant -->
+
+		<!-- put the uninstaller in place -->
+		<antcall target="insert-and-compile-uninstaller"/>
+
+		<!-- (windows only) -->
 		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<antcall target="insert-windows-perl">
-				<param name="todir" value="compiled/gs2build/bin/windows"/>
-			</antcall>
-			<antcall target="insert-windows-icon"/>
+			<!-- insert perl -->
+			<unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
 		</if>
+
+		<!-- minify tomcat -->
+		<delete dir="compiled/packages/tomcat/webapps/docs"/>
+		<delete dir="compiled/packages/tomcat/webapps/examples"/>
+
+		<!-- tidy up gli to make it smaller -->
+		<antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
+
+		<!-- strip out .svn dirs -->
+		<antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
+
+		<!-- (linux only) -->
+		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
+			<!-- grab imagemagick binaries -->
+			<delete dir="compiled/gs2build/bin/linux/imagemagick"/>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
+				<arg value="compiled/gs2build/bin/linux/imagemagick"/>
+			</exec>
+
+			<!-- grab wv binaries -->
+			<delete dir="compiled/gs2build/bin/linux/wv"/>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
+				<arg value="compiled/gs2build/bin/linux/wv"/>
+			</exec>
+		<!-- (mac only) -->
+		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
+			<!-- grab imagemagick binaries -->
+			<delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
+				<arg value="compiled/gs2build/bin/darwin/imagemagick"/>
+			</exec>
+
+			<!-- grab ghostscript binaries -->
+			<delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
+				<arg value="compiled/gs2build/bin/darwin/ghostscript"/>
+			</exec>
+		</if></else></if>
+
 	</target>
 
Index: main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml	(revision 21623)
+++ main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml	(revision 21630)
@@ -2,24 +2,22 @@
 <project name="rk3-create-components">
 
-	<import file="${basedir}/distributions/web/resources/xml/components.xml"/>
+	<import file="${basedir}/compiled/resources/xml/components.xml"/>
 	<import file="${rk.home}/core/ant-scripts/init.xml"/>
-
-	<!-- create components from the distributions folder -->
 
 	<target name="create-components">
 
-		<antcall target="prepare-component"><param name="component" value="core"/></antcall>
-		<antcall target="compress-component"><param name="component" value="core"/></antcall>
+		<!-- core -->
+		<antcall target="create-component"><param name="component" value="core"/></antcall>
 
-		<antcall target="prepare-component"><param name="component" value="tomcat"/></antcall>
-		<antcall target="compress-component"><param name="component" value="tomcat"/></antcall>
+		<!-- tomcat -->
+		<antcall target="create-component"><param name="component" value="tomcat"/></antcall>
 
-		<antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall>
-		<antcall target="compress-component"><param name="component" value="imagemagick"/></antcall>
+		<!-- imageagick -->
+		<antcall target="create-component"><param name="component" value="imagemagick"/></antcall>
 
-		<!-- windows and mac only -->
+		<!-- (windows and mac only) -->
 		<if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<antcall target="prepare-component"><param name="component" value="ghostscript"/></antcall>
-			<antcall target="compress-component"><param name="component" value="ghostscript"/></antcall>
+			<!-- ghostscript -->
+			<antcall target="create-component"><param name="component" value="ghostscript"/></antcall>
 		</if>
 
Index: main/trunk/release-kits/kits/rk3/ant-scripts/create-distribution.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/create-distribution.xml	(revision 21623)
+++ 	(revision )
@@ -1,60 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="rk3-create-distribution">
-	<target name="create-distribution">
-		<!-- create distribution -->
-		<antcall target="copy-compiled-to-dist"/> <!-- from init -->
-		<antcall target="insert-uninstaller"/>
-		<antcall target="clean-user-manual"/>
-		<antcall target="clean-uninstaller"/>
-		<antcall target="minify-tomcat"/>
-		<antcall target="gli-tidy-for-dist"><param name="glibasedir" value="distributions/web/gli"/></antcall>
-		<antcall target="strip-svn-dirs"><param name="dir" value="distributions"/></antcall> <!-- from init -->
-
-		<!-- linux only -->
-		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<antcall target="export-imagemagick-linux-binaries"/>
-			<antcall target="export-wvware-linux-binaries"/>
-
-		<!-- mac only -->
-		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-			<antcall target="export-imagemagick-darwin-binaries"/>
-			<antcall target="export-ghostscript-darwin-binaries"/>
-
-		</if></else></if>
-		
-	</target>
-
-	<target name="export-imagemagick-linux-binaries">
-		<delete dir="distributions/web/bin/linux/imagemagick"/>
-		<svn>
-			<export srcurl="${svn.root}/main/${branch.path}/binaries/linux/imagemagick" destPath="distributions/web/gs2build/bin/linux/imagemagick"/>
-		</svn>
-	</target>
-
-	<target name="export-wvware-linux-binaries">
-		<delete dir="distributions/web/bin/linux/wv"/>
-		<svn>
-			<export srcurl="${svn.root}/main/${branch.path}/binaries/linux/wv" destPath="distributions/web/gs2build/bin/linux/wv"/>
-		</svn>
-	</target>
-
-	<target name="export-imagemagick-darwin-binaries">
-		<delete dir="distributions/web/bin/darwin/imagemagick"/>
-		<svn>
-			<export srcurl="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick" destPath="distributions/web/gs2build/bin/darwin/imagemagick"/>
-		</svn>
-	</target>
-
-	<target name="export-ghostscript-darwin-binaries">
-		<delete dir="distributions/web/bin/darwin/ghostscript"/>
-		<svn>
-			<export srcurl="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript" destPath="distributions/web/gs2build/bin/darwin/ghostscript"/>
-		</svn>
-	</target>
-
-	<target name="minify-tomcat">
-		<delete dir="distributions/web/packages/tomcat/webapps/docs"/>
-		<delete dir="distributions/web/packages/tomcat/webapps/examples"/>
-	</target>
-
-</project>
Index: main/trunk/release-kits/kits/rk3/ant-scripts/create-installer.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/create-installer.xml	(revision 21623)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="rk3-create-installer">
-
-	<target name="create-installer">
-		<antcall target="copy-installer-files"/>
-		<antcall target="make-installer-files-concrete"/>
-		<antcall target="compile-binary-installer"/>
-	</target>
-
-	<target name="copy-installer-files" depends="copy-main-installer-files">
-
-		<!-- the installer descriptors -->
-		<copy todir="installer" file="${rk.home}/greenstone3/installer/antinstall-config.xml" overwrite="true"/>
-		<copy todir="installer" file="${rk.home}/greenstone3/installer/build.xml" overwrite="true"/>
-
-		<!-- the licence -->
-		<copy file="${basedir}/distributions/web/LICENSE.txt" todir="${basedir}/installer/classes" overwrite="true"/>
-
-		<!-- greenstone's ant tasks -->
-		<unjar src="${rk3.home}/core/ant-tasks/greenstone/anttasks.jar" dest="${basedir}/installer/classes"/>
-
-		<!-- windows only -->
-		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<!-- 7za.exe tool -->
-			<copy todir="${basedir}/installer/classes" overwrite="true" file="${rk3.home}/windows/7za/7za.exe"/>
-
-			<!-- roxes and orangevolt for windows tricks in ant -->
-			<unjar src="${rk3.home}/core/ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar" dest="${basedir}/installer/classes"/>
-			<unjar src="${rk3.home}/core/ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar" dest="${basedir}/installer/classes"/>
-
-		<!-- linux and mac only -->
-		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<!-- 7zip ant task -->
-			<unjar src="${rk3.home}/core/ant-tasks/7z-ant/7z.jar" dest="${basedir}/installer/classes"/>
-
-		</if></else></if>
-
-		<!-- clean up meta directory -->
-		<delete dir="${basedir}/installer/classes/META-INF"/>
-
-	</target>
-
-</project>
Index: main/trunk/release-kits/kits/rk3/ant-scripts/wrap.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/ant-scripts/wrap.xml	(revision 21623)
+++ 	(revision )
@@ -1,223 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="rk3-wrap" default="wrap">
-
-	<target name="wrap">
-		<!-- windows -->
-		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<antcall target="windows-wrap"/>
-		<!-- linux -->
-		<else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<antcall target="linux-wrap"/>
-		<!-- mac -->
-		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-			<antcall target="mac-wrap"/>
-		</if></else></if></else></if>
-
-	</target>
-
-	<target name="linux-wrap">
-		<antcall target="linux-setup-for-wrapping"/>
-		<antcall target="linux-compile-wrapper"/>
-	</target>
-
-	<target name="windows-wrap">
-		<!-- the size of the resourse chunks to be put in the wrapped installer -->
-		<property name="resources.chunksize" value="8388608"/><!-- 8MiB -->
-	
-		<antcall target="windows-copy-files-for-wrapping"/>
-		<antcall target="windows-tweak-files-for-wrapping"/>
-		<antcall target="windows-compile-resources"/>
-		<antcall target="windows-compile-wrapper"/>
-		<antcall target="windows-link-wrapper"/>
-	</target>
-
-	<target name="mac-wrap">
-	 	<property name="dmg.overhead" value="4096"/>
-
-		<!-- create and setup the build directory -->
-		<delete dir="${basedir}/wrapped-installer"/>
-		<mkdir dir="${basedir}/wrapped-installer"/>
-		<mkdir dir="products"/>
-		<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${rk3.home}/mac/Wrapper.app"/></copy>
-		<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${rk3.home}/greenstone3/icon/icon.icns"/>
-		<chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
-
-		<!-- copy bundled files -->
-		<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar"/>
-
-		<!-- substitute in real values -->
-		<rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-${os.suffix}.jar"/>
-		<rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/>
-
-		<!-- get size of app -->
-		<exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec>
-		<echo>app.du: ${app.du}</echo>
-		<exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
-		<echo>app.size: ${app.size}</echo>
-		<math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
-		<echo>dmg.size: ${dmg.size}</echo>
-
-		<!-- create disk image -->
-		<property name="dmg.name" value="Greenstone-${version}-${os.suffix}"/>
-		<exec dir="${basedir}/products" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec>
-		<!-- mount it -->
-		<exec executable="hdiutil" dir="${basedir}/products"><arg line="attach ${dmg.name}.dmg"/></exec>
-		<!-- copy file into it -->
-		<exec executable="cp"><arg line="-r ${basedir}/wrapped-installer/Greenstone${version}.app /Volumes/${dmg.name}"/></exec>
-		<!-- unmount it-->
-		<exec executable="hdiutil"><arg line="detach /Volumes/${dmg.name}"/></exec>
-	</target>
-
-	<target name="linux-setup-for-wrapping">
-
-		<!-- create and setup the build directory -->
-		<mkdir dir="${basedir}/wrapped-installer/build"/>
-		<copy todir="${basedir}/wrapped-installer/build" file="${rk3.home}/linux/wrapper.cpp" overwrite="true" />
-		<copy todir="${basedir}/wrapped-installer/build" file="${rk3.home}/core/search4j/libsearch4j.cpp" overwrite="true" />
-		<copy todir="${basedir}/wrapped-installer/build" file="${rk3.home}/core/search4j/libsearch4j.h" overwrite="true" />
-
-		<!-- copy bundled files -->
-		<copy todir="${basedir}/wrapped-installer/build" file="${rk3.home}/linux/${linux-java.installer}"/>
-		<copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar"/>
-
-		<!-- substitute the real java installer filename and min version into various files -->
-		<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${linux-java.installer}"/>
-		<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@installer.name@" replacement="greenstone3"/>
-		<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.extracted@" replacement="${java.extracted}"/>
-		<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
-
-	</target>
-
-	<target name="linux-compile-wrapper">
-		<mkdir dir="products"/>
-		<echo level="info">create an object file (extension .o) for each file to bundle</echo>
-		<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
-			<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar greenstone3.jar.o"/>
-		</exec>
-		<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
-			<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_${linux-java.installer}_start=java --readonly-text ${linux-java.installer} java.o"/>
-		</exec>
-
-		<!-- get size of greenstone.jar -->
-		<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3.jar.ls"><arg line="-l greenstone3.jar"/></exec>
-		<exec executable="sed" inputstring="${greenstone3.jar.ls}" outputproperty="greenstone3.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
-
-		<!-- get size of java -->
-		<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="java.ls"><arg line="-l ${linux-java.installer}"/></exec>
-		<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
-
-		<echo level="info">compile libsearch4j</echo>
-		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-			<arg line="-Wall -static -static-libgcc -c -o libsearch4j.o libsearch4j.cpp"/>
-		</exec>
-
-		<echo level="info">creating the header file for bundled java version</echo>
-		<delete file="wrapper.h"/>
-		<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
-		<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
-		<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
-
-		<echo level="info">recompile the wrapper program</echo>
-		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-			<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
-		</exec>
-
-		<echo level="info">relink, bundling the files to be bundled</echo>
-		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-			<arg line="-static -static-libgcc -o  ../../products/Greenstone-${version}-${os.suffix} wrapper.o libsearch4j.o greenstone3.jar.o java.o"/>
-		</exec>
-
-	</target>
-
-	<target name="windows-copy-files-for-wrapping">
-		<echo>Copying wrapper source files</echo>
-		<mkdir dir="${basedir}/wrapped-installer"/>
-		<copy todir="${basedir}/wrapped-installer" file="${rk3.home}/windows/wrapper/wrapper.cpp"/>
-		<copy todir="${basedir}/wrapped-installer" file="${rk3.home}/core/search4j/libsearch4j.cpp"/>
-		<copy todir="${basedir}/wrapped-installer" file="${rk3.home}/core/search4j/libsearch4j.h"/>
-	</target>
-	
-	<target name="windows-tweak-files-for-wrapping">
-		<echo>Substituting concrete values into source files</echo>
-		<rsr file="${basedir}/wrapped-installer/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
-		<rsr file="${basedir}/wrapped-installer/wrapper.cpp" pattern="@java.installer@" replacement="${windows-java.installer}"/>
-		<rsr file="${basedir}/wrapped-installer/wrapper.cpp" pattern="@java.extracted@" replacement="${java.extracted}"/>
-		<rsr file="${basedir}/wrapped-installer/wrapper.cpp" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
-	</target>
-
-	<target name="windows-compile-resources">
-		<if>
-			<bool>
-				<not>
-					<uptodate targetfile="${basedir}/wrapped-installer/wrapper.RES">
-						<srcfiles dir="${rk3.home}/greenstone3/icon" includes="icon.ico"/>
-						<srcfiles dir="${rk3.home}/windows/wrapper" includes="${windows-java.installer}"/>
-						<srcfiles dir="${rk3.home}/windows/wrapper" includes="*.bmp"/>
-						<srcfiles dir="${rk3.home}/windows/wrapper" includes="*.rc"/>
-						<srcfiles dir="${rk3.home}/greenstone3/wrapper" includes="*.bmp"/>
-						<srcfiles dir="${basedir}/installer" includes="Greenstone-${version}-${os.suffix}.jar"/>
-					</uptodate>
-				</not>
-			</bool>
-			
-			<echo>Compiling resources</echo>
-			
-			<echo>getting the template resource script</echo>
-			<copy todir="${basedir}/wrapped-installer" file="${rk3.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
-			
-			<echo>copying the small resource files into place</echo>
-			<copy todir="${basedir}/wrapped-installer">
-				<fileset dir="${rk3.home}/windows/wrapper" includes="*.bmp"/>
-				<fileset dir="${rk3.home}/greenstone3/wrapper" includes="*.bmp"/>
-				<fileset dir="${rk3.home}/greenstone3/icon" includes="icon.ico"/>
-			</copy>
-			
-			<echo>adding greenstone3.jar to the resource script as chunks</echo>
-			<rsplit
-				resource="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar"
-				outputDir="${basedir}/wrapped-installer"
-				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
-				resourceName="JAR"
-				resourceType="JAR"
-				chunkSize="${resources.chunksize}"
-				/>
-			
-			<echo>adding ${windows-java.installer} to the copy as chunks</echo>
-			<rsplit
-				resource="${rk3.home}/windows/wrapper/${windows-java.installer}"
-				outputDir="${basedir}/wrapped-installer"					
-				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
-				resourceName="JAVA"
-				resourceType="EXE"
-				chunkSize="${resources.chunksize}"
-				/>
-
-			<echo>resource compiling the generated resource script</echo>
-			<exec executable="rc" dir="${basedir}/wrapped-installer">
-				<arg line="wrapper.rc"/>
-			</exec>
-			
-			<else>
-				<echo>Resourses are up-to-date, will not compile</echo>
-			</else>
-		</if>
-	</target>
-
-	<target name="windows-compile-wrapper">
-		<exec executable="cl" dir="${basedir}/wrapped-installer">
-			<arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/>
-		</exec>
-		<exec executable="cl" dir="${basedir}/wrapped-installer">
-			<arg line="/c -GX /DWINDOWS=yes /DWEB wrapper.cpp /out:wrapper.obj"/>
-		</exec>
-	</target>
-
-	<target name="windows-link-wrapper">
-		<mkdir dir="products"/>
-		<exec executable="link" dir="${basedir}/wrapped-installer">
-			<arg line="/OUT:..\products\Greenstone-${version}-${os.suffix}.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
-		</exec>
-	</target>
-
-
-</project>
