mirror of https://github.com/BOINC/boinc.git
Mac: Changes to build scripts to allow building under Xcode 10
This commit is contained in:
parent
98063ce0e5
commit
282ea8c324
|
@ -32,6 +32,7 @@
|
|||
# Updated 3/13/16 to add -target and -setting optional arguments
|
||||
# Updated 10/17/17 to fix bug when -all argument is implied but not explicitly passed
|
||||
# Updated 10/19/17 Special handling of screensaver build is no longer needed
|
||||
# Updated 10/2/18 for Xcode 10
|
||||
#
|
||||
## This script requires OS 10.8 or later
|
||||
#
|
||||
|
@ -144,8 +145,8 @@ major=`echo $version | sed 's/\([0-9]*\)[.].*/\1/' `;
|
|||
# Darwin version 7.x.y corresponds to OS 10.3.x
|
||||
# Darwin version 6.x corresponds to OS 10.2.x
|
||||
|
||||
if [ "$major" -lt "10" ]; then
|
||||
echo "ERROR: Building BOINC requires System 10.6 or later. For details, see build instructions at"
|
||||
if [ "$major" -lt "11" ]; then
|
||||
echo "ERROR: Building BOINC requires System 10.7 or later. For details, see build instructions at"
|
||||
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
|
||||
return 1
|
||||
fi
|
||||
|
@ -154,7 +155,7 @@ if [ "${style}" = "Development" ]; then
|
|||
echo "Development (debug) build"
|
||||
else
|
||||
style="Deployment"
|
||||
echo "Deployment (release) build for architectures: i386, x86_64"
|
||||
echo "Deployment (release) build for architecture: x86_64"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
# Build only 64-bit library 1/25/18
|
||||
# Fix wxWidgets 3.1.0 bug when wxStaticBox has no label 3/20/18
|
||||
# Fix wxWidgets 3.1.0 to not use backingScaleFactor API on OS 10.6 6/8/18
|
||||
# Update for compatibility with Xcode 10 10/2/18
|
||||
#
|
||||
## This script requires OS 10.6 or later
|
||||
##
|
||||
|
@ -249,7 +250,7 @@ if [ "${doclean}" != "clean" ] && [ -f "${libPathRel}/libwx_osx_cocoa_static.a"
|
|||
if [ $? -eq 0 ]; then
|
||||
alreadyBuilt=1
|
||||
lipo "${libPathRel}/libwx_osx_cocoa_static.a" -verify_arch i386
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $? -eq 0 ]; then
|
||||
# already built for both 32 and 64 bit, rebuild for only 64 bit
|
||||
alreadyBuilt=0
|
||||
doclean="clean"
|
||||
|
@ -269,7 +270,7 @@ else
|
|||
## We must override some of the build settings in wxWindows.xcodeproj
|
||||
## For wxWidgets 3.0.0 through 3.1.0 (at least) we must use legacy WebKit APIs
|
||||
## for x86_64, so we must define WK_API_ENABLED=0
|
||||
xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Release $doclean build ARCHS="x86_64" ONLY_ACTIVE_ARCH=="NO" OTHER_CFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DNDEBUG -fvisibility=hidden" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden" GCC_PREPROCESSOR_DEFINITIONS="WXBUILDING __WXOSX_COCOA__ __WX__ wxUSE_BASE=1 _FILE_OFFSET_BITS=64 _LARGE_FILES MACOS_CLASSIC __WXMAC_XCODE__=1 SCI_LEXER WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=${PIPESTATUS[0]}
|
||||
xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Release $doclean build ARCHS="x86_64" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.7" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DNDEBUG -fvisibility=hidden" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden" GCC_PREPROCESSOR_DEFINITIONS="WXBUILDING __WXOSX_COCOA__ __WX__ wxUSE_BASE=1 _FILE_OFFSET_BITS=64 _LARGE_FILES MACOS_CLASSIC __WXMAC_XCODE__=1 SCI_LEXER WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=${PIPESTATUS[0]}
|
||||
if [ ${retval} -ne 0 ]; then return 1; fi
|
||||
if [ "x${lprefix}" != "x" ]; then
|
||||
# copy library and headers to $lprefix
|
||||
|
@ -292,14 +293,14 @@ if [ "${doclean}" != "clean" ] && [ -f "${libPathDbg}/libwx_osx_cocoa_static.a"
|
|||
if [ $? -eq 0 ]; then
|
||||
alreadyBuilt=1
|
||||
lipo "${libPathDbg}/libwx_osx_cocoa_static.a" -verify_arch i386
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $? -eq 0 ]; then
|
||||
# already built for both 32 and 64 bit, rebuild for only 64 bit
|
||||
alreadyBuilt=0
|
||||
doclean="clean"
|
||||
doclean="clean" ## Not acutally used; see comment below
|
||||
fi
|
||||
else
|
||||
# already built but not for correct architectures
|
||||
doclean="clean"
|
||||
doclean="clean" ## Not acutally used; see comment below
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -312,7 +313,13 @@ else
|
|||
## We must override some of the build settings in wxWindows.xcodeproj
|
||||
## For wxWidgets 3.0.0 through 3.1.0 (at least) we must use legacy WebKit APIs
|
||||
## for x86_64, so we must define WK_API_ENABLED=0
|
||||
xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Debug $doclean build ARCHS="x86_64" ONLY_ACTIVE_ARCH=="NO" OTHER_CFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DDEBUG -fvisibility=hidden" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DDEBUG -fvisibility=hidden -fvisibility-inlines-hidden" GCC_PREPROCESSOR_DEFINITIONS="WXBUILDING __WXOSX_COCOA__ __WX__ wxUSE_BASE=1 _FILE_OFFSET_BITS=64 _LARGE_FILES MACOS_CLASSIC __WXMAC_XCODE__=1 SCI_LEXER WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=${PIPESTATUS[0]}
|
||||
##
|
||||
## We don't use $doclean here because:
|
||||
## * As of Xcode 10, "clean" would delete both the Release and Debug builds, and
|
||||
## * If there is a previous build of wrong architecture, both Xcode 10 and
|
||||
## earlier versions of Xcode correctly overwrite it with x86_64-only build.
|
||||
##
|
||||
xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Debug build ARCHS="x86_64" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.7" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DDEBUG -fvisibility=hidden" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -fno-strict-aliasing -fno-common -DWK_API_ENABLED=0 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DDEBUG -fvisibility=hidden -fvisibility-inlines-hidden" GCC_PREPROCESSOR_DEFINITIONS="WXBUILDING __WXOSX_COCOA__ __WX__ wxUSE_BASE=1 _FILE_OFFSET_BITS=64 _LARGE_FILES MACOS_CLASSIC __WXMAC_XCODE__=1 SCI_LEXER WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=${PIPESTATUS[0]}
|
||||
if [ ${retval} -ne 0 ]; then return 1; fi
|
||||
if [ "x${lprefix}" != "x" ]; then
|
||||
# copy debug library to $PREFIX
|
||||
|
|
Loading…
Reference in New Issue