Index: /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml
===================================================================
--- /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml	(revision 16682)
+++ /release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml	(revision 16682)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+		.......................................................... 
+		August 2008
+		Targets for Greenstone3 release kits
+		Oran Fry
+		..........................................................
+-->
+
+<project name="rk3-targets">
+
+	<target name="calculate-component-sizes">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<!-- calculate the size of some components -->
+			<echo>Calculating the size of some components</echo>
+
+			<!-- 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>
+			<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>
+			<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>
+			<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>
+			<math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/>
+			<property name="component.size.ant" value="${component.megabytesize.ant} MB"/>
+
+			<echo>component.size.core: ${component.size.core}</echo>
+			<echo>component.size.sourcecode: ${component.size.sourcecode}</echo>
+			<echo>component.size.tomcat: ${component.size.tomcat}</echo>
+			<echo>component.size.ant: ${component.size.ant}</echo>
+
+			<if>
+				<bool><equals arg1="windows" arg2="${rk.os}"/></bool>
+				<echo>component.size.windows-java: ${component.size.windows-java}</echo>
+
+			<else><if>
+				<bool><equals arg1="linux" arg2="${rk.os}"/></bool>
+				<echo>component.size.linux-java: ${component.size.linux-java}</echo>
+
+				</if></else>
+
+			</if>
+
+		</if>
+	</target>
+
+	<target name="make-installer-files-concrete">
+		<if><bool><istrue value="${execute}"/></bool>
+
+			<echo>component.size.core: ${component.size.core}</echo>
+			<echo>component.size.sourcecode: ${component.size.sourcecode}</echo>
+			<echo>component.size.tomcat: ${component.size.tomcat}</echo>
+			<echo>component.size.ant: ${component.size.ant}</echo>
+
+			<if>
+				<bool><equals arg1="windows" arg2="${rk.os}"/></bool>
+				<echo>component.size.windows-java: ${component.size.windows-java}</echo>
+
+			<else><if>
+				<bool><equals arg1="linux" arg2="${rk.os}"/></bool>
+				<echo>component.size.linux-java: ${component.size.linux-java}</echo>
+
+				</if></else>
+
+			</if>
+
+			<!-- put the concrete values of things in the config -->
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
+			<!--<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.core@" replacement="${component.size.core}"/>-->
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/>
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
+			<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/>
+
+			<rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
+
+			<!-- put the concrete values of things in the text -->
+			<!-- default -->
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+
+			<!-- chinese -->
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
+			<rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
+
+			<!-- 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}"/>
+
+			<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>
+
+		</if>
+	</target>
+
+</project>
