Index: /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 30130)
+++ /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 30131)
@@ -66,5 +66,5 @@
 		<comment name="choose-components"/>
 
-		<!-- if linux|windows -->
+		<!-- if linux|windows|mac -->
 		<target
 			target="Initialising"
Index: /main/trunk/release-kits/kits/rk2/installer/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 30130)
+++ /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 30131)
@@ -46,4 +46,5 @@
 			<available file="../@java.extracted@/bin/java"/>
 			<available file="../@java.extracted@/bin/java.exe"/>
+			<available file="/tmp/jre/bin/java"/>
 		</or>
 	</condition>
@@ -69,4 +70,25 @@
 	<!-- copy jre -->
 	<target name="Initialising" if="bundled.java.exists">
+		<!-- work out whether a jre was bundled with this installer. If it was, then for a Mac, it would live in /tmp -->
+		<!-- if mac -->
+		<property name="extracted.jre.path" location="/tmp/jre" relative="false" />
+		<!-- /if -->
+		<!-- if windows|linux -->
+		<property name="extracted.jre.path" location="../@java.extracted@" relative="true" basedir="${basedir}" />
+		<!-- /if -->
+
+		<mkdir dir="${installDir}/packages"/>
+		<copy todir="${installDir}/packages/jre" failonerror="false">
+			<fileset dir="${extracted.jre.path}"/>
+		</copy>
+		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
+		<!-- if mac -->
+		<chmod dir="${installDir}/packages/jre/lib" includes="**/*" perm="a+rx"/>		
+		<!-- /if -->
+	</target>
+
+	<!-- copy jre -->
+	<!--
+	<target name="Initialising" if="bundled.java.exists">
 		<mkdir dir="${installDir}/packages"/>
 		<copy todir="${installDir}/packages/jre" failonerror="false">
@@ -75,4 +97,6 @@
 		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
 	</target>
+	-->
+
 
 	<!-- core system -->
Index: /main/trunk/release-kits/kits/rk3/installer/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 30130)
+++ /main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 30131)
@@ -46,10 +46,17 @@
 	<winprops/>
 	<!-- /if -->
-
-	<!-- work out whether a jre is bundled with this installer -->
-	<available file="../jre/bin" property="bundled.java.exists"/>
-
+	
 	<!-- determine if there is an existing installation in the installDir-->
 	<available file="${installDir}\installation.properties" property="is.overinstall"/>
+
+	<!-- work out whether a jre was bundled with this installer. If it was, then for a Mac, it would live in /tmp -->
+	<!-- if mac -->
+	<available file="/tmp/jre/bin" property="bundled.java.exists"/>
+	<property name="extracted.jre.path" location="/tmp/jre" relative="false" />
+	<!-- /if -->
+	<!-- if windows|liunx -->
+	<available file="../jre/bin" property="bundled.java.exists"/>
+	<property name="extracted.jre.path" location="../jre" relative="true" basedir="${basedir}" />
+	<!-- /if -->
 
 	<!-- target to copy the bundled jre into place -->
@@ -57,7 +64,10 @@
 		<mkdir dir="${installDir}"/>
 		<copy todir="${installDir}/packages/jre" failonerror="false">
-			<fileset dir="../jre"/>
+			<fileset dir="${extracted.jre.path}"/>
 		</copy>
 		<chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>		
+		<!-- if mac -->
+		<chmod dir="${installDir}/packages/jre/lib" includes="**/*" perm="a+rx"/>		
+		<!-- /if -->
 	</target>
 
Index: /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml	(revision 30130)
+++ /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml	(revision 30131)
@@ -67,5 +67,9 @@
 			<math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.linux-java}" datatype="int"/>
 		<else>
-			<property name="component.bytesize.core" value="${component.bytesize.core-without-jre}"/>
+			<exec dir="." executable="/bin/sh" outputproperty="bitness.ouput"><arg line="-c &quot;uname -m&quot;"/></exec>
+			<if><bool><contains string="${bitness.ouput}" substring="_64"/></bool>
+				<math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.mac-java}" datatype="int"/>
+				<else><property name="component.bytesize.core" value="${component.bytesize.core-without-jre}"/></else>
+			</if>
 		</else></if></else></if>
 		<math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/>
Index: /main/trunk/release-kits/shared/core/ant-scripts/shared.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 30130)
+++ /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 30131)
@@ -92,11 +92,17 @@
 		<!-- linux -->
 		<property name="linux-java.installer" value="jre_bin${extension_x64}"/>
-		<property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
+		<property name="bundled.version.linux-java" value="1.7.0_72"/> <!-- set this to the version number of java in the above archive -->
 		<property name="component.bytesize.linux-java" value="101245987"/> <!-- set this to the size of the extract archive -->
 
 		<!-- windows -->
 		<property name="windows-java.installer" value="jre.exe"/>
-		<property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
+		<property name="bundled.version.windows-java" value="1.7.0_72"/> <!-- set this to the version number of java in the above archive -->
 		<property name="component.bytesize.windows-java" value="75000000"/> <!-- set this to the size of the extract archive -->
+
+		<!-- mac -->
+		<!-- only a jre_bin for 64 bit macs -->
+		<property name="mac-java.installer" value="jre_bin_x64"/>
+		<property name="bundled.version.mac-java" value="1.7.0_79"/> <!-- set this to the version number of java in the above archive -->
+		<property name="component.bytesize.mac-java" value="30688272"/> <!-- set this to the size of the archive, NOT the extracted archive, since we'll extract it into the /tmp folder -->
 
 		<!-- version numbers of other bundled things -->
Index: /main/trunk/release-kits/shared/core/ant-scripts/wrap.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/wrap.xml	(revision 30130)
+++ /main/trunk/release-kits/shared/core/ant-scripts/wrap.xml	(revision 30131)
@@ -151,4 +151,10 @@
 
 			<!-- copy bundled files -->
+			<!-- Include the self-extracting jre (for 64 bit) if this Mac is a 64 bit OS
+				 http://stackoverflow.com/questions/218989/how-to-determine-build-architecture-32bit-64bit-with-ant -->
+			<exec dir="." executable="/bin/sh" outputproperty="bitness.ouput"><arg line="-c &quot;uname -m&quot;"/></exec>
+			<if><bool><contains string="${bitness.ouput}" substring="_64"/></bool>
+				<copy tofile="wrapped-installer/Greenstone${version}${version-extra}.app/Contents/Resources/Java/jre_bin" file="${rk.home}/shared/mac/${mac-java.installer}"/>
+			</if>
 			<chmod file="wrapped-installer/Greenstone${version}${version-extra}.app/Contents/MacOS/greenstone" perm="ug+x"/>
 			<copy todir="wrapped-installer/Greenstone${version}${version-extra}.app/Contents/Resources/Java" file="installer/Greenstone-${version}${version-extra}-${os.suffix}.jar"/>
