Index: /release-kits/lirk2/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/lirk2/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/lirk2/ant-scripts/create-distribution.xml	(revision 17652)
@@ -11,5 +11,5 @@
 		<antcall target="remove-unneeded-files-1" />
 
-		<antcall target="copy-web-to-source" />
+		<antcall target="copy-web-to-source" /> <!-- from init -->
 
 		<antcall target="drop-in-binaries" />
@@ -86,8 +86,4 @@
 	</target>
 
-	<target name="copy-web-to-source">
-		<copy todir="distributions/source"><fileset dir="distributions/web"/></copy>
-	</target>
-
 	<target name="drop-in-binaries">
 		<echo level="info">Dropping compiled binaries into distribution</echo>
Index: /release-kits/lirk3/ant-scripts/create-components.xml
===================================================================
--- /release-kits/lirk3/ant-scripts/create-components.xml	(revision 17651)
+++ /release-kits/lirk3/ant-scripts/create-components.xml	(revision 17652)
@@ -3,4 +3,6 @@
 
 	<!-- create components from the distribution folder -->
+
+	<!-- 1st level -->
 	<target name="create-components">
 		<antcall target="prepare-components" />
@@ -8,4 +10,5 @@
 	</target>
 
+	<!-- 2nd level -->
 	<target name="prepare-components">
 		<antcall target="prepare-core-component" />
@@ -14,5 +17,5 @@
 		<antcall target="prepare-tomcat-component" />
 		<antcall target="prepare-imagemagick-component" />
-
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 
@@ -23,7 +26,8 @@
 		<antcall target="compress-tomcat-component" />
 		<antcall target="compress-imagemagick-component" />
+		<antcall target="compress-sourcecode-core-component" />
 	</target>
 
-	
+	<!-- 3rd level -->
 	<target name="prepare-core-component">
 
@@ -148,4 +152,29 @@
 		<sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
 	</target>
+
+	<target name="prepare-sourcecode-core-component">
+		<delete dir="components/tmp/sourcecode-core"/>
+		<mkdir dir="components/tmp/sourcecode-core"/>
+
+		<copy todir="components/tmp/sourcecode-core" overwrite="true">
+			<fileset dir="distribution/source">
+				<include name="gli/**/*"/>
+				<include name="docs/**/*"/>
+				<include name="resources/**/*"/>
+				<include name="web/**/*"/>
+				<include name="gs2build/etc/**/*"/>
+				<include name="gs2build/setup.bash"/>
+				<include name="build.xml"/>
+				<include name="build.properties"/>
+				<include name="*.sh"/>
+				<include name="*.txt"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
+	</target>
 	
+	<target name="compress-sourcecode-core-component">
+		<sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
+	</target>
+
 </project>
Index: /release-kits/lirk3/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/lirk3/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/lirk3/ant-scripts/create-distribution.xml	(revision 17652)
@@ -3,14 +3,13 @@
 
 	<target name="create-distribution">
+
 		<!-- create distribution -->
 		<antcall target="export-greenstone3-gli" />
-		<antcall target="greenstone3-set-version-numbers">
-			<param name="greenstone3basedir" value="${basedir}/distribution/greenstone3"/>
-		</antcall>
-		<antcall target="gli-set-version-numbers">
-			<param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/>
-		</antcall>
+		<antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distribution/greenstone3"/></antcall>
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/></antcall>
+		<antcall target="insert-user-manual"/>
 
-		<!-- create distributions 1, 2 and 3 -->
+		<antcall target="copy-web-to-source-greenstone3" /> <!-- from gs3-targets -->
+
 		<ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false">
 			<property name="app.version" value="${version}"/>
@@ -29,10 +28,10 @@
 
 		<antcall target="copy-over-build-xml" />
-		<antcall target="insert-user-manual"/>
 		<antcall target="insert-compiled-binaries"/>
 		<antcall target="export-imagemagick-linux-binaries" />
 		<antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk3-targets -->
-		<antcall target="rename-build-xml-for-transit"/>
-		<antcall target="strip-svn-dirs"><param name="dir" value="distribution/greenstone3"/></antcall> <!-- from init -->
+	
+		<antcall target="strip-svn-dirs"><param name="dir" value="distribution"/></antcall> <!-- from init -->
+
 	</target>
 
@@ -72,7 +71,3 @@
 	</target>
 
-	<target name="rename-build-xml-for-transit">
-		<move file="distribution/greenstone3/build.xml" tofile="distribution/greenstone3/greenstone3-build.xml"/>
-	</target>
-
 </project>
Index: /release-kits/lirk3/installer/antinstall-config.xml
===================================================================
--- /release-kits/lirk3/installer/antinstall-config.xml	(revision 17651)
+++ /release-kits/lirk3/installer/antinstall-config.xml	(revision 17652)
@@ -53,10 +53,21 @@
 		<comment name="choose-components"/>
 
+		<!-- start binary release core -->
 		<target
 			target="Installing Core System"
 			diskRequirement="@component.size.core@"
+			displayText=""
 			defaultValue="true"
+			force="true"/>
+		<!-- end binary release core -->
+
+		<!-- start source release core -->
+		<target
+			target="Installing Source Code Core"
+			diskRequirement="@component.size.sourcecode-core@"
 			displayText=""
+			defaultValue="true"
 			force="true"/>
+		<!-- end source release core -->
 
 		<!-- start bundled components -->
@@ -90,4 +101,5 @@
 	</page>
 
+	<!-- start bundled components -->
 	<page type="input" name="tomcat-config" ifProperty="(${Installing Tomcat}==true)" displayText="">
 
@@ -97,4 +109,5 @@
 
 	</page>
+	<!-- end bundled components -->
 
 	<page type="progress" name="progress" showTargets="true" displayText=""/>
Index: /release-kits/lirk3/installer/build.xml
===================================================================
--- /release-kits/lirk3/installer/build.xml	(revision 17651)
+++ /release-kits/lirk3/installer/build.xml	(revision 17652)
@@ -42,8 +42,4 @@
 		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
 
-
-		<echo>Renaming greenstone3-build.xml back to build.xml</echo>
-		<move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/>
-
 		<echo>Setting Binaries to Executable</echo>
 		<chmod dir="${installDir}" includes="*.sh" perm="775"/>
@@ -69,8 +65,4 @@
 		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
 
-		<echo>Deleting some unneeded files</echo>
-		<delete dir="${installDir}/resources/icons"/>
-		<delete file="${installDir}/resources/*.png"/>
-
 		<echo>Creating installation properties file</echo>
 		<echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
@@ -79,4 +71,30 @@
 
 	</target>
+
+	<!-- sourcecode core system -->
+	<target name="Installing Source Code Core">
+
+		<echo>Installing Source Code Core</echo>
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
+		<sevenzip task="decode" input="${basedir}/sourcecode-core.lzma" output="${basedir}/sourcecode-core.comp"/>
+		<delete file="sourcecode-core.lzma"/>
+		<unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
+		<delete file="sourcecode-core.comp"/>
+
+		<echo>Setting up global properties</echo>
+		<copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
+
+		<echo>Setting up log4j properties</echo>
+		<copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
+
+		<echo>Creating installation properties file</echo>
+		<echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
+
+	</target>
+
 
 	<!-- Source -->
Index: /release-kits/mark2/ant-scripts/create-components.xml
===================================================================
--- /release-kits/mark2/ant-scripts/create-components.xml	(revision 17651)
+++ /release-kits/mark2/ant-scripts/create-components.xml	(revision 17652)
@@ -3,9 +3,25 @@
 
 	<!-- create components from the distribution folder -->
+
+	<!-- 1st level -->
 	<target name="create-components">
-		<antcall target="create-core-component" />
-		<antcall target="create-sourcecode-component" />
+		<antcall target="prepare-components" />
+		<antcall target="compress-components" />
+	</target>
+
+	<!-- 2nd level -->
+	<target name="prepare-components">
+		<antcall target="prepare-core-component" />
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 	
+	<target name="compress-components">
+		<antcall target="compress-core-component" />
+		<antcall target="compress-sourcecode-component" />
+		<antcall target="compress-sourcecode-core-component" />
+	</target>
+
+	<!-- 3rd level -->
 	<target name="create-core-component">
 		<antcall target="prepare-core-component" />
@@ -27,7 +43,10 @@
 				<include name="**/*"/>
 
-				<!-- sourcecode -->
+				<!-- exclude sourcecode -->
+				<exclude name="common-src"/>
 				<exclude name="common-src/**/*"/>
+				<exclude name="runtime-src"/>
 				<exclude name="runtime-src/**/*"/>
+				<exclude name="build-src"/>
 				<exclude name="build-src/**/*"/>
 
@@ -61,3 +80,25 @@
 	</target>
 	
+	<target name="prepare-sourcecode-core-component">
+		<delete dir="components/tmp/sourcecode-core"/>
+		<mkdir dir="components/tmp/sourcecode-core"/>
+
+		<copy todir="components/tmp/sourcecode-core" overwrite="true">
+			<fileset dir="distributions/source">
+				<include name="macros/**/*"/>
+				<include name="images/**/*"/>
+				<include name="etc/**/*"/>
+				<include name="gli/**/*"/>
+				<include name="collect/**/*"/>
+				<include name="doc/**/*"/>
+				<include name="setup.bash"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-sourcecode-core-component">
+		<sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
+	</target>
+
 </project>
Index: /release-kits/mark2/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/mark2/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/mark2/ant-scripts/create-distribution.xml	(revision 17652)
@@ -3,16 +3,22 @@
 
 	<target name="create-distribution">
+
 		<antcall target="export-gsdl-gli" />
 		<antcall target="dist-set-version" />
-		<antcall target="gli-set-version-numbers">
-			<param name="glibasedir" value="${basedir}/distributions/web/gli"/>
-		</antcall>
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
+		<antcall target="drop-in-docs" />
+		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-1" />
+
+		<antcall target="copy-web-to-source" /> <!-- from init -->
+
 		<antcall target="drop-in-binaries" />
 		<antcall target="drop-in-demo-collection" />
-		<antcall target="drop-in-docs" />
 		<antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk2-targets -->
-		<antcall target="insert-export-to-cd-package"/> <!-- from rk2-targets -->
+		<antcall target="insert-export-to-cd-package"/>		<!-- from rk2-targets -->
+		<antcall target="export-imagemagick-linux-binaries" />
 		<antcall target="compile-gli" />
-		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-2" />
+
 	</target>
 
@@ -24,4 +30,5 @@
 			<export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
 		</svn>
+		<copy todir="distributions/source"><fileset dir="distributions/web"/></copy>
 	</target>
 
@@ -105,12 +112,17 @@
 		<rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/>
 
-		<echo level="info">Removing signed gatherer</echo>
-		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
+	</target>
 
-		<echo level="info">Removing some unneeded stuff</echo>
+	<target name="remove-unneeded-files-1">
 		<delete file="${basedir}/distributions/web/gli/.greenstonestore" />
 		<delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
 		<delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
+		<delete dir="${basedir}/distributions/web/common-src/packages/windows"/>
 	</target>
 
+	<target name="remove-unneeded-files-2">
+		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
+	</target>
+
+
 </project>
Index: /release-kits/mark2/installer/antinstall-config.xml
===================================================================
--- /release-kits/mark2/installer/antinstall-config.xml	(revision 17651)
+++ /release-kits/mark2/installer/antinstall-config.xml	(revision 17652)
@@ -45,10 +45,21 @@
 		<comment name="choose-components"/>
 
+		<!-- start binary release core -->
 		<target
 			target="Installing Core System"
 			diskRequirement="@component.size.core@"
+			displayText=""
 			defaultValue="true"
-			force="true"
-			displayText=""/>
+			force="true"/>
+		<!-- end binary release core -->
+
+		<!-- start source release core -->
+		<target
+			target="Installing Source Code Core"
+			diskRequirement="@component.size.sourcecode-core@"
+			displayText=""
+			defaultValue="true"
+			force="true"/>
+		<!-- end source release core -->
 
 		<!-- start sourcecode -->
Index: /release-kits/mark2/installer/build.xml
===================================================================
--- /release-kits/mark2/installer/build.xml	(revision 17651)
+++ /release-kits/mark2/installer/build.xml	(revision 17652)
@@ -87,4 +87,36 @@
 	</target>
 
+	<!-- sourcecode core system -->
+	<target name="Installing Source Code Core">
+
+		<echo>Installing Source Code Core</echo>
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
+		<sevenzip task="decode" input="${basedir}/sourcecode-core.lzma" output="${basedir}/sourcecode-core.comp"/>
+		<delete file="sourcecode-core.lzma"/>
+		<unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
+		<delete file="sourcecode-core.comp"/>
+
+		<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}"/>
+
+		<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>
+
+		<rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
+
+		<echo>Creating installation properties file</echo>
+		<echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
+
+	</target>
+
+
+
 	<!-- Source -->
 	<target name="Installing Source Code" depends="">
Index: /release-kits/mark3/ant-scripts/create-components.xml
===================================================================
--- /release-kits/mark3/ant-scripts/create-components.xml	(revision 17651)
+++ /release-kits/mark3/ant-scripts/create-components.xml	(revision 17652)
@@ -3,31 +3,29 @@
 
 	<!-- create components from the distribution folder -->
+
+	<!-- 1st level -->
 	<target name="create-components">
-		<antcall target="create-core-component" />
-		<antcall target="create-sourcecode-component" />
-		<antcall target="create-ant-component" />
-		<antcall target="create-tomcat-component" />
+		<antcall target="prepare-components" />
+		<antcall target="compress-components" />
 	</target>
 
-	<target name="create-core-component">
+	<!-- 2nd level -->
+	<target name="prepare-components">
 		<antcall target="prepare-core-component" />
-		<antcall target="compress-core-component" />
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="prepare-ant-component" />
+		<antcall target="prepare-tomcat-component" />
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 
-	<target name="create-sourcecode-component">
-		<antcall target="prepare-sourcecode-component" />
-		<antcall target="compress-sourcecode-component" />	
+	<target name="compress-components">
+		<antcall target="compress-core-component" />
+		<antcall target="compress-sourcecode-component" />
+		<antcall target="compress-ant-component" />
+		<antcall target="compress-tomcat-component" />
+		<antcall target="compress-sourcecode-core-component" />
 	</target>
-		
-	<target name="create-ant-component">
-		<antcall target="prepare-ant-component" />
-		<antcall target="compress-ant-component" />	
-	</target>
-		
-	<target name="create-tomcat-component">
-		<antcall target="prepare-tomcat-component" />
-		<antcall target="compress-tomcat-component" />	
-	</target>
-	
+
+	<!-- 3rd level -->
 	<target name="prepare-core-component">
 
@@ -124,4 +122,30 @@
 		<sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
 	</target>	
+
+	<target name="prepare-sourcecode-core-component">
+		<delete dir="components/tmp/sourcecode-core"/>
+		<mkdir dir="components/tmp/sourcecode-core"/>
+
+		<copy todir="components/tmp/sourcecode-core" overwrite="true">
+			<fileset dir="distribution/source">
+				<include name="gli/**/*"/>
+				<include name="docs/**/*"/>
+				<include name="resources/**/*"/>
+				<include name="web/**/*"/>
+				<include name="gs2build/etc/**/*"/>
+				<include name="gs2build/setup.bash"/>
+				<include name="build.xml"/>
+				<include name="build.properties"/>
+				<include name="*.sh"/>
+				<include name="*.txt"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-sourcecode-core-component">
+		<sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
+	</target>
+
 	
 </project>
Index: /release-kits/mark3/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/mark3/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/mark3/ant-scripts/create-distribution.xml	(revision 17652)
@@ -3,14 +3,12 @@
 
 	<target name="create-distribution">
+
 		<!-- create distribution -->
 		<antcall target="export-greenstone3-gli" />
+		<antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distribution/greenstone3"/></antcall>
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/></antcall>
+		<antcall target="insert-user-manual"/>
 
-		<antcall target="greenstone3-set-version-numbers">
-			<param name="greenstone3basedir" value="${basedir}/distribution/greenstone3"/>
-		</antcall>
-
-		<antcall target="gli-set-version-numbers">
-			<param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/>
-		</antcall>
+		<antcall target="copy-web-to-source-greenstone3" /> <!-- from gs3-targets -->
 
 		<ant target="create-distribution-1" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false">
@@ -30,9 +28,7 @@
 
 		<antcall target="copy-over-build-xml" />
-		<antcall target="insert-user-manual"/>
 		<antcall target="insert-compiled-binaries"/>
 		<antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk3-targets -->
-		<antcall target="rename-build-xml-for-transit"/>
-		<antcall target="strip-svn-dirs"><param name="dir" value="distribution/greenstone3"/></antcall> <!-- from init -->
+		<antcall target="strip-svn-dirs"><param name="dir" value="distribution"/></antcall> <!-- from init -->
 	</target>
 
@@ -44,4 +40,5 @@
 			<export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/greenstone3/gli"/>
 		</svn>
+		<copy todir="distribution/source"><fileset dir="distribution/greenstone3"/></copy>
 	</target>
 
Index: /release-kits/mark3/installer/antinstall-config.xml
===================================================================
--- /release-kits/mark3/installer/antinstall-config.xml	(revision 17651)
+++ /release-kits/mark3/installer/antinstall-config.xml	(revision 17652)
@@ -45,10 +45,21 @@
 		<comment name="choose-components"/>
 
+		<!-- start binary release core -->
 		<target
 			target="Installing Core System"
 			diskRequirement="@component.size.core@"
+			displayText=""
 			defaultValue="true"
+			force="true"/>
+		<!-- end binary release core -->
+
+		<!-- start source release core -->
+		<target
+			target="Installing Source Code Core"
+			diskRequirement="@component.size.sourcecode-core@"
 			displayText=""
+			defaultValue="true"
 			force="true"/>
+		<!-- end source release core -->
 
 		<!-- start bundled components -->
@@ -76,4 +87,5 @@
 	</page>
 
+	<!-- start bundled components -->
 	<page type="input" name="tomcat-config" ifProperty="(${Installing Tomcat}==true)" displayText="">
 
@@ -83,4 +95,5 @@
 
 	</page>
+	<!-- end bundled components -->
 
 	<page type="progress" name="progress" showTargets="true" displayText=""/>
Index: /release-kits/mark3/installer/build.xml
===================================================================
--- /release-kits/mark3/installer/build.xml	(revision 17651)
+++ /release-kits/mark3/installer/build.xml	(revision 17652)
@@ -34,7 +34,4 @@
 		<delete file="core.comp"/>
 
-		<!-- rename greenstone3-build.xml back to build.xml -->
-		<move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/>
-
 		<echo message="Setting Binaries to Executable"/>
 		<chmod dir="${installDir}" includes="*.sh" perm="775"/>
@@ -63,16 +60,4 @@
 		<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 (no need anymore)-->
-		<!--<echo>In the gs3-setup.sh file, set ANT_HOME and put it in PATH</echo>
-		<exec executable="echo" output="${installDir}/gs3-setup.sh" append="true">
-			<arg line="export ANT_HOME=${installDir}/packages/ant; export PATH=$ANT_HOME/bin:$PATH;"/>
-		</exec>-->
-
-		<!-- delete unneeded files -->	    
-		<echo message="Deleting some extraneous files"/>
-		<delete dir="${installDir}/resources/icons"/>
-		<delete file="${installDir}/resources/*.png"/>
-
 		<echo>Creating installation properties file</echo>
 		<echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
@@ -81,4 +66,31 @@
 
 	</target>
+
+	<!-- sourcecode core system -->
+	<target name="Installing Source Code Core">
+
+		<echo>Installing Source Code Core</echo>
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
+		<sevenzip task="decode" input="${basedir}/sourcecode-core.lzma" output="${basedir}/sourcecode-core.comp"/>
+		<delete file="sourcecode-core.lzma"/>
+		<unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
+		<delete file="sourcecode-core.comp"/>
+
+		<echo>Setting up global properties</echo>
+		<copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
+
+		<echo>Setting up log4j properties</echo>
+		<copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
+
+		<echo>Creating installation properties file</echo>
+		<echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
+
+
+	</target>
+
 
 	<!-- Source -->
Index: /release-kits/wirk2/ant-scripts/create-components.xml
===================================================================
--- /release-kits/wirk2/ant-scripts/create-components.xml	(revision 17651)
+++ /release-kits/wirk2/ant-scripts/create-components.xml	(revision 17652)
@@ -2,5 +2,7 @@
 <project name="wirk2-create-components" default="create-components">
 
+	<!-- create components from the distribution folder -->
 
+	<!-- 1st level -->
 	<target name="create-components">
 		<antcall target="prepare-components" />
@@ -8,5 +10,5 @@
 	</target>
 	
-	<!-- create components from the distribution folder -->
+	<!-- 2nd level -->
 	<target name="prepare-components">
 		<antcall target="prepare-core-component" />
@@ -14,4 +16,5 @@
 		<antcall target="prepare-ghostscript-component" />
 		<antcall target="prepare-sourcecode-component" />
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 	
@@ -21,9 +24,8 @@
 		<antcall target="compress-ghostscript-component" />
 		<antcall target="compress-sourcecode-component" />
+		<antcall target="compress-sourcecode-core-component" />
 	</target>
 	
-	
-	
-	
+	<!-- 3rd level -->	
 	<target name="prepare-core-component">
 		<!-- delete old stuff to create new components -->
@@ -121,4 +123,28 @@
 		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
 	</target>
+
+	<target name="prepare-sourcecode-core-component">
+		<delete dir="components/tmp/sourcecode-core"/>
+		<mkdir dir="components/tmp/sourcecode-core"/>
+
+		<copy todir="components/tmp/sourcecode-core" overwrite="true">
+			<fileset dir="distributions/source">
+				<include name="macros/**/*"/>
+				<include name="images/**/*"/>
+				<include name="etc/**/*"/>
+				<include name="gli/**/*"/>
+				<include name="collect/**/*"/>
+				<include name="doc/**/*"/>
+				<include name="setup.bash"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-sourcecode-core-component">
+		<!--<sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>-->
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode-core.lzma sourcecode-core.comp"/></exec>
+	</target>
+
 	
 	
Index: /release-kits/wirk2/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/wirk2/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/wirk2/ant-scripts/create-distribution.xml	(revision 17652)
@@ -3,13 +3,21 @@
 
 	<target name="create-distribution">
+
 		<antcall target="export-gsdl-gli" />
 		<antcall target="dist-set-version" />
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
+		<antcall target="drop-in-docs" />
+		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-1" />
+
+		<antcall target="copy-web-to-source" /> <!-- from init -->
+
 		<antcall target="drop-in-binaries" />
 		<antcall target="drop-in-demo-collection" />
-		<antcall target="drop-in-docs" />
 		<antcall target="drop-in-misc" />
 		<antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->		
 		<antcall target="compile-gli" />
-		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-2" />
+
 	</target>
 
@@ -96,9 +104,7 @@
 		<rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/>
 
+	</target>
 
-		<echo level="info">Removing signed gatherer</echo>
-		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
-
-		<echo level="info">Removing some unneeded stuff</echo>
+	<target name="remove-unneeded-files-1">
 		<delete file="${basedir}/distributions/web/gli/.greenstonestore" />
 		<delete dir="${basedir}/distributions/web/bin/linux" />
@@ -107,3 +113,8 @@
 	</target>
 
+	<target name="remove-unneeded-files-2">
+		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
+	</target>
+
+
 </project>
Index: /release-kits/wirk2/installer/antinstall-config.xml
===================================================================
--- /release-kits/wirk2/installer/antinstall-config.xml	(revision 17651)
+++ /release-kits/wirk2/installer/antinstall-config.xml	(revision 17652)
@@ -53,10 +53,21 @@
 			hidden="true"/>
 
+		<!-- start binary release core -->
 		<target
 			target="Installing Core System"
 			diskRequirement="@component.size.core@"
+			displayText=""
 			defaultValue="true"
+			force="true"/>
+		<!-- end binary release core -->
+
+		<!-- start source release core -->
+		<target
+			target="Installing Source Code Core"
+			diskRequirement="@component.size.sourcecode-core@"
 			displayText=""
+			defaultValue="true"
 			force="true"/>
+		<!-- end source release core -->
 
 		<target
Index: /release-kits/wirk2/installer/build.xml
===================================================================
--- /release-kits/wirk2/installer/build.xml	(revision 17651)
+++ /release-kits/wirk2/installer/build.xml	(revision 17652)
@@ -36,5 +36,5 @@
 	<target name="Installing Core System">
 
-		<!-- figure out the start menu path (if not already set from previous installation) -->
+		<!-- 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}"/>
@@ -107,4 +107,42 @@
 	</target>
 
+	<target name="Installing Source Code Core">
+
+		<!-- 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"/>
+
+		<echo>basedir: ${basedir}</echo>
+		<echo>installDir: ${installDir}</echo>
+		<echo>antinstaller.jar: ${antinstaller.jar}</echo>
+		<echo>startmenu.path: ${startmenu.path}</echo>
+
+		<!-- create the installation directory -->
+		<echo message="Creating Installation directory"/>
+		<mkdir dir="${installDir}"/>
+		
+		<!-- extract 7za tool -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}">
+			<patternset><include name="7za.exe"/></patternset>
+		</unzip>
+
+		<!-- install files -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
+		<exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x sourcecode-core.lzma"/></exec>
+		<delete file="sourcecode-core.lzma"/>
+		<unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
+		<delete file="sourcecode-core.comp"/>
+		
+		<echo message="Filling in concrete values in config files"/>
+		<rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
+				
+		<echo message="Creating installation properties file"/>
+		<echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
+		
+		<echo message="Finished"/>
+		
+	</target>
+
 	<!-- Source -->
 	<target name="Installing Source Code">
Index: /release-kits/wirk3/ant-scripts/create-components.xml
===================================================================
--- /release-kits/wirk3/ant-scripts/create-components.xml	(revision 17651)
+++ /release-kits/wirk3/ant-scripts/create-components.xml	(revision 17652)
@@ -2,11 +2,13 @@
 <project name="wirk3-create-components" default="create-components">
 
-
+	<!-- create components from the distribution folder -->
+
+	<!-- 1st level -->
 	<target name="create-components">
 		<antcall target="prepare-components" />
 		<antcall target="compress-components" />
 	</target>
-	
-	<!-- create components from the distribution folder -->
+
+	<!-- 2nd level -->
 	<target name="prepare-components">
 		<antcall target="prepare-core-component" />
@@ -16,4 +18,5 @@
 		<antcall target="prepare-ant-component" />
 		<antcall target="prepare-tomcat-component" />
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 	
@@ -25,9 +28,8 @@
 		<antcall target="compress-ant-component" />
 		<antcall target="compress-tomcat-component" />
-	</target>
-	
-	
-
-	
+		<antcall target="compress-sourcecode-core-component" />
+	</target
+	
+	<!-- 3rd level -->
 	<target name="prepare-core-component">
 
@@ -169,4 +171,31 @@
 	</target>	
 
+	<target name="prepare-sourcecode-core-component">
+		<delete dir="components/tmp/sourcecode-core"/>
+		<mkdir dir="components/tmp/sourcecode-core"/>
+
+		<copy todir="components/tmp/sourcecode-core" overwrite="true">
+			<fileset dir="distribution/source">
+				<include name="gli/**/*"/>
+				<include name="docs/**/*"/>
+				<include name="resources/**/*"/>
+				<include name="web/**/*"/>
+				<include name="gs2build/etc/**/*"/>
+				<include name="gs2build/setup.bash"/>
+				<include name="build.xml"/>
+				<include name="build.properties"/>
+				<include name="*.sh"/>
+				<include name="*.txt"/>
+			</fileset>
+		</copy>
+		<zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-sourcecode-core-component">
+		<!--<sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>-->
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode-core.lzma sourcecode-core.comp"/></exec>
+	</target>
+
+
 	
 	
Index: /release-kits/wirk3/ant-scripts/create-distribution.xml
===================================================================
--- /release-kits/wirk3/ant-scripts/create-distribution.xml	(revision 17651)
+++ /release-kits/wirk3/ant-scripts/create-distribution.xml	(revision 17652)
@@ -3,8 +3,13 @@
 
 	<target name="create-distribution">
+
 		<!-- create distribution -->
 		<antcall target="export-greenstone3-gli" />
 		<antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distribution/greenstone3" /></antcall>
 		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distribution/greenstone3/gli" /></antcall>
+		<antcall target="insert-user-manual"/>
+
+		<antcall target="copy-web-to-source-greenstone3" /> <!-- from gs3-targets -->
+
 		<ant target="create-distribution-1" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false">
 			<property name="app.version" value="${version}"/>
@@ -23,9 +28,7 @@
 		</ant>
 		<antcall target="copy-over-build-xml" />
-		<antcall target="insert-user-manual"/>
 		<antcall target="insert-compiled-binaries"/>
 		<antcall target="insert-icon"/>
 		<antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk3-targets -->
-		<antcall target="rename-build-xml-for-transit"/>
 	</target>
 
Index: /release-kits/wirk3/installer/antinstall-config.xml
===================================================================
--- /release-kits/wirk3/installer/antinstall-config.xml	(revision 17651)
+++ /release-kits/wirk3/installer/antinstall-config.xml	(revision 17652)
@@ -53,10 +53,21 @@
 			hidden="true"/>
 
+		<!-- start binary release core -->
 		<target
 			target="Installing Core System"
 			diskRequirement="@component.size.core@"
+			displayText=""
 			defaultValue="true"
+			force="true"/>
+		<!-- end binary release core -->
+
+		<!-- start source release core -->
+		<target
+			target="Installing Source Code Core"
+			diskRequirement="@component.size.sourcecode-core@"
 			displayText=""
+			defaultValue="true"
 			force="true"/>
+		<!-- end source release core -->
 
 		<target
@@ -102,4 +113,5 @@
 	</page>
 
+	<!-- start bundled components -->
 	<page type="input" name="tomcat-config" ifProperty="(${Installing Tomcat}==true)" displayText="">
 
@@ -109,4 +121,5 @@
 
 	</page>
+	<!-- end bundled components -->
 
 	<page type="progress" name="progress" showTargets="true" displayText=""/>
Index: /release-kits/wirk3/installer/build.xml
===================================================================
--- /release-kits/wirk3/installer/build.xml	(revision 17651)
+++ /release-kits/wirk3/installer/build.xml	(revision 17652)
@@ -39,5 +39,5 @@
 	<target name="Installing Core System">
 
-		<!-- figure out the start menu path (if not already set from previous installation) -->
+		<!-- 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}"/>
@@ -72,7 +72,4 @@
 		</copy>
 
-		<!-- rename greenstone3-build.xml back to build.xml -->
-		<move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/>
-		
 		<!-- change the tomcat ports in build.properties -->
 		<echo message="Changing tomcat ports in build.properties"/>
@@ -104,4 +101,66 @@
 		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.unix}/web"/>
 
+		<echo message="Creating installation properties file"/>
+		<echo file="${installDir}\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
+		
+	</target>
+
+	<target name="Installing Core System">
+
+		<!-- 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"/>
+				
+		<echo>basedir: ${basedir}</echo>
+		<echo>installDir: ${installDir}</echo>
+		<echo>antinstaller.jar: ${antinstaller.jar}</echo>
+		<echo>startmenu.path: ${startmenu.path}</echo>
+		
+		<!-- create the installation directory -->
+		<echo message="Creating Installation directory"/>
+		<mkdir dir="${installDir}"/>
+
+		<!-- extract 7za tool -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}">
+			<patternset><include name="7za.exe"/></patternset>
+		</unzip>
+		
+		<!-- install files -->
+		<unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
+		<exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x sourcecode-core.lzma"/></exec>
+		<delete file="sourcecode-core.lzma"/>
+		<unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
+		<delete file="sourcecode-core.comp"/>
+
+		<!-- change the tomcat ports in build.properties -->
+		<echo message="Changing tomcat ports in build.properties"/>
+		<rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
+		<rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
+		<echo message="Changing tomcat ports in resources/tomcat/server.xml"/>
+		<copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir.local}/packages/tomcat/conf/server.xml" overwrite="true"/>
+		
+		<!-- set gsdlhome in gs2build setup.bat -->
+		<echo message="Setting %GSDLHOME% in gs2build\setup.bat"/>
+		<rsr file="${installDir}/gs2build/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}\gs2build" />
+		<!-- copy the greenstone3.xml file to tomcat -->
+		<echo message="Copying greenstone3.xml to tomcat directory"/>
+		<copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
+		<rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" />
+
+		<!-- set up global properties -->
+		<echo message="Setting up global properties"/>
+		<copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/global.properties">
+			<job pattern="@gsdl3home@" replacement="${installDir.unix}/web" />
+			<job pattern="@tomcat.server@" replacement="${tomcat.server}" />
+			<job pattern="@tomcat.port@" replacement="${tomcat.port}" />
+		</rsr>
+
+		<!-- set up log4j properties-->
+		<echo message="Setting up log4j properties"/>
+		<copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
+		<rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.unix}/web"/>
+
 		<!-- delete unneeded files -->	    
 		<delete dir="${installDir}/resources/icons"/>
@@ -112,4 +171,5 @@
 		
 	</target>
+
 
 	<!-- Source -->
