Index: release-kits/wirk3/ant-scripts/build.xml
===================================================================
--- release-kits/wirk3/ant-scripts/build.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/build.xml	(revision 15053)
@@ -15,6 +15,6 @@
 	<import file="compile.xml"/>
 	<import file="create-distribution.xml"/>
+	<import file="create-launcher.xml"/>
 	<import file="create-installer.xml"/>
-	<import file="create-launcher.xml"/>
 	<import file="wrap.xml"/>
 
@@ -24,6 +24,6 @@
 		<addressedcall target="compile"/>
 		<addressedcall target="create-distribution"/>
+		<addressedcall target="create-launcher"/>
 		<addressedcall target="create-installer"/>
-		<addressedcall target="create-launcher"/>
 		<addressedcall target="wrap"/>
 	</target>
Index: release-kits/wirk3/ant-scripts/compile.xml
===================================================================
--- release-kits/wirk3/ant-scripts/compile.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/compile.xml	(revision 15053)
@@ -32,5 +32,5 @@
 		<if><bool><istrue value="${execute}"/></bool>
 			<svn>
-				<checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
+				<checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3" revision="${branch.revision}"/>
 			</svn>
 		</if>
@@ -45,5 +45,10 @@
 	<target name="dist-prepare-windows">
 		<if><bool><istrue value="${execute}"/></bool>
-			<ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-windows"  inheritAll="false"/>
+			<ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-windows" inheritAll="false">
+				<property name="app.version" value="${version}"/>
+				<property name="branch.path" value="${branch.path}"/>
+				<property name="branch.revision" value="${branch.revision}"/>
+			</ant>
+
 		</if>	
 	</target>
@@ -56,5 +61,9 @@
 	<target name="dist-build-windows">
 		<if><bool><istrue value="${execute}"/></bool>
-			<ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-windows" inheritAll="false"/>
+			<ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-windows" inheritAll="false">
+				<property name="app.version" value="${version}"/>
+				<property name="branch.path" value="${branch.path}"/>
+				<property name="branch.revision" value="${branch.revision}"/>
+			</ant>
 		</if>
 	</target>
@@ -65,6 +74,6 @@
 			<mkdir dir="greenstone3/gsdl-manuals"/>
 			<svn>
-				<checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
-				<checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
+				<checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals" revision="${branch.revision}"/>
+				<checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared" revision="${branch.revision}"/>
 			</svn>
 			<javac srcdir="greenstone3/gsdl-manuals/shared" destdir="greenstone3/gsdl-manuals/shared" debug="on"><include name="*.java"/></javac>
@@ -98,5 +107,4 @@
 			</exec>
 			
-
 		</if>
 	</target>
Index: release-kits/wirk3/ant-scripts/create-distribution.xml
===================================================================
--- release-kits/wirk3/ant-scripts/create-distribution.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/create-distribution.xml	(revision 15053)
@@ -37,5 +37,5 @@
 			<delete dir="distribution/greenstone3"/>
 			<svn>
-				<export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/>
+				<export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3" revision="${branch.revision}"/>
 			</svn>
 		</if>
@@ -62,4 +62,5 @@
 				<property name="app.version" value="${version}"/>
 				<property name="branch.path" value="${branch.path}"/>
+				<property name="branch.revision" value="${branch.revision}"/>
 			</ant>
 		</if>
@@ -91,11 +92,11 @@
 
 			<delete dir="distribution/greenstone3/lib/jni"/>
-			<copy todir="distribution/greenstone3/lib"><fileset dir="greenstone3/lib/jni"/></copy>
+			<copy todir="distribution/greenstone3/lib/jni"><fileset dir="greenstone3/lib/jni"/></copy>
 			
 			<delete dir="distribution/greenstone3/gs2build/bin/windows"/>
-			<copy todir="distribution/greenstone3/gs2build/bin"><fileset dir="greenstone3/gs2build/bin/windows"/></copy>
+			<copy todir="distribution/greenstone3/gs2build/bin/windows"><fileset dir="greenstone3/gs2build/bin/windows"/></copy>
 						
 			<delete dir="distribution/greenstone3/gs2build/bin/java"/>
-			<copy todir="distribution/greenstone3/gs2build/bin"><fileset dir="greenstone3/gs2build/bin/java"/></copy>
+			<copy todir="distribution/greenstone3/gs2build/bin/java"><fileset dir="greenstone3/gs2build/bin/java"/></copy>
 
 		</if>
Index: release-kits/wirk3/ant-scripts/create-installer.xml
===================================================================
--- release-kits/wirk3/ant-scripts/create-installer.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/create-installer.xml	(revision 15053)
@@ -12,4 +12,10 @@
 
 	<target name="create-installer">
+		<addressedcall target="setup-for-installer-creation"/>
+		<addressedcall target="compile-installer"/>
+		<addressedcall target="clean-up-after-installer-creation"/>
+	</target>
+
+	<target name="setup-for-installer-creation">
 		<if><bool><istrue value="${execute}"/></bool>
 
@@ -18,4 +24,10 @@
 			<copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/>
 			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
+			
+		</if>
+	</target>
+
+	<target name="compile-installer">
+		<if><bool><istrue value="${execute}"/></bool>
 
 			<installer file="${basedir}/installer/greenstone-${version}-win32.jar"
@@ -48,3 +60,10 @@
 	</target>
 
+	<target name="clean-up-after-installer-creation">
+		<if><bool><istrue value="${execute}"/></bool>
+			<delete file="${basedir}/installer/antinstall-config.xml"/>
+		</if>
+	</target>
+
+	
 </project>
Index: release-kits/wirk3/ant-scripts/create-launcher.xml
===================================================================
--- release-kits/wirk3/ant-scripts/create-launcher.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/create-launcher.xml	(revision 15053)
@@ -39,4 +39,6 @@
 			<launch4j configFile="${basedir}/launcher/launcher.xml" />
 
+			<echo>Putting a copy of the launcher in winutil</echo>
+			<copy file="${basedir}/launcher/launch-installer.exe" tofile="${basedir}/distribution/greenstone3/winutil/launcher.exe" overwrite="true"/>
 		</if>
 	</target>
Index: release-kits/wirk3/ant-scripts/init.xml
===================================================================
--- release-kits/wirk3/ant-scripts/init.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/init.xml	(revision 15053)
@@ -185,9 +185,4 @@
 		<echo level="info">Determining the branch path...</echo>
 		<if>
-			<bool><equals arg1="trunk" arg2="${version}"/></bool>
-			<property name="branch.path" value="trunk"/>
-		</if>
-
-		<if>
 			<bool><not><isset property="branch.path"/></not></bool>
 			<fail>You have not specified a branch path where code will come from in the repository</fail>
@@ -196,122 +191,15 @@
 		<echo level="info">Branch Path: ${branch.path}</echo>
 		<echo level="info"/>
-
-		<!-- check branches exist -->
-		<property name="svn.greenstone3" value="${svn.root}/greenstone3/${branch.path}"/>
-		<property name="svn.gsdl" value="${svn.root}/gsdl/${branch.path}"/>
-		<property name="svn.gli" value="${svn.root}/gli/${branch.path}"/>
-		<property name="svn.indexers" value="${svn.root}/indexers/${branch.path}"/>
-		<property name="svn.documentation" value="${svn.root}/documentation/${branch.path}"/>
-
-		<!-- greenstone3 branch -->
-		<echo level="info">Checking that ${svn.greenstone3} exists...</echo>
-
-		<!-- try to put the html index of the location into the temp file -->
-		<setloglevel level="error"/>
-		<try>
-			<get src="${svn.greenstone3}" dest="${temp.file}"/>
-			<catch>
-				<echo level="error">No, it does not exist</echo>
-				<property name="svn.greenstone3.unavailable" value="true"/>
-			</catch>
-		</try>
-		<setloglevel level="info"/>
-		<if>
-			<bool><not><istrue value="${svn.greenstone3.unavailable}"/></not></bool>
-			<echo level="info">Yes, it exists</echo>
-		</if>
-
-		<!-- gsdl branch -->
-		<echo level="info">Checking that ${svn.gsdl} exists...</echo>
-		<setloglevel level="error"/>
-		<try>
-			<get src="${svn.gsdl}" dest="${temp.file}"/>
-			<catch>
-				<echo level="error">No, it does not exist</echo>
-				<property name="svn.gsdl.unavailable" value="true"/>
-			</catch>
-		</try>
-		<setloglevel level="info"/>
-		<if>
-			<bool><not><istrue value="${svn.gsdl.unavailable}"/></not></bool>
-			<echo level="info">Yes, it exists</echo>
-		</if>
-
-
-		<!-- gli branch -->
-		<echo level="info">Checking that ${svn.gli} exists...</echo>
-		<!-- try to put the  html index of the location into the temp file -->
-		<setloglevel level="error"/>
-		<try>
-			<get src="${svn.gli}" dest="${temp.file}"/>
-			<catch>
-				<echo level="error">No, does not exist</echo>
-				<property name="svn.gli.unavailable" value="true"/>
-			</catch>
-		</try>
-		<setloglevel level="info"/>
-		<if>
-			<bool><not><istrue value="${svn.gli.unavailable}"/></not></bool>
-			<echo level="info">Yes, it exists</echo>
-		</if>
-
-
-		<!-- indexers branch -->
-		<echo level="info">Checking that ${svn.indexers} exists...</echo>
-		<!-- try to put the  html index of the location into the temp file -->
-		<setloglevel level="error"/>
-		<try>
-			<get src="${svn.indexers}" dest="${temp.file}"/>
-			<catch>
-				<echo level="error">No, it does not exist</echo>
-				<property name="svn.indexers.unavailable" value="true"/>
-			</catch>
-		</try>
-		<setloglevel level="info"/>
-		<if>
-			<bool><not><istrue value="${svn.indexers.unavailable}"/></not></bool>
-			<echo level="info">Yes, it exists</echo>
-		</if>
-
-		<!-- documentation branch -->
-		<echo level="info">Checking that ${svn.documentation} exists...</echo>
-		<!-- try to put the  html index of the location into the temp file -->
-		<setloglevel level="error"/>
-		<try>
-			<get src="${svn.documentation}" dest="${temp.file}"/>
-			<catch>
-				<echo level="error">No, it does not exist</echo>
-				<property name="svn.documentation.unavailable" value="true"/>
-			</catch>
-		</try>
-		<setloglevel level="info"/>
-		<if>
-			<bool><not><istrue value="${svn.documentation.unavailable}"/></not></bool>
-			<echo level="info">Yes, it exists</echo>
-		</if>
-
-
-		<!-- clean up the temp file -->
-		<setloglevel level="error"/>
-		<delete file="${temp.file}"/>
-		<setloglevel level="info"/>
-
-
-		<!-- fail if some branches were missing -->
-		<if>
-			<bool>
-				<or>
-					<istrue value="${svn.greenstone3.unavailable}"/>
-					<istrue value="${svn.gsdl.unavailable}"/>
-					<istrue value="${svn.gli.unavailable}"/>
-					<istrue value="${svn.indexers.unavailable}"/>
-					<istrue value="${svn.documentation.unavailable}"/>
-				</or>
-			</bool>
-			<fail>Some branches do not exist, or you are unable to access them from where you are. Please review the list above and create any branches that are missing, or run this script from somewhere with access to the repository.</fail>
-			<else>
-				<echo level="info">All exist</echo>
-			</else>
-		</if>
+		
+		<!-- check branch.revision -->
+		<echo level="info">Determining the branch revision...</echo>
+		<if>
+			<bool><not><isset property="branch.revision"/></not></bool>
+			<property name="branch.revision" value="HEAD"/>
+			<!--<echo level="info">No branch revision specified, defaulting to HEAD</echo>-->
+		</if>
+
+		<echo level="info">Branch Revision: ${branch.revision}</echo>
+		<echo level="info"/>
 
 	</target>
Index: release-kits/wirk3/ant-scripts/operations-on-gs3home.xml
===================================================================
--- release-kits/wirk3/ant-scripts/operations-on-gs3home.xml	(revision 15025)
+++ release-kits/wirk3/ant-scripts/operations-on-gs3home.xml	(revision 15053)
@@ -101,5 +101,5 @@
 		<move todir="${gs2build.home}/source/indexers" failonerror="false"><fileset dir="${gs2build.home}/indexers" defaultexcludes="no"/></move>
 		<move file="${gs2build.home}/win32.mak" tofile="${gs2build.home}/source/win32.mak"/>
-		<move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/source/setup.bat"/>
+		<!--<move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/source/setup.bat"/>-->
 		<move file="${gs2build.home}/WIN32cfg.h" tofile="${gs2build.home}/source/WIN32cfg.h"/>
 
Index: release-kits/wirk3/installer/antinstall-config.xml
===================================================================
--- release-kits/wirk3/installer/antinstall-config.xml	(revision 15025)
+++ release-kits/wirk3/installer/antinstall-config.xml	(revision 15053)
@@ -45,4 +45,5 @@
 		<comment displayText="Please select the ports which the web server (Apache Tomcat) will use  will use. It is usually safe to accept the defaults by just clicking Next. The exception is when you are running other services on these ports - if this is the case, select some free ports and click Next."/>
 
+		<text property="tomcat.server" defaultValue="localhost" displayText="Tomcat Server"/>
 		<text property="tomcat.port" defaultValue="8080" displayText="Tomcat Port"/>
 		<text property="tomcat.shutdown.port" defaultValue="8005" displayText="Tomcat Shutdown Port"/>
Index: release-kits/wirk3/installer/build.xml
===================================================================
--- release-kits/wirk3/installer/build.xml	(revision 15025)
+++ release-kits/wirk3/installer/build.xml	(revision 15053)
@@ -24,5 +24,4 @@
 		<echo>antinstaller.jar: ${antinstaller.jar}</echo>
 		<mkdir dir="${installDir}"/>
-
 
 		<!-- install binaries  -->
@@ -106,11 +105,12 @@
 		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
 
-		<!-- in the gs3-setup.sh file, set ANT_HOME and put it in PATH -->
+		<!-- get the found JRE_HOME -->
+		<exec executable="cmd" dir="${installDir}" outputproperty="backup.jre.home"><arg line="/C launch-installer.exe -find"/></exec>
+				
+		<!-- in the gs3-setup.sh file, set ANT_HOME and put it in PATH, and set the fallback JRE_HOME -->
 		<echo>In the gs3-setup.sh file, set ANT_HOME and put it in PATH</echo>
-		<exec executable="cmd" output="${installDir}/gs3-setup.sh" append="true">
-			<arg
-			line="/C echo set ANT_HOME=${installDir}/packages/ant
-set PATH=%ANT_HOME%/bin:%PATH%"/>
-		</exec>
+		<exec executable="cmd" output="${installDir}/machine.bat" append="true"><arg line="/C echo set ANT_HOME=${installDir}/packages/ant"/></exec>
+		<exec executable="cmd" output="${installDir}/machine.bat" append="true"><arg line="/C echo set PATH=\%ANT_HOME\%/bin:\%PATH\%"/></exec>
+		<exec executable="cmd" output="${installDir}/machine.bat" append="true"><arg line="/C echo set BACKUP_JRE_HOME=${backup.jre.home}"/></exec>
 
 		<!-- delete unneeded files -->	    
Index: release-kits/wirk3/launcher/launcher.xml
===================================================================
--- release-kits/wirk3/launcher/launcher.xml	(revision 15025)
+++ release-kits/wirk3/launcher/launcher.xml	(revision 15053)
@@ -1,5 +1,5 @@
 <launch4jConfig>
   <dontWrapJar>true</dontWrapJar>
-  <headerType>0</headerType>
+  <headerType>1</headerType>
   <jar>greenstone3.jar</jar>
   <outfile>@basedir@\launcher\launch-installer.exe</outfile>
Index: release-kits/wirk3/wrapper/wrapper.cpp
===================================================================
--- release-kits/wirk3/wrapper/wrapper.cpp	(revision 15025)
+++ release-kits/wirk3/wrapper/wrapper.cpp	(revision 15053)
@@ -63,5 +63,7 @@
 	//if it failed, launch the installer for the bundled java, then try again
 	if ( launch_exit_code == 1 ) {
-		cout << "It appears that you do not have an installed Java Runtime Enviromnent (JRE)" << endl;
+		cout << "Greenstone requires Java Runtime Enviromnent (JRE) 1.4.0 or greater" << endl;
+		cout << "It appears that you do not have an a suitible JRE installed" << endl;
+
 		
 		//is this an installer with the bundled JRE?
