Index: release-kits/wirk3/ant-scripts/create-components.xml
===================================================================
--- release-kits/wirk3/ant-scripts/create-components.xml	(revision 17366)
+++ release-kits/wirk3/ant-scripts/create-components.xml	(revision 17366)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="wirk3-create-components" default="create-components">
+
+	<!-- create components from the distribution folder -->
+	<target name="create-components">
+		<antcall target="create-core-component" />
+		<antcall target="create-imagemagick-component" />
+		<antcall target="create-ghostscript-component" />
+		<antcall target="create-sourcecode-component" />
+		<antcall target="create-ant-component" />
+		<antcall target="create-tomcat-component" />
+	</target>
+	
+	
+	<target name="create-core-component">
+		<antcall target="prepare-core-component" />
+		<antcall target="compress-core-component" />
+	</target>
+
+	<target name="create-imagemagick-component">
+		<antcall target="prepare-imagemagick-component" />
+		<antcall target="compress-imagemagick-component" />	
+	</target>
+	
+	
+	<target name="create-ghostscript-component">
+		<antcall target="prepare-ghostscript-component" />
+		<antcall target="compress-ghostscript-component" />	
+	</target>
+	
+	
+	<target name="create-sourcecode-component">
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="compress-sourcecode-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>
+
+	
+	<target name="prepare-core-component">
+		<!-- delete old stuff to create new components -->
+		<delete dir="components"/>
+		<mkdir dir="components"/>
+		<mkdir dir="components/tmp"/>
+				
+		<copy todir="components/tmp/core" overwrite="true">
+				<fileset dir="distribution/greenstone3">
+					<include name="bin/**/*"/>
+					<include name="docs/**/*"/>
+					<include name="gli/**/*"/>
+					<include name="gs2build/**/*"/>
+					
+					<exclude name="gs2build/common-src/**/*"/>
+					<exclude name="gs2build/build-src/**/*"/>
+					<exclude name="gs2build/runtime-src/**/*"/>
+					<exclude name="gs2build/bin/windows/imagemagick/**/*"/>
+					<exclude name="gs2build/bin/windows/ghostscript/**/*"/>
+					
+					<include name="lib/**/*"/>
+					<include name="web/**/*"/>
+					<include name="resources/**/*"/>
+					<include name="winutil/**/*"/>
+
+					<include name="greenstone3-build.xml"/>
+					<include name="build.properties"/>
+					<include name="gs3-server.bat"/>
+					<include name="gs3-setup.bat"/>
+					<include name="LICENSE.txt"/>
+					<include name="README.txt"/>
+					<include name="server.jar"/>
+					<include name="Uninstall.jar"/>
+				</fileset>
+		</copy>
+		
+		<!-- do some cleanup -->
+		<delete dir="components/tmp/core/gs2build/common-src"/>
+		<delete dir="components/tmp/core/gs2build/build-src"/>
+		<delete dir="components/tmp/core/gs2build/runtime-src"/>
+		<delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
+		<delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>
+				
+		<zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
+	</target>
+	
+	
+	<target name="compress-core-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
+	</target>
+	
+	
+	
+	<target name="prepare-imagemagick-component">
+		<copy todir="components/tmp/imagemagick" overwrite="true">
+			<fileset dir="distribution/greenstone3/gs2build/bin/windows/">
+				<include name="imagemagick/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
+	</target>
+		
+	<target name="compress-imagemagick-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
+	</target>
+	
+	
+	
+	<target name="prepare-ghostscript-component">
+		<copy todir="components/tmp/ghostscript" overwrite="true">
+			<fileset dir="distribution/greenstone3/gs2build/bin/windows/">
+				<include name="ghostscript/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
+	</target>
+		
+	<target name="compress-ghostscript-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
+	</target>
+	
+	
+	
+	<target name="prepare-sourcecode-component">
+		<copy todir="components/tmp/sourcecode" overwrite="true">
+				<fileset dir="distribution/greenstone3">
+					<include name="src/**/*"/>
+					<include name="gs2build/common-src/**/*"/>
+					<include name="gs2build/build-src/**/*"/>
+					<include name="gs2build/runtime-src/**/*"/>
+				</fileset>
+		</copy>
+				
+		<zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
+	</target>
+		
+	<target name="compress-sourcecode-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
+	</target>
+	
+	
+	
+	<target name="prepare-ant-component">
+		<copy todir="components/tmp/ant" overwrite="true">
+			<fileset dir="distribution/greenstone3/packages">
+				<include name="ant/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
+	</target>
+		
+	<target name="compress-ant-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ant.lzma ant.comp"/></exec>
+	</target>
+	
+	
+	
+	<target name="prepare-tomcat-component">
+		<copy todir="components/tmp/tomcat" overwrite="true">
+			<fileset dir="distribution/greenstone3/packages">
+				<include name="tomcat/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
+	</target>
+		
+	<target name="compress-tomcat-component">
+		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 tomcat.lzma tomcat.comp"/></exec>
+	</target>	
+
+	
+	
+</project>
