diff --git a/mac_build/buildWxMac.sh b/mac_build/buildWxMac.sh index daf7be6f79..726c863071 100644 --- a/mac_build/buildWxMac.sh +++ b/mac_build/buildWxMac.sh @@ -1,34 +1,11 @@ -#!/bin/sh - -# Script to build Macintosh Universal Binary library of wxMac-2.6.2 for -# use in building BOINC. -# -# by Charlie Fenton 12/19/05 -# - -# The following is optional. It works around a bug in a script supplied -# with wxMac-2.6.2. Without these steps, the bug will force a full new -# build every time the XCode project is run, even if not needed. -# -# Open [ path ]/wxMac-2.6.2/src/wxWindows.xcodeproj -# -# In the left hand column of the project window, use the disclosure -# triangles to view items in the hierarchy. -# -# In the left-hand column hierarchy, select (click on): -# wxWindows/Targets/static/Run Script -# Type command-I to open the "Run Script" Info window. -# Select the General tab in the Info window -# Click on the + button under "Input Files" and replace the new entry with: -# ${SRCROOT}/../include/wx/mac/setup.h -# Click on the + button under "Output Files" and replace the new entry with: -# ${SYMROOT}/include/wx/setup.h -# Make sure the "Run script only when installing" checkbox is OFF. -# -# Quit XCode or close the project window. - - # To build the wxMac-2.6.2 library for BOINC as a Universal Binary: +# +# Before running this script: +# +# Open wxWindows.xcode to upgrade it for XCode 2.2, and name the new file +# wxWindowsB.xcodeproj. +# Do NOT use the wxWindows.xcodeproj supplied with the package. +# # In Terminal, CD to the wxMac-2.6.2 directory. # cd [path]/wxMac-2.6.2/ # then run this script: @@ -37,18 +14,6 @@ # the -clean argument will force a full rebuild. # -### THIS SCRIPT IS STILL UNDER DEVELOPMENT -### IT IS NOT YET RELIABLE -### IT DOESN'T DO DEVELOPMENT BUILD YET - -if [ "$1" != "-clean" ]; then -## if [ -f src/build/Deployment/libwx_mac.a ] && [ -f src/build/Development/libwx_macd.a ]; then - if [ -f src/build/Deployment/libwx_mac.a ]; then - echo "wxMac-2.6.2 already built" - return 0 - fi -fi - if [ "$1" = "-clean" ]; then doclean="clean " else @@ -65,22 +30,70 @@ fi cp -n include/wx/mac/setup0.h src/build/include/wx/setup.h -xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk OTHER_CFLAGS="" OTHER_CPPFLAGS="" OTHER_CFLAGS_i386="-iquote ${SYMROOT}/include -iquote ../include -iquote mac/carbon/morefilex -iquote common -iquote jpeg -iquote png -iquote regex -iquote expat/lib -iquote tiff" OTHER_CPPFLAGS_i386="-iquote ${SYMROOT}/include -iquote ../include -iquote mac/carbon/morefilex -iquote common -iquote jpeg -iquote png -iquote regex -iquote expat/lib -iquote tiff" + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_ppc.a ]; then + echo "libwx_mac_ppc.a already built" +else + +rm -f src/build/Deployment/libwx_mac.a + +xcodebuild -project src/wxWindowsB.xcodeproj -target wxStaticRelease -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_mac_ppc.a" + if [ $? -ne 0 ]; then exit 1; fi +fi + + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_ppc.a ]; then + echo "libwx_mac_i386.a already built" +else + +rm -f src/build/Deployment/libwx_mac.a + +xcodebuild -project src/wxWindowsB.xcodeproj -target wxStaticRelease -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_mac_i386.a" + +if [ $? -ne 0 ]; then exit 1; fi +fi + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac.a ]; then + echo "libwx_mac.a already built" +else + +lipo -create src/build/Deployment/libwx_mac_ppc.a src/build/Deployment/libwx_mac_i386.a -output src/build/Deployment/libwx_mac.a + +if [ $? -ne 0 ]; then exit 1; fi +fi + + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_ppc.a ]; then + echo "libwx_macd_ppc.a already built" +else + +rm -f src/build/Deployment/libwx_macd.a + +xcodebuild -project src/wxWindowsB.xcodeproj -target wxStaticDebug -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk ARCHS="ppc" EXECUTABLE_NAME="libwx_macd_ppc.a" + +if [ $? -ne 0 ]; then exit 1; fi +fi + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_i386.a ]; then + echo "libwx_macd_i386.a already built" +else + +rm -f src/build/Deployment/libwx_macd.a + +xcodebuild -project src/wxWindowsB.xcodeproj -target wxStaticDebug -configuration Deployment $doclean build GCC_VERSION_i386=4.0 MACOSX_DEPLOYMENT_TARGET_i386=10.4 SDKROOT_i386=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386" EXECUTABLE_NAME="libwx_macd_i386.a" + +if [ $? -ne 0 ]; then exit 1; fi +fi + +if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_macd_ppc.a ]; then + echo "libwx_macd_ppc.a already built" +else + +lipo -create src/build/Deployment/libwx_macd_ppc.a src/build/Deployment/libwx_macd_i386.a -output src/build/Deployment/libwx_macd.a + +if [ $? -ne 0 ]; then exit 1; fi +fi return 0 - -## **** THIS SHOULD WORK FOR DEPLOYMENT BUILD BUT DIDN'T: ??? **** - -xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk OTHER_CFLAGS="" OTHER_CPLUSPLUSFLAGS="" PER_ARCH_CFLAGS_i386="-iquote ./build/include -iquote ../include -iquote mac/carbon/morefilex -iquote common -iquote jpeg -iquote png -iquote regex -iquote expat/lib -iquote tiff" PER_ARCH_CFLAGS_ppc="-I./build/include -I../include -Imac/carbon/morefilex -Icommon -Ijpeg -Ipng -Iregex -Iexpat/lib -Itiff" USE_SEPARATE_HEADERMAPS="NO" GCC_ENABLE_FIX_AND_CONTINUE="NO" - -if [ $? -ne 0 ]; then exit 1; fi - -## **** THIS ONE WORKS FOR INTEL DEVLOPMENT BUILD BUT NOT PPC: **** - -xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Development $doclean build GCC_VERSION_ppc=3.3 MACOSX_DEPLOYMENT_TARGET_ppc=10.3 SDKROOT_ppc=/Developer/SDKs/MacOSX10.3.9.sdk OTHER_CFLAGS="" OTHER_CPLUSPLUSFLAGS="" PER_ARCH_CFLAGS_i386="-iquote ./build/include -iquote ../include -iquote mac/carbon/morefilex -iquote common -iquote jpeg -iquote png -iquote regex -iquote expat/lib -iquote tiff" PER_ARCH_CFLAGS_ppc="-I./build/include -I../include -Imac/carbon/morefilex -Icommon -Ijpeg -Ipng -Iregex -Iexpat/lib -Itiff" USE_SEPARATE_HEADERMAPS="NO" GCC_ENABLE_FIX_AND_CONTINUE="NO" - -if [ $? -ne 0 ]; then exit 1; fi - -return 0