Index: release-kits/lirk2/ant-scripts/wrap.xml
===================================================================
--- release-kits/lirk2/ant-scripts/wrap.xml	(revision 15896)
+++ release-kits/lirk2/ant-scripts/wrap.xml	(revision 15980)
@@ -9,10 +9,9 @@
 -->
 
-<project name="lirk3-wrap" default="wrap">
+<project name="lirk2-wrap" default="wrap">
 
 	<target name="wrap">
 		<addressedcall target="setup-for-wrapping"/>
 		<addressedcall target="compile-wrapper"/>
-		<addressedcall target="clean-up-after-wrapping"/>
 	</target>
 
@@ -23,16 +22,16 @@
 			<!-- create and setup the build directory -->
 			<mkdir dir="${basedir}/wrapped-installer/build"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/mywrapper.c"/>
+			<copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/linux/wrapper.cpp"/>
 
 			<!-- copy bundled files -->
-			<copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/search4j/search4j"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/${java.installer}"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3.jar"/>
-			<copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3-with-java.jar"/>
+			<copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/search4j/search4j"/>
+			<copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/wrapper/${java.installer}"/>
+			<copy tofile="${basedir}/wrapped-installer/build/greenstone2.jar" file="${basedir}/installer/gsdl-${version}-linux.jar"/>
+			<copy tofile="${basedir}/wrapped-installer/build/greenstone2-with-java.jar" file="${basedir}/installer/gsdl-${version}-linux-with-java.jar"/>
 
-			<!-- substitute the real java installer filename and min version into various files -->
-			<rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.installer@" replacement="${java.installer}"/>
-			<rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.extracted@" replacement="${java.extracted}"/>
-			<rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.min.version@" replacement="${java.min.version}"/>
+			<!-- substitute in real values -->
+			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${java.installer}"/>
+			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.extracted@" replacement="${java.extracted}"/>
+			<rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
 
 		</if>
@@ -44,8 +43,8 @@
 			<echo level="info">create an object file (extension .o) for each file to bundle</echo>
 			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
-				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar greenstone3.jar.o"/>
+				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_jar_start=greenstone2jar --readonly-text greenstone2.jar greenstone2.jar.o"/>
 			</exec>
 			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
-				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_with_java_jar_start=greenstone3jar --readonly-text greenstone3-with-java.jar greenstone3-with-java.jar.o"/>
+				<arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_with_java_jar_start=greenstone2jar --readonly-text greenstone2-with-java.jar greenstone2-with-java.jar.o"/>
 			</exec>
 			<exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
@@ -56,12 +55,11 @@
 			</exec>
 
-
 			<!-- get size of greenstone.jar -->
-			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3.jar.ls"><arg line="-l greenstone3.jar"/></exec>
-			<exec executable="sed" inputstring="${greenstone3.jar.ls}" outputproperty="greenstone3.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
+			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone2.jar.ls"><arg line="-l greenstone2.jar"/></exec>
+			<exec executable="sed" inputstring="${greenstone2.jar.ls}" outputproperty="greenstone2.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
 
 			<!-- get size of greenstone-with-java.jar -->
-			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3-with-java.jar.ls"><arg line="-l greenstone3-with-java.jar"/></exec>
-			<exec executable="sed" inputstring="${greenstone3-with-java.jar.ls}" outputproperty="greenstone3-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
+			<exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone2-with-java.jar.ls"><arg line="-l greenstone2-with-java.jar"/></exec>
+			<exec executable="sed" inputstring="${greenstone2-with-java.jar.ls}" outputproperty="greenstone2-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
 
 			<!-- get size of search4j -->
@@ -73,50 +71,38 @@
 			<exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
 
-
 			<echo level="info">creating the header file for no java version</echo>
-			<delete file="mywrapper.h"/>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
+			<delete file="wrapper.h"/>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2.jar.size}];"/></exec>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
 
 			<echo level="info">compile the wrapper program</echo>
 			<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-				<arg line="-Wall -static -static-libgcc -c -o mywrapper.o mywrapper.c"/>
+				<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
 			</exec>
 
 			<echo level="info">link, bundling the files to be bundled</echo>
 			<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-				<arg line="-static -static-libgcc -o  ../greenstone-${version}-linux.bin mywrapper.o greenstone3.jar.o search4j.o"/>
+				<arg line="-static -static-libgcc -o  ../greenstone-${version}-linux.bin wrapper.o greenstone2.jar.o search4j.o"/>
 			</exec>
 
-
 			<echo level="info">creating the header file for bundled java version</echo>
-			<delete file="mywrapper.h"/>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3-with-java.jar.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
-			<exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
+			<delete file="wrapper.h"/>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2-with-java.jar.size}];"/></exec>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
+			<exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
 
 			<echo level="info">recompile the wrapper program</echo>
 			<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-				<arg line="-Wall -static -static-libgcc -c -o mywrapper.o mywrapper.c"/>
+				<arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
 			</exec>
 
 			<echo level="info">relink, bundling the files to be bundled</echo>
 			<exec executable="g++" dir="${basedir}/wrapped-installer/build">
-				<arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin mywrapper.o greenstone3-with-java.jar.o search4j.o java.o"/>
+				<arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin wrapper.o greenstone2-with-java.jar.o search4j.o java.o"/>
 			</exec>
-
-
 
 		</if>
 	</target>
 
-	<target name="clean-up-after-wrapping">
-		<if><bool><istrue value="${execute}"/></bool>
-			<delete dir="${basedir}/wrapped-installer/build"/>
-		</if>
-	</target>
-
-
-
 </project>
