Mac: update sample code to allow building with Xcode 4.3 and to eliminate compiler warnings

svn path=/trunk/boinc/; revision=25862
This commit is contained in:
Charlie Fenton 2012-07-11 10:32:09 +00:00
parent f7a9d4049e
commit 72007821b7
10 changed files with 951 additions and 396 deletions

View File

@ -4833,3 +4833,24 @@ David 10 July 2012
edit_forum_preferences*.php
forum_reply.php
forum_thread.php
Charlie 11 July 2012
- Mac: update sample code to allow building with Xcode 4.3 and
to eliminate compiler warnings.
samples/
example_app/
MakeMacExample.sh
Makefile_mac
Makefile_mac2
uc_graphics.cpp
mac_build/
UpperCase2.xcodeproj/
project.pbxproj
vboxwrapper/
BuildMacVboxWrapper.sh (new)
Makefile_mac (new)
vboxwrapper.xcodeproj/
project.pbxproj
wrapper/
BuildMacWrapper.sh

View File

@ -22,6 +22,13 @@
#
# by Charlie Fenton 2/16/10
# Updated 10/11/10 for XCode 3.2 and OS 10.6
# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
#
## This script requires OS 10.6 or later
#
## If you drag-install Xcode 4.3 or later, you must have opened Xcode
## and clicked the Install button on the dialog which appears to
## complete the Xcode installation before running this script.
#
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
##
@ -31,31 +38,39 @@
## sh [path]/MakeMacExample.sh
##
rm -fR ppc i386 x86_64
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
return 1
fi
echo
echo "***************************************************"
echo "********** Building PowerPC Application ***********"
echo "***************************************************"
echo
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
return 1
fi
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
export MACOSX_DEPLOYMENT_TARGET=10.3
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc"
export VARIANTFLAGS="-arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
return 1
fi
TOOLSPATH1=${MAKEPATH%/make}
rm -f uc2.o
rm -f uc2_graphics.o
rm -f uc2
rm -f uc2_graphics
make -f Makefile_mac all
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
return 1
fi
if [ $? -ne 0 ]; then exit 1; fi
TOOLSPATH2=${ARPATH%/ar}
mkdir ppc
mv uc2 ppc/
mv uc2_graphics ppc/
export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
SDKPATH=`xcodebuild -version -sdk macosx Path`
rm -fR i386 x86_64
echo
echo "***************************************************"
@ -63,10 +78,11 @@ echo "******* Building 32-bit Intel Application *********"
echo "***************************************************"
echo
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.4
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,i386"
export VARIANTFLAGS="-arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
rm -f uc2.o
rm -f uc2_graphics.o
@ -86,10 +102,11 @@ echo "******* Building 64-bit Intel Application *********"
echo "***************************************************"
echo
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.5
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk,-arch,x86_64"
export VARIANTFLAGS="-arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
rm -f uc2.o
rm -f uc2_graphics.o

View File

@ -1,7 +1,7 @@
# makefile for uc2 BOINC example application on Macintosh.
# This is invoked from MakeMacExample.sh shell script.
# It should not be used by itself without the script.
# Updated 2/16/10 for OS 10.6 and XCode 3.2
# Updated 7/10/12 for OS 10.7 and XCode 4.3 and later
BOINC_DIR = ../..
BOINC_API_DIR = $(BOINC_DIR)/api
@ -20,8 +20,6 @@ CXXFLAGS = $(VARIANTFLAGS) \
-L$(BOINC_BUILD_DIR) \
-L.
LIBJPEG = ../../../jpeg-6b/libjpeg.a
OBJ = \
uc2.o \
uc2_graphics.o
@ -38,6 +36,6 @@ uc2: uc2.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
uc2_graphics: uc2_graphics.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o uc2_graphics uc2_graphics.o\
-lboinc_graphics2 -lboinc_api -lboinc \
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg\
-framework AppKit -framework GLUT -framework OpenGL

View File

@ -1,5 +1,5 @@
# stand-alone makefile for uc2 BOINC example application on Macintosh.
# Updated 10/8/10 for OS 10.6 and XCode 3.2
# Updated 7/11/12 for OS 10.7 and XCode 4.3
#
BOINC_DIR = ../..
@ -17,97 +17,63 @@ CXXFLAGS_ALL = \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
-L$(BOINC_BUILD_DIR) \
-L/usr/lib \
-L.
CC_PPC = /usr/bin/gcc-4.0
CXX_PPC = /usr/bin/g++-4.0
CXXFLAGS_PPC = -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
LDFLAGS_PPC = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc
CC_i386 = /usr/bin/gcc-4.0
CXX_i386 = /usr/bin/g++-4.0
CXXFLAGS_i386 = -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
LDFLAGS_i386 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,i386
LDFLAGS_i386 = -Wl,,-arch,i386
CC_x86_64 = /usr/bin/gcc-4.0
CXX_x86_64 = /usr/bin/g++-4.0
CXXFLAGS_x86_64 = -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
-isysroot /Developer/SDKs/MacOSX10.5.sdk \
$(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
LDFLAGS_x86_64 = -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk,-arch,x86_64
LDFLAGS_x86_64 = -Wl,-arch,x86_64
LIBJPEG = ../../../jpeg-6b/libjpeg.a
OBJ = \
uc2_ppc.o \
uc2_graphics_ppc.o \
uc2_i386.o \
uc2_graphics_i386.o \
uc2_x86_64.o \
uc2_graphics_x86_64.o \
PROGS = uc2_ppc uc2_graphics_ppc uc2_i386 uc2_graphics_i386 uc2_x86_64 uc2_graphics_x86_64
PROGS = uc2_i386 uc2_graphics_i386 uc2_x86_64 uc2_graphics_x86_64
all: $(PROGS)
clean:
/bin/rm -f $(PROGS) $(OBJ)
uc2_ppc: export MACOSX_DEPLOYMENT_TARGET=10.3
uc2_graphics_ppc: export MACOSX_DEPLOYMENT_TARGET=10.3
uc2_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
uc2_graphics_i386: export MACOSX_DEPLOYMENT_TARGET=10.4
uc2_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
uc2_graphics_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
uc2_ppc.o: uc2.cpp
$(CXX_PPC) -c $(CXXFLAGS_PPC) uc2.cpp -o uc2_ppc.o
uc2_graphics_ppc.o: uc2_graphics.cpp
$(CXX_PPC) -c $(CXXFLAGS_PPC) uc2_graphics.cpp -o uc2_graphics_ppc.o
target uc2_i386.0: MACOSX_DEPLOYMENT_TARGET=10.4
uc2_i386.o: uc2.cpp
$(CXX_i386) -c $(CXXFLAGS_i386) uc2.cpp -o uc2_i386.o
$(CXX) -c $(CXXFLAGS_i386) uc2.cpp -o uc2_i386.o
uc2_graphics_i386.o: uc2_graphics.cpp
$(CXX_i386) -c $(CXXFLAGS_i386) uc2_graphics.cpp -o uc2_graphics_i386.o
$(CXX) -c $(CXXFLAGS_i386) uc2_graphics.cpp -o uc2_graphics_i386.o
target uc2_x86_64: MACOSX_DEPLOYMENT_TARGET=10.5
uc2_x86_64.o: uc2.cpp
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) uc2.cpp -o uc2_x86_64.o
$(CXX) -c $(CXXFLAGS_x86_64) uc2.cpp -o uc2_x86_64.o
uc2_graphics_x86_64.o: uc2_graphics.cpp
$(CXX_x86_64) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
uc2_ppc: uc2_ppc.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_ppc uc2_ppc.o -lboinc_api -lboinc
uc2_graphics_ppc: uc2_graphics_ppc.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX_PPC) $(CXXFLAGS_PPC) $(LDFLAGS_PPC) -o uc2_graphics_ppc uc2_graphics_ppc.o\
-lboinc_graphics2 -lboinc_api -lboinc \
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
$(CXX) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
uc2_i386: uc2_i386.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
$(CXX) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_i386 uc2_i386.o -lboinc_api -lboinc
uc2_graphics_i386: uc2_graphics_i386.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX_i386) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_graphics_i386 uc2_graphics_i386.o\
-lboinc_graphics2 -lboinc_api -lboinc \
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
$(CXX) $(CXXFLAGS_i386) $(LDFLAGS_i386) -o uc2_graphics_i386 uc2_graphics_i386.o\
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg \
-framework AppKit -framework GLUT -framework OpenGL
uc2_x86_64: uc2_x86_64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
uc2_graphics_x86_64: uc2_graphics_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX_x86_64) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64 uc2_graphics_x86_64.o\
-lboinc_graphics2 -lboinc_api -lboinc \
-framework AppKit -framework GLUT -framework OpenGL $(LIBJPEG)
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64 uc2_graphics_x86_64.o\
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg \
-framework AppKit -framework GLUT -framework OpenGL

View File

@ -101,12 +101,12 @@ static void draw_text() {
if (dt > 10) {
boinc_close_window_and_quit("shmem not updated");
} else if (dt > 5) {
txf_render_string(.1, 0, 0, 0, 500, white, 0, "App not running - exiting in 5 seconds");
txf_render_string(.1, 0, 0, 0, 500, white, 0, (char*)"App not running - exiting in 5 seconds");
} else if (shmem->status.suspended) {
txf_render_string(.1, 0, 0, 0, 500, white, 0, "App suspended");
txf_render_string(.1, 0, 0, 0, 500, white, 0, (char*)"App suspended");
}
} else {
txf_render_string(.1, 0, 0, 0, 500, white, 0, "No shared mem");
txf_render_string(.1, 0, 0, 0, 500, white, 0, (char*)"No shared mem");
}
}
@ -236,9 +236,9 @@ void app_graphics_init() {
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
txf_load_fonts(".");
txf_load_fonts((char*)".");
boinc_resolve_filename("logo.jpg", path, sizeof(path));
boinc_resolve_filename((char*)"logo.jpg", path, sizeof(path));
logo.load_image_file(path);
init_lights();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,130 @@
#!/bin/sh
# This file is part of BOINC.
# http://boinc.berkeley.edu
# Copyright (C) 2008 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# BOINC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#
#
# Script to build Macintosh vboxwrapper using Makefile
#
# by Charlie Fenton 2/15/10
# Updated 11/16/11 for XCode 4.1 and OS 10.7
# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
#
## This script requires OS 10.6 or later
#
## If you drag-install Xcode 4.3 or later, you must have opened Xcode
## and clicked the Install button on the dialog which appears to
## complete the Xcode installation before running this script.
#
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
##
## In Terminal, CD to the wrqpper directory.
## cd [path]/vboxwrapper/
## then run this script:
## sh [path]/BuildMacVboxWrapper.sh
##
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
return 1
fi
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
return 1
fi
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
return 1
fi
TOOLSPATH1=${MAKEPATH%/make}
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
return 1
fi
TOOLSPATH2=${ARPATH%/ar}
export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
SDKPATH=`xcodebuild -version -sdk macosx Path`
rm -fR i386 x86_64
echo
echo "***************************************************"
echo "******* Building 32-bit Intel Application *********"
echo "***************************************************"
echo
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.4
make -f Makefile_mac clean
make -f Makefile_mac all
if [ $? -ne 0 ]; then exit 1; fi
mkdir i386
mv vboxwrapper i386/
echo
echo "***************************************************"
echo "******* Building 64-bit Intel Application *********"
echo "***************************************************"
echo
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.5
make -f Makefile_mac clean
make -f Makefile_mac all
if [ $? -ne 0 ]; then exit 1; fi
mkdir x86_64
mv vboxwrapper x86_64/
rm -f vboxwrapper.o
echo
echo "***************************************************"
echo "**************** Build Succeeded! *****************"
echo "***************************************************"
echo
export CC="";export CXX=""
export LDFLAGS=""
export CPPFLAGS=""
export CFLAGS=""
exit 0

View File

@ -0,0 +1,43 @@
# makefile for BOINC vboxwrapper application on Macintosh.
# This is invoked from BuildMacVboxWrapper.sh shell script.
# It should not be used by itself without the script.
# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
BOINC_DIR = ../..
BOINC_API_DIR = $(BOINC_DIR)/api
BOINC_LIB_DIR = $(BOINC_DIR)/lib
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
FRAMEWORKS_DIR = /System/Library/Frameworks
CXXFLAGS = $(VARIANTFLAGS) \
-g \
-DAPP_GRAPHICS \
-I$(BOINC_CONFIG_DIR) \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
-L$(BOINC_BUILD_DIR) \
-L.
OBJ = \
floppyio.o \
vbox.o \
vboxwrapper.o
PROGS = vboxwrapper
all: $(PROGS)
clean:
/bin/rm -f $(PROGS) $(OBJ)
floppyio.o: floppyio.cpp
$(CXX) $(CXXFLAGS) -c floppyio.cpp
vbox.o: vbox.cpp
$(CXX) $(CXXFLAGS) -c vbox.cpp
vboxwrapper: vboxwrapper.o vbox.o floppyio.o $(BOINC_BUILD_DIR)/libboinc.a $(BOINC_BUILD_DIR)/libboinc_api.a
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o vboxwrapper vboxwrapper.o vbox.o floppyio.o -pthread -lboinc_api -lboinc

View File

@ -6,6 +6,21 @@
objectVersion = 45;
objects = {
/* Begin PBXAggregateTarget section */
DDF95AF415AD8A54004AD167 /* Build_All */ = {
isa = PBXAggregateTarget;
buildConfigurationList = DDF95AF715AD8A54004AD167 /* Build configuration list for PBXAggregateTarget "Build_All" */;
buildPhases = (
);
dependencies = (
DDF95AFA15AD8A65004AD167 /* PBXTargetDependency */,
DDF95AFC15AD8A65004AD167 /* PBXTargetDependency */,
);
name = Build_All;
productName = Build_All;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
DD3B677B140CF9470088683F /* vbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD90CE9E140CAB3D0074CF46 /* vbox.cpp */; };
DD3B677C140CF9470088683F /* vboxwrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD90CEA0140CAB3D0074CF46 /* vboxwrapper.cpp */; };
@ -15,6 +30,23 @@
DD90CEA2140CAB3D0074CF46 /* vboxwrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD90CEA0140CAB3D0074CF46 /* vboxwrapper.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
DDF95AF915AD8A65004AD167 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8DD76FA90486AB0100D96B5E;
remoteInfo = vboxwrapper_i686;
};
DDF95AFB15AD8A65004AD167 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = DD3B6779140CF9470088683F;
remoteInfo = vboxwrapper_x86_64;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
8DD76FB20486AB0100D96B5E /* vboxwrapper_i686 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vboxwrapper_i686; sourceTree = BUILT_PRODUCTS_DIR; };
DD3B6783140CF9470088683F /* vboxwrapper_x86_64 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vboxwrapper_x86_64; sourceTree = BUILT_PRODUCTS_DIR; };
@ -131,6 +163,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
DDF95AF415AD8A54004AD167 /* Build_All */,
8DD76FA90486AB0100D96B5E /* vboxwrapper_i686 */,
DD3B6779140CF9470088683F /* vboxwrapper_x86_64 */,
);
@ -149,7 +182,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "mkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\" ]; then\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n if [ \"$CONFIGURATION\" = \"Release\" ]; then\n cp -fpR \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.dSYM\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n fi\nfi\n";
shellScript = "mkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\" ]; then\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n if [ \"$CONFIGURATION\" = \"Release\" ]; then\n rm -fR \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n cp -fpR \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.dSYM\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n fi\nfi\n";
};
DDB3501A1421FBF000EF2DFC /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -162,7 +195,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "mkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\" ]; then\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n if [ \"$CONFIGURATION\" = \"Release\" ]; then\n cp -fpR \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.dSYM\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n fi\nfi\n";
shellScript = "mkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" -nt \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\" ]; then\n cp -fp \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n if [ \"$CONFIGURATION\" = \"Release\" ]; then\n rm -fR \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n cp -fpR \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.dSYM\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}.dSYM\"\n fi\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@ -189,12 +222,24 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
DDF95AFA15AD8A65004AD167 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DD76FA90486AB0100D96B5E /* vboxwrapper_i686 */;
targetProxy = DDF95AF915AD8A65004AD167 /* PBXContainerItemProxy */;
};
DDF95AFC15AD8A65004AD167 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DD3B6779140CF9470088683F /* vboxwrapper_x86_64 */;
targetProxy = DDF95AFB15AD8A65004AD167 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB928608733DD80010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = vboxwrapper_i686;
SDKROOT = macosx10.6;
USER_HEADER_SEARCH_PATHS = ../../clientgui/mac;
};
name = Debug;
@ -203,7 +248,6 @@
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = vboxwrapper_i686;
SDKROOT = macosx10.6;
USER_HEADER_SEARCH_PATHS = ../../clientgui/mac;
};
name = Release;
@ -228,13 +272,18 @@
../..,
);
LIBRARY_SEARCH_PATHS = "../../mac_build/build/Development/**";
MACOSX_DEPLOYMENT_TARGET = 10.4;
OTHER_CFLAGS = (
"-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
"-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
);
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc",
);
PREBINDING = NO;
PRODUCT_NAME = vboxwrapper;
SDKROOT = macosx10.5;
SDKROOT = "";
STRIP_INSTALLED_PRODUCT = NO;
};
name = Debug;
@ -259,6 +308,11 @@
../..,
);
LIBRARY_SEARCH_PATHS = "../../mac_build/build/Deployment/**";
MACOSX_DEPLOYMENT_TARGET = 10.4;
OTHER_CFLAGS = (
"-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
"-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
);
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc",
@ -266,7 +320,7 @@
PREBINDING = NO;
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = vboxwrapper;
SDKROOT = macosx10.5;
SDKROOT = "";
STRIP_INSTALLED_PRODUCT = YES;
};
name = Release;
@ -299,6 +353,20 @@
};
name = Release;
};
DDF95AF515AD8A54004AD167 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
DDF95AF615AD8A54004AD167 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -329,6 +397,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DDF95AF715AD8A54004AD167 /* Build configuration list for PBXAggregateTarget "Build_All" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DDF95AF515AD8A54004AD167 /* Debug */,
DDF95AF615AD8A54004AD167 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;

View File

@ -22,6 +22,13 @@
#
# by Charlie Fenton 2/15/10
# Updated 11/16/11 for XCode 4.1 and OS 10.7
# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
#
## This script requires OS 10.6 or later
#
## If you drag-install Xcode 4.3 or later, you must have opened Xcode
## and clicked the Install button on the dialog which appears to
## complete the Xcode installation before running this script.
#
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
##
@ -31,42 +38,51 @@
## sh [path]/BuildMacWrapper.sh
##
rm -fR ppc i386 x86_64
if [ -d /Developer/SDKs/MacOSX10.3.sdk/ ]; then
echo
echo "***************************************************"
echo "********** Building PowerPC Application ***********"
echo "***************************************************"
echo
export MACOSX_DEPLOYMENT_TARGET=10.3
export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk,-arch,ppc"
export VARIANTFLAGS="-arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
rm -f wrapper.o
rm -f wrapper
make -f Makefile_mac all
if [ $? -ne 0 ]; then exit 1; fi
mkdir ppc
mv wrapper ppc/
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
return 1
fi
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
return 1
fi
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
return 1
fi
TOOLSPATH1=${MAKEPATH%/make}
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
return 1
fi
TOOLSPATH2=${ARPATH%/ar}
export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
SDKPATH=`xcodebuild -version -sdk macosx Path`
rm -fR i386 x86_64
echo
echo "***************************************************"
echo "******* Building 32-bit Intel Application *********"
echo "***************************************************"
echo
export MACOSX_DEPLOYMENT_TARGET=10.6
export CC=/usr/bin/gcc-4.2;export CXX=/usr/bin/g++-4.2
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk,-arch,i386"
export VARIANTFLAGS="-arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,i386"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1040 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.4
rm -f wrapper.o
rm -f wrapper
@ -83,11 +99,12 @@ echo "******* Building 64-bit Intel Application *********"
echo "***************************************************"
echo
export MACOSX_DEPLOYMENT_TARGET=10.6
export CC=/usr/bin/gcc-4.2;export CXX=/usr/bin/g++-4.2
export LDFLAGS="-Wl,-arch x86_64"
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk,-arch,x86_64"
export VARIANTFLAGS="-arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden"
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1050 -DMAC_OS_X_VERSION_MIN_REQUIRED=1050 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
export MACOSX_DEPLOYMENT_TARGET=10.5
rm -f wrapper.o
rm -f wrapper