Index: main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 22093)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml	(revision 22094)
@@ -4,10 +4,22 @@
 	<target name="compile" depends="init,gs2-init">
 
-		<!-- checkout gsdl and gli -->
-		<exec executable="svn">
-			<arg value="checkout"/>
-			<arg value="${svn.root}/main/${branch.path}/greenstone2"/>
-			<arg value="${basedir}/compiled"/>
-		</exec>
+		<!-- checkout greenstone2 (or gsdl if a pre-2.84 release is being created) and gli -->
+		<if><bool><islessthan arg1="${branch.tag.version}" arg2="2.84"/></bool>
+
+		  <exec executable="svn">
+		    <arg value="checkout"/>
+		    <arg value="${svn.root}/main/${branch.path}/gsdl"/>
+		    <arg value="${basedir}/compiled"/>
+		  </exec>
+
+		  <else>
+		    <exec executable="svn">
+		      <arg value="checkout"/>
+		      <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
+		      <arg value="${basedir}/compiled"/>
+		    </exec>
+		  </else>
+		</if>
+
                 <exec executable="svn">
 			<arg value="checkout"/>
@@ -35,12 +47,27 @@
 			<untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
 
-			<!-- get winbin -->
+			<!-- get winbin from tags if the version is greater than 2.83 otherwise get it from trunk -->
 			<if><bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
-				<exec executable="svn">
-					<arg value="export"/>
-					<arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
-					<arg value="${basedir}/compiled/bin/windows"/>
-					<arg value="-r"/><arg value="${branch.revision}"/>
-				</exec>
+			  <if>
+			    <bool>
+			      <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
+			    </bool>
+			    <exec executable="svn">
+			      <arg value="export"/>
+			      <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
+			      <arg value="${basedir}/compiled/bin/windows"/>
+			      <arg value="-r"/>
+			      <arg value="${branch.revision}"/>
+			    </exec>
+			    <else>
+			      <exec executable="svn">
+				<arg value="export"/>
+				<arg value="${svn.root}/main/trunk/binaries/windows/bin"/>
+				<arg value="${basedir}/compiled/bin/windows"/>
+				<arg value="-r"/>
+				<arg value="${branch.revision}"/>
+			      </exec>
+			    </else>
+			  </if>
 			</if>
 
@@ -192,19 +219,37 @@
 		<!-- linux -->
 		<else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
-			<!-- grab imagemagick binaries -->
+
+			<!-- grab imagemagick and wv binaries -->
 			<delete dir="compiled/bin/linux/imagemagick"/>
-			<exec executable="svn">
-				<arg value="export"/>
-				<arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
-				<arg value="compiled/bin/linux/imagemagick"/>
-			</exec>
-
-			<!-- grab wv binaries -->
 			<delete dir="compiled/bin/linux/wv"/>
-			<exec executable="svn">
-				<arg value="export"/>
-				<arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
-				<arg value="compiled/bin/linux/wv"/>
-			</exec>
+
+			<if><bool><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></bool>
+
+			  <exec executable="svn">
+			    <arg value="export"/>
+			    <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
+			    <arg value="compiled/bin/linux/imagemagick"/>
+			  </exec>
+
+			  <exec executable="svn">
+			    <arg value="export"/>
+			    <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
+			    <arg value="compiled/bin/linux/wv"/>
+			  </exec>
+
+			  <else>
+			    <exec executable="svn">
+			      <arg value="export"/>
+			      <arg value="${svn.root}/main/trunk/binaries/linux/imagemagick"/>
+			      <arg value="compiled/bin/linux/imagemagick"/>
+			    </exec>
+
+			    <exec executable="svn">
+			      <arg value="export"/>
+			      <arg value="${svn.root}/main/trunk/binaries/linux/wv"/>
+			      <arg value="compiled/bin/linux/wv"/>
+			    </exec>
+			  </else>
+			</if>
 
 			<!-- delete unneeded files -->
@@ -217,19 +262,35 @@
 		<!-- mac -->
 		<else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
-			<!-- grab imagemagick binaries -->
+			<!-- grab imagemagick and ghostscript binaries -->
 			<delete dir="compiled/bin/darwin/imagemagick"/>
-			<exec executable="svn">
-				<arg value="export"/>
-				<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
-				<arg value="compiled/bin/darwin/imagemagick"/>
-			</exec>
-
-			<!-- grab ghostscript binaries -->
 			<delete dir="compiled/bin/darwin/ghostscript"/>
-			<exec executable="svn">
-				<arg value="export"/>
-				<arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
-				<arg value="compiled/bin/darwin/ghostscript"/>
-			</exec>
+
+			<if><bool><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></bool>
+			  <exec executable="svn">
+			    <arg value="export"/>
+			    <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
+			    <arg value="compiled/bin/darwin/imagemagick"/>
+			  </exec>
+			  
+			  <exec executable="svn">
+			    <arg value="export"/>
+			    <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
+			    <arg value="compiled/bin/darwin/ghostscript"/>
+			  </exec>
+
+			  <else>			    
+			    <exec executable="svn">
+			      <arg value="export"/>
+			      <arg value="${svn.root}/main/trunk/binaries/mac/intel/imagemagick"/>
+			      <arg value="compiled/bin/darwin/imagemagick"/>
+			    </exec>
+			    
+			    <exec executable="svn">
+			      <arg value="export"/>
+			      <arg value="${svn.root}/main/trunk/binaries/mac/intel/ghostscript"/>
+			      <arg value="compiled/bin/darwin/ghostscript"/>
+			    </exec>
+			  </else>
+			</if>
 
 			<!-- delete unneeded files -->
@@ -251,6 +312,15 @@
 			<mkdir dir="compiled/bin/windows"/>
 			<get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/>
-			<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
-			<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
+
+			<if><bool><isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/></bool>
+			  
+			  <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
+			  <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
+
+			  <else>
+			    <get src="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
+			    <get src="${svn.root}/main/trunk/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
+			  </else>
+			</if>
 		</if>
 
