Index: main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml
===================================================================
--- main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml	(revision 22099)
+++ main/trunk/release-kits/kits/cdrk2/ant-scripts/build.xml	(revision 22699)
@@ -10,408 +10,349 @@
 <project name="cdrk2-build" default="cdrk2">
 
-  <!-- IMPORT OTHER ANT SCRIPTS -->
-  <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
-  <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
-
-  <!-- THE MAIN TARGET -->
-  <target name="cdrk2" depends="init">
-
-    <property name="linux.file" value="null"/>
-    <property name="mac.file" value="null"/>
-    <property name="windows.file" value="null"/>
-    <property name="doc.file" value="null"/>
-
-    <if>
-      <bool>
-	<not><equals arg1="${linux.file}" arg2="null"/></not>
-      </bool>
-      <property name="software.archive.linux" value="file://${linux.file}"/>
-    </if>
-    
-    <if>
-      <bool>
-	<not><equals arg1="${mac.file}" arg2="null"/></not>
-      </bool>
-      <property name="software.archive.mac" value="file://${mac.file}"/>
-    </if>
-    
-    <if>
-      <bool>
-	<not><equals arg1="${windows.file}" arg2="null"/></not>
-      </bool>
-      <property name="software.archive.windows" value="file://${windows.file}"/>
-    </if>
-    
-    <if>
-      <bool>
-	<not><equals arg1="${doc.file}" arg2="null"/></not>
-      </bool>
-      <property name="software.archive.documented-examples" value="file://${doc.file}"/>
-    </if>
-    
-    <!-- figure out where the compiled software is coming from -->
-    <property name="software.archive.linux" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-linux.tar.gz"/>
-    <property name="software.archive.windows" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-windows.tar.gz"/>
-    <property name="software.archive.mac" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-mac.tar.gz"/>
-    <property name="software.archive.documented-examples" value="http://www.greenstone.org/caveat-emptor/Greenstone-documented-examples-${version}-candidate-${date}.tar.gz"/>
-    
-    <!-- show the properties we're using -->
-    <if>
-      <bool>
-	<not><equals arg1="${no.linux}" arg2="true"/></not>
-      </bool>
-      <echo message="software.archive.linux:                    ${software.archive.linux}"/>
-    </if>
-
-    <if>
-      <bool>
-	<not><equals arg1="${no.windows}" arg2="true"/></not>
-      </bool>
-      <echo message="software.archive.windows:                  ${software.archive.windows}"/>
-    </if>
-
-    <if>
-      <bool>
-	<not><equals arg1="${no.mac}" arg2="true"/></not>
-      </bool>
-      <echo message="software.archive.mac:                      ${software.archive.mac}"/>
-    </if>
-
-    <if>
-      <bool>
-	<not><equals arg1="${no.doc}" arg2="true"/></not>
-      </bool>
-      <echo message="software.archive.documented-examples:      ${software.archive.documented-examples}"/>
-    </if>
-
-    <!-- create a directory for the cdrom contents -->
-    <mkdir dir="cdrom"/>
-
-    <!-- checkout and compile documentation java/fop code -->
-    <if>
-      <bool>
-	<or>
-	  <equals arg1="${branch.path}" arg2="trunk"/>
-	  <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
-	</or> 
-      </bool>
-
-      <exec executable="svn">
-	<arg value="export"/>
-	<arg value="${svn.root}/documentation/${branch.path}/shared"/>
-	<arg value="documentation/shared"/>
-      </exec>
-      
-      <else>
-	<exec executable="svn">
-	  <arg value="export"/>
-	  <arg value="${svn.root}/main/${branch.path}/documentation/shared"/>
-	  <arg value="documentation/shared"/>
-	</exec>
-      </else>
-    </if>
-
-    <javac srcdir="documentation/shared" destdir="documentation/shared" debug="on" classpath="documentation/shared/xalan.jar">
-      <include name="*.java"/>
-    </javac>
-
-    <!-- checkout tutorials and build them -->
-    <if>
-      <bool>
-	<or>
-	  <equals arg1="${branch.path}" arg2="trunk"/>
-	  <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
-	</or>
-      </bool>
-      
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/documentation/${branch.path}/tutorials"/><arg value="documentation/tutorials"/>
-      </exec>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/main/${branch.path}/gli"/>
-	<arg value="documentation/gli"/>
-      </exec>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/main/${branch.path}/greenstone2/perllib"/>
-	<arg value="documentation/perllib"/>
-      </exec>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/main/${branch.path}/greenstone2/macros"/>
-	<arg value="documentation/macros"/>
-      </exec>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/documentation/${branch.path}/tutorial_sample_files"/>
-	<arg value="documentation/tutorial_sample_files"/>
-      </exec>
-      
-      <else>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/documentation/tutorials"/>
-	  <arg value="documentation/tutorials"/>
-	</exec>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/gli"/>
-	  <arg value="documentation/gli"/>
-	</exec>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/gsdl/perllib"/>
-	  <arg value="documentation/perllib"/>
-	</exec>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/gsdl/macros"/>
-	  <arg value="documentation/macros"/>
-	</exec>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/documentation/tutorial_sample_files"/>
-	  <arg value="documentation/tutorial_sample_files"/>
-	</exec>
-      </else>
-    </if>
-
-    <delete dir="documentation/tutorials/html"/>
-    <exec dir="documentation/tutorials" executable="/bin/bash">
-      <arg value="generate-html.sh"/>
-      <env key="GSDLHOME" value="${basedir}/documentation"/>
-    </exec>
-    <delete dir="cdrom/Tutorial Exercises"/>
-    <mkdir dir="cdrom/Tutorial Exercises/sample_files"/>
-
-    <!-- copy tutorial html into place on the cd -->
-    <copy todir="cdrom/Tutorial Exercises/English"><fileset dir="documentation/tutorials/html/en"/></copy>
-    <copy todir="cdrom/Tutorial Exercises/French"><fileset dir="documentation/tutorials/html/fr"/></copy>
-    <copy todir="cdrom/Tutorial Exercises/Spanish"><fileset dir="documentation/tutorials/html/es"/></copy>
-    <copy todir="cdrom/Tutorial Exercises/Russian"><fileset dir="documentation/tutorials/html/ru"/></copy>
-
-    <!-- create tutorial sample files zips in place on the cdrom -->
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/beatles.zip" basedir="documentation/tutorial_sample_files/beatles"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/custom.zip" basedir="documentation/tutorial_sample_files/custom"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/demo_NewFiles.zip" basedir="documentation/tutorial_sample_files/demo_NewFiles"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/dspace.zip" basedir="documentation/tutorial_sample_files/dspace"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/images.zip" basedir="documentation/tutorial_sample_files/images"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/isis.zip" basedir="documentation/tutorial_sample_files/isis"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/marc.zip" basedir="documentation/tutorial_sample_files/marc"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/niupepa.zip" basedir="documentation/tutorial_sample_files/niupepa"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/oai.zip" basedir="documentation/tutorial_sample_files/oai"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/simple_html.zip" basedir="documentation/tutorial_sample_files/simple_html"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/tudor.zip" basedir="documentation/tutorial_sample_files/tudor"/>
-    <zip destfile="cdrom/Tutorial Exercises/sample_files/Word_and_PDF.zip" basedir="documentation/tutorial_sample_files/Word_and_PDF"/>
-
-    <!-- checkout manuals ad build them -->
-    <if>
-      <bool>
-	<or>
-	  <equals arg1="${branch.path}" arg2="trunk"/>
-	  <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
-	</or>
-      </bool>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/documentation/${branch.path}/manuals"/>
-	<arg value="documentation/manuals"/>
-      </exec>
-      <exec executable="svn">
-	<arg value="checkout"/>
-	<arg value="${svn.root}/documentation/${branch.path}/shared"/>
-	<arg value="documentation/shared"/>
-      </exec>
-      
-      <else>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/documentation/manuals"/>
-	  <arg value="documentation/manuals"/>
-	</exec>
-	<exec executable="svn">
-	  <arg value="checkout"/>
-	  <arg value="${svn.root}/main/${branch.path}/documentation/shared"/>
-	  <arg value="documentation/shared"/>
-	</exec>
-      </else>
-    </if>
-
-    <exec executable="svn">
-      <arg value="checkout"/>
-      <arg value="${svn.root}/main/${branch.path}/gli"/>
-      <arg value="documentation/gli"/>
-    </exec>
-
-    <unzip src="documentation/shared/fop.zip" dest="documentation/shared"/>
-    <chmod perm="a+x" file="documentation/shared/fop/fop.sh"/>
-
-    <antcall target="generate-gli-chapter"><param name="language" value="en"/></antcall>
-    <antcall target="generate-gli-chapter"><param name="language" value="fr"/></antcall>
-    <antcall target="generate-gli-chapter"><param name="language" value="es"/></antcall>
-    <antcall target="generate-gli-chapter"><param name="language" value="ru"/></antcall>
-
-    <delete dir="documentation/manuals/build"/>
-    <exec dir="documentation/manuals" executable="/bin/bash">
-      <arg value="generate-pdf.sh"/>
-      <arg value="all"/>
-      <arg value="en es ru fr"/>
-    </exec>
-
-    <exec spawn="true" dir="documentation/manuals" executable="/bin/bash">
-      <arg value="generate-pdf.sh"/>
-      <arg value="Install"/>
-      <arg value="ar"/>
-    </exec>
-
-    <!-- put manuals in place on cdrom -->
-    <delete dir="cdrom/Documentation"/>
-    <copy todir="cdrom/Documentation/English"><fileset dir="documentation/manuals/build/en/pdf"/></copy>
-    <copy todir="cdrom/Documentation/French"><fileset dir="documentation/manuals/build/fr/pdf"/></copy>
-    <copy todir="cdrom/Documentation/Spanish"><fileset dir="documentation/manuals/build/es/pdf"/></copy>
-    <copy todir="cdrom/Documentation/Russian"><fileset dir="documentation/manuals/build/ru/pdf"/></copy>
-    <copy todir="cdrom/Documentation/Arabic"><fileset dir="documentation/manuals/build/ar/pdf"/></copy>
-
-    <!-- top off manuals with a few more from the web -->
-    <get src="http://wiki.greenstone.org/wiki/gsdoc/others/CDS-ISIS_to_DL.pdf" dest="cdrom/Documentation/English/CDS-ISIS_to_DL.pdf"/>
-    <get src="http://www.greenstone.org/docs/inside_greenstone.pdf" dest="cdrom/Documentation/English/inside_greenstone.pdf"/>
-
-    <get src="http://www.greenstone.org/manuals/gsdl2/ar/pdf/Users_Guide_Arabic.doc" dest="cdrom/Documentation/Arabic/Users_Guide_Arabic.doc"/>
-    <get src="http://www.greenstone.org/manuals/gsdl2/ar/pdf/Install_ar.pdf" dest="cdrom/Documentation/Arabic/Install_ar.pdf"/>
-
-    <mkdir dir="cdrom/Documentation/Brazilian Portuguese"/>
-    <get src="http://www.greenstone.org/manuals/gsdl2/pt-br/pdf/Install_pt-br.pdf" dest="cdrom/Documentation/Brazilian Portuguese/Install_pt-br.pdf"/>
-
-    <mkdir dir="cdrom/Documentation/Vietnamese"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/Install-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/Install-2.39-vi.pdf"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/User-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/User-2.39-vi.pdf"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/Paper-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/Paper-2.39-vi.pdf"/>
-
-    <mkdir dir="cdrom/Documentation/Kazakh"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/Install-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/Install-2.39-kz.pdf"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/User-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/User-2.39-kz.pdf"/>
-    <get src="http://prdownloads.sourceforge.net/greenstone/Paper-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/Paper-2.39-kz.pdf"/>
-
-    <!-- insert the documented examples onto cdrom -->
-    <if>
-      <bool>
-	<not><equals arg1="${no.doc}" arg2="true"/></not>
-      </bool>
-      <mkdir dir="archives"/>
-      <get src="${software.archive.documented-examples}" dest="archives/documented-examples.tar.gz"/>		  
-      <delete dir="cdrom/Documented Examples"/>
-      <copy toDir="cdrom">
-	<fileset dir="${rk.home}/kits/${rk.name}/resources">
-	  <include name="Documented Examples/**/*"/>
-	  <include name="Documented Examples"/>
-	</fileset>
-      </copy>
-      <exec executable="tar" dir="cdrom/Documented Examples"><arg value="-xzf"/><arg value="../../archives/documented-examples.tar.gz"/></exec>
-    </if>
-
-    <!-- insert readmes -->
-    <copy todir="cdrom"><fileset dir="${rk.home}/shared/greenstone2/docs"/></copy>
-    <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${basedir}/cdrom"/></antcall>
-
-    <!-- insert linux software -->
-    <if>
-      <bool>
-	<not><equals arg1="${no.linux}" arg2="true"/></not>
-      </bool>
-
-      <mkdir dir="cdrom"/>
-      <mkdir dir="archives"/>
-      <get src="${software.archive.linux}" dest="archives/linux.tar.gz"/>
-      <exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/linux.tar.gz"/></exec>
-    </if>
-
-    <!-- insert windows software -->
-    <if>
-      <bool>
-	<not><equals arg1="${no.windows}" arg2="true"/></not>
-      </bool>
-      <mkdir dir="cdrom"/>
-      <mkdir dir="archives"/>
-      <get src="${software.archive.windows}" dest="archives/windows.tar.gz"/>
-      <exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/windows.tar.gz"/></exec>
-    </if>
-
-    <!-- insert mac software -->
-    <if>
-      <bool>
-	<not><equals arg1="${no.mac}" arg2="true"/></not>
-      </bool>
-      <mkdir dir="cdrom"/>
-      <mkdir dir="archives"/>
-      <get src="${software.archive.mac}" dest="archives/mac.tar.gz"/>
-      <exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/mac.tar.gz"/></exec>
-    </if>
-
-    <!-- create autorun (windows) -->
-    <exec executable="cp">
-      <arg value="${rk.home}/kits/${rk.name}/resources/AUTORUN.INF"/>
-      <arg value="cdrom"/>
-    </exec>
-
-    <!-- finally create the cdrom image -->
-    <mkdir dir="products"/>
-    <exec executable="mkisofs">
-      <arg value="-V"/>
-      <arg value="Greenstone-${version}"/>
-      <arg value="-input-charset"/>
-      <arg value="utf-8"/>
-      <arg value="-o"/>
-      <arg value="products/Greenstone-${version}-cdrom.iso"/>
-      <arg value="-J"/>
-      <arg value="-R"/>
-      <arg value="-D"/>
-      <arg value="cdrom"/>
-    </exec>
-    <exec executable="/bin/bash" dir="products">
-      <arg value="-c"/>
-      <arg value="cat Greenstone-${version}-cdrom.iso | gzip > Greenstone-${version}-cdrom.iso.gz"/>
-    </exec>
-    <exec executable="/bin/bash" dir="products">
-      <arg value="-c"/>
-      <arg value="zip Greenstone-${version}-cdrom.zip Greenstone-${version}-cdrom.iso"/>
-    </exec>
-
-  </target>
-
-  <target name="properties" depends="core-properties">
-    <echo>no.linux                                    (optional)  specifies that this cd should not use files from the linux distribution</echo>
-    <echo>no.windows                                  (optional)  specifies that this cd should not use files from the windows distribution</echo>
-    <echo>no.mac                                      (optional)  specifies that this cd should not use files from the mac distribution</echo>
-    <echo>no.doc                                      (optional)  specifies that this cd should not use the documented examples</echo>
-    <echo>linux.file                                  (optional)  use this if you would like to specify a file path to the linux software archive rather than a URL</echo>
-    <echo>windows.file                                (optional)  use this if you would like to specify a file path to the windows software archive rather than a URL</echo>
-    <echo>mac.file                                    (optional)  use this if you would like to specify a file path to the mac software archive rather than a URL</echo>
-    <echo>doc.file                                    (optional)  use this if you would like to specify a file path to the documented examples software archive rather than a URL</echo>
-    <echo>software.archive.linux                      (optional)  the URL to the linux archive of components</echo>
-    <echo>software.archive.windows                    (optional)  the URL to the windows archive of components</echo>
-    <echo>software.archive.mac                        (optional)  the URL to the mac archive of components</echo>
-    <echo>software.archive.documented-examples        (optional)  the URL to the archive of documented examples</echo>
-  </target>
-
-  <!-- target to generate the manual chapter about gli in a given language -->
-  <target name="generate-gli-chapter">
-    <path id="documentation.compile.classpath">
-      <fileset dir="documentation">
-	<include name="**/*.jar"/>
-      </fileset>
-      <pathelement path="documentation/gli/classes"/>
-      <pathelement path="documentation/shared"/>
-      <pathelement path="documentation/manuals"/>
-    </path>
-    <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="documentation/manuals/xml-source/${language}/help-${language}.xml">
-      <arg value="${language}" />
-      <arg value="documentation/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
-      <arg value="documentation/gli/help/${language}/help.xml" />
-      <arg value="compiled" />
-    </java>
-    <copy file="documentation/manuals/xml-source/${language}/help-${language}.xml" todir="documentation/manuals"/>
-  </target>
+	<!-- IMPORT OTHER ANT SCRIPTS -->
+	<import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
+	<import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
+
+	<!-- THE MAIN TARGET -->
+	<target name="cdrk2" depends="init">
+
+		<property name="linux.file" value="null"/>
+		<property name="mac.file" value="null"/>
+		<property name="windows.file" value="null"/>
+		<property name="doc.file" value="null"/>
+
+		<if><bool><not><equals arg1="${linux.file}" arg2="null"/></not></bool>
+			<property name="software.archive.linux" value="file://${linux.file}"/>
+		</if>
+		
+		<if><bool><not><equals arg1="${mac.file}" arg2="null"/></not></bool>
+			<property name="software.archive.mac" value="file://${mac.file}"/>
+		</if>
+		
+		<if><bool><not><equals arg1="${windows.file}" arg2="null"/></not></bool>
+			<property name="software.archive.windows" value="file://${windows.file}"/>
+		</if>
+		
+		<if><bool><not><equals arg1="${doc.file}" arg2="null"/></not></bool>
+			<property name="software.archive.documented-examples" value="file://${doc.file}"/>
+		</if>
+		
+		<!-- figure out where the compiled software is coming from -->
+		<property name="software.archive.linux" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-linux.tar.gz"/>
+		<property name="software.archive.windows" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-windows.tar.gz"/>
+		<property name="software.archive.mac" value="http://www.greenstone.org/caveat-emptor/cdrom-components-${version}-candidate-${date}-mac.tar.gz"/>
+		<property name="software.archive.documented-examples" value="http://www.greenstone.org/caveat-emptor/Greenstone-documented-examples-${version}-candidate-${date}.tar.gz"/>
+		
+		<!-- show the properties we're using -->
+		<if><bool><not><equals arg1="${no.linux}" arg2="true"/></not></bool>
+			<echo message="software.archive.linux:                    ${software.archive.linux}"/>
+		</if>
+
+		<if><bool><not><equals arg1="${no.windows}" arg2="true"/></not></bool>
+			<echo message="software.archive.windows:                  ${software.archive.windows}"/>
+		</if>
+
+		<if><bool><not><equals arg1="${no.mac}" arg2="true"/></not></bool>
+			<echo message="software.archive.mac:                      ${software.archive.mac}"/>
+		</if>
+
+		<if><bool><not><equals arg1="${no.doc}" arg2="true"/></not></bool>
+			<echo message="software.archive.documented-examples:      ${software.archive.documented-examples}"/>
+		</if>
+
+		<!-- create a directory for the cdrom contents -->
+		<mkdir dir="cdrom"/>
+
+		<!-- checkout and compile documentation java/fop code -->
+		<if><bool><or><equals arg1="${branch.path}" arg2="trunk"/><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></or></bool>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/documentation/${branch.path}/shared"/>
+				<arg value="documentation/shared"/>
+			</exec>
+		  
+		<else>
+			<exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/${branch.path}/documentation/shared"/>
+				<arg value="documentation/shared"/>
+			</exec>
+		</else>
+		</if>
+
+		<javac srcdir="documentation/shared" destdir="documentation/shared" debug="on" classpath="documentation/shared/xalan.jar">
+			<include name="*.java"/>
+		</javac>
+
+		<!-- checkout tutorials and build them -->
+		<if><bool><or><equals arg1="${branch.path}" arg2="trunk"/><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></or></bool>  
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/documentation/${branch.path}/tutorials"/><arg value="documentation/tutorials"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/gli"/>
+				<arg value="documentation/gli"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/greenstone2/perllib"/>
+				<arg value="documentation/perllib"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/greenstone2/macros"/>
+				<arg value="documentation/macros"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/documentation/${branch.path}/tutorial_sample_files"/>
+				<arg value="documentation/tutorial_sample_files"/>
+			</exec>
+		  
+		<else>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/documentation/tutorials"/>
+				<arg value="documentation/tutorials"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/gli"/>
+				<arg value="documentation/gli"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/gsdl/perllib"/>
+				<arg value="documentation/perllib"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/gsdl/macros"/>
+				<arg value="documentation/macros"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/documentation/tutorial_sample_files"/>
+				<arg value="documentation/tutorial_sample_files"/>
+			</exec>
+		</else>
+		</if>
+
+		<delete dir="documentation/tutorials/html"/>
+		<exec dir="documentation/tutorials" executable="/bin/bash">
+			<arg value="generate-html.sh"/>
+			<env key="GSDLHOME" value="${basedir}/documentation"/>
+		</exec>
+		<delete dir="cdrom/Tutorial Exercises"/>
+		<mkdir dir="cdrom/Tutorial Exercises/sample_files"/>
+
+		<!-- copy tutorial html into place on the cd -->
+		<copy todir="cdrom/Tutorial Exercises/English"><fileset dir="documentation/tutorials/html/en"/></copy>
+		<copy todir="cdrom/Tutorial Exercises/French"><fileset dir="documentation/tutorials/html/fr"/></copy>
+		<copy todir="cdrom/Tutorial Exercises/Spanish"><fileset dir="documentation/tutorials/html/es"/></copy>
+		<copy todir="cdrom/Tutorial Exercises/Russian"><fileset dir="documentation/tutorials/html/ru"/></copy>
+
+		<!-- create tutorial sample files zips in place on the cdrom -->
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/beatles.zip" basedir="documentation/tutorial_sample_files/beatles"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/custom.zip" basedir="documentation/tutorial_sample_files/custom"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/demo_NewFiles.zip" basedir="documentation/tutorial_sample_files/demo_NewFiles"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/dspace.zip" basedir="documentation/tutorial_sample_files/dspace"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/images.zip" basedir="documentation/tutorial_sample_files/images"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/isis.zip" basedir="documentation/tutorial_sample_files/isis"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/marc.zip" basedir="documentation/tutorial_sample_files/marc"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/niupepa.zip" basedir="documentation/tutorial_sample_files/niupepa"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/oai.zip" basedir="documentation/tutorial_sample_files/oai"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/simple_html.zip" basedir="documentation/tutorial_sample_files/simple_html"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/tudor.zip" basedir="documentation/tutorial_sample_files/tudor"/>
+		<zip destfile="cdrom/Tutorial Exercises/sample_files/Word_and_PDF.zip" basedir="documentation/tutorial_sample_files/Word_and_PDF"/>
+
+		<!-- checkout manuals ad build them -->
+		<if><bool><or><equals arg1="${branch.path}" arg2="trunk"/><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></or></bool>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/documentation/${branch.path}/manuals"/>
+				<arg value="documentation/manuals"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/documentation/${branch.path}/shared"/>
+				<arg value="documentation/shared"/>
+			</exec>   
+		<else>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/documentation/manuals"/>
+				<arg value="documentation/manuals"/>
+			</exec>
+			<exec executable="svn">
+				<arg value="checkout"/>
+				<arg value="${svn.root}/main/${branch.path}/documentation/shared"/>
+				<arg value="documentation/shared"/>
+			</exec>
+		</else>
+		</if>
+
+		<exec executable="svn">
+			<arg value="checkout"/>
+			<arg value="${svn.root}/main/${branch.path}/gli"/>
+			<arg value="documentation/gli"/>
+		</exec>
+
+		<unzip src="documentation/shared/fop.zip" dest="documentation/shared"/>
+		<chmod perm="a+x" file="documentation/shared/fop/fop.sh"/>
+
+		<antcall target="generate-gli-chapter"><param name="language" value="en"/></antcall>
+		<antcall target="generate-gli-chapter"><param name="language" value="fr"/></antcall>
+		<antcall target="generate-gli-chapter"><param name="language" value="es"/></antcall>
+		<antcall target="generate-gli-chapter"><param name="language" value="ru"/></antcall>
+
+		<delete dir="documentation/manuals/build"/>
+		<exec dir="documentation/manuals" executable="/bin/bash">
+			<arg value="generate-pdf.sh"/>
+			<arg value="all"/>
+			<arg value="en es ru fr"/>
+		</exec>
+
+		<exec spawn="true" dir="documentation/manuals" executable="/bin/bash">
+			<arg value="generate-pdf.sh"/>
+			<arg value="Install"/>
+			<arg value="ar"/>
+		</exec>
+
+		<!-- put manuals in place on cdrom -->
+		<delete dir="cdrom/Documentation"/>
+		<copy todir="cdrom/Documentation/English"><fileset dir="documentation/manuals/build/en/pdf"/></copy>
+		<copy todir="cdrom/Documentation/French"><fileset dir="documentation/manuals/build/fr/pdf"/></copy>
+		<copy todir="cdrom/Documentation/Spanish"><fileset dir="documentation/manuals/build/es/pdf"/></copy>
+		<copy todir="cdrom/Documentation/Russian"><fileset dir="documentation/manuals/build/ru/pdf"/></copy>
+		<copy todir="cdrom/Documentation/Arabic"><fileset dir="documentation/manuals/build/ar/pdf"/></copy>
+
+		<!-- top off manuals with a few more from the web -->
+		<get src="http://wiki.greenstone.org/wiki/gsdoc/others/CDS-ISIS_to_DL.pdf" dest="cdrom/Documentation/English/CDS-ISIS_to_DL.pdf"/>
+		<get src="http://www.greenstone.org/docs/inside_greenstone.pdf" dest="cdrom/Documentation/English/inside_greenstone.pdf"/>
+
+		<get src="http://www.greenstone.org/manuals/gsdl2/ar/pdf/Users_Guide_Arabic.doc" dest="cdrom/Documentation/Arabic/Users_Guide_Arabic.doc"/>
+		<get src="http://www.greenstone.org/manuals/gsdl2/ar/pdf/Install_ar.pdf" dest="cdrom/Documentation/Arabic/Install_ar.pdf"/>
+
+		<mkdir dir="cdrom/Documentation/Brazilian Portuguese"/>
+		<get src="http://www.greenstone.org/manuals/gsdl2/pt-br/pdf/Install_pt-br.pdf" dest="cdrom/Documentation/Brazilian Portuguese/Install_pt-br.pdf"/>
+
+		<mkdir dir="cdrom/Documentation/Vietnamese"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/Install-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/Install-2.39-vi.pdf"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/User-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/User-2.39-vi.pdf"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/Paper-2.39-vi.pdf" dest="cdrom/Documentation/Vietnamese/Paper-2.39-vi.pdf"/>
+
+		<mkdir dir="cdrom/Documentation/Kazakh"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/Install-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/Install-2.39-kz.pdf"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/User-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/User-2.39-kz.pdf"/>
+		<get src="http://prdownloads.sourceforge.net/greenstone/Paper-2.39-kz.pdf" dest="cdrom/Documentation/Kazakh/Paper-2.39-kz.pdf"/>
+
+		<!-- insert the documented examples onto cdrom -->
+		<if><bool><not><equals arg1="${no.doc}" arg2="true"/></not></bool>
+			<mkdir dir="archives"/>
+			<get src="${software.archive.documented-examples}" dest="archives/documented-examples.tar.gz"/>		  
+			<delete dir="cdrom/Documented Examples"/>
+			<copy toDir="cdrom">
+				<fileset dir="${rk.home}/kits/${rk.name}/resources">
+					<include name="Documented Examples/**/*"/>
+					<include name="Documented Examples"/>
+				</fileset>
+			</copy>
+			<exec executable="tar" dir="cdrom/Documented Examples"><arg value="-xzf"/><arg value="../../archives/documented-examples.tar.gz"/></exec>
+		</if>
+
+		<!-- insert readmes -->
+		<copy todir="cdrom"><fileset dir="${rk.home}/shared/greenstone2/docs"/></copy>
+		<antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${basedir}/cdrom"/></antcall>
+
+		<!-- insert linux software -->
+		<if><bool><not><equals arg1="${no.linux}" arg2="true"/></not></bool>
+			<mkdir dir="cdrom"/>
+			<mkdir dir="archives"/>
+			<get src="${software.archive.linux}" dest="archives/linux.tar.gz"/>
+			<exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/linux.tar.gz"/></exec>
+		</if>
+
+		<!-- insert windows software -->
+		<if><bool><not><equals arg1="${no.windows}" arg2="true"/></not></bool>
+			<mkdir dir="cdrom"/>
+			<mkdir dir="archives"/>
+			<get src="${software.archive.windows}" dest="archives/windows.tar.gz"/>
+			<exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/windows.tar.gz"/></exec>
+		</if>
+
+		<!-- insert mac software -->
+		<if><bool><not><equals arg1="${no.mac}" arg2="true"/></not></bool>
+			<mkdir dir="cdrom"/>
+			<mkdir dir="archives"/>
+			<get src="${software.archive.mac}" dest="archives/mac.tar.gz"/>
+			<exec executable="tar" dir="cdrom"><arg value="-xzf"/><arg value="../archives/mac.tar.gz"/></exec>
+		</if>
+
+		<!-- create autorun (windows) -->
+		<exec executable="cp">
+			<arg value="${rk.home}/kits/${rk.name}/resources/AUTORUN.INF"/>
+			<arg value="cdrom"/>
+		</exec>
+
+		<!-- finally create the cdrom image -->
+		<mkdir dir="products"/>
+		<exec executable="mkisofs">
+			<arg value="-V"/>
+			<arg value="Greenstone-${version}"/>
+			<arg value="-input-charset"/>
+			<arg value="utf-8"/>
+			<arg value="-o"/>
+			<arg value="products/Greenstone-${version}-cdrom.iso"/>
+			<arg value="-J"/>
+			<arg value="-R"/>
+			<arg value="-D"/>
+			<arg value="cdrom"/>
+		</exec>
+		<exec executable="/bin/bash" dir="products">
+			<arg value="-c"/>
+			<arg value="cat Greenstone-${version}-cdrom.iso | gzip > Greenstone-${version}-cdrom.iso.gz"/>
+		</exec>
+		<exec executable="/bin/bash" dir="products">
+			<arg value="-c"/>
+			<arg value="zip Greenstone-${version}-cdrom.zip Greenstone-${version}-cdrom.iso"/>
+		</exec>
+	</target>
+
+	<target name="properties" depends="core-properties">
+		<echo>no.linux                                    (optional)  specifies that this cd should not use files from the linux distribution</echo>
+		<echo>no.windows                                  (optional)  specifies that this cd should not use files from the windows distribution</echo>
+		<echo>no.mac                                      (optional)  specifies that this cd should not use files from the mac distribution</echo>
+		<echo>no.doc                                      (optional)  specifies that this cd should not use the documented examples</echo>
+		<echo>linux.file                                  (optional)  use this if you would like to specify a file path to the linux software archive rather than a URL</echo>
+		<echo>windows.file                                (optional)  use this if you would like to specify a file path to the windows software archive rather than a URL</echo>
+		<echo>mac.file                                    (optional)  use this if you would like to specify a file path to the mac software archive rather than a URL</echo>
+		<echo>doc.file                                    (optional)  use this if you would like to specify a file path to the documented examples software archive rather than a URL</echo>
+		<echo>software.archive.linux                      (optional)  the URL to the linux archive of components</echo>
+		<echo>software.archive.windows                    (optional)  the URL to the windows archive of components</echo>
+		<echo>software.archive.mac                        (optional)  the URL to the mac archive of components</echo>
+		<echo>software.archive.documented-examples        (optional)  the URL to the archive of documented examples</echo>
+	</target>
+
+	<!-- target to generate the manual chapter about gli in a given language -->
+	<target name="generate-gli-chapter">
+		<path id="documentation.compile.classpath">
+			<fileset dir="documentation">
+				<include name="**/*.jar"/>
+			</fileset>
+			<pathelement path="documentation/gli/classes"/>
+			<pathelement path="documentation/shared"/>
+			<pathelement path="documentation/manuals"/>
+		</path>
+		<java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="documentation/manuals/xml-source/${language}/help-${language}.xml">
+			<arg value="${language}" />
+			<arg value="documentation/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
+			<arg value="documentation/gli/help/${language}/help.xml" />
+			<arg value="compiled" />
+		</java>
+		<copy file="documentation/manuals/xml-source/${language}/help-${language}.xml" todir="documentation/manuals"/>
+	</target>
 
 </project>
