Index: /release-kits/lirk2/ant-scripts/build.xml
===================================================================
--- /release-kits/lirk2/ant-scripts/build.xml	(revision 17395)
+++ /release-kits/lirk2/ant-scripts/build.xml	(revision 17396)
@@ -16,4 +16,7 @@
 	<property name="rk.os" value="linux" />
 
+	<property name="bundled.version.ghostscript" value=""/>
+	<property name="bundled.version.imagemagick" value=""/>
+	
 	<!-- IMPORT OTHER ANT SCRIPTS -->
 	<import file="shared-ant-scripts/init.xml"/>
@@ -22,4 +25,5 @@
 	<import file="compile.xml"/>
 	<import file="create-distribution.xml"/>
+	<import file="create-components.xml"/>
 	<import file="create-installer.xml"/>
 	<import file="wrap.xml"/>
@@ -29,4 +33,5 @@
 		<antcall target="compile"/>
 		<antcall target="create-distribution"/>
+		<antcall target="create-components"/>
 		<antcall target="create-installer"/>
 		<antcall target="wrap"/>
Index: /release-kits/lirk2/ant-scripts/create-components.xml
===================================================================
--- /release-kits/lirk2/ant-scripts/create-components.xml	(revision 17396)
+++ /release-kits/lirk2/ant-scripts/create-components.xml	(revision 17396)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="lirk2-create-components" default="create-components">
+
+	<!-- create components from the distribution folder -->
+	<target name="create-components">
+		<antcall target="prepare-to-create-components" />
+		<antcall target="create-core-component" />
+		<antcall target="create-sourcecode-component" />
+	</target>
+	
+	<target name="prepare-to-create-components">
+		<delete dir="components"/>
+		<mkdir dir="components/tmp"/>
+	</target>
+
+	<target name="create-core-component">
+		<antcall target="prepare-core-component" />
+		<antcall target="compress-core-component" />
+	</target>
+
+	<target name="create-sourcecode-component">
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="compress-sourcecode-component" />	
+	</target>
+	
+	<target name="prepare-core-component">
+		<mkdir dir="components/tmp/core"/>
+		<copy todir="components/tmp/core" overwrite="true">
+			<fileset dir="distributions/web">
+				<include name="gli/**/*"/>
+				<include name="bin/**/*"/>
+				<include name="cgi-bin/**/*"/>
+				<include name="etc/**/*"/>
+				<include name="mappings/**/*"/>
+				<include name="images/**/*"/>
+				<include name="perllib/**/*"/>
+				<include name="indexers/**/*"/>
+				<include name="macros/**/*"/>
+				<include name="collect/**/*"/>
+				<include name="*"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-core-component">
+		<sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
+	</target>
+	
+	<target name="prepare-sourcecode-component">
+		<mkdir dir="components/tmp/sourcecode"/>
+		<copy todir="components/tmp/sourcecode" overwrite="true">
+			<fileset dir="distributions/web">
+				<include name="common-src/**/*"/>
+				<include name="runtime-src/**/*"/>
+				<include name="build-src/**/*"/>
+			</fileset>
+		</copy>
+				
+		<zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" includes="**/*"/>
+	</target>
+		
+	<target name="compress-sourcecode-component">
+		<sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
+	</target>
+	
+</project>
Index: /release-kits/lirk2/ant-scripts/create-installer.xml
===================================================================
--- /release-kits/lirk2/ant-scripts/create-installer.xml	(revision 17395)
+++ /release-kits/lirk2/ant-scripts/create-installer.xml	(revision 17396)
@@ -15,7 +15,13 @@
 		<copy todir="${basedir}/installer/classes" overwrite="true">
 			<fileset dir="${lirk2.home}/greenstone2/installer-classes"/>
+			<fileset file="${basedir}/distributions/web/LICENSE.txt"/>
 		</copy>
+
 		<unjar src="${lirk2.home}/ant-scripts/tasks/greenstone/anttasks.jar" dest="${basedir}/installer/classes"/>
 		<delete dir="${basedir}/installer/classes/META-INF"/>
+
+		<unjar src="${lirk2.home}/ant-scripts/tasks/7z-ant/7z.jar" dest="${basedir}/installer/classes"/>
+		<delete dir="${basedir}/installer/classes/META-INF"/>
+
 		<unjar src="${lirk2.home}/lib/crypt.jar" dest="${basedir}/installer/classes"/>
 		<delete dir="${basedir}/installer/classes/META-INF"/>
@@ -24,5 +30,5 @@
 	<target name="compile-installer">
 
-		<!-- create the installer with java -->
+		<!-- create the full installer -->
 		<installer file="${basedir}/installer/Greenstone-${version}-linux.jar"
 				compress="true"
@@ -37,7 +43,30 @@
 
 			<zipfileset dir="${basedir}/installer/classes" includes="**/*" />
-			<zipfileset dir="${basedir}/distributions/web" includes="**/*"/>
+			<zipfileset dir="${basedir}/components" includes="*.lzma"/>
 
 		</installer>
+
+		<dcff
+			file="${basedir}/installer/antinstall-config.xml"
+			startTag=".*&lt;!-- start full --&gt;"
+			endTag=".*&lt;!-- end full --&gt;"/>
+
+		<!-- create the minimal installer -->
+		<installer file="${basedir}/installer/Greenstone-${version}-linux-minimal.jar"
+				compress="true"
+				extractType="NonExtractor"
+				installConfig="${basedir}/installer/antinstall-config.xml"
+				buildFile="${basedir}/installer/build.xml"
+				antInstallLib="${lirk2.home}/packages/ant-installer/lib"
+				antLib="${lirk2.home}/packages/ant/lib"
+				validateConfig="true"
+				failOnError="false"
+				icons="bluecurve">
+
+			<zipfileset dir="${basedir}/installer/classes" includes="**/*" />
+			<zipfileset dir="${basedir}/components" includes="core.lzma"/>
+
+		</installer>
+
 
 	</target>
Index: /release-kits/lirk2/ant-scripts/wrap.xml
===================================================================
--- /release-kits/lirk2/ant-scripts/wrap.xml	(revision 17395)
+++ /release-kits/lirk2/ant-scripts/wrap.xml	(revision 17396)
@@ -49,9 +49,4 @@
 		<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
 
-		<echo level="info">compile the wrapper program</echo>
-		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-			<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
-		</exec>
-
 		<echo level="info">compile libsearch4j</echo>
 		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
@@ -65,4 +60,9 @@
 		<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
 
+		<echo level="info">compile the wrapper program</echo>
+		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
+			<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
+		</exec>
+
 		<echo level="info">link the compiled code and bundled files</echo>
 		<exec executable="g++" dir="${basedir}/wrapped-installer/build">
Index: /release-kits/lirk2/installer/antinstall-config.xml
===================================================================
--- /release-kits/lirk2/installer/antinstall-config.xml	(revision 17395)
+++ /release-kits/lirk2/installer/antinstall-config.xml	(revision 17396)
@@ -40,11 +40,11 @@
 			force="true"/>
 
-		<!-- start bundled java only -->
+		<!-- start full -->
 		<target
-			target="install-java"
+			target="install-linux-jre"
 			diskRequirement="@component.size.linux-java@"
 			displayText=""
 			defaultValue="true"/>
-		<!-- end bundled java only -->
+		<!-- end full -->
 
 		<target
Index: /release-kits/lirk2/installer/build.xml
===================================================================
--- /release-kits/lirk2/installer/build.xml	(revision 17395)
+++ /release-kits/lirk2/installer/build.xml	(revision 17396)
@@ -16,7 +16,8 @@
 	<typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
 	<typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
+	<taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
 
 	<condition property="bundled.java.exists">
-		<available file="../@java.extracted@/bin/java"/>
+		<available file="../@linux-java.extracted@/bin/java"/>
 	</condition>
 
@@ -32,31 +33,9 @@
 
 		<echo>Installing Core Files</echo>
-		<unzip src="${antinstaller.jar}" dest="${installDir}">
-			<patternset>
-				<include name="gli/**/*"/>
-				<include name="bin/**/*"/>
-				<include name="cgi-bin/**/*"/>
-				<include name="etc/**/*"/>
-				<include name="mappings/**/*"/>
-				<include name="images/**/*"/>
-				<include name="perllib/**/*"/>
-				<include name="indexers/**/*"/>
-				<include name="macros/**/*"/>
-				<include name="collect/**/*"/>
-
-				<include name="Install.sh"/>
-				<include name="setup.bash"/>
-				<include name="setup.csh"/>
-				<include name="LICENSE.txt"/>
-				<include name="READMEar.txt"/>
-				<include name="READMEen.txt"/>
-				<include name="READMEes.txt"/>
-				<include name="READMEfr.txt"/>
-				<include name="READMEes.txt"/>
-				<include name="Support.htm"/>
-				<include name="Uninstall.jar"/>
-			</patternset>
-		</unzip>
-		<echo/>
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
+		<sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
+		<delete file="core.lzma"/>
+		<unzip src="${basedir}/core.comp" dest="${installDir}"/>
+		<delete file="core.comp"/>
 
 		<echo>Setting Binaries to Executable</echo>
@@ -119,18 +98,15 @@
 	<target name="install-source-code" depends="">
 		<echo>Installing Source Code</echo>
-		<unzip src="${antinstaller.jar}" dest="${installDir}">
-			<patternset>
-				<include name="common-src/**/*"/>
-				<include name="runtime-src/**/*"/>
-				<include name="build-src/**/*"/>
-				<include name="packages/**/*"/>
-			</patternset>
-		</unzip>
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
+		<sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
+		<delete file="sourcecode.lzma"/>
+		<unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
+		<delete file="sourcecode.comp"/>
 	</target>
 
-	<target name="install-java">
+	<target name="install-linux-jre">
 		<echo>Installing bundled java</echo>
 		<copy todir="${installDir}/packages/jre">
-			<fileset dir="../@java.extracted@"/>
+			<fileset dir="../@linux-java.extracted@"/>
 		</copy>
 		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
