Index: /release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml
===================================================================
--- /release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml	(revision 16814)
+++ /release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml	(revision 16814)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+		.......................................................... 
+		August 2008
+		Targets for Greenstone2 release kits
+		Oran Fry
+		..........................................................
+-->
+
+<project name="rk2-targets">
+
+	<target name="make-installer-files-concrete">
+
+		<!-- calculate the size of some components -->
+		<echo>Calculating the size of some components</echo>
+
+		<!-- core greenstone2 system (keep in sync with installer build.xml files) -->
+		<length property="component.bytesize.core" mode="all">
+			<fileset dir="${basedir}/distribution/greenstone3" includes="gli/**/*,bin/**/*,cgi-bin/**/*,etc/**/*,mappings/**/*,images/**/*,perllib/**/*,indexers/**/*,macros/**/*,collect/**/*"/>
+		</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="common-src/**/*,runtime-src/**/*build-src/**/*,packages/**/*"/></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"/>
+
+		<!-- show the calculated sizes -->
+		<echo>component.size.core: ${component.size.core}</echo>
+		<echo>component.size.sourcecode: ${component.size.sourcecode}</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/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
+		<rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
+
+		<!-- 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}"/>
+		<!-- 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}"/>
+
+		<!-- 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>
+
+	</target>
