Index: /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml
===================================================================
--- /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml	(revision 17371)
+++ /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml	(revision 17372)
@@ -16,25 +16,34 @@
 
 		<!-- core greenstone3 system (keep in sync with installer build.xml files) -->
-		<length property="component.bytesize.core" mode="all">
-			<fileset dir="${basedir}/distribution/greenstone3" includes="bin/**/*,docs/**/*,gli/**/*,gs2build/**/*,lib/**/*,web/**/*,resources/**/*,winutil/**/*"/>
-		</length>
+		<length property="component.bytesize.core" mode="all"><fileset file="${basedir}/components/core.comp"/></length>
 		<math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/>
 		<property name="component.size.core" value="${component.megabytesize.core} MB"/>
 
 		<!-- source code (keep in sync with installer build.xml files) -->
-		<length property="component.bytesize.sourcecode" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="src/**/*"/></length>
+		<length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length>
 		<math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/>
 		<property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/>
 
 		<!-- tomcat -->
-		<length property="component.bytesize.tomcat" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/tomcat/**/*"/></length>
+		<length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length>
 		<math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/>
 		<property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/>
 
 		<!-- ant -->
-		<length property="component.bytesize.ant" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/ant/**/*"/></length>
+		<length property="component.bytesize.ant" mode="all"><fileset file="${basedir}/components/ant.comp"/></length>
 		<math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/>
 		<property name="component.size.ant" value="${component.megabytesize.ant} MB"/>
 
+		<!-- imagemagick -->
+		<length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length>
+		<math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/>
+		<property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/>
+
+		<!-- ghostscript -->
+		<length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length>
+		<math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/>
+		<property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/>
+
+		
 		<!-- show the calculated sizes -->
 		<echo>component.size.core: ${component.size.core}</echo>
@@ -42,4 +51,6 @@
 		<echo>component.size.tomcat: ${component.size.tomcat}</echo>
 		<echo>component.size.ant: ${component.size.ant}</echo>
+		<echo>component.size.imagemagick: ${component.size.imagemagick}</echo>
+		<echo>component.size.ghostscript: ${component.size.ghostscript}</echo>
 		<if>
 			<bool><equals arg1="windows" arg2="${rk.os}"/></bool>
@@ -57,8 +68,10 @@
 			<job pattern="@component.size.core@" replacement="${component.size.core}"/>
 			<job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
+			<job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
+			<job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
+			<job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/>
+			<job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/>
 			<job pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
 			<job pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/>
-			<job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
-			<job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
 		</rsr>
 
@@ -66,4 +79,6 @@
 			<job pattern="@version@" replacement="${version}"/>
 			<job pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/>
+			<job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/>
 		</rsr>
 
@@ -75,4 +90,8 @@
 			<job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
 			<job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+			<job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
+			<job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
+			<job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
+			<job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
 		</rsr>
 
@@ -83,22 +102,9 @@
 			<job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
 			<job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+			<job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
+			<job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
+			<job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
+			<job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
 		</rsr>
-
-		<!-- os specific replacements -->
-		<if>
-			<bool><equals arg1="windows" arg2="${rk.os}"/></bool>
-			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
-			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
-			<rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${windows-java.extracted}"/>
-
-		<else><if>
-			<bool><equals arg1="linux" arg2="${rk.os}"/></bool>
-			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
-			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
-			<rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
-
-			</if></else>
-
-		</if>
 
 	</target>
