Index: release-kits/lirk3/ant-scripts/create-installer.xml
===================================================================
--- release-kits/lirk3/ant-scripts/create-installer.xml	(revision 15203)
+++ release-kits/lirk3/ant-scripts/create-installer.xml	(revision 15205)
@@ -24,7 +24,27 @@
 			<copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml"/>
 			<copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml"/>
+			<copy todir="${basedir}/installer/cp"><fileset dir="${lirk3.home}/installer/cp"/></copy>
+
+			<!-- put the concrete values of things in the config -->
 			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
+			<rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
 			<rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/>
-			
+
+
+			<!-- put the concrete values of things in the text -->
+			<!-- default -->
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+
+			<!-- chinese -->
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
+			<rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+
 		</if>
 	</target>
@@ -32,4 +52,36 @@
 	<target name="compile-installer">
 		<if><bool><istrue value="${execute}"/></bool>
+
+			<installer file="${basedir}/installer/greenstone3-with-java.jar"
+					compress="true"
+					extractType="NonExtractor"
+					installConfig="${basedir}/installer/antinstall-config.xml"
+					buildFile="${basedir}/installer/build.xml"
+					antInstallLib="${lirk3.home}/bin/ant-installer/lib"
+					antLib="${lirk3.home}/bin/ant-installer/antlib"
+					validateConfig="true"
+					icons="bluecurve">
+
+				<!-- copy all the important files into the archive to be extracted for install -->
+				<zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
+				<zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></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/src" prefix="src"><include name="**/*"/></zipfileset>
+-->
+
+			</installer>
+
+			<!-- delete the 'bundled java only' lines from the installer config -->
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*&lt;!-- bundled java only --&gt;" replacement=""/>
 
 			<installer file="${basedir}/installer/greenstone3.jar"
@@ -47,4 +99,5 @@
 				<zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
 
+<!--
 				<zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
 				<zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
@@ -57,4 +110,5 @@
 				<zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
 				<zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
+-->
 			</installer>
 
Index: release-kits/lirk3/ant-scripts/init.xml
===================================================================
--- release-kits/lirk3/ant-scripts/init.xml	(revision 15203)
+++ release-kits/lirk3/ant-scripts/init.xml	(revision 15205)
@@ -43,5 +43,12 @@
 	<!-- bundled java strings -->
 	<!-- java.installer: use a filename which has only letters numbers and underscores -->
-	<property name="java.installer" value="jre_6u5_linux_i586"/>
+
+	<!-- the version numbers of bundled things -->
+	<property name="bundled.version.java" value="1.6.0_05"/>
+	<property name="bundled.version.tomcat" value="5.5.25"/>
+	<property name="bundled.version.ant" value="1.6.5"/>
+
+	<!--<property name="java.installer" value="jre_6u5_linux_i586"/>-->
+	<property name="java.installer" value="jre_6u5_tar_gz"/>
 	<property name="java.extracted" value="jre1.6.0_05"/>
 	<property name="java.min.version" value="1.5.0_00"/>
Index: release-kits/lirk3/ant-scripts/wrap.xml
===================================================================
--- release-kits/lirk3/ant-scripts/wrap.xml	(revision 15203)
+++ release-kits/lirk3/ant-scripts/wrap.xml	(revision 15205)
@@ -29,4 +29,5 @@
 			<copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/${java.installer}"/>
 			<copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3.jar"/>
+			<copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3-with-java.jar"/>
 
 			<!-- substitute the real java installer filename and min version into various files -->
@@ -46,4 +47,7 @@
 			</exec>
 			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
+				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_with_java_jar_start=greenstone3jar --readonly-text greenstone3-with-java.jar greenstone3-with-java.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_search4j_start=search4j --readonly-text search4j search4j.o"/>
 			</exec>
@@ -53,17 +57,25 @@
 
 
-			<echo level="info">create a header file declaring bundled greenstone.jar and search4j</echo>
-			<delete file="mywrapper.h"/>
-
-			<!-- greenstone.jar -->
+			<!-- 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>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
 
-			<!-- search4j -->
+			<!-- get size of greenstone-with-java.jar -->
+			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3-with-java.jar.ls"><arg line="-l greenstone3-with-java.jar"/></exec>
+			<exec executable="sed" inputstring="${greenstone3-with-java.jar.ls}" outputproperty="greenstone3-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
+
+			<!-- get size of search4j -->
 			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="search4j.ls"><arg line="-l search4j"/></exec>
 			<exec executable="sed" inputstring="${search4j.ls}" outputproperty="search4j.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 ${java.installer}"/></exec>
+			<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
+
+
+			<echo level="info">creating the header file for no java version</echo>
+			<delete file="mywrapper.h"/>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
 			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
-
 
 			<echo level="info">compile the wrapper program</echo>
@@ -78,8 +90,8 @@
 
 
-			<echo level="info">add java to the header file</echo>
-			<!-- java -->
-			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="java.ls"><arg line="-l ${java.installer}"/></exec>
-			<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
+			<echo level="info">creating the header file for bundled java version</echo>
+			<delete file="mywrapper.h"/>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3-with-java.jar.size}];"/></exec>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
 			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
 			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
@@ -92,5 +104,5 @@
 			<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  ../greenstone-${version}-linux-with-jre.bin mywrapper.o greenstone3.jar.o search4j.o java.o"/>
+				<arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin mywrapper.o greenstone3-with-java.jar.o search4j.o java.o"/>
 			</exec>
 
Index: release-kits/lirk3/installer/antinstall-config.xml
===================================================================
--- release-kits/lirk3/installer/antinstall-config.xml	(revision 15203)
+++ release-kits/lirk3/installer/antinstall-config.xml	(revision 15205)
@@ -6,58 +6,45 @@
 			debug="false"
 			lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
-			name="Greenstone3Installer"
-			windowIcon="/resources/gkmain_inv.png"
+			name="Greenstone3 Installer"
+			windowIcon="/resources/gs3-small.png"
 			defaultImageResource="/resources/makewavesdawn.png"
 			minJavaVersion="1.4">
 
-	<!--  each page element represents a page of the installer -->
-	<page
-			type="input"
-			name="intro"
-			displayText="Welcome to the Greenstone3 installer">
+	<!--  simple intro page -->
+	<page type="input" name="intro" displayText="">
+		<comment name="welcome-message"/>
 	</page>
 
 	<!--  type="license" shows a license page to click through -->
-	<page
-			type="license"
-			name="license"
-			displayText="License conditions"
-			resource="/LICENSE.txt">
-	</page>
+	<page type="license" name="license" resource="/LICENSE.txt"  displayText="" />
 
-	<!--  type="input" shows a list of editable options for the installer -->
-	<page
-			type="input"
-			name="destination"
-			displayText="Install Destination">
+	<!--  install destination page -->
+	<page type="input" name="destination">
 
-		<directory
-				property="installDir"
-				defaultValue="/usr/local/Greenstone-@version@"
-				defaultValueWin="${env.ProgramFiles}\Greenstone-@version@"
-				displayText="Select an installation directory"
-				create="true"/>
+		<directory property="installDir"
+			defaultValue="/usr/local/Greenstone-@version@"
+			defaultValueWin="${env.ProgramFiles}\Greenstone-@version@"
+			create="true"
+			displayText="" />
 
 	</page>
 
-	<page type="input" name="tomcatports" displayText="Tomcat Ports">
+	<page type="input" name="selector">
 
-		<comment name="tomcatportsdescription" 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."/>
+		<comment name="choose-components"/>
 
-		<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"/>
+		<target target="install-core-components" 	defaultValue="true" force="true" displayText="" />
+		<target target="install-java" 				defaultValue="true" displayText="" /> <!-- bundled java only -->
+		<target target="install-tomcat"				defaultValue="true" displayText="" />
+		<target target="install-ant"					defaultValue="true" displayText="" />
+		<target target="install-source-code"		defaultValue="false" displayText="" />
 
 	</page>
 
+	<page type="input" name="tomcat-config" ifProperty="(${install-tomcat}==true)">
 
-	<page
-			type="input"
-			name="selector"
-			displayText="Components to install">
-
-		<comment name="choosecomponents" displayText="Choose the components you want to install" bold="true"/>
-		<target displayText="Core components" target="default" defaultValue="true" force="true"/>
-		<target displayText="Source code" target="tgsrc" defaultValue="false"/>
+		<text property="tomcat.server" defaultValue="localhost" displayText=""/>
+		<text property="tomcat.port" defaultValue="8080" displayText=""/>
+		<text property="tomcat.shutdown.port" defaultValue="8005" displayText=""/>
 
 	</page>
@@ -66,5 +53,4 @@
 			type="progress"
 			name="progress"
-			displayText="Installation progress"
 			showTargets="false"
 			target="cleanuptarget">
Index: release-kits/lirk3/installer/build.xml
===================================================================
--- release-kits/lirk3/installer/build.xml	(revision 15203)
+++ release-kits/lirk3/installer/build.xml	(revision 15205)
@@ -4,5 +4,5 @@
 -->
 
-<project name="Installation" default="">
+<project name="Installation">
 
 	<!-- this is required to pick up the properties generated during the install pages -->
@@ -21,5 +21,5 @@
 
 
-	<target name="default" depends="">
+	<target name="install-core-components" depends="">
 
 		<!-- create the installation directory -->
@@ -134,5 +134,5 @@
 
 	<!-- Source -->
-	<target name="tgsrc" depends="">
+	<target name="install-source-code" depends="">
 		<echo message="Installing Source Code (src)"/>
 		<mkdir dir="${installDir}/src"/>
@@ -144,5 +144,5 @@
 	</target>
 
-	<target name="install-bundled-java" depends="" if="bundled.java.exists">
+	<target name="install-java">
 		<echo message="Installing bundled java"/>
 		<copy todir="${installDir}/packages/jre">
@@ -152,5 +152,15 @@
 	</target>
 
-	<target name="cleanuptarget" depends="install-bundled-java">
+	<target name="install-tomcat">
+		<echo message="Installing Tomcat"/>
+	</target>
+
+	<target name="install-ant">
+		<echo message="Installing Ant"/>
+	</target>
+
+
+
+	<target name="cleanuptarget">
 	</target>
 	
Index: release-kits/lirk3/installer/cp/resources/LanguagePack.properties
===================================================================
--- release-kits/lirk3/installer/cp/resources/LanguagePack.properties	(revision 15205)
+++ release-kits/lirk3/installer/cp/resources/LanguagePack.properties	(revision 15205)
@@ -0,0 +1,78 @@
+
+# intro page
+page.intro.displayText = Welcome to the Greenstone3 installer
+welcome-message.displayText = This will install the Greenstone3 (version @version@) Digital Library Software onto you computer. Greenstone3 is a software package for building digital libraries and hosting them online.
+
+# license page
+license.displayText = License conditions
+
+
+# destination page
+page.destination.displayText = Install Destination
+installDir.displayText = Select an installation directory
+
+
+# selector page
+page.selector.displayText = Components to install
+choose-components.displayText = Choose the components you want to install
+
+install-core-components.displayText = Core components
+install-core-components.explanatoryText = \
+<html> \
+This is the core Greenstone3 system. It is a required component. \
+</html>
+
+install-java.displayText = Java (jre@bundled.version.java@)
+install-java.explanatoryText = \
+<html> \
+Much of Greenstone3 is written in the Java programming language, and so requires <br> \
+a Java Virtual Machine to run (@java.min.version@ or greater). <br><br> \
+This installer comes bundled with Java (version @bundled.version.java@),<br> \
+which you can choose to install if you don't have a sutible Java installed already.<br><br> \
+If in doubt, install this component. \
+</html>
+
+install-tomcat.displayText = Apache Tomcat (@bundled.version.tomcat@)
+install-tomcat.explanatoryText = \
+<html> \
+Greenstone3 requires the Apache Tomcat web server to serve your digital library over <br> \
+the web. If you have an existing installation of Tomcat, you can use that installation <br> \
+(some configuration is required), so you can safely opt not to install this component. <br><br> \
+If in doubt, install this component. \
+</html>
+
+install-ant.displayText = Apache Ant (@bundled.version.ant@)
+install-ant.explanatoryText = \
+<html> \
+Greenstone3 requires Apache Ant to start and stop the Tomcat web server, to recompile <br> \
+the source code, and to perform some maintainence tasks. If you already have Ant installed, <br> \
+you can safely opt not to install this component.<br><br> \
+If in doubt, install this component. \
+</html>
+
+install-source-code.displayText = Source code
+install-source-code.explanatoryText = \
+<html> \
+The source code is a purely optional component. <br><br> \
+Install the source code if you wish to make modifications to your copy of Greenstone3, or just <br> \
+want to see how it works. \
+</html>
+
+
+# tomcat-config page
+
+page.tomcat-config.displayText = Tomcat Configuration
+
+tomcat.server.displayText = Tomcat Server
+tomcat-server.explanatoryText = Please type the name of the server machine where the library will be hosted. If you are not sure, accept the default (localhost).
+
+tomcat.port.explanatoryText = Please select the ports which tomcat should use. It is usually safe to accept the defaults. If you are already running other services on the default ports, please select some free ports.
+tomcat.port.displayText = Tomcat Port
+tomcat.shutdown.port.displayText = Tomcat Shutdown Port
+
+
+# progress page
+page.progress.displayText = Installation progress
+
+
+finishButtonText = Install
Index: release-kits/lirk3/installer/cp/resources/LanguagePack_en_NZ.properties
===================================================================
--- release-kits/lirk3/installer/cp/resources/LanguagePack_en_NZ.properties	(revision 15203)
+++ 	(revision )
@@ -1,29 +1,0 @@
-### Ant Installer - language pack auto generated on Wed Mar 12 16:17:54 NZDT 2008
-
-finishButtonText = Install
-
-
-## Text from Page:intro
-page.intro.displayText = \u7EFF\u5B9D\u77F3\u8F6F\u4EF6
-
-## Text from Page:license
-page.license.displayText = License conditions
-
-## Text from Page:destination
-page.destination.displayText = Install Destination
-installDir.displayText = Select an installation directory
-
-## Text from Page:tomcatports
-page.tomcatports.displayText = Tomcat Ports
-tomcatportsdescription.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.
-tomcat.port.displayText = Tomcat Port
-tomcat.shutdown.port.displayText = Tomcat Shutdown Port
-
-## Text from Page:selector
-page.selector.displayText = Components to install
-choosecomponents.displayText = Choose the components you want to install
-default.displayText = Core components
-tgsrc.displayText = Source code
-
-## Text from Page:progress
-page.progress.displayText = Installation progress
Index: release-kits/lirk3/wrapper/mywrapper.c
===================================================================
--- release-kits/lirk3/wrapper/mywrapper.c	(revision 15203)
+++ release-kits/lirk3/wrapper/mywrapper.c	(revision 15205)
@@ -66,5 +66,5 @@
 			cout << "Your java is too old." << endl;
 		} else {
-			cout << "Could not find java." << endl;
+			cout << "Could not find java on your system." << endl;
 		}
 		
@@ -73,4 +73,5 @@
 		#ifdef java_is_bundled
 			//yes, JRE is bundled
+			/*
 			cout
 				<< "This installer comes bundled with a suitible version of java: " << endl
@@ -79,8 +80,12 @@
 			char r[1024]; cin >> r;
 			if ( strcmp( r, "y" ) == 0 || strcmp( r, "Y" ) == 0) {
-				extract_bundled_file( java, sizeof(java), (char*)"@java.installer@", true );
-				system( "./@java.installer@" );
-				jvmFound = true; //assume the java installation went well
-			}
+			*/
+
+			cout << "Using bundled java." << endl;
+			extract_bundled_file( java, sizeof(java), (char*)"@java.installer@", true );
+			system( "tar -xzf @java.installer@" );
+			jvmFound = true; //assume the java installation went well
+
+			/*}*/
 		#endif
 
