Index: release-kits/lirk2/ant-scripts/create-components.xml
===================================================================
--- release-kits/lirk2/ant-scripts/create-components.xml	(revision 17646)
+++ release-kits/lirk2/ant-scripts/create-components.xml	(revision 17649)
@@ -3,4 +3,6 @@
 
 	<!-- create components from the distribution folder -->
+
+	<!-- 1st level -->
 	<target name="create-components">
 		<antcall target="prepare-components" />
@@ -8,9 +10,10 @@
 	</target>
 
+	<!-- 2nd level -->
 	<target name="prepare-components">
 		<antcall target="prepare-core-component" />
 		<antcall target="prepare-sourcecode-component" />
 		<antcall target="prepare-imagemagick-component" />
-
+		<antcall target="prepare-sourcecode-core-component" />
 	</target>
 
@@ -19,6 +22,8 @@
 		<antcall target="compress-sourcecode-component" />	
 		<antcall target="compress-imagemagick-component" />
+		<antcall target="compress-sourcecode-core-component" />
 	</target>
-	
+
+	<!-- 3rd level -->	
 	<target name="prepare-core-component">
 
@@ -89,4 +94,26 @@
 		<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="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/lirk2/ant-scripts/create-distribution.xml
===================================================================
--- release-kits/lirk2/ant-scripts/create-distribution.xml	(revision 17646)
+++ release-kits/lirk2/ant-scripts/create-distribution.xml	(revision 17649)
@@ -3,15 +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="drop-in-docs" />
+		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-1" />
+
+		<antcall target="copy-web-to-source" />
+
 		<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="export-imagemagick-linux-binaries" />
 		<antcall target="compile-gli" />
-		<antcall target="tweak-files" />
+		<antcall target="remove-unneeded-files-2" />
+
 	</target>
 
@@ -25,11 +32,4 @@
 	</target>
 	
-	<target name="export-imagemagick-linux-binaries">
-		<delete dir="distributions/web/bin/linux/imagemagick"/>
-		<svn>
-			<export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
-		</svn>
-	</target>
-
 	<target name="dist-set-version">
 		<echo level="info">Setting version in src/lib/gsdlconf.h</echo>
@@ -41,42 +41,4 @@
 		<echo level="info">Setting version in etc/VERSION</echo>
 		<rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
-	</target>
-
-	<target name="drop-in-binaries">
-		<echo level="info">Dropping compiled binaries into distribution</echo>
-		<delete dir="distributions/web/bin/linux" />
-		<exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
-		<exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
-		<exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec>
-	</target>
-
-	<target name="drop-in-demo-collection">
-		<echo level="info">Dropping rebuilt demo collection into distribution</echo>
-		<delete dir="distributions/web/collect/demo" />
-		<exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
-	</target>
-
-	<target name="drop-in-docs">
-		<echo level="info">Dropping gsdl docs  into distribution</echo>
-		<copy todir="${basedir}/distributions/web" overwrite="true">
-			<fileset dir="${lirk2.home}/greenstone2/docs"/>
-		</copy>
-	</target>
-
-	<target name="compile-gli">
-		<echo>Compiling gli...</echo>
-		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
-
-		<echo>Creating jar...</echo>
-		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
-
-		<echo>Cleaning up intermediate files...</echo>
-		<delete dir="${basedir}/distributions/web/gli/jar"/>
-		<delete dir="${basedir}/distributions/web/gli/classes/org"/>
-
-		<echo>Putting gli server jar in a better place</echo>
-		<exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
-			<arg line="gli/GLIServer.jar bin/java" />
-		</exec>
 	</target>
 
@@ -107,14 +69,67 @@
 		<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="drop-in-docs">
+		<echo level="info">Dropping gsdl docs  into distribution</echo>
+		<copy todir="${basedir}/distributions/web" overwrite="true">
+			<fileset dir="${lirk2.home}/greenstone2/docs"/>
+		</copy>
+	</target>
+
+	<target name="remove-unneeded-files-1">
 		<delete file="${basedir}/distributions/web/gli/.greenstonestore" />
-		<delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
 		<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="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>
+		<delete dir="distributions/web/bin/linux" />
+		<exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
+		<exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
+		<exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec>
+	</target>
+
+	<target name="drop-in-demo-collection">
+		<echo level="info">Dropping rebuilt demo collection into distribution</echo>
+		<delete dir="distributions/web/collect/demo" />
+		<exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
+	</target>
+
+	<target name="export-imagemagick-linux-binaries">
+		<delete dir="distributions/web/bin/linux/imagemagick"/>
+		<svn>
+			<export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
+		</svn>
+	</target>
+
+	<target name="compile-gli">
+		<echo>Compiling gli...</echo>
+		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
+
+		<echo>Creating jar...</echo>
+		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
+
+		<echo>Cleaning up intermediate files...</echo>
+		<delete dir="${basedir}/distributions/web/gli/jar"/>
+		<delete dir="${basedir}/distributions/web/gli/classes/org"/>
+
+		<echo>Putting gli server jar in a better place</echo>
+		<exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
+			<arg line="gli/GLIServer.jar bin/java" />
+		</exec>
+	</target>
+
+	<target name="remove-unneeded-files-2">
+		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
+	</target>
+
+
 </project>
