Index: /release-kits/wirk3/ant-scripts/create-installer.xml
===================================================================
--- /release-kits/wirk3/ant-scripts/create-installer.xml	(revision 15690)
+++ /release-kits/wirk3/ant-scripts/create-installer.xml	(revision 15691)
@@ -14,5 +14,5 @@
 		<addressedcall target="setup-for-installer-creation"/>
 		<addressedcall target="compile-installer"/>
-		<addressedcall target="clean-up-after-installer-creation"/>
+		<!--<addressedcall target="clean-up-after-installer-creation"/>-->
 	</target>
 
@@ -20,5 +20,4 @@
 		<if><bool><istrue value="${execute}"/></bool>
 			
-			<echo>Project Path: ${project.path}</echo>
 			<mkdir dir="${basedir}/installer"/>
 			<copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/>
@@ -56,24 +55,25 @@
 					extractType="NonExtractor"
 					installConfig="${basedir}/installer/antinstall-config.xml"
-					buildFile="${project.installer.path}/build.xml"
-					antInstallLib="${ant.installer.home}/lib"
-					antLib="${ant.installer.home}/antlib"
+					buildFile="${basedir}/installer/build.xml"
+					antInstallLib="${wirk3.home}/bin/ant-installer/lib"
+					antLib="${wirk3.home}/bin/ant-installer/antlib"
 					validateConfig="true"
 					icons="bluecurve">
 
-				<zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
+				<zipfileset dir="${basedir}/installer/cp" includes="**"/>
+				<zipfileset dir="${wirk3.home}/installer/cp-extra" includes="**"/>
 				<zipfileset dir="${wirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
 
-				<zipfileset dir="${project.path}" includes="*"/>
-				<zipfileset dir="${project.path}/bin" prefix="bin"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/docs" prefix="docs"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/gli" prefix="gli"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/lib" prefix="lib"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/web" prefix="web"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/packages" prefix="packages"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/resources" prefix="resources"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/winutil" prefix="winutil"><include name="**/*"/></zipfileset>
-				<zipfileset dir="${project.path}/src" prefix="src"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
+				<zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/winutil" prefix="winutil"><include name="**/*"/></zipfileset>
+				<zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
 
 			</installer>
Index: /release-kits/wirk3/ant-scripts/init.xml
===================================================================
--- /release-kits/wirk3/ant-scripts/init.xml	(revision 15690)
+++ /release-kits/wirk3/ant-scripts/init.xml	(revision 15691)
@@ -19,11 +19,8 @@
 			<include name="*.jar"/>
 		</fileset>
-		
 		<pathelement path="${wirk3.home}/ant-scripts/tasks/orans"/>
-
 		<!-- antinstaller -->
 		<pathelement path="${wirk3.home}/bin/ant-installer/lib/ant-installer-ext.jar"/>
 		<pathelement path="${wirk3.home}/bin/ant-installer/lib/ant-installer.jar"/>
-		
 	</path>
 	
@@ -45,5 +42,5 @@
 	<typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
 	<taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/> 
-
+	
 	<!-- load in static properties from build.properties -->
 	<property file="build.properties" />
@@ -53,12 +50,4 @@
 	<property name="bundled.version.tomcat" value="5.5.25"/>
 	<property name="bundled.version.ant" value="1.6.5"/>
-
-	<!-- project details (for ant-installer) -->
-	<property name="project.name"					value="Greenstone3"/>
-	<property name="project.short.name"			value="greenstone3"/>
-	<property name="project.path"					value="${basedir}/distribution/greenstone3"/>
-	<property name="project.installer.path"	value="${wirk3.home}/installer"/>
-	<property name="project.version"				value="${version}"/>
-	<property name="ant.installer.home"			value="${wirk3.home}/bin/ant-installer"/>
 
 	<!-- somewhere to store temporary text -->
Index: /release-kits/wirk3/ant-scripts/wrap.xml
===================================================================
--- /release-kits/wirk3/ant-scripts/wrap.xml	(revision 15690)
+++ /release-kits/wirk3/ant-scripts/wrap.xml	(revision 15691)
@@ -15,32 +15,98 @@
 
 	<target name="wrap">
-		<addressedcall target="setup-for-wrapping"/>
+		<addressedcall target="copy-files-for-wrapping"/>
+		<addressedcall target="tweak-files-for-wrapping"/>
+		<addressedcall target="compile-resources"/>
 		<addressedcall target="compile-wrapper"/>
-		<addressedcall target="clean-up-after-wrapping"/>
+		<addressedcall target="link-wrapper-no-java"/>
+		<addressedcall target="link-wrapper-with-java"/>
+		<!--<addressedcall target="clean-up-after-wrapping"/>-->
 	</target>
 
 
-	<target name="setup-for-wrapping">
+	<target name="copy-files-for-wrapping">
 		<if><bool><istrue value="${execute}"/></bool>
-
+			
 			<!--create a directory to build the wrapped installer in -->
 			<mkdir dir="${basedir}/wrapped-installer/build"/>
+
+			<!-- copy source files -->
 			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.cpp"/>
+			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/search4j/libsearch4j.h"/>
 			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.rc"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper-with-jre.rc"/>
-
-			<!-- copy resources to bundle -->
-			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/icon/gs3.ico"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/${java.installer}"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/search4j/search4j.exe"/>
-			<copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/greenstone-${version}-win32.jar"/>
+		
+		</if>
+	</target>
+	
+	<target name="tweak-files-for-wrapping">
+		<if><bool><istrue value="${execute}"/></bool>
 			
-
 			<!-- substitute the real java installer filename and min version into various files -->
+			<echo>Substitute concrete values of things into source files</echo>
 			<rsr file="${basedir}/wrapped-installer/build/wrapper.rc" pattern="@java.installer@" replacement="${java.installer}"/>
-			<rsr file="${basedir}/wrapped-installer/build/wrapper-with-jre.rc" pattern="@java.installer@" replacement="${java.installer}"/>
 			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${java.installer}"/>
 			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
+			
+		</if>
+	</target>
 
+	<target name="compile-resources">
+		<if><bool><istrue value="${execute}"/></bool>
+			
+			<if>
+				<bool>
+					<not>
+						<uptodate targetfile="${basedir}/wrapped-installer/build/wrapper.RES">
+							<srcfiles dir="${wirk3.home}/icon" includes="gs3.ico"/>
+							<srcfiles dir="${wirk3.home}/wrapper" includes="${java.installer}"/>
+							<srcfiles dir="${wirk3.home}/wrapper" includes="*.bmp"/>
+							<srcfiles dir="${wirk3.home}/wrapper" includes="*.rc"/>
+							<srcfiles dir="${basedir}/installer" includes="greenstone3.jar"/>
+						</uptodate>
+					</not>
+				</bool>
+				
+				<echo>Compiling resources</echo>
+
+				<echo>copying the resource files into place</echo>
+				<copy todir="${basedir}/wrapped-installer/build">
+					<fileset dir="${wirk3.home}/wrapper" includes="*.bmp,${java.installer}"/>
+					<fileset dir="${wirk3.home}/icon" includes="gs3.ico"/>
+				</copy>
+				<copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/greenstone-${version}-win32.jar"/>
+
+				<echo>splitting the big resources into chunks</echo>
+				<property name="resource.chunk.size" value="8388608" /><!-- 8Mib -->
+				<delete><fileset dir="${basedir}/wrapped-installer/build" includes="greenstone3.jar.*"/></delete>
+				<exec executable="split.exe" dir="${basedir}/wrapped-installer/build">
+					<arg value="${basedir}/wrapped-installer/build/greenstone3.jar" />
+					<arg value="${resource.chunk.size}" />
+				</exec>
+				<delete><fileset dir="${basedir}/wrapped-installer/build" includes="${java.installer}.*"/></delete>
+				<exec executable="split.exe" dir="${basedir}/wrapped-installer/build">
+					<arg value="${basedir}/wrapped-installer/build/${java.installer}" />
+					<arg value="${resource.chunk.size}" />
+				</exec>
+				
+				<echo>adding the chunks to the resource scripts</echo>
+				
+				<!-- compile the resources with bundled java-->
+				<exec executable="rc" dir="${basedir}/wrapped-installer/build">
+					<arg line="wrapper.rc"/>
+				</exec>
+				<move file="${basedir}/wrapped-installer/build/wrapper.RES" tofile="${basedir}/wrapped-installer/build/wrapper-with-jre.RES"/>
+
+				<!-- compile the resources without bundled java -->
+				<rsr file="${basedir}/wrapped-installer/build/wrapper.rc" pattern="^.*//bundled java only$" replacement=""/>
+				<exec executable="rc" dir="${basedir}/wrapped-installer/build">
+					<arg line="wrapper.rc"/>
+				</exec>
+				
+				<else>
+					<echo>Resourses are up-to-date, will not compile</echo>
+				</else>
+			</if>
+			
 			
 		</if>
@@ -50,24 +116,23 @@
 		<if><bool><istrue value="${execute}"/></bool>
 
-			<echo>Compiling the resources</echo>
-			<exec executable="rc" dir="${basedir}/wrapped-installer/build">
-				<arg line="wrapper.rc"/>
-			</exec>
-			<exec executable="rc" dir="${basedir}/wrapped-installer/build">
-				<arg line="wrapper-with-jre.rc"/>
-			</exec>
-
-			
-			<echo>Compiling the wrapper</echo>
 			<exec executable="cl" dir="${basedir}/wrapped-installer/build">
-				<arg line="/c -GX wrapper.cpp /out:wrapper.obj"/>
+				<arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/>
 			</exec>
 			
-			<echo>Linking</echo>
+		</if>
+	</target>
+	
+	<target name="link-wrapper-no-java">
+		<if><bool><istrue value="${execute}"/></bool>
 			<exec executable="link" dir="${basedir}/wrapped-installer/build">
-				<arg line="/OUT:..\greenstone-${version}-win32.exe wrapper.obj wrapper.res"/>
+				<arg line="/OUT:..\greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib wrapper.obj wrapper.res"/>
 			</exec>
+		</if>
+	</target>
+
+	<target name="link-wrapper-with-java">
+		<if><bool><istrue value="${execute}"/></bool>
 			<exec executable="link" dir="${basedir}/wrapped-installer/build">
-				<arg line="/OUT:..\greenstone-${version}-win32-with-java.exe wrapper.obj wrapper-with-jre.res"/>
+				<arg line="/OUT:..\greenstone-${version}-win32-with-java.exe gdi32.lib advapi32.lib shell32.lib user32.lib wrapper.obj wrapper-with-jre.res"/>
 			</exec>
 		</if>
Index: /release-kits/wirk3/installer/build.xml
===================================================================
--- /release-kits/wirk3/installer/build.xml	(revision 15690)
+++ /release-kits/wirk3/installer/build.xml	(revision 15691)
@@ -152,12 +152,40 @@
 	<target name="install-start-menu-shortcuts">
 
-		<mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@"/>
+		<mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@\documentation"/>
+		
 		
 		<shortcut
 			file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone3 Server.lnk"
-			execute="${installDir}/gs3-server.bat"
+			execute="${installDir}\gs3-server.bat"
 			workingDirectory="${installDir}"
-			iconFile="${installDir}/gli/gli.ico"
+			iconFile="${installDir}\resources\images\gs3.ico"
 			iconIndex="0" />
+
+		<shortcut
+			file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Librarian Interface (GLI).lnk"
+			execute="${installDir}\gli\gli4gs3.bat"
+			workingDirectory="${installDir}\gli"
+			iconFile="${installDir}\resources\images\gs3.ico"
+			iconIndex="0" />
+			
+		<shortcut
+			file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Editor for Metadata Sets (GEMS).lnk"
+			execute="${installDir}\gli\gems4gs3.bat"
+			workingDirectory="${installDir}\gli"
+			iconFile="${installDir}\resources\images\gs3.ico"
+			iconIndex="0" />
+
+		<shortcut
+			file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\README.lnk"
+			execute="${installDir}\README.txt" />
+
+		<shortcut
+			file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone3 Users' Guide.lnk"
+			execute="${installDir}\documentation\manual\manual.pdf" />
+
+		<shortcut
+			file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone2 Users' Guide.lnk"
+			execute="${installDir}\documentation\manual\gs2_user_en.pdf" />
+
 			
 	</target>
Index: /release-kits/wirk3/src/wirk3.cpp
===================================================================
--- /release-kits/wirk3/src/wirk3.cpp	(revision 15690)
+++ /release-kits/wirk3/src/wirk3.cpp	(revision 15691)
@@ -37,4 +37,5 @@
 	
 	//set the classpath
+	//WIRK3_HOME + "\\ant-scripts\\tasks\\orangevolt\\roxes-win32forjava-1.1.1.jar;" + WIRK3_HOME + "\\ant-scripts\\tasks\\orangevolt\\orangevolt-ant-tasks-1.3.8.jar;" + 
 	classpath = pwd + "\\installer\\cp;" + JAVA_HOME + "\\lib\\tools.jar;" + WIRK3_HOME + "\\lib\\serializer.jar;" + WIRK3_HOME + "\\lib\\xalan.jar;" + WIRK3_HOME + "\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-antlr.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-bcel.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-bsf.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-log4j.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-oro.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-regexp.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-apache-resolver.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-commons-logging.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-commons-net.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-icontract.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jai.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-javamail.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jdepend.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jmf.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-jsch.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-junit.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-launcher.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-netrexx.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-nodeps.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-starteam.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-stylebook.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-swing.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-trax.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-vaj.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-weblogic.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-xalan1.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\ant-xslp.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\bin\\apache-ant-1.6.5\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-amaranth.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-bluecurve.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-crystalsvg.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-eclipse.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ai-icons-krystaline.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ant-installer-ext.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\ant-installer.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\jgoodies-edited-1_2_2.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\xercesImpl.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\lib\\xml-apis.jar;" + WIRK3_HOME + "\\bin\\ant-installer\\classes";
 	putenv( ("CLASSPATH=" + classpath).c_str() );
