Index: /main/trunk/release-kits/bin/rk
===================================================================
--- /main/trunk/release-kits/bin/rk	(revision 21393)
+++ /main/trunk/release-kits/bin/rk	(revision 21394)
@@ -13,16 +13,8 @@
 
 function show_help {
-	echo "$rk_name - $rk_fullname"
-	echo "Automatically creates Greenstone releases"
-	echo
-	echo "usage: $rk_name [-help|-cmd] [ANT_ARGS]"
-	echo "	-help"
-	echo "		show this help screen"
-	echo
-	echo "	-cmd"
-	echo "		show the ant command being used by $rk_name"
-	echo
-	echo "	ANT_ARGS"
-	echo "		Additional arguments to be passed to ant"
+	echo "usage: {rk2|rk3|sork2|sork2|cdrk2|derk} [-help|-cmd] [ANT_ARGS]"
+	echo "	-help       show this help screen"
+	echo "	-cmd        show the ant command being used by the releas kit"
+	echo "	ANT_ARGS    additional arguments to be passed to ant"
 }
 
@@ -36,5 +28,5 @@
         rk_fullname="Release Kit for Greenstone3"
 else
-	echo "Unrecognised release-kit name '$rk_name'" >&2
+	show_help
 	exit
 fi
@@ -43,9 +35,9 @@
 #cd up a level or two if needed
 if [ -e "$rk_name-build.properties" ]; then
-	pushd .
+	pushd . &>/dev/null
 elif [ -e "../$rk_name-build.properties" ]; then
-	pushd ..
+	pushd .. &>/dev/null
 elif [ -e "../../$rk_name-build.properties" ]; then
-	pushd ../..
+	pushd ../.. &>/dev/null
 else
 	echo "couldn't find file $rk_name-build.properties"
@@ -58,5 +50,5 @@
 
 #create the command
-toexec="ant -lib `pwd`/installer/classes -f $RK_HOME/kits/$rk_name/ant-scripts/build.xml -Dbasedir=`pwd` -D$rk_name.home=$RK_HOME"
+toexec="ant -lib \"`pwd`/installer/classes\" -f \"$RK_HOME/kits/$rk_name/ant-scripts/build.xml\" \"-Dbasedir=`pwd`\" \"-Drk.home=$RK_HOME\" \"-Drk.name=$rk_name\""
 
 #pass on the arguments
@@ -69,5 +61,5 @@
 		show_cmd=true
 	else
-		toexec="$toexec $1"
+		toexec="$toexec \"$1\""
 	fi
 	shift
@@ -85,3 +77,3 @@
 
 #go back to original dir
-popd
+popd &>/dev/null
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/build.xml	(revision 21394)
@@ -10,14 +10,8 @@
 <project name="rk2-build" default="rk2">
 
-	<!-- CONSTANTS -->
-
-	<!-- for the benefit of the shared scripts, set release-kit home -->
-	<property name="rk.name" value="rk2"/>
-	<property name="rk.home" value="${rk2.home}" />
-
 	<!-- IMPORT OTHER ANT SCRIPTS -->
-	<import file="../../../shared/core/ant-scripts/init.xml"/>
-	<import file="../../../shared/core/ant-scripts/operations-on-gli.xml"/>
-	<import file="../../../shared/greenstone2/ant-scripts/rk2-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/rk2-targets.xml"/>
 
 	<import file="compile.xml"/>
@@ -31,12 +25,5 @@
 
 	<!-- THE MAIN TARGET -->
-	<target name="rk2" depends="init,gs2-init">
-		<antcall target="compile"/>
-		<antcall target="create-distribution"/>
-		<antcall target="create-components"/>
-		<antcall target="create-installer"/>
-		<antcall target="wrap"/>
-		<antcall target="create-cdrom-components"/>
-	</target>
+	<target name="rk2" depends="init,gs2-init,compile,create-distribution,create-components,create-installer,wrap,create-cdrom-components"/>
 
 	<target name="properties">
@@ -50,3 +37,120 @@
 	</target>
 
+	<!-- TODO: Move the targets below to the xml file that calls it -->
+	<target name="checkout-gsdl-gli">
+		<exec executable="svn">
+			<arg value="checkout"/>
+			<arg value="${svn.root}/main/${branch.path}/greenstone2"/>
+			<arg value="${basedir}/compiled"/>
+		</exec>
+                <exec executable="svn">
+			<arg value="checkout"/>
+			<arg value="${svn.root}/main/${branch.path}/gli"/>
+			<arg value="${basedir}/compiled/gli"/>
+		</exec>
+	</target>
+
+	<target name="insert-export-to-cd-package">
+		<mkdir dir="${gsdl.basedir}/bin/windows"/>
+		<get src="${server.exe.location}" dest="${gsdl.basedir}/bin/windows/server.exe"/>
+		<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
+		<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
+	</target>
+
+	<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="create-binary-zip-windows">
+		<property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
+		<copy todir="${binzip.dir}">
+			<fileset dir="distributions/web"/>
+		</copy>
+
+		<!-- 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.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
+		</delete>
+	</target>
+
+	<target name="dist-clean-sourcecode">
+
+		<!-- delete the sourcecode -->
+		<delete>
+			<fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
+		</delete>
+		<delete dir="distributions/web/common-src"/>
+		<delete dir="distributions/web/build-src"/>
+		<delete dir="distributions/web/runtime-src"/>
+		<delete>
+			<fileset dir="distributions/web" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h"/>
+		</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="make-common-src">
+		<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
+		<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
+	</target>
+
+	<target name="compile-gli">
+
+		<if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
+			<property name="script.format" value="sh"/>
+		<else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
+			<property name="script.format" value="bat"/>
+		</if></else></if>
+		
+		<echo>Compiling gli...</echo>
+		<exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
+
+		<echo>Creating jar...</echo>
+		<exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
+
+		<echo>Cleaning up intermediate files...</echo>
+		<delete dir="${glibasedir}/jar"/>
+		<delete dir="${glibasedir}/classes/org"/>
+
+		<if><bool><isset property="gsdlbasedir"/></bool>
+			<echo>Putting gli server jar in a better place</echo>
+			<exec executable="mv" failonerror="true">
+				<arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
+			</exec>
+		</if>
+
+	</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/installer/build.xml" overwrite="true"/>
+	</target>
+
 </project>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 21394)
@@ -2,5 +2,5 @@
 <project name="rk2-compile">
 
-	<target name="compile">
+	<target name="compile" depends="init,gs2-init">
 
 		<antcall target="checkout-gsdl-gli" />
@@ -144,5 +144,5 @@
 		<!-- linux, mac -->
 		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<exec dir="${basedir}/compiled" executable="${rk2.home}/resources/build-demo.sh" failonerror="true"/>
+			<exec dir="${basedir}/compiled" executable="${rk.home}/kits/rk2/resources/build-demo.sh" failonerror="true"/>
 
 		<!-- windows -->
@@ -194,5 +194,5 @@
 
 	<target name="compile-c-code">
-		<copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
+		<copy file="${rk.home}/kits/rk2/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
 		<exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec>
 		<exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec>
@@ -203,3 +203,11 @@
 	</target>
 
+	<target name="drop-in-docs">
+		<echo level="info">Dropping gsdl docs into distribution</echo>
+		<copy todir="${gsdl.basedir}" overwrite="true">
+			<fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
+		</copy>
+	</target>
+
+
 </project>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 21394)
@@ -106,10 +106,10 @@
 			<mkdir dir="cdrom/dist/Java/Linux"/>
 			<exec executable="cp">
-				<arg value="${rk2.home}/linux/jre_bin"/>
+				<arg value="${rk.home}/shared/linux/jre_bin"/>
 				<arg value="cdrom/dist/Java/Linux"/>
 			</exec>
 			<!--
 			don't extract to save space
-			<exec dir="cdrom/dist/Java/Linux" executable="${rk2.home}/linux/jre_bin"/>
+			<exec dir="cdrom/dist/Java/Linux" executable="${rk.home}/shared/linux/jre_bin"/>
 			<exec dir="cdrom/dist/Java/Linux" executable="tar"><arg value="-xf"/><arg value="jre.tar"/></exec>
 			<delete file="cdrom/dist/Java/Linux/jre.tar"/>
@@ -118,5 +118,5 @@
 		<else><if><bool><or><equals arg1="${rk.os}" arg2="windows"/></or></bool>
 			<mkdir dir="cdrom/dist/Java/Windows"/>
-			<exec dir="cdrom/dist/Java/Windows" executable="${rk2.home}/windows/wrapper/jre.exe"/>
+			<exec dir="cdrom/dist/Java/Windows" executable="${rk.home}/shared/windows/wrapper/jre.exe"/>
 
 		</if></else></if>
@@ -163,6 +163,6 @@
 			<mkdir dir="wrapped-installer/cdrom"/>
 			<!-- create app for cdrom installer -->
-			<copy todir="cdrom/dist/Greenstone-${version}-MacOS.app"><fileset dir="${rk2.home}/mac/Wrapper.app"/></copy>
-			<copy todir="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Resources" file="${rk2.home}/greenstone2/icon/icon.icns"/>
+			<copy todir="cdrom/dist/Greenstone-${version}-MacOS.app"><fileset dir="${rk.home}/shared/mac/Wrapper.app"/></copy>
+			<copy todir="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Resources" file="${rk.home}/shared/greenstone2/icon/icon.icns"/>
 			<chmod file="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/MacOS/JavaApplicationStub" perm="+x"/>
 
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 21394)
@@ -2,5 +2,5 @@
 <project name="rk2-create-components">
 
-	<target name="create-components">
+	<target name="create-components" depends="init,gs2-init">
 
 		<antcall target="prepare-component"><param name="component" value="core"/></antcall>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml	(revision 21394)
@@ -2,5 +2,5 @@
 <project name="rk2-create-distribution">
 
-	<target name="create-distribution">
+	<target name="create-distribution" depends="init,gs2-init">
 
 		<antcall target="copy-compiled-to-dist"/>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-installer.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-installer.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-installer.xml	(revision 21394)
@@ -2,5 +2,5 @@
 <project name="rk2-create-installer">
 
-	<target name="create-installer">
+	<target name="create-installer" depends="init,gs2-init">
 		<antcall target="copy-installer-files"/>
 		<antcall target="make-installer-files-concrete"/>
@@ -11,13 +11,13 @@
 
 		<copy todir="installer/classes" overwrite="true" file="distributions/web/LICENSE.txt"/>
-		<unjar src="${rk2.home}/core/ant-tasks/greenstone/anttasks.jar" dest="installer/classes"/>
-		<unjar src="${rk2.home}/core/lib/crypt.jar" dest="installer/classes"/>
+		<unjar src="${rk.home}/shared/core/ant-tasks/greenstone/anttasks.jar" dest="installer/classes"/>
+		<unjar src="${rk.home}/shared/core/lib/crypt.jar" dest="installer/classes"/>
 
 		<!-- windows -->
 		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<fileset dir="${rk2.home}/windows/7za" includes="7za.exe"/>
+			<fileset dir="${rk.home}/shared/windows/7za" includes="7za.exe"/>
 		<!-- linux and mac -->
 		<else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<unjar src="${rk2.home}/core/ant-tasks/7z-ant/7z.jar" dest="installer/classes"/>
+			<unjar src="${rk.home}/shared/core/ant-tasks/7z-ant/7z.jar" dest="installer/classes"/>
 		</if></else></if>
 
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/wrap.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/wrap.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/wrap.xml	(revision 21394)
@@ -2,5 +2,5 @@
 <project name="rk2-wrap" default="wrap">
 
-	<target name="wrap">
+	<target name="wrap" depends="init,gs2-init">
 
 		<mkdir dir="products"/>
@@ -13,5 +13,10 @@
 
 			<!-- copy wrapper source into place -->
-			<antcall target="get-copy-of-wrapper-source"><param name="todir" value="wrapped-installer"/></antcall>
+			<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 -->
@@ -24,7 +29,7 @@
 
 			<!-- split the resources into chunks, creating a resource script of the chunks -->
-			<copy todir="${basedir}/wrapped-installer" file="${rk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
+			<copy todir="${basedir}/wrapped-installer" file="${rk.home}/shared/windows/wrapper/wrapper.rc" overwrite="true"/>
 			<rsplit
-				resource="${rk2.home}/windows/wrapper/${windows-java.installer}"
+				resource="${rk.home}/shared/windows/wrapper/${windows-java.installer}"
 				outputDir="${basedir}/wrapped-installer"					
 				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
@@ -64,10 +69,10 @@
 			<!-- create and setup the build directory -->
 			<mkdir dir="${basedir}/wrapped-installer"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk2.home}/linux/wrapper.cpp"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk2.home}/core/search4j/libsearch4j.cpp"/>
-			<copy todir="${basedir}/wrapped-installer" file="${rk2.home}/core/search4j/libsearch4j.h"/>
+			<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="${rk2.home}/linux/${linux-java.installer}"/>
+			<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"/>
 
@@ -117,6 +122,6 @@
 
 			<!-- create app for main installer -->
-			<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${rk2.home}/mac/Wrapper.app"/></copy>
-			<copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${rk2.home}/greenstone2/icon/icon.icns"/>
+			<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"/>
 
Index: /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 21394)
+++ /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 21394)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN" "http://antinstaller.sf.net/dtd/antinstall-config-0.8.dtd">
+<installer
+			ui="swing,text"
+			verbose="true"
+			debug="false"
+			lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
+			name="Greenstone@version@ Installer"
+			windowIcon="/resources/icon.png"
+			defaultImageResource="/resources/header.png"
+			minJavaVersion="1.4">
+
+	<!-- select language page -->
+	<page type="input" name="language-selector" displayText="">
+		<comment name="language-selector-explanation"/>
+		<select property="language" defaultValue="en" displayText="" useAsLocale="true">
+			<option value="en" text="English"/>
+			<option value="fr" text="FranÃ§ais (French)"/>
+			<option value="es" text="EspaÃ±ol (Spanish)"/>
+			<option value="de" text="Deutsch (German)"/>
+			<option value="ru" text="ÑÑÑÑÐºÐžÐ¹ ÑÐ·ÑÐº (Russian)"/>
+			<option value="zh" text="äž­æ (Chinese)"/>
+			<option value="ar" text="Arabic"/>
+		</select>
+	</page>
+
+	<!-- intro page -->
+	<page type="input" name="intro" displayText="">
+		<comment name="welcome"/>
+	</page>
+
+	<!-- licence page -->
+	<page type="license" name="license" resource="/LICENSE.txt"  displayText="" />
+
+	<!--  install destination page -->
+	<page type="input" name="destination" displayText="">
+
+		<!-- if linux|mac -->
+		<directory property="installDir"
+			defaultValue="/usr/local/Greenstone,${env.HOME}/Greenstone"
+			create="true"
+			displayText=""
+			flagFile="_uninst"
+			flagFileExistsProperty="ISInstallDetected"
+			/>
+		<!-- /if -->
+		<!-- if windows -->
+		<directory property="installDir"
+			defaultValue="C:\Program Files\Greenstone,${env.HOMEDRIVE}\${env.HOMEPATH}\Greenstone"
+			create="true"
+			displayText=""
+			flagFile="_uninst"
+			flagFileExistsProperty="ISInstallDetected"
+			/>
+		<!-- /if -->
+
+	</page>
+
+	<!-- don't budge if installshield installation found -->
+	<page type="input" name="dontBudge" displayText="" ifProperty="(${ISInstallDetected}==true)" showNextButton="false">
+		<comment name="is-install-detected"/>
+	</page>
+
+	<!-- conmponents -->
+	<page type="input" name="selector" displayText="">
+		<comment name="choose-components"/>
+
+		<!-- if linux|windows -->
+		<target
+			target="Initialising"
+			diskRequirement="x"
+			defaultValue="true"
+			displayText="x"
+			force="true"
+			hidden="true"/>
+		<!-- /if -->
+
+		<target
+			target="Installing Core System"
+			diskRequirement="@component.size.core@"
+			displayText=""
+			defaultValue="true"
+			force="true"/>
+
+		<target
+			target="Installing ImageMagick"
+			diskRequirement="@component.size.imagemagick@"
+			defaultValue="true" 
+			displayText=""/>
+
+		<!-- if windows|mac -->
+		<target
+			target="Installing Ghostscript"
+			diskRequirement="@component.size.ghostscript@"
+			defaultValue="true" 
+			displayText=""/>
+		<!-- /if -->
+
+
+		<!-- start cdrom -->
+		<!-- the size of this component has to be maintained manually as we can't
+			know at compile time how big the documented examples are -->
+		<target
+			target="Installing Documented Examples"
+			diskRequirement="108 MB"
+			defaultValue="true" 
+			displayText=""/>
+		<!-- end cdrom -->
+
+		<!-- if windows -->
+		<target
+			target="Installing Start Menu Shortcuts"
+			diskRequirement="~10 KB"
+			defaultValue="true"
+			displayText=""/>
+		<!-- /if -->
+
+	</page>
+
+	<!-- page to ask if we should enable admin pages -->
+	<page type="input" name="admin-pages" displayText="">
+		<comment name="admin-expl"/>
+		<comment name="admin-expl-2"/>
+		<comment name="admin-expl-3"/>
+		<checkbox property="enable.admin.pages" displayText="" defaultValue="false"/>
+	</page>
+
+	<!-- only if they said yes above, set a password -->
+	<page type="input" name="admin-password" displayText="" ifProperty="(${enable.admin.pages}==true)" target="Configuring Administration Pages">
+		<comment name="admin-password-expl"/>
+		<validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>
+	</page>
+
+	<!-- progress page -->
+	<page type="progress" name="progress" showTargets="true" displayText=""/>
+
+</installer>
Index: /main/trunk/release-kits/kits/rk2/installer/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 21394)
+++ /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 21394)
@@ -0,0 +1,295 @@
+﻿<?xml version="1.0"?>
+<!--
+This is the build.xml run by AntInstaller for the installer
+-->
+
+<project name="Installation">
+
+	<!-- this is required to pick up the properties generated during the install pages -->
+	<property file="${basedir}/ant.install.properties"/>
+
+	<!-- set some properties to keep track of the OS -->
+	<!-- if windows -->
+	<property name="rk.os" value="windows"/>
+	<property name="shell.name" value="windows"/>
+	<!-- /if -->
+	<!-- if linux -->
+	<property name="rk.os" value="linux"/>
+	<property name="shell.name" value="linux"/>
+	<!-- /if -->
+	<!-- if mac -->
+	<property name="rk.os" value="mac"/>
+	<property name="shell.name" value="darwin"/>
+	<!-- /if -->
+
+	<!-- classpath -->
+	<path id="project.classpath">
+		<pathelement path="${antinstaller.jar}"/>
+	</path>
+
+	<!-- custom tasks -->
+	<typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
+	<typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
+	<!-- if windows -->
+	<taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
+	<taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/> 
+	<typedef name="getfreepath" classname="org.greenstone.anttasks.GetFreePath" classpathref="project.classpath"/>
+	<!-- /if -->
+	<!-- if linux|mac -->
+	<taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
+	<!-- /if -->
+	
+	<!-- determine if a bundled java exists -->
+	<condition property="bundled.java.exists">
+		<or>
+			<available file="../@java.extracted@/bin/java"/>
+			<available file="../@java.extracted@/bin/java.exe"/>
+		</or>
+	</condition>
+
+	<!-- determine if there is an existing installation in the installDir-->
+	<available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
+
+	<!-- create a local installDir String -->
+	<path id="installDir.path"><pathelement location="${installDir}"/></path>
+	<property name="installDir.local" refid="installDir.path"/>
+
+	<!-- if windows -->
+	<!-- load windows properties -->
+	<winprops/>
+	<!-- /if -->
+
+	<!-- load the properties of the previous installation if this is an overinstall -->
+	<target name="Looking For Previous Installation" if="is.overinstall">
+		<property file="${installDir}\etc\installation.properties"/>
+		<delete dir="${installed.startmenu.path}" failonerror="false"/>
+	</target>
+
+	<!-- copy jre -->
+	<target name="Initialising" if="bundled.java.exists">
+		<mkdir dir="${installDir}/packages"/>
+		<copy todir="${installDir}/packages/jre" failonerror="false">
+			<fileset dir="../@java.extracted@"/>
+		</copy>
+		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
+	</target>
+
+	<!-- core system -->
+	<target name="Installing Core System">
+
+		<!-- if windows -->
+		<!-- figure out the start menu path -->
+		<getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>		
+		<path id="startmenu.path.path" path="${startmenu.path}"/>
+		<pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
+
+		<!-- extract 7za tool -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}">
+			<patternset><include name="7za.exe"/></patternset>
+		</unzip>
+		<!-- /if -->
+
+		<!-- start web -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
+		<!-- if linux|mac --><sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/><!-- /if -->
+		<!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec><!-- /if -->
+		<delete file="core.lzma"/>
+		<unzip src="${basedir}/core.comp" dest="${installDir}"/>
+		<delete file="core.comp"/>
+		<!-- end web -->
+
+		<!-- start cdrom -->
+		<copy todir="${installDir}">
+			<fileset dir="${orig.dir}/Software/core/all"/>
+			<fileset dir="${orig.dir}/Software/core/${rk.os}"/><!-- /if -->
+		</copy>
+		<!-- if windows -->
+		<copy todir="${installDir}/packages/jre" failonerror="false">
+			<fileset dir="${orig.dir}/Java/Windows/jre"/>
+		</copy>
+		<!-- /if -->
+		<!-- end cdrom -->
+
+		<echo>Setting Binaries to Executable</echo>
+		<chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
+		<chmod dir="${installDir}/bin" includes="*" perm="775"/>
+		<chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
+		<chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
+		<chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
+		<!-- if linux|mac -->
+		<chmod dir="${installDir}/bin/${shell.name}" includes="**/*" perm="775"/>
+		<chmod dir="${installDir}/apache-httpd/${shell.name}/bin" includes="*" perm="775"/>
+		<chmod dir="${installDir}/apache-httpd/${shell.name}" includes="*.sh" perm="775"/>
+		<!-- /if -->
+
+		<echo>Filling in concrete values in config files</echo>
+		<copy file="${installDir}/cgi-bin/gsdlsite.cfg.in" tofile="${installDir}/cgi-bin/gsdlsite.cfg"/>
+		<rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}"/>
+
+		<echo>Correcting perl shebangs in perl scripts</echo>
+		<!-- if linux|mac -->
+		<exec executable="which" outputproperty="perl.executable"><arg value="perl"/></exec>
+		<rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
+		<!-- /if -->
+		<!-- if windows -->
+		<property name="perl.executable" value="${installDir.local}\bin\windows\perl\bin\perl.exe"/>
+		<rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
+		<!-- /if -->
+
+		<echo>Creating the english dictionary</echo>
+		<copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
+
+		<!-- if linux|mac -->
+		<echo>Set the installation locale in config files</echo>
+		<rsr file="${installDir}/setup.bash" pattern="^gsdllang=.*" replacement="gsdllang=${language}"/>
+		<rsr file="${installDir}/gli/gli.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
+		<rsr file="${installDir}/gli/gems.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
+		<!-- /if -->
+		<rsr
+			file="${installDir}/gli/classes/xml/config.xml"
+			pattern="(&lt;Argument name=&quot;general.locale&quot;&gt;).*(&lt;/Argument&gt;)"
+			replacement="$1${language}$2"/>
+
+		<echo file="${installDir}/etc/main.cfg" append="true"
+			>cgiarg          shortname=l argdefault=${language}</echo>
+
+		<!-- if linux|mac -->
+		<echo>Setting up apache web server</echo>
+		<exec dir="${installDir}" executable="${installDir}/apache-httpd/${shell.name}/install-bindist.sh">
+			<arg value="${installDir}/apache-httpd/${shell.name}"/>
+		</exec>
+		<!-- /if -->
+
+		<echo message="Creating installation properties file"/>
+		<!-- if linux|mac -->
+		<echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
+		<!-- /if -->
+		<!-- if windows -->
+		<echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
+		<!-- /if -->
+		
+	</target>
+
+	<!-- ImageMagick -->
+	<target name="Installing ImageMagick">
+		<echo>Installing ImageMagick</echo>
+		<!-- start web -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
+		<!-- if linux|mac --><sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/><!-- /if -->
+		<!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec><!-- /if -->
+		<delete file="imagemagick.lzma"/>
+		<unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/${shell.name}"/>
+		<delete file="imagemagick.comp"/>
+		<!-- end web -->
+
+		<!-- start cdrom -->
+		<copy todir="${installDir}/bin/${shell.name}">
+			<fileset dir="${orig.dir}/Software/imagemagick/${rk.os}"/>
+		</copy>
+		<!-- end cdrom -->
+
+		<chmod dir="${installDir}/bin/${shell.name}/imagemagick/bin" includes="*" perm="775"/>
+		
+	</target>
+
+	<!-- Ghostscript -->
+	<target name="Installing Ghostscript" depends="">
+		<echo message="Installing Ghostscript"/>
+		<!-- start web -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
+		<!-- if linux|mac --><sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/><!-- /if -->
+		<!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec><!-- /if -->
+		<delete file="ghostscript.lzma"/>
+		<unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/${shell.name}" />
+		<delete file="ghostscript.comp"/>
+		<!-- end web -->
+
+		<!-- start cdrom -->
+		<copy todir="${installDir}/bin/${shell.name}">
+			<fileset dir="${orig.dir}/Software/ghostscript/${rk.os}"/>
+		</copy>
+		<!-- end cdrom -->
+
+		<chmod dir="${installDir}/bin/${shell.name}/ghostscript/bin" includes="*" perm="775"/>
+	</target>
+
+	<!-- Start menu shortcuts -->
+	<target name="Installing Start Menu Shortcuts">
+
+		<mkdir dir="${startmenu.path}\Documentation"/>
+		
+		<shortcut
+			file="${startmenu.path}\Greenstone Server.lnk"
+			execute="${installDir}\server.exe"
+			workingDirectory="${installDir}"
+			iconFile="${installDir}\web\images\serverico.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${startmenu.path}\Librarian Interface (GLI).lnk"
+			execute="${installDir}\gli\gli.bat"
+			workingDirectory="${installDir}\gli"
+			iconFile="${installDir}\web\images\icon.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${startmenu.path}\Librarian Interface for Remote Server (Client GLI).lnk"
+			execute="${installDir}\gli\client-gli.bat"
+			workingDirectory="${installDir}\gli"
+			iconFile="${installDir}\web\images\icon.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${startmenu.path}\Metadata Set Editor (GEMS).lnk"
+			execute="${installDir}\gli\gems.bat"
+			workingDirectory="${installDir}\gli"
+			iconFile="${installDir}\web\images\gems.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${startmenu.path}\Uninstall.lnk"
+			execute="${installDir}\Uninstall.bat"
+			workingDirectory="${installDir}"
+			iconFile="${installDir}\web\images\uninstall.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${startmenu.path}\Documentation\READMEen.lnk"
+			execute="${installDir}\READMEen.txt" />
+
+		<shortcut
+			file="${startmenu.path}\Documentation\Greenstone Wiki.url"
+			url="http://wiki.greenstone.org" />
+
+		<shortcut
+			file="${startmenu.path}\Documentation\Greenstone Website.url"
+			url="http://www.greenstone.org" />
+			
+	</target>
+
+	<target name="Configuring Administration Pages" if="enable.admin.pages">
+		<echo>Enabling Admin Pages</echo>
+		<rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
+		<echo>Creating admin and demo users</echo>
+		<adduser txt2db="${installDir}/bin/${shell.name}/txt2db"
+			usersDb="${installDir}/etc/users.gdb"
+			username="admin"
+			password="${admin.password}"
+			groups="administrator,colbuilder,all-collections-editor"
+			comment="created at install time"/>
+		<adduser
+			txt2db="${installDir}/bin/${shell.name}/txt2db"
+			usersDb="${installDir}/etc/users.gdb"
+			username="demo"
+			password="demo"
+			groups="demo"
+			comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
+	</target>
+
+	<target name="Installing Documented Examples">
+		<copy todir="${installDir}/collect">
+			<fileset dir="${orig.dir}/Documented Examples" includes="documented-examples/**/*"/>
+		</copy>
+	</target>
+
+</project>
Index: /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml
===================================================================
--- /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml	(revision 21393)
+++ /main/trunk/release-kits/kits/sork2/ant-scripts/build.xml	(revision 21394)
@@ -136,4 +136,18 @@
 	</target>
 
+	<target name="export-gsdl-gli">
+		<delete dir="${dest}"/>
+		<exec executable="svn">
+			<arg value="export"/>
+			<arg value="${svn.root}/main/${branch.path}/greenstone2"/>
+			<arg value="${dest}"/>
+		</exec>
+		<exec executable="svn">
+			<arg value="export"/>
+			<arg value="${svn.root}/main/${branch.path}/gli"/>
+			<arg value="${dest}/gli"/>
+		</exec>
+	</target>
+
 
 </project>
Index: /main/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml
===================================================================
--- /main/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml	(revision 21393)
+++ /main/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml	(revision 21394)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <!--
-		.......................................................... 
+		..........................................................
 		August 2008
 		Targets for Greenstone2 release kits
@@ -17,182 +17,4 @@
 	</target>
 
-	<target name="export-gsdl-gli">
-		<delete dir="${dest}"/>
-		<exec executable="svn">
-			<arg value="export"/>
-			<arg value="${svn.root}/main/${branch.path}/greenstone2"/>
-			<arg value="${dest}"/>
-		</exec>
-		<exec executable="svn">
-			<arg value="export"/>
-			<arg value="${svn.root}/main/${branch.path}/gli"/>
-			<arg value="${dest}/gli"/>
-		</exec>
-	</target>
-
-	<target name="drop-in-docs">
-		<echo level="info">Dropping gsdl docs into distribution</echo>
-		<copy todir="${gsdl.basedir}" overwrite="true">
-			<fileset dir="${rk.home}/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
-		</copy>
-	</target>
-
-	<target name="insert-export-to-cd-package">
-		<mkdir dir="${gsdl.basedir}/bin/windows"/>
-		<get src="${server.exe.location}" dest="${gsdl.basedir}/bin/windows/server.exe"/>
-		<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
-		<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
-	</target>
-
-	<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="create-binary-zip-windows">
-		<property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
-		<copy todir="${binzip.dir}">
-			<fileset dir="distributions/web"/>
-		</copy>
-
-		<!-- 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.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
-		</delete>
-	</target>
-
-	<target name="create-needed-empty-files">
-		<mkdir dir="${gsdl.basedir}/tmp"/>
-		<chmod dir="${gsdl.basedir}/tmp" perm="a+rwx"/>
-		<echo file="${gsdl.basedir}/etc/usage.txt"></echo>
-	</target>
-
-	<target name="dist-clean-sourcecode">
-
-		<!-- delete the sourcecode -->
-		<delete>
-			<fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
-		</delete>
-		<delete dir="distributions/web/common-src"/>
-		<delete dir="distributions/web/build-src"/>
-		<delete dir="distributions/web/runtime-src"/>
-		<delete>
-			<fileset dir="distributions/web" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h"/>
-		</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="make-common-src">
-		<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
-		<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
-	</target>
-
-	<target name="checkout-gsdl-gli">
-		<exec executable="svn">
-			<arg value="checkout"/>
-			<arg value="${svn.root}/main/${branch.path}/greenstone2"/>
-			<arg value="${basedir}/compiled"/>
-		</exec>
-                <exec executable="svn">
-			<arg value="checkout"/>
-			<arg value="${svn.root}/main/${branch.path}/gli"/>
-			<arg value="${basedir}/compiled/gli"/>
-		</exec>
-	</target>
-
-	<target name="compile-gli">
-
-		<if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
-			<property name="script.format" value="sh"/>
-		<else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
-			<property name="script.format" value="bat"/>
-		</if></else></if>
-		
-		<echo>Compiling gli...</echo>
-		<exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
-
-		<echo>Creating jar...</echo>
-		<exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
-
-		<echo>Cleaning up intermediate files...</echo>
-		<delete dir="${glibasedir}/jar"/>
-		<delete dir="${glibasedir}/classes/org"/>
-
-		<if><bool><isset property="gsdlbasedir"/></bool>
-			<echo>Putting gli server jar in a better place</echo>
-			<exec executable="mv" failonerror="true">
-				<arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
-			</exec>
-		</if>
-
-	</target>
-
-	<target name="clean">
-		<antcall target="clean-compiled"/>
-		<antcall target="clean-distributions"/>
-		<antcall target="clean-components"/>
-		<antcall target="clean-installer"/>
-		<antcall target="clean-wrapped-installer"/>
-		<antcall target="clean-cdrom"/>
-	</target>
-
-	<target name="clean-compiled">
-		<delete dir="compiled"/>
-	</target>
-
-	<target name="clean-distribution">
-		<delete dir="distributions"/>
-	</target>
-
-	<target name="clean-components">
-		<delete dir="components"/>
-	</target>
-
-	<target name="clean-installer">
-		<delete dir="installer"/>
-	</target>
-
-	<target name="clean-wrapped-installer">
-		<delete dir="wrapped-installer"/>
-	</target>
-
-	<target name="clean-cdrom">
-		<delete dir="cdrom"/>
-	</target>
-
-	<target name="copy-greenstone2-installer-files">
-
-		<!-- the installer descriptors -->
-		<copy todir="installer" file="${rk.home}/greenstone2/installer/antinstall-config.xml" overwrite="true"/>
-		<copy todir="installer" file="${rk.home}/greenstone2/installer/build.xml" overwrite="true"/>
-
-	</target>
-
 </project>
 	
