Index: main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml	(revision 21391)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/create-distribution.xml	(revision 21393)
@@ -9,30 +9,87 @@
 		<antcall target="strip-svn-dirs"><param name="dir" value="${basedir}/distributions/web"/></antcall>
 
+		<!-- create needed empty files -->
+		<mkdir dir="distributions/web/tmp"/>
+		<chmod dir="distributions/web/tmp" perm="a+rwx"/>
+		<echo file="distributions/web/etc/usage.txt"></echo>
+
 		<!-- windows -->
 		<if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
 			<antcall target="copy-server"/>
-			<antcall target="remove-unneeded-files" />
-			<antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
 			<antcall target="create-binary-zip-windows"/>
+
+			<!-- unneeded files -->
+			<delete dir="${basedir}/distributions/web/bin/linux" />
+			<delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,.gstermrc"/></delete>
+			<delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
+			<delete dir="${basedir}/distributions/web/autom4te.cache" />
 
 		<!-- linux -->
 		<else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets -->
+			<antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall>
 			<antcall target="export-imagemagick-linux-binaries"/>
 			<antcall target="export-wvware-linux-binaries"/>
-			<antcall target="remove-unneeded-files" />
-			<antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
+
+			<!-- unneeded files -->
+			<delete><fileset dir="${basedir}/distributions/web" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete>
+			<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"/>
+			<delete dir="${basedir}/distributions/web/common-src/indexers/packages/windows"/>
 
 		<!-- mac -->
 		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-			<antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets -->
+			<antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall>
 			<antcall target="export-imagemagick-darwin-binaries" />
 			<antcall target="export-ghostscript-darwin-binaries" />
-			<antcall target="remove-unneeded-files"/>
-			<antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
+
+			<!-- unneeded files -->
+			<delete><fileset dir="${basedir}/distributions/web" includes="win32.mak,win32cfg.h,Install.sh,Support.htm"/></delete>
+			<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"/>
+
 
 		</if></else></if></else></if>
 
+		<!-- unneeded files -->
+		<delete dir="${basedir}/distributions/web/uninstaller" />
+		<delete file="${basedir}/distributions/web/gli/.greenstonestore" />
+		<delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
+
 	</target>
 
+	<target name="export-imagemagick-linux-binaries">
+		<delete dir="distributions/web/bin/linux/imagemagick"/>
+		<svn>
+			<export srcurl="${svn.root}/main/${branch.path}/binaries/linux/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
+		</svn>
+	</target>
+	
+	<target name="export-wvware-linux-binaries">
+		<delete dir="distributions/web/bin/linux/wv"/>
+		<svn>
+			<export srcurl="${svn.root}/main/${branch.path}/binaries/linux/wv" destPath="distributions/web/bin/linux/wv"/>
+		</svn>
+	</target>
+
+	<target name="export-imagemagick-darwin-binaries">
+		<delete dir="distributions/web/bin/darwin/imagemagick"/>
+		<exec executable="svn">
+			<arg value="export"/>
+			<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
+			<arg value="distributions/web/bin/darwin/imagemagick"/>
+		</exec>
+	</target>
+	
+	<target name="export-ghostscript-darwin-binaries">
+		<delete dir="distributions/web/bin/darwin/ghostscript"/>
+		<exec executable="svn">
+			<arg value="export"/>
+			<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
+			<arg value="distributions/web/bin/darwin/ghostscript"/>
+		</exec>
+	</target>
+
+
 </project>
