changeset 315:2b2f0ba33262

More Mac build material
author Chris Cannam
date Tue, 01 Mar 2011 16:50:06 +0000
parents 067b5c116a3b
children 806e9cb9ce61 5144926b715e
files deploy/osx/combine.sh easyhg.pro
diffstat 2 files changed, 43 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/osx/combine.sh	Tue Mar 01 16:50:06 2011 +0000
@@ -0,0 +1,30 @@
+#!/bin/bash
+app=EasyMercurial.app
+if [ ! -d "$app.carbon" ] || [ ! -d "$app.cocoa" ]; then
+	echo Carbon or Cocoa bundle not found
+	exit 1
+fi
+(cd "$app.cocoa" ; find . -type f -print) | while read f; do
+        d=$(dirname "$f")
+        mkdir -p "$app.output/$d"
+	case $(file "$app.cocoa/$f") in
+	*x86_64*)
+		lipo "$app.cocoa/$f" -extract x86_64 -output "/tmp/$$.x86_64"
+		case $(file "$app.carbon/$f") in
+		*x86_64*)
+			lipo "$app.carbon/$f" -remove x86_64 -output "/tmp/$$.rest"
+			;;
+		*)
+			cp "$app.carbon/$f" "/tmp/$$.rest"
+			;;
+		esac
+		lipo "/tmp/$$.x86_64" "/tmp/$$.rest" -create -output "$app.output/$f"
+		rm "/tmp/$$".*
+		;;
+	*)
+		cp "$app.cocoa/$f" "$app.output/$f"
+		;;
+	esac
+done
+
+
--- a/easyhg.pro	Tue Mar 01 15:51:41 2011 +0000
+++ b/easyhg.pro	Tue Mar 01 16:50:06 2011 +0000
@@ -1,15 +1,22 @@
 
 CONFIG += release
 
-macx-* {
-    QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
-    QMAKE_LFLAGS_RELEASE += -bind_at_load
-    CONFIG += x86 ppc
-}
-
 TEMPLATE = app
 TARGET = EasyMercurial
 
+macx-g++40 {
+    # Note, to use the 10.4 SDK on 10.6+ you need qmake -spec macx-g++40
+    QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk
+    QMAKE_CFLAGS += -mmacosx-version-min=10.4
+    QMAKE_CXXFLAGS += -mmacosx-version-min=10.4
+    QMAKE_LFLAGS_RELEASE += -bind_at_load
+    CONFIG += x86 ppc 
+}
+macx-g++ {
+    QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk
+    CONFIG += x86 x86_64
+}
+
 unix {
     DESTDIR = .
 }