Index: release-kits/wirk2/ant-scripts/build.xml
===================================================================
--- release-kits/wirk2/ant-scripts/build.xml	(revision 19566)
+++ release-kits/wirk2/ant-scripts/build.xml	(revision 19586)
@@ -33,4 +33,5 @@
 	<import file="create-installer.xml"/>
 	<import file="wrap.xml"/>
+	<import file="create-cdrom-components.xml"/>
 
 	<!-- THE MAIN TARGET -->
@@ -41,4 +42,5 @@
 		<antcall target="create-installer"/>
 		<antcall target="wrap"/>
+		<antcall target="create-cdrom-components"/>
 	</target>
 
Index: release-kits/wirk2/ant-scripts/create-cdrom-components.xml
===================================================================
--- release-kits/wirk2/ant-scripts/create-cdrom-components.xml	(revision 19586)
+++ release-kits/wirk2/ant-scripts/create-cdrom-components.xml	(revision 19586)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="wirk2-create-cdrom-components">
+
+	<!--
+		cd components
+		produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
+		pull out windows only files 
+	-->
+
+	<target name="create-cdrom-components">
+		<antcall target="compile-cdrom-installer"/> <!-- from init -->
+		<antcall target="prepare-cdrom-components"/>
+		<antcall target="compile-cdrom-wrapper"/>
+		<antcall target="create-cdrom-components-archive"/>
+	</target>
+
+	<target name="prepare-cdrom-components">
+		<delete dir="cdrom"/>
+		<mkdir dir="cdrom/build"/>
+		<mkdir dir="cdrom/dist/Software"/>
+		<mkdir dir="cdrom/dist/Java/Windows"/>
+		<mkdir dir="cdrom/dist/Java/Jars"/>
+		
+		<!-- core -->
+		<mkdir dir="cdrom/dist/Software/core/windows"/>
+		<copy todir="cdromdist/Software/core/windows" overwrite="true">
+			<fileset dir="components/tmp/core">
+				<include name="bin/windows"/>
+				<include name="bin/windows/**/*"/>
+				<include name="*.bat"/>
+			</fileset>
+		</copy>
+
+		<!-- imagemagick -->
+		<mkdir dir="cdrom/dist/Software/imagemagick/windows"/>
+		<copy todir="cdrom/dist/Software/imagemagick/windows" overwrite="true">
+			<fileset dir="components/tmp/imagemagick"/>
+		</copy>
+
+		<!-- ghostscript -->
+		<mkdir dir="cdrom/dist/Software/ghostscript/windows"/>
+		<copy todir="cdrom/dist/Software/ghostscript/windows" overwrite="true">
+			<fileset dir="components/tmp/ghostscript"/>
+		</copy>
+		
+		<!-- jre -->
+		<exec dir="cdrom/dist/Java/Windows" executable="${wirk2.home}/windows/wrapper/jre.exe"/>
+
+		<!-- jar installer -->
+		<copy file="installer/cdrom.jar" tofile="cdrom/dist/Java/Jars/windows.jar"/>
+		
+	</target>
+
+	<target name="compile-cdrom-wrapper">
+		<copy file="${wirk2.home}/greenstone2/icon/icon.ico" todir="cdrom/build"/>
+		<echo file="cdrom/build/cdrom-wrapper.rc">MAINICON ICON "icon.ico"</echo>
+		<exec executable="rc" dir="cdrom/build">
+			<arg line="cdrom-wrapper.rc"/>
+		</exec>
+		<exec executable="cl" dir="cdrom/build">
+			<arg line="/c -GX ${rk.home}/windows/wrapper/cdrom-wrapper.cpp /out:cdrom-wrapper.obj"/>
+		</exec>
+		<exec executable="link" dir="cdrom/build">
+			<arg line="/OUT:../dist/Greenstone-${version}-windows.exe gdi32.lib advapi32.lib shell32.lib user32.lib cdrom-wrapper.obj cdrom-wrapper.RES"/>
+		</exec>
+
+	</target>
+
+	<target name="create-cdrom-components-archive">
+		<mkdir dir="products"/>
+		<tar destfile="products/cdrom-components-${version}-windows.tar.gz" compression="gzip">
+			<tarfileset dir="cdrom/dist"><include name="**/*"/></tarfileset>
+		</tar>
+	</target>
+	
+</project>
Index: release-kits/wirk2/ant-scripts/create-components.xml
===================================================================
--- release-kits/wirk2/ant-scripts/create-components.xml	(revision 19566)
+++ release-kits/wirk2/ant-scripts/create-components.xml	(revision 19586)
@@ -8,5 +8,4 @@
 		<antcall target="prepare-components"/>
 		<antcall target="compress-components"/>
-		<antcall target="produce-cd-components"/>
 	</target>
 	
@@ -86,37 +85,4 @@
 		<exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
 	</target>
-
-	<!--
-		cd components
-		produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
-		pull out windows only files 
-	-->
-	<target name="produce-cd-components">
-		<delete dir="components/tmp/cdrom"/>
-		<mkdir dir="components/tmp/cdrom"/>
-
-		<!-- core -->
-		<mkdir dir="components/tmp/cdrom/core/windows"/>
-		<copy todir="components/tmp/cdrom/core/windows" overwrite="true">
-			<fileset dir="components/tmp/core">
-				<include name="bin/windows"/>
-				<include name="bin/windows/**/*"/>
-				<include name="*.bat"/>
-			</fileset>
-		</copy>
-
-		<!-- imagemagick -->
-		<mkdir dir="components/tmp/cdrom/imagemagick/windows"/>
-		<copy todir="components/tmp/cdrom/imagemagick/windows" overwrite="true">
-			<fileset dir="components/tmp/imagemagick"/>
-		</copy>
-
-		<!-- ghostscript -->
-		<mkdir dir="components/tmp/cdrom/ghostscript/windows"/>
-		<copy todir="components/tmp/cdrom/ghostscript/windows" overwrite="true">
-			<fileset dir="components/tmp/ghostscript"/>
-		</copy>
-
-	</target>
-		
+			
 </project>
Index: release-kits/wirk2/ant-scripts/create-installer.xml
===================================================================
--- release-kits/wirk2/ant-scripts/create-installer.xml	(revision 19566)
+++ release-kits/wirk2/ant-scripts/create-installer.xml	(revision 19586)
@@ -6,5 +6,4 @@
 		<antcall target="make-installer-files-concrete"><param name="java.os" value="windows"/></antcall> <!-- from init -->
 		<antcall target="compile-binary-installer"/> <!-- from init -->
-		<antcall target="compile-cdrom-installer"/> <!-- from init -->
 	</target>
 
Index: release-kits/wirk2/ant-scripts/wrap.xml
===================================================================
--- release-kits/wirk2/ant-scripts/wrap.xml	(revision 19566)
+++ release-kits/wirk2/ant-scripts/wrap.xml	(revision 19586)
@@ -12,10 +12,10 @@
 	<target name="copy-files-for-wrapping">
 		<!--create a directory to build the wrapped installer in -->
-		<mkdir dir="${basedir}/wrapped-installer/build"/>
+		<mkdir dir="${basedir}/wrapped-installer"/>
 		
 		<!-- copy source files -->
-		<copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/>
-		<copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/core/search4j/libsearch4j.cpp" overwrite="true"/>
-		<copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/core/search4j/libsearch4j.h" overwrite="true"/>
+		<copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/>
+		<copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/core/search4j/libsearch4j.cpp" overwrite="true"/>
+		<copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/core/search4j/libsearch4j.h" overwrite="true"/>
 
 	</target>
@@ -23,5 +23,5 @@
 	<target name="tweak-files-for-wrapping">
 		<echo>Substitute concrete values of things into source files</echo>
-		<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp">
+		<rsr file="${basedir}/wrapped-installer/wrapper.cpp">
 			<job pattern="@java.installer@" replacement="${windows-java.installer}"/>
 			<job pattern="@java.min.version@" replacement="${java.min.version}"/>
@@ -36,8 +36,8 @@
 			
 			<echo>getting the template resource script</echo>
-			<copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
+			<copy todir="${basedir}/wrapped-installer" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
 			
 			<echo>copying the small resource files into place</echo>
-			<copy todir="${basedir}/wrapped-installer/build" overwrite="true">
+			<copy todir="${basedir}/wrapped-installer" overwrite="true">
 				<fileset dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/>
 				<fileset dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/>
@@ -45,25 +45,25 @@
 			</copy>
 			
+			<echo>adding ${windows-java.installer} to the copy as chunks</echo>
+			<rsplit
+				resource="${wirk2.home}/windows/wrapper/${windows-java.installer}"
+				outputDir="${basedir}/wrapped-installer"					
+				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
+				resourceName="JAVA"
+				resourceType="EXE"
+				chunkSize="${resources.chunksize}"/>
+				
 			<echo>adding greenstone2.jar to the resource script as chunks</echo>
 			<rsplit
 				resource="${basedir}/installer/Greenstone-${version}-win32.jar"
-				outputDir="${basedir}/wrapped-installer/build"
-				resourceScript="${basedir}/wrapped-installer/build/wrapper.rc"
+				outputDir="${basedir}/wrapped-installer"
+				resourceScript="${basedir}/wrapped-installer/wrapper.rc"
 				resourceName="JAR"
 				resourceType="JAR"
 				chunkSize="${resources.chunksize}"
 				/>
-			
-			<echo>adding ${windows-java.installer} to the copy as chunks</echo>
-			<rsplit
-				resource="${wirk2.home}/windows/wrapper/${windows-java.installer}"
-				outputDir="${basedir}/wrapped-installer/build"					
-				resourceScript="${basedir}/wrapped-installer/build/wrapper.rc"
-				resourceName="JAVA"
-				resourceType="EXE"
-				chunkSize="${resources.chunksize}"/>
-			
-			<echo>resource compiling the generated resource script</echo>
-			<exec executable="rc" dir="${basedir}/wrapped-installer/build">
+				
+			<echo>resource compiling the resource script</echo>
+			<exec executable="rc" dir="${basedir}/wrapped-installer">
 				<arg line="wrapper.rc"/>
 			</exec>
@@ -72,9 +72,9 @@
 
 	<target name="compile-wrapper">
-		<exec executable="cl" dir="${basedir}/wrapped-installer/build">
+		<exec executable="cl" dir="${basedir}/wrapped-installer">
 			<arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/>
 		</exec>
 
-		<exec executable="cl" dir="${basedir}/wrapped-installer/build">
+		<exec executable="cl" dir="${basedir}/wrapped-installer">
 			<arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/>
 		</exec>
@@ -82,16 +82,9 @@
 	
 	<target name="link-wrapper">
-		<exec executable="link" dir="${basedir}/wrapped-installer/build">
-			<arg line="/OUT:..\..\products\Greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
+		<mkdir dir="products"/>
+		<exec executable="link" dir="${basedir}/wrapped-installer">
+			<arg line="/OUT:..\products\Greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
 		</exec>
 	</target>
 
-	<target name="archive-cdrom-components-and-installer">
-		<mkdir dir="products"/>
-		<tar destfile="products/cdrom-components-${version}-linux.tar.gz" compression="gzip">
-			<tarfileset dir="components/tmp"><include name="cdrom/**/*"/></tarfileset>
-			<tarfileset dir="wrapped-installer"><include name="cdrom-windows.exe"/></tarfileset>
-		</tar>
-	</target>
-
 </project>
