diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml
index c330d71f5a..a54073cf4f 100644
--- a/.github/workflows/osx.yml
+++ b/.github/workflows/osx.yml
@@ -22,7 +22,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
- type: [manager, libs-cmake]
+ type: [manager, samples-makefile, libs-cmake]
fail-fast: false
steps:
- uses: maxim-lobanov/setup-xcode@v1
@@ -51,14 +51,18 @@ jobs:
if: ${{! contains(matrix.type, 'cmake')}}
run: ./3rdParty/buildMacDependencies.sh -q
- - name: make
- if: success() && ! contains(matrix.type, 'cmake')
+ - name: make manager
+ if: success() && matrix.type == 'manager'
run: ./mac_build/buildMacBOINC-CI.sh --no_shared_headers
- name: libs cmake
if: matrix.type == 'libs-cmake'
run: osx/ci_build_libs_cmake.sh
+ - name: make samples makefile
+ if: matrix.type == 'samples-makefile'
+ run: ./mac_build/buildMacMakefiles-CI.sh
+
- name: Prepare logs on failure
if: ${{ failure() }}
run: python3 ./deploy/prepare_deployment.py logs
@@ -69,8 +73,3 @@ jobs:
with:
name: osx_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
path: deploy/logs.7z
-
- - name: deploy
- if: success() && ! contains(matrix.type, 'libs')
- run: echo "Would start deployment now"
- #run: ./deploy/prepare_deployment.sh osx_${BOINC_TYPE} deploy/osx_${BOINC_TYPE}/ && ./deploy/deploy_to_bintray.sh deploy/osx_${BOINC_TYPE}/
diff --git a/3rdParty/buildMacDependencies.sh b/3rdParty/buildMacDependencies.sh
index 0d35063bc1..b6c9829d9a 100755
--- a/3rdParty/buildMacDependencies.sh
+++ b/3rdParty/buildMacDependencies.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -18,7 +18,7 @@
# along with BOINC. If not, see .
#
-## IMPORTANT: This script is used only by GitHub Continuous Integration. Do not use it for
+## IMPORTANT: This script is used only by GitHub Continuous Integration. Do not use it for
## building BOINC on a Macintosh computer! Use mac_build/setupForBOINC.sh instead.
## support script to build BOINC dependencies on Macintosh
@@ -155,12 +155,12 @@ fi
source "${ROOTDIR}/mac_build/dependencyNames.sh"
#download_and_build $DIRNAME $FILENAME $DOWNLOADURL $BUILDSCRIPT $PRODUCTNAME $ARCHS
-download_and_build "${opensslDirName}" "${opensslFileName}" "${opensslURL}" "${ROOTDIR}/mac_build/buildopenssl.sh" "libssl.a" "x86_64"
-download_and_build "${caresDirName}" "${caresFileName}" "${caresURL}" "${ROOTDIR}/mac_build/buildc-ares.sh" "libcares.a" "x86_64"
-download_and_build "${curlDirName}" "${curlFileName}" "${curlURL}" "${ROOTDIR}/mac_build/buildcurl.sh" "libcurl.a" "x86_64"
-download_and_build "${wxWidgetsDirName}" "${wxWidgetsFileName}" "${wxWidgetsURL}" "${ROOTDIR}/mac_build/buildWxMac.sh ${wxoption}" "libwx_osx_cocoa_static.a" "x86_64"
-download_and_build "${freetypeDirName}" "${freetypeFileName}" "${freetypeURL}" "${ROOTDIR}/mac_build/buildfreetype.sh" "libfreetype.a" "x86_64"
-download_and_build "${ftglDirName}" "${ftglFileName}" "${ftglURL}" "${ROOTDIR}/mac_build/buildFTGL.sh" "libftgl.a" "x86_64"
+download_and_build "${opensslDirName}" "${opensslFileName}" "${opensslURL}" "${ROOTDIR}/mac_build/buildopenssl.sh" "libssl.a" "x86_64 arm64"
+download_and_build "${caresDirName}" "${caresFileName}" "${caresURL}" "${ROOTDIR}/mac_build/buildc-ares.sh" "libcares.a" "x86_64 arm64"
+download_and_build "${curlDirName}" "${curlFileName}" "${curlURL}" "${ROOTDIR}/mac_build/buildcurl.sh" "libcurl.a" "x86_64 arm64"
+download_and_build "${wxWidgetsDirName}" "${wxWidgetsFileName}" "${wxWidgetsURL}" "${ROOTDIR}/mac_build/buildWxMac.sh ${wxoption}" "libwx_osx_cocoa_static.a" "x86_64 arm64"
+download_and_build "${freetypeDirName}" "${freetypeFileName}" "${freetypeURL}" "${ROOTDIR}/mac_build/buildfreetype.sh" "libfreetype.a" "x86_64 arm64"
+download_and_build "${ftglDirName}" "${ftglFileName}" "${ftglURL}" "${ROOTDIR}/mac_build/buildFTGL.sh" "libftgl.a" "x86_64 arm64"
# change back to root directory
cd ${ROOTDIR} || exit 1
diff --git a/mac_build/BuildMacBOINC.sh b/mac_build/BuildMacBOINC.sh
index 1eb4f3304a..fcdb6369d7 100644
--- a/mac_build/BuildMacBOINC.sh
+++ b/mac_build/BuildMacBOINC.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2022 University of California
+# Copyright (C) 2023 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
@@ -36,6 +36,7 @@
# Updated 3/31/21 To eliminate redundant -c++11 arg since C++11 build is now standard
# Updated 5/19/21 for compatibility with zsh
# Updated 7/12/22 result is moved out of eval string to get correct status on CI if build fails
+# Updated 2/6/23 refactoring made to build zip apps (-zipapps), uc2 samples (-uc2) and vboxwrapper (-vboxwrapper)
#
## This script requires OS 10.8 or later
#
@@ -49,10 +50,10 @@
## cd [path]/boinc/mac_build
##
## then invoke this script as follows:
-## source BuildMacBOINC.sh [-dev] [-noclean] [-libstdc++] [-all] [-lib] [-client] [-target targetName] [-setting name value] [-help]
+## source BuildMacBOINC.sh [-dev] [-noclean] [-libstdc++] [-all] [-lib] [-client] [-zipapps] [-uc2] [-vboxwrapper] [-target targetName] [-setting name value] [-help]
## or
## chmod +x BuildMacBOINC.sh
-## ./BuildMacBOINC.sh [-dev] [-noclean] [-libstdc++] [-all] [-lib] [-client] [-target targetName] [-setting name value] [-help]
+## ./BuildMacBOINC.sh [-dev] [-noclean] [-libstdc++] [-all] [-lib] [-client] [-zipapps] [-uc2] [-vboxwrapper] [-target targetName] [-setting name value] [-help]
##
## optional arguments
## -dev build the development (debug) version.
@@ -67,6 +68,8 @@
## The following arguments determine which targets to build
##
## -all build all targets (i.e. target "Build_All" -- this is the default)
+## except boinc_zip_test, testzlibconflict, UpperCase2 targets
+## (UC2-x86_64, UC2Gfx-x86_64 and slide_show-x86_64) and VBoxWrapper
##
## -lib build the six libraries: libboinc_api.a, libboinc_graphics2.a,
## libboinc.a, libboinc_opencl.a, libboinc_zip.a, jpeglib.a.
@@ -74,6 +77,12 @@
## -client build two targets: boinc client and command-line utility boinc_cmd
## (also builds libboinc.a if needed, since boinc_cmd requires it.)
##
+## -zipapps build two zip samples: boinc_zip_test and testzlibconflict
+##
+## -uc2 build the UpperCase2 targets: UC2-x86_64, UC2Gfx-x86_64 and slide_show-x86_64
+##
+## -vboxwrapper build the VBoxWrapper target
+##
## Both -lib and -client may be specified to build seven targets (no BOINC Manager)
##
## The following are used mainly for building the daily test builds:
@@ -90,7 +99,9 @@ uselibcplusplus=""
buildall=0
buildlibs=0
buildclient=0
-buildzip=1
+buildzipapps=0
+builduc2=0
+buildvboxwrapper=0
style="Deployment"
unset settings
@@ -102,12 +113,15 @@ while [ $# -gt 0 ]; do
-all ) buildall=1 ; shift 1 ;;
-lib ) buildlibs=1 ; shift 1 ;;
-client ) buildclient=1 ; shift 1 ;;
- -target ) shift 1 ; targets="$targets -target $1" ; buildzip=0 ; shift 1 ;;
+ -zipapps ) buildzipapps=1 ; buildlibs=1 ; shift 1 ;;
+ -uc2 ) builduc2=1 ; buildlibs=1 ; shift 1 ;;
+ -vboxwrapper ) buildvboxwrapper=1 ; buildlibs=1 ; shift 1 ;;
+ -target ) shift 1 ; targets="$targets -target $1" ; shift 1 ;;
-setting ) shift 1 ; name="$1" ;
shift 1 ; unset value ; value=("$1");
settings+=("$name=""\"${value[@]}\"") ;
shift 1 ;;
- * ) echo "usage:" ; echo "cd {path}/mac_build/" ; echo "source BuildMacBOINC.sh [-dev] [-noclean] [-all] [-lib] [-client] [-target targetName] [-setting name value] [-help]" ; return 1 ;;
+ * ) echo "usage:" ; echo "cd {path}/mac_build/" ; echo "source BuildMacBOINC.sh [-dev] [-noclean] [-libstdc++] [-all] [-lib] [-client] [-zipapps] [-uc2] [-vboxwrapper] [-target targetName] [-setting name value] [-help]" ; return 1 ;;
esac
done
@@ -123,9 +137,12 @@ if [ "${buildclient}" = "1" ]; then
targets="$targets -target BOINC_Client -target cmd_boinc"
fi
-## "-all" overrides "-lib" and "-client" since it includes those targets
-if [ "${buildall}" = "1" ] || [ "${targets}" = "" ]; then
+if [ "x${targets}" = "x" ] && [ "${buildlibs}" = "0" ] && [ "${buildclient}" = "0" ] && [ "${buildzipapps}" = "0" ] && [ "${builduc2}" = "0" ] && [ "${buildvboxwrapper}" = "0" ]; then
buildall=1
+fi
+
+## "-all" overrides "-lib" and "-client" and "-zipaps" and "-uc2" and "-vboxwrapper" since it includes those targets
+if [ "${buildall}" = "1" ]; then
targets="-target Build_All"
fi
@@ -147,7 +164,7 @@ major=`echo $version | sed 's/\([0-9]*\)[.].*/\1/' `;
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"
+ echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or https://boinc.berkeley.edu/trac/wiki/MacBuild"
return 1
fi
@@ -173,17 +190,43 @@ done
## For unknown reasons, this xcodebuild call generates syntax errors under zsh
## unless we enclose the command in quotes and invoke it with eval.
-eval "xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
-result=$?
+## That is why all the other xcodebuild calls are invoked this way.
+
+if [ "${buildall}" = "1" ] || [ "${buildlibs}" = "1" ] || [ "${buildclient}" = "1" ] || [ "x${targets}" != "x" ]; then
+ # build all or specified targets from the boinc.xcodeproj project for -all, -libs, -client, or -target
+ eval "xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
+ result=$?
+fi
if [ $result -eq 0 ]; then
- # build ibboinc_zip.a for -all or -lib or default, where
- # default is none of { -all, -lib, -client }
- if [ "${buildall}" = "1" ] || [ "${buildlibs}" = "1" ] || [ "${buildclient}" = "0" ]; then
- if [ "${buildzip}" = "1" ]; then
- xcodebuild -project ../zip/boinc_zip.xcodeproj -target boinc_zip -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ${uselibcplusplus}
- result=$?
- fi
+ # build libboinc_zip.a for -all or -lib or -zipapps
+ if [ "${buildall}" = "1" ] || [ "${buildlibs}" = "1" ] || [ "${buildzipapps}" = "1" ]; then
+ eval "xcodebuild -project ../zip/boinc_zip.xcodeproj -target boinc_zip -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
+ result=$?
+ fi
+fi
+
+if [ $result -eq 0 ]; then
+ # build zip sample apps for -zipapps
+ if [ "${buildzipapps}" = "1" ]; then
+ eval "xcodebuild -project ../zip/boinc_zip.xcodeproj -target boinc_zip_test -target testzlibconflict -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
+ result=$?
+ fi
+fi
+
+if [ $result -eq 0 ]; then
+ # build UC2 sample apps for -uc2
+ if [ "${builduc2}" = "1" ]; then
+ eval "xcodebuild -project ../samples/mac_build/UpperCase2.xcodeproj -target Build_All -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
+ result=$?
+ fi
+fi
+
+if [ $result -eq 0 ]; then
+ # build vboxwrapper app for -vboxwrapper
+ if [ "${buildvboxwrapper}" = "1" ]; then
+ eval "xcodebuild -project ../samples/vboxwrapper/vboxwrapper.xcodeproj -target Build_All -configuration ${style} -sdk \"${SDKPATH}\" ${doclean} build ${uselibcplusplus} ${theSettings}"
+ result=$?
fi
fi
diff --git a/mac_build/buildFTGL.sh b/mac_build/buildFTGL.sh
index 1d8b6ba36c..05106ee9b1 100644
--- a/mac_build/buildFTGL.sh
+++ b/mac_build/buildFTGL.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -30,6 +30,7 @@
# Updated 8/22/20 to build Apple Silicon / arm64 and x86_64 Universal binary
# Updated 5/18/21 for compatibility with zsh
# Updated 10/18/21 for building with freetype 2.11.0
+# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
#
## This script requires OS 10.8 or later
#
@@ -104,12 +105,12 @@ if [ "${doclean}" != "yes" ]; then
lipo "${libPath}/libftgl.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ $GCC_can_build_arm64 = "yes" ]; then
lipo "${libPath}/libftgl.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ]; then
cwd=$(pwd)
dirname=${cwd##*/}
@@ -156,10 +157,10 @@ SDKPATH=`xcodebuild -version -sdk macosx Path`
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export CPPFLAGS=""
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
-export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
-export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
+export MACOSX_DEPLOYMENT_TARGET=10.13
if [ "x${lprefix}" != "x" ]; then
./configure --prefix="${lprefix}" --enable-shared=NO --disable-freetypetest --with-ft-prefix="${libftpath}" --host=x86_64
@@ -192,11 +193,11 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
- export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+ export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+ export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+ export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
export SDKROOT="${SDKPATH}"
- export MACOSX_DEPLOYMENT_TARGET=10.10
+ export MACOSX_DEPLOYMENT_TARGET=10.13
if [ "x${lprefix}" != "x" ]; then
./configure --prefix="${lprefix}" --enable-shared=NO --disable-freetypetest --with-ft-prefix="${libftpath}" --host=arm
diff --git a/mac_build/buildMacBOINC-CI.sh b/mac_build/buildMacBOINC-CI.sh
index 4d7fda143f..d455800ac2 100755
--- a/mac_build/buildMacBOINC-CI.sh
+++ b/mac_build/buildMacBOINC-CI.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2022 University of California
+# Copyright (C) 2023 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
@@ -114,6 +114,54 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a..."
+lipo ./build/${style}/libboinc.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a...done"
+echo "Verifying architecture (x86_64 arm64) of BOINCManager..."
+lipo ./build/${style}/BOINCManager.app/Contents/MacOS/BOINCManager -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of BOINCManager...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of BOINCManager...done"
+echo "Verifying architecture (x86_64 arm64) of SetVersion..."
+lipo ./build/${style}/SetVersion -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of SetVersion...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of SetVersion...done"
+echo "Verifying architecture (x86_64 arm64) of boinc..."
+lipo ./build/${style}/boinc -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of boinc...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of boinc...done"
+echo "Verifying architecture (x86_64) of detect_rosetta_cpu..."
+lipo ./build/${style}/detect_rosetta_cpu -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of detect_rosetta_cpu...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of detect_rosetta_cpu...done"
+echo "Verifying architecture (arm64) of detect_rosetta_cpu..."
+lipo ./build/${style}/detect_rosetta_cpu -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -eq 0 ]; then
+ echo "Verifying architecture (arm64) of detect_rosetta_cpu...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (arm64) of detect_rosetta_cpu...done"
echo "Building ${target}...done"
## Target gfx2libboinc also build dependent target jpeg
@@ -124,6 +172,22 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a..."
+lipo ./build/${style}/libjpeg.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libjpeg.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a...done"
+echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a..."
+lipo ./build/${style}/libboinc_graphics2.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a...done"
echo "Building ${target}...done"
target="libboinc"
@@ -133,6 +197,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a..."
+lipo ./build/${style}/libboinc.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a...done"
echo "Building ${target}...done"
target="api_libboinc"
@@ -142,6 +214,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_api.a..."
+lipo ./build/${style}/libboinc_api.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_api.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_api.a...done"
echo "Building ${target}...done"
target="PostInstall"
@@ -151,6 +231,30 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of boinc_finish_install..."
+lipo ./build/${style}/boinc_finish_install -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of boinc_finish_install...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of boinc_finish_install...done"
+echo "Verify architecture (x86_64 arm64) of SetVersion..."
+lipo ./build/${style}/SetVersion -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verify architecture (x86_64 arm64) of SetVersion...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verify architecture (x86_64 arm64) of SetVersion...done"
+echo "Verify architecture (x86_64 arm64) of PostInstall..."
+lipo ./build/${style}/PostInstall.app/Contents/MacOS/PostInstall -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verify architecture (x86_64 arm64) of PostInstall...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verify architecture (x86_64 arm64) of PostInstall...done"
echo "Building ${target}...done"
target="switcher"
@@ -160,6 +264,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of switcher..."
+lipo ./build/${style}/switcher -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of switcher...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of switcher...done"
echo "Building ${target}...done"
target="gfx_switcher"
@@ -169,6 +281,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of gfx_switcher..."
+lipo ./build/${style}/gfx_switcher -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of gfx_switcher...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of gfx_switcher...done"
echo "Building ${target}...done"
target="Install_BOINC"
@@ -178,6 +298,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of Install_BOINC..."
+lipo ./build/${style}/BOINC\ Installer.app/Contents/MacOS/BOINC\ Installer -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of Install_BOINC...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of Install_BOINC...done"
echo "Building ${target}...done"
libSearchPath=""
@@ -191,6 +319,22 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a..."
+lipo ./build/${style}/libjpeg.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libjpeg.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a...done"
+echo "Verifying architecture (x86_64 arm64) of boincscr..."
+lipo ./build/${style}/boincscr -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of boincscr...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of boincscr...done"
echo "Building ${target}...done"
target="ScreenSaver"
@@ -200,6 +344,22 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of gfx_cleanup..."
+lipo ./build/${style}/gfx_cleanup -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of gfx_cleanup...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of gfx_cleanup...done"
+echo "Verifying architecture (x86_64 arm64) of BOINCSaver..."
+lipo ./build/${style}/BOINCSaver.saver/Contents/MacOS/BOINCSaver -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of BOINCSaver...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of BOINCSaver...done"
echo "Building ${target}...done"
target="boinc_opencl"
@@ -209,6 +369,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a..."
+lipo ./build/${style}/libboinc_opencl.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a...done"
echo "Building ${target}...done"
target="setprojectgrp"
@@ -218,6 +386,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of setprojectgrp..."
+lipo ./build/${style}/setprojectgrp -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of setprojectgrp...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of setprojectgrp...done"
echo "Building ${target}...done"
target="cmd_boinc"
@@ -227,6 +403,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of boinccmd..."
+lipo ./build/${style}/boinccmd -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of boinccmd...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of boinccmd...done"
echo "Building ${target}...done"
target="Uninstaller"
@@ -236,6 +420,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of Uninstaller..."
+lipo ./build/${style}/Uninstall\ BOINC.app/Contents/MacOS/Uninstall\ BOINC -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of Uninstaller...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of Uninstaller...done"
echo "Building ${target}...done"
target="SetUpSecurity"
@@ -245,6 +437,14 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of SetUpSecurity..."
+lipo ./build/${style}/SetUpSecurity -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of SetUpSecurity...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of SetUpSecurity...done"
echo "Building ${target}...done"
target="AddRemoveUser"
@@ -254,6 +454,97 @@ if [ ${retval} -ne 0 ]; then
echo "Building ${target}...failed"
cd ..; exit 1;
fi
+echo "Verifying architecture (x86_64 arm64) of AddRemoveUser..."
+lipo ./build/${style}/AddRemoveUser -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of AddRemoveUser...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of AddRemoveUser...done"
+echo "Building ${target}...done"
+
+target="zip apps"
+echo "Building ${target}..."
+source BuildMacBOINC.sh ${config} -noclean -zipapps | tee xcodebuild_${target}.log | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a..."
+lipo ./build/${style}/libboinc_zip.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a...done"
+echo "Verifying architecture (x86_64 arm64) of boinc_zip_test..."
+lipo ../zip/build/${style}/boinc_zip_test -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of boinc_zip_test...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of boinc_zip_test...done"
+echo "Verifying architecture (x86_64 arm64) of testzlibconflict..."
+lipo ../zip/build/${style}/testzlibconflict -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of testzlibconflict...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of testzlibconflict...done"
+echo "Building ${target}...done"
+
+target="UpperCase2"
+echo "Building ${target}..."
+source BuildMacBOINC.sh ${config} -noclean -uc2 -setting HEADER_SEARCH_PATHS "../../ ../../api/ ../../lib/ ../../zip/ ../../clientgui/mac/ ../jpeglib/ ../samples/jpeglib/ ${cache_dir}/include ${cache_dir}/include/freetype2" -setting LIBRARY_SEARCH_PATHS "../../mac_build/build/Deployment ${cache_dir}/lib" | tee xcodebuild_${target}.log | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of UC2_graphics-apple-darwin..."
+lipo ../samples/mac_build/build/${style}/UC2_graphics-apple-darwin -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of UC2_graphics-apple-darwin...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of UC2_graphics-apple-darwin...done"
+echo "Verifying architecture (x86_64 arm64) of UC2-apple-darwin..."
+lipo ../samples/mac_build/build/${style}/UC2-apple-darwin -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of UC2-apple-darwin...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of UC2-apple-darwin...done"
+echo "Verifying architecture (x86_64 arm64) of slide_show-apple-darwin..."
+lipo ../samples/mac_build/build/${style}/slide_show-apple-darwin -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of slide_show-apple-darwin...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of slide_show-apple-darwin...done"
+echo "Building ${target}...done"
+
+target="VBoxWrapper"
+echo "Building ${target}..."
+source BuildMacBOINC.sh ${config} -noclean -vboxwrapper -setting HEADER_SEARCH_PATHS "../../ ../../api/ ../../lib/ ../../clientgui/mac/ ../samples/jpeglib ${cache_dir}/include" -setting LIBRARY_SEARCH_PATHS "../../mac_build/build/Deployment ${cache_dir}/lib" | tee xcodebuild_${target}.log | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of vboxwrapper..."
+lipo ../samples/vboxwrapper/build/${style}/vboxwrapper -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of vboxwrapper...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of vboxwrapper...done"
echo "Building ${target}...done"
cd ..
diff --git a/mac_build/buildMacMakefiles-CI.sh b/mac_build/buildMacMakefiles-CI.sh
new file mode 100755
index 0000000000..ae7fcd2021
--- /dev/null
+++ b/mac_build/buildMacMakefiles-CI.sh
@@ -0,0 +1,332 @@
+#!/bin/bash
+
+# This file is part of BOINC.
+# http://boinc.berkeley.edu
+# Copyright (C) 2023 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 .
+#
+#
+# Script to build the different targets in the BOINC xcode project using a
+# combined install directory for all dependencies
+#
+# Usage:
+# ./mac_build/buildMacMakefiles-CI.sh [--cache_dir PATH] [--debug]
+#
+# --cache_dir is the path where the dependencies are installed by 3rdParty/buildMacDependencies.sh.
+# --debug will build the debug Manager (needs debug wxWidgets library in cache_dir).
+
+# check working directory because the script needs to be called like: ./mac_build/buildMacMakefiles-CI.sh
+if [ ! -d "mac_build" ]; then
+ echo "start this script in the source root directory"
+ exit 1
+fi
+
+# Delete any obsolete paths to old build products
+rm -fR ./zip/build
+rm -fR ./mac_build/build
+
+cache_dir="$(pwd)/3rdParty/buildCache/mac"
+doclean=""
+style="Deployment"
+config=""
+beautifier="cat" # we need a fallback if xcpretty is not available
+while [[ $# -gt 0 ]]; do
+ key="$1"
+ case $key in
+ --cache_dir)
+ cache_dir="$2"
+ shift
+ ;;
+ --debug|-dev)
+ style="Development"
+ config="-dev"
+ ;;
+ esac
+ shift # past argument or value
+done
+
+if [ ! -d "$cache_dir" ] || [ ! -d "$cache_dir/lib" ] || [ ! -d "$cache_dir/include" ]; then
+ echo "${cache_dir} is not a directory or does not contain dependencies"
+fi
+
+XCPRETTYPATH=`xcrun -find xcpretty 2>/dev/null`
+if [ $? -eq 0 ]; then
+ beautifier="xcpretty"
+fi
+
+cd ./mac_build || exit 1
+retval=0
+
+echo "Building BOINC libs..."
+source BuildMacBOINC.sh ${config} -noclean -lib | tee xcodebuild_${target}.log | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a..."
+lipo ./build/${style}/libboinc.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc.a...done"
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a..."
+lipo ./build/${style}/libjpeg.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libjpeg.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libjpeg.a...done"
+echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a..."
+lipo ./build/${style}/libboinc_graphics2.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_graphics2.a...done"
+echo "Verifying architecture (x86_64 arm64) of libboinc_api.a..."
+lipo ./build/${style}/libboinc_api.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_api.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_api.a...done"
+echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a..."
+lipo ./build/${style}/libboinc_opencl.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_opencl.a...done"
+echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a..."
+lipo ./build/${style}/libboinc_zip.a -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a...failed"
+ echo "Building ${target}...failed"
+ cd ..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of libboinc_zip.a...done"
+echo "Building BOINC libs...done"
+
+target="Examples via Makefile"
+echo "Building ${target}..."
+cd ../samples/example_app
+source MakeMacExample.sh --cache_dir ${cache_dir}; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of uc2..."
+lipo ./x86_64/uc2 -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of uc2...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of uc2...done"
+echo "Verifying architecture (arm64) of uc2..."
+lipo ./arm64/uc2 -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of uc2...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of uc2...done"
+echo "Verifying architecture (x86_64) of uc2_graphics..."
+lipo ./x86_64/uc2_graphics -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of uc2_graphics...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of uc2_graphics...done"
+echo "Verifying architecture (arm64) of uc2_graphics..."
+lipo ./arm64/uc2_graphics -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of uc2_graphics...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of uc2_graphics...done"
+echo "Verifying architecture (x86_64) of slide_show..."
+lipo ./x86_64/slide_show -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of slide_show...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of slide_show...done"
+echo "Verifying architecture (arm64) of slide_show..."
+lipo ./arm64/slide_show -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of slide_show...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of slide_show...done"
+cd ../../mac_build/
+echo "Building ${target}...done"
+
+target="Examples Makefile_mac2"
+echo "Building ${target}..."
+cd ../samples/example_app
+export PREFIX=${cache_dir}
+export CXX="${GPPPATH}"
+SDKPATH=`xcodebuild -version -sdk macosx Path`
+export SYSLIBROOT="-Wl,-syslibroot,${SDKPATH}"
+export ISYSROOT="-isysroot ${SDKPATH}"
+make -f Makefile_mac2 clean; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+make -f Makefile_mac2 all; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+export PREFIX=""
+export CXX=""
+export SYSLIBROOT=""
+export ISYSROOT=""
+echo "Verifying architecture (x86_64) of uc2_x86_64..."
+lipo ./uc2_x86_64 -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of uc2_x86_64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of uc2_x86_64...done"
+echo "Verifying architecture (arm64) of uc2_arm64..."
+lipo ./uc2_arm64 -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of uc2_arm64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of uc2_arm64...done"
+echo "Verifying architecture (x86_64) of uc2_graphics_x86_64..."
+lipo ./uc2_graphics_x86_64 -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of uc2_graphics_x86_64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of uc2_graphics_x86_64...done"
+echo "Verifying architecture (arm64) of uc2_graphics_arm64..."
+lipo ./uc2_graphics_arm64 -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of uc2_graphics_arm64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of uc2_graphics_arm64...done"
+echo "Verifying architecture (x86_64) of slide_show_x86_64..."
+lipo ./slide_show_x86_64 -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of slide_show_x86_64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of slide_show_x86_64...done"
+echo "Verifying architecture (arm64) of slide_show_arm64..."
+lipo ./slide_show_arm64 -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of slide_show_arm64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of slide_show_arm64...done"
+cd ../../mac_build/
+echo "Building ${target}...done"
+
+target="Wrapper"
+echo "Building ${target}..."
+cd ../samples/wrapper
+source BuildMacWrapper.sh --cache_dir ${cache_dir}; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of wrapper..."
+lipo ./wrapper -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of wrapper...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of wrapper...done"
+cd ../../mac_build/
+echo "Building ${target}...done"
+
+target="VBoxWrapper"
+echo "Building ${target}..."
+cd ../samples/vboxwrapper
+source BuildMacVboxWrapper.sh --cache_dir ${cache_dir}; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../../; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of vboxwrapper..."
+lipo ./vboxwrapper -verify_arch x86_64 arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64 arm64) of vboxwrapper...failed"
+ echo "Building ${target}...failed"
+ cd ../../; exit 1;
+fi
+echo "Verifying architecture (x86_64 arm64) of vboxwrapper...done"
+cd ../../mac_build/
+echo "Building ${target}...done"
+
+target="openclapp"
+echo "Building ${target}..."
+cd ../samples/openclapp
+export CXX="${GPPPATH}"
+make -f Makefile_mac clean; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+make -f Makefile_mac all; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+export CXX=""
+echo "Verifying architecture (x86_64) of openclapp_x86_64..."
+lipo ./openclapp_x86_64 -verify_arch x86_64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (x86_64) of openclapp_x86_64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (x86_64) of openclapp_x86_64...done"
+echo "Verifying architecture (arm64) of openclapp_arm64..."
+lipo ./openclapp_arm64 -verify_arch arm64 | $beautifier; retval=${PIPESTATUS[0]}
+if [ ${retval} -ne 0 ]; then
+ echo "Verifying architecture (arm64) of openclapp_arm64...failed"
+ echo "Building ${target}...failed"
+ cd ../..; exit 1;
+fi
+echo "Verifying architecture (arm64) of openclapp_arm64...done"
+cd ../../mac_build/
+echo "Building ${target}...done"
+
+cd ..
diff --git a/mac_build/buildWxMac.sh b/mac_build/buildWxMac.sh
index d91cd1430a..57cb499853 100644
--- a/mac_build/buildWxMac.sh
+++ b/mac_build/buildWxMac.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -43,6 +43,7 @@
# Updated 5/18/21 for compatibility with zsh
# Updated 9/30/21 for wxCocoa 3.1.5
# Updated 10/18/21 to add -Werror=unguarded-availability compiler flag
+# Updated 2/6/23 changed MACOSX_DEPLOYMENT_TARGET to 10.13
#
## This script requires OS 10.6 or later
##
@@ -74,7 +75,7 @@ fi
echo ""
## Add our custom method SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
-## to wxChoice. We use this to create our own custom CBOINCBitmapComboBox
+## to wxChoice. We use this to create our own custom CBOINCBitmapComboBox
## which uses native Mac controls instead of wxBitmapComboBox which does not.
## By using only native Mac controls in BOINC SImple View, MacOS will provide
## accessibility support automatically.
@@ -92,7 +93,7 @@ if [ ! -f include/wx/osx/choice.h.orig ]; then
virtual void SetString(unsigned int pos, const wxString& s) wxOVERRIDE;
+ void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
// osx specific event handling common for all osx-ports
-
+
virtual bool OSXHandleClicked(double timestampsec) wxOVERRIDE;
ENDOFFILE
patch -bfi /tmp/choice_h_diff include/wx/osx/choice.h
@@ -111,7 +112,7 @@ if [ ! -f src/osx/choice_osx.cpp.orig ]; then
@@ -212,6 +212,13 @@
return m_strings[n] ;
}
-
+
+void wxChoice::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
+{
+ wxCHECK_RET( IsValid(n), wxT("wxChoice::SetItemBitmap(): invalid index") );
@@ -138,13 +139,13 @@ if [ ! -f include/wx/osx/core/private.h.orig ]; then
+++ include/wx/osx/core/private_patched.h 2021-09-30 01:11:28.000000000 -0700
@@ -809,6 +809,8 @@
}
-
+
virtual void SetItem(int pos, const wxString& item) = 0;
-+
++
+ virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
};
-
-
+
+
ENDOFFILE
patch -bfi /tmp/private_h_cpp_diff include/wx/osx/core/private.h
rm -f /tmp/private_h_cpp_diff
@@ -162,7 +163,7 @@ if [ ! -f src/osx/cocoa/choice.mm.orig ]; then
@@ -130,6 +130,12 @@
m_popUpMenu->FindItemByPosition( pos )->SetItemLabel( s ) ;
}
-
+
+ void SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
+ {
+ if ( bitmap.Ok() )
@@ -173,7 +174,7 @@ if [ ! -f src/osx/cocoa/choice.mm.orig ]; then
wxMenu* m_popUpMenu;
};
ENDOFFILE
- patch -bfi /tmp/choice_mm_diff src/osx/cocoa/choice.mm
+ patch -bfi /tmp/choice_mm_diff src/osx/cocoa/choice.mm
rm -f /tmp/choice_mm_diff
else
echo "src/osx/cocoa/choice.mm already patched"
@@ -245,7 +246,7 @@ if [ "${doclean}" != "clean" ] && [ -f "${libPathRel}/libwx_osx_cocoa_static.a"
lipo "${libPathRel}/libwx_osx_cocoa_static.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="clean"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ $GCC_can_build_arm64 = "yes" ]; then
lipo "${libPathRel}/libwx_osx_cocoa_static.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="clean"; fi
@@ -261,18 +262,18 @@ 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
-
+
## "-include unistd.h" is a workaround for a problem under Xcode 12 Beta
## $(ARCHS_STANDARD) builds Universal Binary (x86_64 & arm64) library under
## Xcode versions that can, otherwise it builds only the X86_64 library.
-
+
## The "-Werror=unguarded-availability" compiler flag generates an error if
## there is an unguarded API not available in our Deployment Target. This
## helps ensure wxWidgets won't try to use unavailable APIs on older Mac
## systems supported by BOINC.
set -o pipefail
- xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Release $doclean build ARCHS="\$(ARCHS_STANDARD)" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.10" GCC_C_LANGUAE_STANDARD="compiler-default" CLANG_CXX_LANGUAGE_SANDARD="c++0x" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DPNG_ARM_NEON_OPT=0 -DNDEBUG -fvisibility=hidden -include unistd.h" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DPNG_ARM_NEON_OPT=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 NO_CXX11_REGEX WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=$?
+ xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Release $doclean build ARCHS="\$(ARCHS_STANDARD)" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.13" GCC_C_LANGUAE_STANDARD="compiler-default" CLANG_CXX_LANGUAGE_SANDARD="c++0x" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DPNG_ARM_NEON_OPT=0 -DNDEBUG -fvisibility=hidden -include unistd.h" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DwxDEBUG_LEVEL=0 -DPNG_ARM_NEON_OPT=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 NO_CXX11_REGEX WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=$?
if [ ${retval} -ne 0 ]; then return 1; fi
if [ "x${lprefix}" != "x" ]; then
# copy library and headers to $lprefix
@@ -302,7 +303,7 @@ if [ "${doclean}" != "clean" ] && [ -f "${libPathDbg}/libwx_osx_cocoa_static.a"
lipo "${libPathDbg}/libwx_osx_cocoa_static.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="clean"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ GCC_can_build_arm64 = "yes" ]; then
lipo "${libPathDbg}/libwx_osx_cocoa_static.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="clean"; fi
@@ -321,14 +322,14 @@ else
##
## 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
+ ## * 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.
##
## "-include unistd.h" is a workaround for a problem under Xcode 12 Beta
## $(ARCHS_STANDARD) builds Universal Binary (x86_64 & arm64) library under
## Xcode versions that can, otherwise it builds only the X86_64 library.
set -o pipefail
- xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Debug build ARCHS="\$(ARCHS_STANDARD)" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.10" GCC_C_LANGUAE_STANDARD="compiler-default" CLANG_CXX_LANGUAGE_SANDARD="c++0x" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DPNG_ARM_NEON_OPT=0 -DDEBUG -fvisibility=hidden -include unistd.h" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DPNG_ARM_NEON_OPT=0 -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 NO_CXX11_REGEX WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=$?
+ xcodebuild -project build/osx/wxcocoa.xcodeproj -target static -configuration Debug build ARCHS="\$(ARCHS_STANDARD)" ONLY_ACTIVE_ARCH="NO" MACOSX_DEPLOYMENT_TARGET="10.13" GCC_C_LANGUAE_STANDARD="compiler-default" CLANG_CXX_LANGUAGE_SANDARD="c++0x" CLANG_CXX_LIBRARY="libc++" OTHER_CFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DPNG_ARM_NEON_OPT=0 -DDEBUG -fvisibility=hidden -include unistd.h" OTHER_CPLUSPLUSFLAGS="-Wall -Wundef -Werror=unguarded-availability -fno-strict-aliasing -fno-common -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -DPNG_ARM_NEON_OPT=0 -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 NO_CXX11_REGEX WX_PRECOMP=1 wxUSE_UNICODE_UTF8=1 wxUSE_UNICODE_WCHAR=0 __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" | $beautifier; retval=$?
if [ ${retval} -ne 0 ]; then return 1; fi
if [ "x${lprefix}" != "x" ]; then
# copy debug library to $PREFIX
diff --git a/mac_build/buildc-ares.sh b/mac_build/buildc-ares.sh
index a1b5ecb4c6..ec1c356924 100644
--- a/mac_build/buildc-ares.sh
+++ b/mac_build/buildc-ares.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -34,6 +34,7 @@
# Updated 8/22/20 to build Apple Silicon / arm64 and x86_64 Universal binary
# Updated 5/18/21 for compatibility with zsh
# Updated 10/18/21 for building c-ares 1.17.2
+# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
#
## This script requires OS 10.8 or later
@@ -120,12 +121,12 @@ if [ "${doclean}" != "yes" ]; then
lipo "${libPath}/libcares.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ $GCC_can_build_arm64 = "yes" ]; then
lipo "${libPath}/libcares.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ]; then
cwd=$(pwd)
dirname=${cwd##*/}
@@ -182,9 +183,9 @@ export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++"
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -arch x86_64"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
-export MAC_OS_X_VERSION_MAX_ALLOWED=101000
-export MAC_OS_X_VERSION_MIN_REQUIRED=101000
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export MAC_OS_X_VERSION_MAX_ALLOWED=101300
+export MAC_OS_X_VERSION_MIN_REQUIRED=101300
./configure --prefix=${lprefix} --enable-shared=NO --host=x86_64
if [ $? -ne 0 ]; then return 1; fi
@@ -210,9 +211,9 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos10.10 -mmacosx-version-min=10.10 -stdlib=libc++"
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos10.10"
export SDKROOT="${SDKPATH}"
- export MACOSX_DEPLOYMENT_TARGET=10.10
- export MAC_OS_X_VERSION_MAX_ALLOWED=101000
- export MAC_OS_X_VERSION_MIN_REQUIRED=101000
+ export MACOSX_DEPLOYMENT_TARGET=10.13
+ export MAC_OS_X_VERSION_MAX_ALLOWED=101300
+ export MAC_OS_X_VERSION_MIN_REQUIRED=101300
./configure --prefix=${lprefix} --enable-shared=NO --host=arm
if [ $? -ne 0 ]; then
@@ -226,15 +227,15 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
# save x86_64 header and lib for later use
# c-ares configure creates a different ares_build.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical
- # for x86_64 and arm64, so this is not currently an issue.
+ # for x86_64 and arm64, so this is not currently an issue.
## cp -f ares_build.h ares_build_x86_64.h
mv -f "src/lib/.libs/libcares.a" libcares_x86_64.a
# Build for arm64 architecture
make clean 1>$stdout_target
-
+
make 1>$stdout_target
- if [ $? -ne 0 ]; then
+ if [ $? -ne 0 ]; then
rm -f libcares_x86_64.a
rm -f ares_build_x86_64.h
return 1
@@ -242,7 +243,7 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
# c-ares configure creates a different ares_build.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical
- # for x86_64 and arm64, so this is not currently an issue.
+ # for x86_64 and arm64, so this is not currently an issue.
## cp -f ares_build.h ares_build_arm64.h
mv -f "src/lib/.libs/libcares.a" libcares_arm64.a
@@ -252,9 +253,9 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
rm -f libcares_x86_64.a libcares_arm64.a
return 1
fi
-
+
rm -f libcares_x86_64.a libcares_arm64.a
-
+
make install 1>$stdout_target
if [ $? -ne 0 ]; then return 1; fi
fi
diff --git a/mac_build/buildcurl.sh b/mac_build/buildcurl.sh
index 0686449f90..5db4600f4a 100644
--- a/mac_build/buildcurl.sh
+++ b/mac_build/buildcurl.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -39,11 +39,12 @@
# Updated 8/22/20 to build Apple Silicon / arm64 and x86_64 Universal binary
# Updated 12/24/20 for curl 7.73.0
# Updated 5/18/21 for compatibility with zsh
-# Updated 10/11/21 to use Secure Transport instead of OpenSSL (uses MacOS certificate store
+# Updated 10/11/21 to use Secure Transport instead of OpenSSL (uses MacOS certificate store
# instead of ca-bundle.crt)
# Updated 11/16/21 for curl 7.79.1
+# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
#
-## Curl's configure and make set the "-Werror=partial-availability" compiler flag,
+## Curl's configure and make set the "-Werror=partial-availability" compiler flag,
## which generates an error if there is an API not available in our Deployment
## Target. This helps ensure curl won't try to use unavailable APIs on older Mac
## systems supported by BOINC.
@@ -67,10 +68,10 @@
function patch_curl_config {
# If building with some SDKs or version of Xcode, either or
- # both of these patches will fail because config has already
+ # both of these patches will fail because config has already
# set our desired values.
#
- # The __builtin_available() function may cause problems in
+ # The __builtin_available() function may cause problems in
# static libraries or older versions of MacOS. It's unclear
# to me whether this is still an issue, but I'm keeping this
# patch in here for now to be safe. - CF 10/11/21
@@ -159,12 +160,12 @@ if [ "${doclean}" != "yes" ]; then
lipo "${libPath}/libcurl.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ $GCC_can_build_arm64 = "yes" ]; then
lipo "${libPath}/libcurl.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ]; then
cwd=$(pwd)
dirname=${cwd##*/}
@@ -207,7 +208,7 @@ fi
# c-ares configure creates a different ares_build.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical for
-# x86_64 and arm64, so this is not currently an issue.
+# x86_64 and arm64, so this is not currently an issue.
## cp -f ../"${caresDirName}"/ares_build_x86_64.h /tmp/installed-c-ares/include/ares_build.h
# Build for x86_64 architecture
@@ -215,9 +216,9 @@ fi
export PATH=/usr/local/bin:$PATH
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
-export MAC_OS_X_VERSION_MAX_ALLOWED=101000
-export MAC_OS_X_VERSION_MIN_REQUIRED=101000
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export MAC_OS_X_VERSION_MAX_ALLOWED=101300
+export MAC_OS_X_VERSION_MIN_REQUIRED=101300
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
export CPPFLAGS="-isysroot ${SDKPATH} -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++"
@@ -278,7 +279,7 @@ export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.10 -target arm64-app
# c-ares configure creates a different ares_build.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical for
-# x86_64 and arm64, so this is not currently an issue.
+# x86_64 and arm64, so this is not currently an issue.
## cp -f ../"${caresDirName}"/ares_build_arm.h /tmp/installed-c-ares/include/ares_build.h
if [ "x${lprefix}" != "x" ]; then
PKG_CONFIG_PATH="${lprefix}/lib/pkgconfig" ./configure --prefix=${lprefix} --enable-ares --disable-shared --with-secure-transport --without-libidn --without-libidn2 --without-nghttp2 --without-ngtcp2 --without-nghttp3 --without-quiche --host=arm-apple-darwin
@@ -296,7 +297,7 @@ export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.10 -target arm64-app
# save x86_64 header and lib for later use
# curl configure creates a different curlbuild.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical
- # for x86_64 and arm64, so this is not currently an issue.
+ # for x86_64 and arm64, so this is not currently an issue.
## cp -f include/curl/curlbuild.h include/curl/curlbuild_x86_64.h
mv -f lib/.libs/libcurl.a lib/libcurl_x86_64.a
@@ -309,7 +310,7 @@ export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.10 -target arm64-app
if [ $? -ne 0 ]; then return 1; fi
# curl configure creates a different curlbuild.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical
- # for x86_64 and arm64, so this is not currently an issue.
+ # for x86_64 and arm64, so this is not currently an issue.
## mv -f include/curl/curlbuild.h include/curl/curlbuild_arm64.h
mv -f lib/.libs/libcurl.a lib/libcurl_arm64.a
@@ -340,10 +341,10 @@ export SDKROOT=""
# curl configure creates a different curlbuild.h file for each architecture
# for a sanity check on size of long and socklen_t. But these are identical
-# for x86_64 and arm64, so this is not currently an issue and so we return now.
+# for x86_64 and arm64, so this is not currently an issue and so we return now.
return 0
-# Create a custom curlbuild.h file which directs BOINC builds
+# Create a custom curlbuild.h file which directs BOINC builds
# to the correct curlbuild_xxx.h file for each architecture.
cat >> include/curl/curlbuild.h << ENDOFFILE
/***************************************************************************
diff --git a/mac_build/buildfreetype.sh b/mac_build/buildfreetype.sh
index 30cba2902c..0b99c191d3 100644
--- a/mac_build/buildfreetype.sh
+++ b/mac_build/buildfreetype.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2022 University of California
+# Copyright (C) 2023 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
@@ -35,6 +35,7 @@
# Updated 5/18/21 for compatibility with zsh
# Updated 10/18/21 for for building freetype 2.11.0
# Updated 7/13/22 specify to build freetype without brotli support
+# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
#
## This script requires OS 10.8 or later
#
@@ -165,11 +166,11 @@ rm -fR "../freetype_install/"
##
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
-export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
-export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
-export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
+export MACOSX_DEPLOYMENT_TARGET=10.13
./configure --enable-shared=NO --prefix=${lprefix} --enable-freetype-config --without-png --without-brotli --without-harfbuzz --host=x86_64
if [ $? -ne 0 ]; then return 1; fi
@@ -187,11 +188,11 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
- export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+ export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+ export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+ export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
export SDKROOT="${SDKPATH}"
- export MACOSX_DEPLOYMENT_TARGET=10.10
+ export MACOSX_DEPLOYMENT_TARGET=10.13
./configure --enable-shared=NO --prefix=${lprefix} --enable-freetype-config --without-png --without-brotli --without-harfbuzz --host=arm
if [ $? -ne 0 ]; then
diff --git a/mac_build/buildjpeg.sh b/mac_build/buildjpeg.sh
deleted file mode 100644
index 7b01edacef..0000000000
--- a/mac_build/buildjpeg.sh
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-# This file is part of BOINC.
-# http://boinc.berkeley.edu
-# Copyright (C) 2019 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 .
-#
-#
-# Script to build Macintosh Universal Binary library of jpeg-6b for
-# use in building BOINC.
-#
-# by Charlie Fenton 12/19/07
-# Updated 12/3/09 for OS 10.6 Snow Leopard and XCode 3.2.1
-# Updated 10/11/10
-# Updated 1/23/19 to report this script is obsolete and return error
-#
-## In Terminal, CD to the jpeg-6b directory.
-## cd [path]/jpeg-6b/
-## then run this script:
-## source [ path_to_this_script ] [ -clean ]
-#
-# the -clean argument will force a full rebuild.
-#
-
-echo "This script is obsolete. libjpeg is now built by boinc.xcodeproj"
-return 1
-
-if [ "$1" != "-clean" ]; then
- if [ -f libjpeg_ppc.a ] && [ -f libjpeg_i386.a ] && [ -f libjpeg_x86_64.a ] && [ -f libjpeg.a ]; then
- echo "jpeg-6b already built"
- return 0
- fi
-fi
-
-if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk/ ]; then
- echo "ERROR: System 10.4u SDK is missing. For details, see build instructions at"
- echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
- return 1
-fi
-
-if [ ! -d /Developer/SDKs/MacOSX10.5.sdk/ ]; then
- echo "ERROR: System 10.5 SDK is missing. For details, see build instructions at"
- echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
- return 1
-fi
-
-export PATH=/usr/local/bin:$PATH
-export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
-export LDFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
-export CPPFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export CFLAGS="-arch ppc -D_NONSTD_SOURCE -isystem /Developer/SDKs/MacOSX10.4u.sdk -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"
-export MACOSX_DEPLOYMENT_TARGET=10.3
-
-./configure --disable-shared --host=ppc
-if [ $? -ne 0 ]; then return 1; fi
-
-rm -f libjpeg_ppc.a
-rm -f libjpeg_i386.a
-rm -f libjpeg_x86_64.a
-rm -f libjpeg.a
-make clean
-
-make -e
-if [ $? -ne 0 ]; then return 1; fi
-mv -f libjpeg.a libjpeg_ppc.a
-
-make clean
-if [ $? -ne 0 ]; then return 1; fi
-
-export PATH=/usr/local/bin:$PATH
-export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
-export LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386"
-export CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"
-export MACOSX_DEPLOYMENT_TARGET=10.4
-
-./configure --disable-shared --host=i386
-if [ $? -ne 0 ]; then return 1; fi
-
-
-make -e
-if [ $? -ne 0 ]; then return 1; fi
-mv libjpeg.a libjpeg_i386.a
-
-# Build for x86_64 architecture using OS 10.5 SDK
-make clean
-if [ $? -ne 0 ]; then return 1; fi
-
-export PATH=/usr/local/bin:$PATH
-export CC=/usr/bin/gcc-4.0;export CXX=/usr/bin/g++-4.0
-export LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64"
-export CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1030 -DMAC_OS_X_VERSION_MIN_REQUIRED=1030"
-export SDKROOT="/Developer/SDKs/MacOSX10.5.sdk"
-export MACOSX_DEPLOYMENT_TARGET=10.5
-
-./configure --disable-shared --host=x86_64
-if [ $? -ne 0 ]; then return 1; fi
-
-
-make -e
-if [ $? -ne 0 ]; then return 1; fi
-
-mv libjpeg.a libjpeg_x86_64.a
-
-
-lipo -create libjpeg_i386.a libjpeg_ppc.a libjpeg_x86_64.a -output libjpeg.a
-
-if [ $? -ne 0 ]; then return 1; fi
-
-export CC="";export CXX=""
-export LDFLAGS=""
-export CPPFLAGS=""
-export CFLAGS=""
-export SDKROOT=""
-
-return 0
diff --git a/mac_build/buildopenssl.sh b/mac_build/buildopenssl.sh
index eb3e83fe1b..484cbcbcf3 100644
--- a/mac_build/buildopenssl.sh
+++ b/mac_build/buildopenssl.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2021 University of California
+# Copyright (C) 2023 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
@@ -38,6 +38,7 @@
# Updated 12/24/20 for openssl-1.1.0l
# Updated 5/18/21 for compatibility with zsh
# Updated 10/18/21 for building OpenSSL 3.0.0
+# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
#
## Building OpenSSL 3.0 requires Xcode 10.2 or later
#
@@ -102,14 +103,14 @@ if [ "${doclean}" != "yes" ]; then
lipo "${libPath}/libcrypto.a" -verify_arch x86_64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ] && [ $GCC_can_build_arm64 = "yes" ]; then
lipo "${libPath}/libssl.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
lipo "${libPath}/libcrypto.a" -verify_arch arm64
if [ $? -ne 0 ]; then alreadyBuilt=0; doclean="yes"; fi
fi
-
+
if [ $alreadyBuilt -eq 1 ]; then
cwd=$(pwd)
dirname=${cwd##*/}
@@ -155,7 +156,7 @@ echo ""
# Build for x86_64 architecture
-## avx-512 cpu extensions are first supported in Xcode 10.2, but there is a bug in
+## avx-512 cpu extensions are first supported in Xcode 10.2, but there is a bug in
## crypto/bn/asm/rsaz-avx512.pl which causes OpenSSL to try to build with avx-512
## instructions on earlier versions of Xcode, causing many build errors. In those
## cases, we patch rsaz-avx512.pl to prevent that.
@@ -175,14 +176,14 @@ if [[ $major -lt 10 || ($major -eq 10 && $minor -lt 2 ) ]]; then
# Disable avx-512 support because not available in this Xcode verson
rm -f crypto/bn/asm/rsaz-avx512.pl.orig
rm -f /tmp/rsaz-avx512_pl_diff
- # We must escape all the $ as \$ in the diff for the shell to treat them as literals
+ # We must escape all the $ as \$ in the diff for the shell to treat them as literals
cat >> /tmp/rsaz-avx512_pl_diff << ENDOFFILE
--- /Volumes/Dev/BOINC_GIT/openssl-3.0.0-patched/crypto/bn/asm/rsaz-avx512-orig.pl 2021-09-07 04:46:32.000000000 -0700
+++ /Volumes/Dev/BOINC_GIT/openssl-3.0.0-patched/crypto/bn/asm/rsaz-avx512.pl 2021-10-14 01:16:23.000000000 -0700
@@ -52,6 +52,9 @@
\$avx512ifma = (\$2>=7.0);
}
-
+
+# Disable avx-512 support because not available in this Xcode verson
+\$avx512ifma = 0;
+
@@ -207,10 +208,10 @@ echo ""
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export CPPFLAGS=""
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
-export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
-export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
+export MACOSX_DEPLOYMENT_TARGET=10.13
export LIBRARY_PATH="${SDKPATH}/usr/lib"
if [ "x${lprefix}" != "x" ]; then
@@ -234,11 +235,11 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
- export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
- export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000"
+ export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+ export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
+ export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
export SDKROOT="${SDKPATH}"
- export MACOSX_DEPLOYMENT_TARGET=10.10
+ export MACOSX_DEPLOYMENT_TARGET=10.13
export LIBRARY_PATH="${SDKPATH}/usr/lib"
if [ "x${lprefix}" != "x" ]; then
@@ -281,8 +282,8 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
rm -f libcrypto_x86_64.a libcrypto_arm64.a
rm -f libssl_x86_64.a libssl_arm64.a
- ## openssl 1.1.0g does not have a configure option for darwin arm64, so we
- ## patched Configurations/10-main.conf to add it.
+ ## openssl 1.1.0g does not have a configure option for darwin arm64, so we
+ ## patched Configurations/10-main.conf to add it.
## NOTE: At the time of writing, I do not have an arm64 Mac to test with.
# Revisit this if a newer version of openssl becomes available.
#
diff --git a/samples/example_app/MakeMacExample.sh b/samples/example_app/MakeMacExample.sh
index b567bab40f..7c49b5f058 100644
--- a/samples/example_app/MakeMacExample.sh
+++ b/samples/example_app/MakeMacExample.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2020 University of California
+# Copyright (C) 2023 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
@@ -21,46 +21,88 @@
# Script to build Macintosh example_app using Makefile
#
# by Charlie Fenton 2/16/10
-# Updated 10/11/10 for XCode 3.2 and OS 10.6
+# Updated 10/11/10 for XCode 3.2 and OS 10.6
# Updated 7/12/12 for Xcode 4.3 and later which are not at a fixed address
# Updated 8/3/12 for TrueType fonts
# Updated 11/8/12 to add slide_show
# Updated 4/14/15 to fix build instructions
# Updated 4/30/20 for Xcode 11
+# Updated 2/6/23 to build Universal M1 / x86_64 binary
#
## This script requires OS 10.7 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
+## 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
-## This file assumes the locations of the needed libraries are those
+## This file assumes the locations of the needed libraries are those
## resulting from following the instructions found in the file:
## boinc/mac_build/HowToBuildBOINC_XCode.rtf
##
## In Terminal, CD to the example_app directory.
## cd [path]/example_app/
## then run this script:
-## sh [path]/MakeMacExample.sh
+## source [path]/MakeMacExample.sh
##
+# checks if a given path is canonical (absolute and does not contain relative links)
+# from http://unix.stackexchange.com/a/256437
+isPathCanonical() {
+ case "x$1" in
+ (x*/..|x*/../*|x../*|x*/.|x*/./*|x./*)
+ rc=1
+ ;;
+ (x/*)
+ rc=0
+ ;;
+ (*)
+ rc=1
+ ;;
+ esac
+ return $rc
+}
+
+while [[ $# -gt 0 ]]; do
+ key="$1"
+ case $key in
+ --cache_dir)
+ cache_dir="$2"
+ shift
+ ;;
+ *)
+ echo "unrecognized option $key"
+ ;;
+ esac
+ shift # past argument or value
+done
+
+PREFIX=""
+if [ "x$cache_dir" != "x" ]; then
+ if isPathCanonical "$cache_dir" && [ "$cache_dir" != "/" ]; then
+ PREFIX="$cache_dir"
+ else
+ echo "cache_dir must be an absolute path without ./ or ../ in it"
+ return 1
+ fi
+fi
+
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
- exit 1
+ return $?
fi
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
- exit 1
+ return $?
fi
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
- exit 1
+ return $?
fi
TOOLSPATH1=${MAKEPATH%/make}
@@ -68,7 +110,7 @@ TOOLSPATH1=${MAKEPATH%/make}
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
- exit 1
+ return $?
fi
TOOLSPATH2=${ARPATH%/ar}
@@ -87,14 +129,15 @@ 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=1070 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -fvisibility=hidden -fvisibility-inlines-hidden"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.7
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export PREFIX="${PREFIX}"
make -f Makefile_mac clean
make -f Makefile_mac all
-if [ $? -ne 0 ]; then exit 1; fi
+if [ $? -ne 0 ]; then return $?; fi
mkdir x86_64
mv uc2 x86_64/
@@ -106,6 +149,33 @@ rm -f ttfont.o
rm -f uc2_graphics.o
rm -f slide_show.o
+echo
+echo "***************************************************"
+echo "******* Building arm64 Application *********"
+echo "***************************************************"
+echo
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -fvisibility=hidden -fvisibility-inlines-hidden"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.13
+
+make -f Makefile_mac clean
+make -f Makefile_mac all
+
+if [ $? -ne 0 ]; then return $?; fi
+
+mkdir arm64
+mv uc2 arm64/
+mv uc2_graphics arm64/
+mv slide_show arm64/
+
+rm -f uc2.o
+rm -f ttfont.o
+rm -f uc2_graphics.o
+rm -f slide_show.o
+
echo
echo "***************************************************"
echo "**************** Build Succeeded! *****************"
@@ -115,8 +185,8 @@ echo
export CC="";export CXX=""
export LDFLAGS=""
export CPPFLAGS=""
+export CXXFLAGS=""
export CFLAGS=""
export SDKROOT=""
-exit 0
-
+return 0
diff --git a/samples/example_app/Makefile_mac b/samples/example_app/Makefile_mac
index 2e6556eb13..2131fea5b5 100644
--- a/samples/example_app/Makefile_mac
+++ b/samples/example_app/Makefile_mac
@@ -6,9 +6,10 @@
# Updated 11/8/12 to add slide_show
# Updated 4/14/15 for compatibility with Xcode 6
# Updated 4/30/20 for compatibility with Xcode 11 and OS 10.13
+# Updated 2/6/23 to unify linked libraries and update freetype library dependency
#
## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
-## This file assumes the locations of the needed libraries are those
+## This file assumes the locations of the needed libraries are those
## resulting from following the instructions found in the file:
## boinc/mac_build/HowToBuildBOINC_XCode.rtf
#
@@ -19,7 +20,7 @@ BOINC_LIB_DIR = $(BOINC_DIR)/lib
BOINC_ZIP_DIR = $(BOINC_DIR)/zip
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
-FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.4.10
+FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.11.0
FTGL_DIR = $(BOINC_DIR)/../ftgl-2.1.3~rc5
FRAMEWORKS_DIR = /System/Library/Frameworks
@@ -34,9 +35,12 @@ CXXFLAGS = $(VARIANTFLAGS) \
-I$(BOINC_ZIP_DIR) \
-I$(FREETYPE_DIR)/include \
-I$(FTGL_DIR)/src \
+ -I$(PREFIX)/include \
+ -I$(PREFIX)/include/freetype2 \
-L$(BOINC_BUILD_DIR) \
- -L$(FREETYPE_DIR)//objs/.libs \
+ -L$(FREETYPE_DIR)/objs/.libs \
-L$(FTGL_DIR)/src/.libs \
+ -L$(PREFIX)/lib \
-L.
OBJ = \
@@ -51,7 +55,7 @@ all: $(PROGS)
clean:
/bin/rm -f $(PROGS) $(OBJ)
-
+
uc2.o: uc2.cpp
$(CXX) $(CXXFLAGS) -c uc2.cpp
@@ -78,4 +82,4 @@ slide_show: slide_show.o $(BOINC_BUILD_DIR)/libboinc.a\
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o slide_show slide_show.o\
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
-framework AppKit -framework GLUT -framework OpenGL -framework IOSurface
-
+
diff --git a/samples/example_app/Makefile_mac2 b/samples/example_app/Makefile_mac2
index 2afc6d65d0..1e93be6cae 100644
--- a/samples/example_app/Makefile_mac2
+++ b/samples/example_app/Makefile_mac2
@@ -4,8 +4,9 @@
# Updated 11/8/12 to add slide_show
# Updated 4/14/15 for compatibility with Xcode 6
# Updated 4/30/20 for compatibility with Xcode 11 and OS 10.13
+# Updated 2/6/23 added arm64 support
#
-## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
+## First, build the BOINC libraries using boinc/mac_build/BuildMacBOINC.sh
## This file assumes the locations of the needed libraries are those
## resulting from following the instructions found in the file:
## boinc/mac_build/HowToBuildBOINC_XCode.rtf
@@ -20,80 +21,118 @@ BOINC_API_DIR = $(BOINC_DIR)/api
BOINC_LIB_DIR = $(BOINC_DIR)/lib
BOINC_ZIP_DIR = $(BOINC_DIR)/zip
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
-BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
-FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.4.10
+BOINC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
+FREETYPE_DIR = $(BOINC_DIR)/../freetype-2.11.0
FTGL_DIR = $(BOINC_DIR)/../ftgl-2.1.3~rc5
FRAMEWORKS_DIR = /System/Library/Frameworks
CXXFLAGS_ALL = \
+ $(ISYSROOT) \
-g \
- -stdlib=libc++ \
+ -stdlib=libc++ \
-DAPP_GRAPHICS \
+ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 \
+ -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 \
+ -fvisibility=hidden \
+ -fvisibility-inlines-hidden \
-I$(BOINC_CONFIG_DIR) \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
-I$(BOINC_ZIP_DIR) \
-I$(FREETYPE_DIR)/include \
- -I$(FTGL_DIR)/src
-
+ -I$(PREFIX)/include/freetype2 \
+ -I$(FTGL_DIR)/src \
+ -I$(PREFIX)/include
+
LDFLAGS_ALL = \
+ $(SYSLIBROOT) \
-Wl,-L$(BOINC_BUILD_DIR) \
-Wl,-L$(FREETYPE_DIR)/objs/.libs \
-Wl,-L$(FTGL_DIR)/src/.libs \
- -Wl,-L/usr/lib \
- -Wl,-L.
+ -Wl,-L$(PREFIX)/lib \
+ -Wl,-L. \
+ -Wl,-L/usr/lib
-CXXFLAGS_x86_64 = -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 \
- $(CXXFLAGS_ALL) -fvisibility=hidden -fvisibility-inlines-hidden
+CXXFLAGS_x86_64 = -arch x86_64 $(CXXFLAGS_ALL)
LDFLAGS_x86_64 = -Wl,-arch,x86_64 $(LDFLAGS_ALL)
+CXXFLAGS_arm64 = -arch arm64 $(CXXFLAGS_ALL)
+LDFLAGS_arm64 = -Wl,-arch,arm64 $(LDFLAGS_ALL)
+
OBJ = \
uc2_x86_64.o \
ttfont_x86_64.o \
uc2_graphics_x86_64.o \
- slide_show_x86_64.o
+ slide_show_x86_64.o \
+ uc2_arm64.o \
+ ttfont_arm64.o \
+ uc2_graphics_arm64.o \
+ slide_show_arm64.o
PROGS = \
- uc2_x86_64 uc2_graphics_x86_64 slide_show_x86_64
+ uc2_x86_64 uc2_graphics_x86_64 slide_show_x86_64 uc2_arm64 uc2_graphics_arm64 slide_show_arm64
all: $(PROGS)
clean:
/bin/rm -f $(PROGS) $(OBJ)
-uc2_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.5
-uc2_graphics_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.7
-slide_show_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.7
+uc2_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.13
+uc2_graphics_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.13
+slide_show_x86_64: export MACOSX_DEPLOYMENT_TARGET=10.13
+uc2_arm64: export MACOSX_DEPLOYMENT_TARGET=10.13
+uc2_graphics_arm64: export MACOSX_DEPLOYMENT_TARGET=10.13
+slide_show_arm64: export MACOSX_DEPLOYMENT_TARGET=10.13
-target uc2_x86_64: MACOSX_DEPLOYMENT_TARGET=10.7
+# target uc2_x86_64: MACOSX_DEPLOYMENT_TARGET=10.13
uc2_x86_64.o: uc2.cpp
- $(CXX) -c $(CXXFLAGS_x86_64) uc2.cpp -o uc2_x86_64.o
+ $(CXX) $(CXXFLAGS_x86_64) -c uc2.cpp -o uc2_x86_64.o
+uc2_arm64.o: uc2.cpp
+ $(CXX) $(CXXFLAGS_arm64) -c uc2.cpp -o uc2_arm64.o
ttfont_x86_64.o: $(BOINC_API_DIR)/ttfont.cpp
- $(CXX) -c $(CXXFLAGS_x86_64) $(BOINC_API_DIR)/ttfont.cpp -o ttfont_x86_64.o
+ $(CXX) $(CXXFLAGS_x86_64) -c $(BOINC_API_DIR)/ttfont.cpp -o ttfont_x86_64.o
+ttfont_arm64.o: $(BOINC_API_DIR)/ttfont.cpp
+ $(CXX) $(CXXFLAGS_arm64) -c $(BOINC_API_DIR)/ttfont.cpp -o ttfont_arm64.o
uc2_graphics_x86_64.o: uc2_graphics.cpp
- $(CXX) -c $(CXXFLAGS_x86_64) uc2_graphics.cpp -o uc2_graphics_x86_64.o
+ $(CXX) $(CXXFLAGS_x86_64) -c uc2_graphics.cpp -o uc2_graphics_x86_64.o
+uc2_graphics_arm64.o: uc2_graphics.cpp
+ $(CXX) $(CXXFLAGS_arm64) -c uc2_graphics.cpp -o uc2_graphics_arm64.o
slide_show_x86_64.o: slide_show.cpp
$(CXX) $(CXXFLAGS_x86_64) -c slide_show.cpp -o slide_show_x86_64.o
+slide_show_arm64.o: slide_show.cpp
+ $(CXX) $(CXXFLAGS_arm64) -c slide_show.cpp -o slide_show_arm64.o
uc2_x86_64: uc2_x86_64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_x86_64 uc2_x86_64.o -lboinc_api -lboinc
+uc2_arm64: uc2_arm64.o $(BOINC_BUILD_DIR)/libboinc_api.a $(BOINC_BUILD_DIR)/libboinc.a
+ $(CXX) $(CXXFLAGS_arm64) $(LDFLAGS_arm64) -o uc2_arm64 uc2_arm64.o -lboinc_api -lboinc
uc2_graphics_x86_64: uc2_graphics_x86_64.o ttfont_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a\
- $(BOINC_BUILD_DIR)/libboinc_graphics2.a $(FREETYPE_DIR/objs/.libs/libfreetype.a\
- $(FTGL_DIR)/src/.libs/libftgl.a
+ $(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o uc2_graphics_x86_64\
uc2_graphics_x86_64.o ttfont_x86_64.o -lboinc_graphics2 -lboinc_api -lboinc -ljpeg\
-lfreetype -lftgl -lz -lbz2 -framework AppKit -framework GLUT -framework OpenGL\
- -framework IOSurface
+ -framework IOSurface
+uc2_graphics_arm64: uc2_graphics_arm64.o ttfont_arm64.o $(BOINC_BUILD_DIR)/libboinc.a\
+ $(BOINC_BUILD_DIR)/libboinc_graphics2.a
+ $(CXX) $(CXXFLAGS_arm64) $(LDFLAGS_arm64) -o uc2_graphics_arm64\
+ uc2_graphics_arm64.o ttfont_arm64.o -lboinc_graphics2 -lboinc_api -lboinc -ljpeg\
+ -lfreetype -lftgl -lz -lbz2 -framework AppKit -framework GLUT -framework OpenGL\
+ -framework IOSurface
slide_show_x86_64: slide_show_x86_64.o $(BOINC_BUILD_DIR)/libboinc.a\
$(BOINC_BUILD_DIR)/libboinc_graphics2.a
$(CXX) $(CXXFLAGS_x86_64) $(LDFLAGS_x86_64) -o slide_show_x86_64 slide_show_x86_64.o\
-lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
-framework AppKit -framework GLUT -framework OpenGL -framework IOSurface
+slide_show_arm64: slide_show_arm64.o $(BOINC_BUILD_DIR)/libboinc.a\
+ $(BOINC_BUILD_DIR)/libboinc_graphics2.a
+ $(CXX) $(CXXFLAGS_arm64) $(LDFLAGS_arm64) -o slide_show_arm64 slide_show_arm64.o\
+ -lboinc_graphics2 -lboinc_api -lboinc -ljpeg -lboinc_zip\
+ -framework AppKit -framework GLUT -framework OpenGL -framework IOSurface
diff --git a/samples/example_app/ReadMe.txt b/samples/example_app/ReadMe.txt
index 836566ac66..86f2739ae6 100644
--- a/samples/example_app/ReadMe.txt
+++ b/samples/example_app/ReadMe.txt
@@ -13,7 +13,7 @@ After building the libraries, there are three ways to build the example_app samp
[1] Run the MakeMacExample.sh script in this example_app directory (which will invoke the makefile Makefile_mac):
cd [path]/samples/example_app/
-sh MakeMacExample.sh
+source MakeMacExample.sh
[2] Invoke the stand-alone makefile Makefile_mac2 directly:
cd [path]/samples/example_app/
diff --git a/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj b/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj
index 17dedb69f4..23efd6e8d8 100644
--- a/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj
+++ b/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj
@@ -40,57 +40,6 @@
DDF8050615CB9C75005473CC /* ttfont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF8050315CB9C75005473CC /* ttfont.cpp */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildRule section */
- DDC4796E15AC56CA0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.c;
- isEditable = 1;
- outputFiles = (
- );
- };
- DDC4796F15AC56CA0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.cpp;
- isEditable = 1;
- outputFiles = (
- );
- };
- DDC4797015AC56CA0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.asm;
- isEditable = 1;
- outputFiles = (
- );
- };
- DDC479B415AC56EB0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.c;
- isEditable = 1;
- outputFiles = (
- );
- };
- DDC479B515AC56EB0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.cpp;
- isEditable = 1;
- outputFiles = (
- );
- };
- DDC479B615AC56EB0022401F /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.asm;
- isEditable = 1;
- outputFiles = (
- );
- };
-/* End PBXBuildRule section */
-
/* Begin PBXContainerItemProxy section */
DD5937AA164D1759001D94A5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -120,13 +69,13 @@
DD1194AE0F42CAF400C2BC25 /* checkin_notes_samples */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = checkin_notes_samples; path = ../../checkin_notes_samples; sourceTree = SOURCE_ROOT; };
DD1194AF0F42CB4900C2BC25 /* uc2_graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = uc2_graphics.cpp; path = ../example_app/uc2_graphics.cpp; sourceTree = SOURCE_ROOT; };
DD1194B10F42CB5400C2BC25 /* uc2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = uc2.cpp; path = ../example_app/uc2.cpp; sourceTree = SOURCE_ROOT; };
- DD5937A8164D16CE001D94A5 /* slide_show_x86_64-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "slide_show_x86_64-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
+ DD5937A8164D16CE001D94A5 /* slide_show-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "slide_show-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
DD760E65094E56DB002CACC4 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
DD760E66094E56DB002CACC4 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = ""; };
DD760E67094E56DB002CACC4 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
DD84C6F90C856C0E000EBEC4 /* uc2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = uc2.h; path = ../example_app/uc2.h; sourceTree = SOURCE_ROOT; };
- DDC4797515AC56CA0022401F /* UC2_x86_64-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "UC2_x86_64-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
- DDC479BB15AC56EB0022401F /* UC2_graphics_x86_64-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "UC2_graphics_x86_64-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
+ DDC4797515AC56CA0022401F /* UC2-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "UC2-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
+ DDC479BB15AC56EB0022401F /* UC2_graphics-apple-darwin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "UC2_graphics-apple-darwin"; sourceTree = BUILT_PRODUCTS_DIR; };
DDDE391524600EAF005FCEFA /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = ../../../../../../System/Library/Frameworks/IOSurface.framework; sourceTree = ""; };
DDF8050315CB9C75005473CC /* ttfont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ttfont.cpp; path = ../../api/ttfont.cpp; sourceTree = ""; };
DDF8050415CB9C75005473CC /* ttfont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ttfont.h; path = ../../api/ttfont.h; sourceTree = ""; };
@@ -194,9 +143,9 @@
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
- DDC4797515AC56CA0022401F /* UC2_x86_64-apple-darwin */,
- DDC479BB15AC56EB0022401F /* UC2_graphics_x86_64-apple-darwin */,
- DD5937A8164D16CE001D94A5 /* slide_show_x86_64-apple-darwin */,
+ DDC4797515AC56CA0022401F /* UC2-apple-darwin */,
+ DDC479BB15AC56EB0022401F /* UC2_graphics-apple-darwin */,
+ DD5937A8164D16CE001D94A5 /* slide_show-apple-darwin */,
);
name = Products;
sourceTree = "";
@@ -232,9 +181,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- DD59379D164D16CE001D94A5 /* slide_show-x86_64 */ = {
+ DD59379D164D16CE001D94A5 /* slide_show */ = {
isa = PBXNativeTarget;
- buildConfigurationList = DD5937A5164D16CE001D94A5 /* Build configuration list for PBXNativeTarget "slide_show-x86_64" */;
+ buildConfigurationList = DD5937A5164D16CE001D94A5 /* Build configuration list for PBXNativeTarget "slide_show" */;
buildPhases = (
DD59379E164D16CE001D94A5 /* Sources */,
DD5937A0164D16CE001D94A5 /* Frameworks */,
@@ -244,51 +193,45 @@
);
dependencies = (
);
- name = "slide_show-x86_64";
+ name = slide_show;
productName = slide_show;
- productReference = DD5937A8164D16CE001D94A5 /* slide_show_x86_64-apple-darwin */;
+ productReference = DD5937A8164D16CE001D94A5 /* slide_show-apple-darwin */;
productType = "com.apple.product-type.tool";
};
- DDC4796515AC56CA0022401F /* UC2-x86_64 */ = {
+ DDC4796515AC56CA0022401F /* UC2 */ = {
isa = PBXNativeTarget;
- buildConfigurationList = DDC4797115AC56CA0022401F /* Build configuration list for PBXNativeTarget "UC2-x86_64" */;
+ buildConfigurationList = DDC4797115AC56CA0022401F /* Build configuration list for PBXNativeTarget "UC2" */;
buildPhases = (
DDC4796615AC56CA0022401F /* Sources */,
DDC4796815AC56CA0022401F /* Frameworks */,
DD7A737B15AD66D8004F2841 /* ShellScript */,
);
buildRules = (
- DDC4796E15AC56CA0022401F /* PBXBuildRule */,
- DDC4796F15AC56CA0022401F /* PBXBuildRule */,
- DDC4797015AC56CA0022401F /* PBXBuildRule */,
);
dependencies = (
);
- name = "UC2-x86_64";
+ name = UC2;
productInstallPath = "$(HOME)/bin";
productName = UpperCase;
- productReference = DDC4797515AC56CA0022401F /* UC2_x86_64-apple-darwin */;
+ productReference = DDC4797515AC56CA0022401F /* UC2-apple-darwin */;
productType = "com.apple.product-type.tool";
};
- DDC4797715AC56EB0022401F /* UC2Gfx-x86_64 */ = {
+ DDC4797715AC56EB0022401F /* UC2Gfx */ = {
isa = PBXNativeTarget;
- buildConfigurationList = DDC479B715AC56EB0022401F /* Build configuration list for PBXNativeTarget "UC2Gfx-x86_64" */;
+ buildConfigurationList = DDC479B715AC56EB0022401F /* Build configuration list for PBXNativeTarget "UC2Gfx" */;
buildPhases = (
DDC4797815AC56EB0022401F /* Sources */,
DDC479AF15AC56EB0022401F /* Frameworks */,
DD7A737C15AD66E2004F2841 /* ShellScript */,
);
buildRules = (
- DDC479B415AC56EB0022401F /* PBXBuildRule */,
- DDC479B515AC56EB0022401F /* PBXBuildRule */,
- DDC479B615AC56EB0022401F /* PBXBuildRule */,
);
dependencies = (
);
- name = "UC2Gfx-x86_64";
+ name = UC2Gfx;
productInstallPath = "$(HOME)/bin";
productName = UpperCase;
- productReference = DDC479BB15AC56EB0022401F /* UC2_graphics_x86_64-apple-darwin */;
+ productReference = DDC479BB15AC56EB0022401F /* UC2_graphics-apple-darwin */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
@@ -313,9 +256,9 @@
projectRoot = "";
targets = (
DD84C71E0C856D9E000EBEC4 /* Build_All */,
- DDC4796515AC56CA0022401F /* UC2-x86_64 */,
- DDC4797715AC56EB0022401F /* UC2Gfx-x86_64 */,
- DD59379D164D16CE001D94A5 /* slide_show-x86_64 */,
+ DDC4796515AC56CA0022401F /* UC2 */,
+ DDC4797715AC56EB0022401F /* UC2Gfx */,
+ DD59379D164D16CE001D94A5 /* slide_show */,
);
};
/* End PBXProject section */
@@ -332,7 +275,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 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";
+ 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\" = \"Deployment\" ]; 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";
};
DD7A737B15AD66D8004F2841 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -345,7 +288,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 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";
+ 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\" = \"Deployment\" ]; 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";
};
DD7A737C15AD66E2004F2841 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -358,7 +301,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 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";
+ 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\" = \"Deployment\" ]; 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 */
@@ -393,29 +336,26 @@
/* Begin PBXTargetDependency section */
DD5937AB164D1759001D94A5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = DD59379D164D16CE001D94A5 /* slide_show-x86_64 */;
+ target = DD59379D164D16CE001D94A5 /* slide_show */;
targetProxy = DD5937AA164D1759001D94A5 /* PBXContainerItemProxy */;
};
DDC479BE15AC57BC0022401F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = DDC4796515AC56CA0022401F /* UC2-x86_64 */;
+ target = DDC4796515AC56CA0022401F /* UC2 */;
targetProxy = DDC479BD15AC57BC0022401F /* PBXContainerItemProxy */;
};
DDC479C015AC57C40022401F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = DDC4797715AC56EB0022401F /* UC2Gfx-x86_64 */;
+ target = DDC4797715AC56EB0022401F /* UC2Gfx */;
targetProxy = DDC479BF15AC57C40022401F /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
- DD5937A6164D16CE001D94A5 /* Debug */ = {
+ DD5937A6164D16CE001D94A5 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = YES;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -443,10 +383,6 @@
);
LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/;
ONLY_ACTIVE_ARCH = YES;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc_graphics2",
@@ -454,17 +390,14 @@
"-ljpeg",
"-lboinc_zip",
);
- PRODUCT_NAME = "slide_show_x86_64-apple-darwin";
+ PRODUCT_NAME = "slide_show-apple-darwin";
};
- name = Debug;
+ name = Development;
};
- DD5937A7164D16CE001D94A5 /* Release */ = {
+ DD5937A7164D16CE001D94A5 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = YES;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -486,10 +419,6 @@
../../clientgui/mac,
);
LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc_graphics2",
@@ -497,79 +426,67 @@
"-ljpeg",
"-lboinc_zip",
);
- PRODUCT_NAME = "slide_show_x86_64-apple-darwin";
+ PRODUCT_NAME = "slide_show-apple-darwin";
};
- name = Release;
+ name = Deployment;
};
- DD6341050973C81800B1057F /* Debug */ = {
+ DD6341050973C81800B1057F /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc",
);
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
- VALID_ARCHS = x86_64;
+ USE_HEADERMAP = NO;
};
- name = Debug;
+ name = Development;
};
- DD63410C0973C84A00B1057F /* Release */ = {
+ DD63410C0973C84A00B1057F /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc",
);
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = YES;
- VALID_ARCHS = x86_64;
+ USE_HEADERMAP = NO;
};
- name = Release;
+ name = Deployment;
};
- DD84C7290C856DBB000EBEC4 /* Debug */ = {
+ DD84C7290C856DBB000EBEC4 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = Build_All;
};
- name = Debug;
+ name = Development;
};
- DD84C72B0C856DBB000EBEC4 /* Release */ = {
+ DD84C72B0C856DBB000EBEC4 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = Build_All;
};
- name = Release;
+ name = Deployment;
};
- DDC4797215AC56CA0022401F /* Debug */ = {
+ DDC4797215AC56CA0022401F /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LIBRARY = "libc++";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -581,24 +498,16 @@
../../clientgui/mac,
);
LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
- PREBINDING = NO;
- PRODUCT_NAME = "UC2_x86_64-apple-darwin";
- ZERO_LINK = NO;
+ OTHER_CFLAGS = "";
+ PRODUCT_NAME = "UC2-apple-darwin";
};
- name = Debug;
+ name = Development;
};
- DDC4797315AC56CA0022401F /* Release */ = {
+ DDC4797315AC56CA0022401F /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LIBRARY = "libc++";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_MODEL_TUNING = G5;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -609,21 +518,14 @@
../../clientgui/mac,
);
LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- );
- PREBINDING = NO;
- PRODUCT_NAME = "UC2_x86_64-apple-darwin";
- ZERO_LINK = NO;
+ OTHER_CFLAGS = "";
+ PRODUCT_NAME = "UC2-apple-darwin";
};
- name = Release;
+ name = Deployment;
};
- DDC479B815AC56EB0022401F /* Debug */ = {
+ DDC479B815AC56EB0022401F /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LIBRARY = "libc++";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
@@ -631,13 +533,12 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
- "../../../freetype-2.4.10/include",
+ "../../../freetype-2.11.0/include",
"../../../ftgl-2.1.3~rc5/src",
../..,
../../lib,
@@ -645,45 +546,39 @@
../../clientgui/mac,
);
INSTALL_PATH = "$(HOME)/bin";
- LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- "-DHAVE_STDLIB_H",
+ LIBRARY_SEARCH_PATHS = (
+ ../../mac_build/build/Development/,
+ "../../../freetype-2.11.0/objs/.libs",
+ "../../../ftgl-2.1.3~rc5/src/.libs",
);
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc_graphics2",
"-lboinc",
"-ljpeg",
- "../../../freetype-2.4.10/objs/.libs/libfreetype.a",
- "../../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
+ "-lfreetype",
+ "-lftgl",
"-lz",
"-lbz2",
);
- PREBINDING = NO;
- PRODUCT_NAME = "UC2_graphics_x86_64-apple-darwin";
- ZERO_LINK = NO;
+ PRODUCT_NAME = "UC2_graphics-apple-darwin";
};
- name = Debug;
+ name = Development;
};
- DDC479B915AC56EB0022401F /* Release */ = {
+ DDC479B915AC56EB0022401F /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LIBRARY = "libc++";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
);
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
- GCC_MODEL_TUNING = G5;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
- "../../../freetype-2.4.10/include",
+ "../../../freetype-2.11.0/include",
"../../../ftgl-2.1.3~rc5/src",
../..,
../../lib,
@@ -691,75 +586,72 @@
../../clientgui/mac,
);
INSTALL_PATH = "$(HOME)/bin";
- LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/;
- OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
- "-DHAVE_STDLIB_H",
+ LIBRARY_SEARCH_PATHS = (
+ ../../mac_build/build/Deployment/,
+ "../../../freetype-2.11.0/objs/.libs",
+ "../../../ftgl-2.1.3~rc5/src/.libs",
);
OTHER_LDFLAGS = (
"-lboinc_api",
"-lboinc_graphics2",
"-lboinc",
"-ljpeg",
- "../../../freetype-2.4.10/objs/.libs/libfreetype.a",
- "../../../ftgl-2.1.3~rc5/src/.libs/libftgl.a",
+ "-lfreetype",
+ "-lftgl",
"-lz",
"-lbz2",
);
- PREBINDING = NO;
- PRODUCT_NAME = "UC2_graphics_x86_64-apple-darwin";
- ZERO_LINK = NO;
+ PRODUCT_NAME = "UC2_graphics-apple-darwin";
};
- name = Release;
+ name = Deployment;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- DD5937A5164D16CE001D94A5 /* Build configuration list for PBXNativeTarget "slide_show-x86_64" */ = {
+ DD5937A5164D16CE001D94A5 /* Build configuration list for PBXNativeTarget "slide_show" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DD5937A6164D16CE001D94A5 /* Debug */,
- DD5937A7164D16CE001D94A5 /* Release */,
+ DD5937A6164D16CE001D94A5 /* Development */,
+ DD5937A7164D16CE001D94A5 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Debug;
+ defaultConfigurationName = Development;
};
DD6341040973C81800B1057F /* Build configuration list for PBXProject "UpperCase2" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DD6341050973C81800B1057F /* Debug */,
- DD63410C0973C84A00B1057F /* Release */,
+ DD6341050973C81800B1057F /* Development */,
+ DD63410C0973C84A00B1057F /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Debug;
+ defaultConfigurationName = Development;
};
DD84C7280C856DBB000EBEC4 /* Build configuration list for PBXAggregateTarget "Build_All" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DD84C7290C856DBB000EBEC4 /* Debug */,
- DD84C72B0C856DBB000EBEC4 /* Release */,
+ DD84C7290C856DBB000EBEC4 /* Development */,
+ DD84C72B0C856DBB000EBEC4 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Debug;
+ defaultConfigurationName = Development;
};
- DDC4797115AC56CA0022401F /* Build configuration list for PBXNativeTarget "UC2-x86_64" */ = {
+ DDC4797115AC56CA0022401F /* Build configuration list for PBXNativeTarget "UC2" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DDC4797215AC56CA0022401F /* Debug */,
- DDC4797315AC56CA0022401F /* Release */,
+ DDC4797215AC56CA0022401F /* Development */,
+ DDC4797315AC56CA0022401F /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Debug;
+ defaultConfigurationName = Development;
};
- DDC479B715AC56EB0022401F /* Build configuration list for PBXNativeTarget "UC2Gfx-x86_64" */ = {
+ DDC479B715AC56EB0022401F /* Build configuration list for PBXNativeTarget "UC2Gfx" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DDC479B815AC56EB0022401F /* Debug */,
- DDC479B915AC56EB0022401F /* Release */,
+ DDC479B815AC56EB0022401F /* Development */,
+ DDC479B915AC56EB0022401F /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Debug;
+ defaultConfigurationName = Development;
};
/* End XCConfigurationList section */
};
diff --git a/samples/openclapp/Makefile_mac b/samples/openclapp/Makefile_mac
index a71772484e..216dba7d84 100644
--- a/samples/openclapp/Makefile_mac
+++ b/samples/openclapp/Makefile_mac
@@ -4,23 +4,29 @@
# make -f Makefile_mac [clean] all
#
# Updated 4/14/15 for compatibility with Xcode 6
+# Updated 2/6/23 to add arm64 support
BOINC_DIR = ../..
BOINC_API_DIR = $(BOINC_DIR)/api
-BOINC_LIB_DIR = $(BOINC_DIR)/lib
+BOINC_LIB_DIR = $(BOINC_DIR)/lib
BOINC_BUILD_DIR = $(BOINC_DIR)/mac_build/build/Deployment
BOINC_MAC_CONFIG_DIR = $(BOINC_DIR)/clientgui/mac
FRAMEWORKS_DIR = /System/Library/Frameworks
-CXXFLAGS = -g \
- -stdlib=libstdc++ \
+CXXFLAGS_ALL = -g \
+ -stdlib=libc++ \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
-I$(BOINC_MAC_CONFIG_DIR)
-PROGS = openclapp \
+CXXFLAGS_X86_64 = -arch x86_64 $(CXXFLAGS_ALL)
+CXXFLAGS_ARM64 = -arch arm64 $(CXXFLAGS_ALL)
+LDFLAGS_x86_64 = -Wl,-arch,x86_64
+LDFLAGS_arm64 = -Wl,-arch,arm64
+
+PROGS = openclapp_x86_64 openclapp_arm64 \
all: $(PROGS)
@@ -30,17 +36,30 @@ clean:
distclean:
/bin/rm -f $(PROGS) *.o
-install: openclapp
-
-openclapp: openclapp.o boinc_opencl.o
- $(CXX) $(CXXFLAGS) -o openclapp openclapp.o \
- boinc_opencl.o \
+openclapp_x86_64: openclapp_x86_64.o boinc_opencl_x86_64.o
+ $(CXX) $(CXXFLAGS_X86_64) $(LDFLAGS_x86_64) \
+ -o openclapp_x86_64 openclapp_x86_64.o \
+ boinc_opencl_x86_64.o \
-framework OpenCL \
-lboinc_api -L$(BOINC_BUILD_DIR) \
-lboinc -L$(BOINC_BUILD_DIR)
-openclapp.o: openclapp.cpp openclapp.hpp
- $(CXX) $(CXXFLAGS) -c openclapp.cpp
+openclapp_arm64: openclapp_arm64.o boinc_opencl_arm64.o
+ $(CXX) $(CXXFLAGS_ARM64) $(LDFLAGS_arm64) \
+ -o openclapp_arm64 openclapp_arm64.o \
+ boinc_opencl_arm64.o \
+ -framework OpenCL \
+ -lboinc_api -L$(BOINC_BUILD_DIR) \
+ -lboinc -L$(BOINC_BUILD_DIR)
-boinc_opencl.o: $(BOINC_API_DIR)/boinc_opencl.cpp $(BOINC_API_DIR)/boinc_opencl.h
- $(CXX) $(CXXFLAGS) -c $(BOINC_API_DIR)/boinc_opencl.cpp
+openclapp_x86_64.o: openclapp.cpp openclapp.hpp
+ $(CXX) $(CXXFLAGS_X86_64) -c openclapp.cpp -o openclapp_x86_64.o
+
+openclapp_arm64.o: openclapp.cpp openclapp.hpp
+ $(CXX) $(CXXFLAGS_ARM64) -c openclapp.cpp -o openclapp_arm64.o
+
+boinc_opencl_x86_64.o: $(BOINC_API_DIR)/boinc_opencl.cpp $(BOINC_API_DIR)/boinc_opencl.h
+ $(CXX) $(CXXFLAGS_X86_64) -c $(BOINC_API_DIR)/boinc_opencl.cpp -o boinc_opencl_x86_64.o
+
+boinc_opencl_arm64.o: $(BOINC_API_DIR)/boinc_opencl.cpp $(BOINC_API_DIR)/boinc_opencl.h
+ $(CXX) $(CXXFLAGS_ARM64) -c $(BOINC_API_DIR)/boinc_opencl.cpp -o boinc_opencl_arm64.o
diff --git a/samples/vboxwrapper/BuildMacVboxWrapper.sh b/samples/vboxwrapper/BuildMacVboxWrapper.sh
index 9925b4ce15..e359034306 100644
--- a/samples/vboxwrapper/BuildMacVboxWrapper.sh
+++ b/samples/vboxwrapper/BuildMacVboxWrapper.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2008 University of California
+# Copyright (C) 2023 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
@@ -21,44 +21,86 @@
# 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 11/16/11 for XCode 4.1 and OS 10.7
# Updated 7/12/12 for Xcode 4.3 and later which are not at a fixed address
# Updated 4/14/15 for compatibility with Xcode 6
# Updated 6/9/22 for Xcode 13 compatibility (no 32-bit build); add code signing
+# Updated 2/6/23 to build Universal M1 / x86_64 binary
#
## This script requires OS 10.15 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
+## 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.
#
-## If you wish to code sign the vboxwrapper, create a file
-## ~/BOINCCodeSignIdentities.txt whose first line is your application
+## If you wish to code sign the vboxwrapper, create a file
+## ~/BOINCCodeSignIdentities.txt whose first line is your application
## code signing identity.
## 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
+## source [path]/BuildMacVboxWrapper.sh
##
+# checks if a given path is canonical (absolute and does not contain relative links)
+# from http://unix.stackexchange.com/a/256437
+isPathCanonical() {
+ case "x$1" in
+ (x*/..|x*/../*|x../*|x*/.|x*/./*|x./*)
+ rc=1
+ ;;
+ (x/*)
+ rc=0
+ ;;
+ (*)
+ rc=1
+ ;;
+ esac
+ return $rc
+}
+
+while [[ $# -gt 0 ]]; do
+ key="$1"
+ case $key in
+ --cache_dir)
+ cache_dir="$2"
+ shift
+ ;;
+ *)
+ echo "unrecognized option $key"
+ ;;
+ esac
+ shift # past argument or value
+done
+
+PREFIX=""
+if [ "x$cache_dir" != "x" ]; then
+ if isPathCanonical "$cache_dir" && [ "$cache_dir" != "/" ]; then
+ PREFIX="$cache_dir"
+ else
+ echo "cache_dir must be an absolute path without ./ or ../ in it"
+ return 1
+ fi
+fi
+
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
- exit 1
+ return $?
fi
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
- exit 1
+ return $?
fi
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
- exit 1
+ return $?
fi
TOOLSPATH1=${MAKEPATH%/make}
@@ -66,7 +108,7 @@ TOOLSPATH1=${MAKEPATH%/make}
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
- exit 1
+ return $?
fi
TOOLSPATH2=${ARPATH%/ar}
@@ -85,15 +127,48 @@ 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=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
-
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export PREFIX="${PREFIX}"
make -f Makefile_mac clean
make -f Makefile_mac all
-if [ $? -ne 0 ]; then exit 1; fi
+if [ $? -ne 0 ]; then return $?; fi
+
+mv -f vboxwrapper vboxwrapper_x86_64
+
+rm -f vboxwrapper.o
+
+echo
+echo "***************************************************"
+echo "******* Building arm64 Application *********"
+echo "***************************************************"
+echo
+
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
+export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden"
+export SDKROOT="${SDKPATH}"
+export MACOSX_DEPLOYMENT_TARGET=10.13
+
+make -f Makefile_mac clean
+make -f Makefile_mac all
+
+if [ $? -ne 0 ]; then return $?; fi
+
+mv -f vboxwrapper vboxwrapper_arm64
+
+rm -f vboxwrapper.o
+
+lipo -create vboxwrapper_x86_64 vboxwrapper_arm64 -output vboxwrapper
+if [ $? -ne 0 ]; then
+ rm -f vboxwrapper_x86_64
+ rm -f vboxwrapper_arm64
+ rm -f vboxwrapper
+ return $?
+fi
# Code Sign the vboxwrapper if we have a signing identity
if [ -e "${HOME}/BOINCCodeSignIdentities.txt" ]; then
@@ -102,11 +177,6 @@ if [ -e "${HOME}/BOINCCodeSignIdentities.txt" ]; then
codesign -f -o runtime -s "${APPSIGNINGIDENTITY}" vboxwrapper
fi
-mkdir x86_64
-mv vboxwrapper x86_64/
-
-rm -f vboxwrapper.o
-
echo
echo "***************************************************"
echo "**************** Build Succeeded! *****************"
@@ -116,7 +186,8 @@ echo
export CC="";export CXX=""
export LDFLAGS=""
export CPPFLAGS=""
+export CXXFLAGS=""
export CFLAGS=""
+export SDKROOT=""
-exit 0
-
+return 0
diff --git a/samples/vboxwrapper/Makefile_mac b/samples/vboxwrapper/Makefile_mac
index 43b5c7f0e1..b253d6c07b 100644
--- a/samples/vboxwrapper/Makefile_mac
+++ b/samples/vboxwrapper/Makefile_mac
@@ -4,6 +4,7 @@
# Updated 7/10/12 for Xcode 4.3 and later which are not at a fixed address
# Updated 4/10/15 to remove deleted files vboxlog.cpp and vboxlog.h
# Updated 4/14/15 for compatibility with Xcode 6
+# Updated 2/6/23 to include additional search paths
BOINC_DIR = ../..
@@ -20,7 +21,9 @@ CXXFLAGS = $(VARIANTFLAGS) \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
+ -I$(PREFIX)/include \
-L$(BOINC_BUILD_DIR) \
+ -L$(PREFIX)/lib \
-L.
OBJ = \
diff --git a/samples/vboxwrapper/vboxwrapper.xcodeproj/project.pbxproj b/samples/vboxwrapper/vboxwrapper.xcodeproj/project.pbxproj
index 1b9e631e6f..d370bd6204 100644
--- a/samples/vboxwrapper/vboxwrapper.xcodeproj/project.pbxproj
+++ b/samples/vboxwrapper/vboxwrapper.xcodeproj/project.pbxproj
@@ -36,12 +36,12 @@
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = DD3B6779140CF9470088683F;
- remoteInfo = vboxwrapper_x86_64;
+ remoteInfo = vboxwrapper;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- DD3B6783140CF9470088683F /* vboxwrapper_x86_64 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vboxwrapper_x86_64; sourceTree = BUILT_PRODUCTS_DIR; };
+ DD3B6783140CF9470088683F /* vboxwrapper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vboxwrapper; sourceTree = BUILT_PRODUCTS_DIR; };
DD52C39414A2D73900FC2A32 /* floppyio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = floppyio.cpp; sourceTree = ""; };
DD52C39514A2D73900FC2A32 /* floppyio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = floppyio.h; sourceTree = ""; };
DD90CEA0140CAB3D0074CF46 /* vboxwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vboxwrapper.cpp; sourceTree = SOURCE_ROOT; };
@@ -102,7 +102,7 @@
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
- DD3B6783140CF9470088683F /* vboxwrapper_x86_64 */,
+ DD3B6783140CF9470088683F /* vboxwrapper */,
);
name = Products;
sourceTree = "";
@@ -110,9 +110,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- DD3B6779140CF9470088683F /* vboxwrapper_x86_64 */ = {
+ DD3B6779140CF9470088683F /* vboxwrapper */ = {
isa = PBXNativeTarget;
- buildConfigurationList = DD3B677F140CF9470088683F /* Build configuration list for PBXNativeTarget "vboxwrapper_x86_64" */;
+ buildConfigurationList = DD3B677F140CF9470088683F /* Build configuration list for PBXNativeTarget "vboxwrapper" */;
buildPhases = (
DD3B677A140CF9470088683F /* Sources */,
DD3B677D140CF9470088683F /* Frameworks */,
@@ -122,10 +122,10 @@
);
dependencies = (
);
- name = vboxwrapper_x86_64;
+ name = vboxwrapper;
productInstallPath = "$(HOME)/bin";
productName = vboxwrapper;
- productReference = DD3B6783140CF9470088683F /* vboxwrapper_x86_64 */;
+ productReference = DD3B6783140CF9470088683F /* vboxwrapper */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
@@ -150,7 +150,7 @@
projectRoot = "";
targets = (
DDF95AF415AD8A54004AD167 /* Build_All */,
- DD3B6779140CF9470088683F /* vboxwrapper_x86_64 */,
+ DD3B6779140CF9470088683F /* vboxwrapper */,
);
};
/* End PBXProject section */
@@ -167,7 +167,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 if [ -e \"${HOME}/BOINCCodeSignIdentities.txt\" ]; then\n exec 8<\"${HOME}/BOINCCodeSignIdentities.txt\"\n read APPSIGNINGIDENTITY <&8\n codesign -f -o runtime -s \"${APPSIGNINGIDENTITY}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n fi\n sleep 5\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";
+ 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\" = \"Deployment\" ]; then\n if [ -e \"${HOME}/BOINCCodeSignIdentities.txt\" ]; then\n exec 8<\"${HOME}/BOINCCodeSignIdentities.txt\"\n read APPSIGNINGIDENTITY <&8\n codesign -f -o runtime -s \"${APPSIGNINGIDENTITY}\" \"${SRCROOT}/build/${CONFIGURATION}/${PRODUCT_NAME}\"\n fi\n sleep 5\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 */
@@ -191,16 +191,16 @@
/* Begin PBXTargetDependency section */
DDF95AFC15AD8A65004AD167 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = DD3B6779140CF9470088683F /* vboxwrapper_x86_64 */;
+ target = DD3B6779140CF9470088683F /* vboxwrapper */;
targetProxy = DDF95AFB15AD8A65004AD167 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
- 1DEB928A08733DD80010E9CD /* Debug */ = {
+ 1DEB928A08733DD80010E9CD /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
+ ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
@@ -217,10 +217,10 @@
../..,
);
LIBRARY_SEARCH_PATHS = "../../mac_build/build/Development/**";
- MACOSX_DEPLOYMENT_TARGET = 10.10;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
+ "-DMAC_OS_X_VERSION_MAX_ALLOWED=101300",
+ "-DMAC_OS_X_VERSION_MIN_REQUIRED=101300",
);
OTHER_LDFLAGS = (
"-lboinc_api",
@@ -231,12 +231,12 @@
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
};
- name = Debug;
+ name = Development;
};
- 1DEB928B08733DD80010E9CD /* Release */ = {
+ 1DEB928B08733DD80010E9CD /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
+ ARCHS = "$(ARCHS_STANDARD)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_DYNAMIC_NO_PIC = YES;
@@ -253,10 +253,10 @@
../..,
);
LIBRARY_SEARCH_PATHS = "../../mac_build/build/Deployment/**";
- MACOSX_DEPLOYMENT_TARGET = 10.10;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_CFLAGS = (
- "-DMAC_OS_X_VERSION_MAX_ALLOWED=1040",
- "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040",
+ "-DMAC_OS_X_VERSION_MAX_ALLOWED=101300",
+ "-DMAC_OS_X_VERSION_MIN_REQUIRED=101300",
);
OTHER_LDFLAGS = (
"-lboinc_api",
@@ -268,45 +268,41 @@
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = YES;
};
- name = Release;
+ name = Deployment;
};
- DD3B6780140CF9470088683F /* Debug */ = {
+ DD3B6780140CF9470088683F /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
PRODUCT_BUNDLE_IDENTIFIER = edu.berkeley.vboxwrapper;
- PRODUCT_NAME = vboxwrapper_x86_64;
+ PRODUCT_NAME = vboxwrapper;
USER_HEADER_SEARCH_PATHS = ../../clientgui/mac;
USE_HEADERMAP = NO;
};
- name = Debug;
+ name = Development;
};
- DD3B6781140CF9470088683F /* Release */ = {
+ DD3B6781140CF9470088683F /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
PRODUCT_BUNDLE_IDENTIFIER = edu.berkeley.vboxwrapper;
- PRODUCT_NAME = vboxwrapper_x86_64;
+ PRODUCT_NAME = vboxwrapper;
USER_HEADER_SEARCH_PATHS = ../../clientgui/mac;
USE_HEADERMAP = NO;
};
- name = Release;
+ name = Deployment;
};
- DDF95AF515AD8A54004AD167 /* Debug */ = {
+ DDF95AF515AD8A54004AD167 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
PRODUCT_NAME = "$(TARGET_NAME)";
};
- name = Debug;
+ name = Development;
};
- DDF95AF615AD8A54004AD167 /* Release */ = {
+ DDF95AF615AD8A54004AD167 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = x86_64;
PRODUCT_NAME = "$(TARGET_NAME)";
};
- name = Release;
+ name = Deployment;
};
/* End XCBuildConfiguration section */
@@ -314,29 +310,29 @@
1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "vboxwrapper" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 1DEB928A08733DD80010E9CD /* Debug */,
- 1DEB928B08733DD80010E9CD /* Release */,
+ 1DEB928A08733DD80010E9CD /* Development */,
+ 1DEB928B08733DD80010E9CD /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
+ defaultConfigurationName = Deployment;
};
- DD3B677F140CF9470088683F /* Build configuration list for PBXNativeTarget "vboxwrapper_x86_64" */ = {
+ DD3B677F140CF9470088683F /* Build configuration list for PBXNativeTarget "vboxwrapper" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DD3B6780140CF9470088683F /* Debug */,
- DD3B6781140CF9470088683F /* Release */,
+ DD3B6780140CF9470088683F /* Development */,
+ DD3B6781140CF9470088683F /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
+ defaultConfigurationName = Deployment;
};
DDF95AF715AD8A54004AD167 /* Build configuration list for PBXAggregateTarget "Build_All" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- DDF95AF515AD8A54004AD167 /* Debug */,
- DDF95AF615AD8A54004AD167 /* Release */,
+ DDF95AF515AD8A54004AD167 /* Development */,
+ DDF95AF615AD8A54004AD167 /* Deployment */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
+ defaultConfigurationName = Deployment;
};
/* End XCConfigurationList section */
};
diff --git a/samples/wrapper/BuildMacWrapper.sh b/samples/wrapper/BuildMacWrapper.sh
index fa0d3632ce..9aeb404734 100644
--- a/samples/wrapper/BuildMacWrapper.sh
+++ b/samples/wrapper/BuildMacWrapper.sh
@@ -2,7 +2,7 @@
# This file is part of BOINC.
# http://boinc.berkeley.edu
-# Copyright (C) 2008 University of California
+# Copyright (C) 2023 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
@@ -21,15 +21,16 @@
# Script to build Macintosh wrapper using Makefile
#
# by Charlie Fenton 2/15/10
-# Updated 11/16/11 for XCode 4.1 and OS 10.7
+# Updated 11/16/11 for XCode 4.1 and OS 10.7
# Updated 7/12/12 for Xcode 4.3 and later which are not at a fixed address
# Updated 8/28/20 for compatibility with Xcode 10
# Updated 8/19/22 to build Universal M1 / x86_64 binary
+# Updated 2/6/23 to sign binaries
#
## 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
+## 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
@@ -37,25 +38,66 @@
## In Terminal, CD to the wrqpper directory.
## cd [path]/wrapper/
## then run this script:
-## sh [path]/BuildMacWrapper.sh
+## source [path]/BuildMacWrapper.sh
##
+# checks if a given path is canonical (absolute and does not contain relative links)
+# from http://unix.stackexchange.com/a/256437
+isPathCanonical() {
+ case "x$1" in
+ (x*/..|x*/../*|x../*|x*/.|x*/./*|x./*)
+ rc=1
+ ;;
+ (x/*)
+ rc=0
+ ;;
+ (*)
+ rc=1
+ ;;
+ esac
+ return $rc
+}
+
+while [[ $# -gt 0 ]]; do
+ key="$1"
+ case $key in
+ --cache_dir)
+ cache_dir="$2"
+ shift
+ ;;
+ *)
+ echo "unrecognized option $key"
+ ;;
+ esac
+ shift # past argument or value
+done
+
+PREFIX=""
+if [ "x$cache_dir" != "x" ]; then
+ if isPathCanonical "$cache_dir" && [ "$cache_dir" != "/" ]; then
+ PREFIX="$cache_dir"
+ else
+ echo "cache_dir must be an absolute path without ./ or ../ in it"
+ return 1
+ fi
+fi
+
GCCPATH=`xcrun -find gcc`
if [ $? -ne 0 ]; then
echo "ERROR: can't find gcc compiler"
- exit 1
+ return $?
fi
GPPPATH=`xcrun -find g++`
if [ $? -ne 0 ]; then
echo "ERROR: can't find g++ compiler"
- exit 1
+ return $?
fi
MAKEPATH=`xcrun -find make`
if [ $? -ne 0 ]; then
echo "ERROR: can't find make tool"
- exit 1
+ return $?
fi
TOOLSPATH1=${MAKEPATH%/make}
@@ -63,7 +105,7 @@ TOOLSPATH1=${MAKEPATH%/make}
ARPATH=`xcrun -find ar`
if [ $? -ne 0 ]; then
echo "ERROR: can't find ar tool"
- exit 1
+ return $?
fi
TOOLSPATH2=${ARPATH%/ar}
@@ -72,7 +114,7 @@ export PATH="${TOOLSPATH1}":"${TOOLSPATH2}":/usr/local/bin:$PATH
SDKPATH=`xcodebuild -version -sdk macosx Path`
-rm -fR i386 x86_64
+rm -fR x86_64
echo
echo "***************************************************"
@@ -80,24 +122,20 @@ echo "******* Building 64-bit Intel Application *********"
echo "***************************************************"
echo
-export CC="${GCCPATH}";export CPP="${GPPPATH}"
+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=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000 -fvisibility=hidden -fvisibility-inlines-hidden"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch x86_64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export PREFIX="${PREFIX}"
-rm -f *.o
-rm -f wrapper
make -f Makefile_mac clean
make -f Makefile_mac all
-if [ $? -ne 0 ]; then
- rm -f *.o
- rm -f wrapper
- exit 1
-fi
+if [ $? -ne 0 ]; then return $?; fi
mv -f wrapper wrapper_x86_64
+rm -f *.o
echo
echo "***************************************************"
@@ -105,33 +143,35 @@ echo "******* Building arm64 Application *********"
echo "***************************************************"
echo
-export CC="${GCCPATH}";export CPP="${GPPPATH}"
+export CC="${GCCPATH}";export CXX="${GPPPATH}"
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
-export VARIANTFLAGS="-isysroot ${SDKPATH} -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101000 -DMAC_OS_X_VERSION_MIN_REQUIRED=101000 -fvisibility=hidden -fvisibility-inlines-hidden"
+export VARIANTFLAGS="-isysroot ${SDKPATH} -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300 -fvisibility=hidden -fvisibility-inlines-hidden"
export SDKROOT="${SDKPATH}"
-export MACOSX_DEPLOYMENT_TARGET=10.10
+export MACOSX_DEPLOYMENT_TARGET=10.13
+export PREFIX="${PREFIX}"
-rm -f *.o
make -f Makefile_mac clean
make -f Makefile_mac all
-if [ $? -ne 0 ]; then
- rm -f *.o
- rm -f wrapper_x86_64
- rm -f wrapper
- exit 1
-fi
-
-rm -f *.o
+if [ $? -ne 0 ]; then return $?; fi
mv -f wrapper wrapper_arm64
+rm -f *.o
+
lipo -create wrapper_x86_64 wrapper_arm64 -output wrapper
if [ $? -ne 0 ]; then
rm -f wrapper_x86_64
rm -f wrapper_arm64
rm -f wrapper
- exit 1
+ return $?
+fi
+
+# Code Sign the wrapper if we have a signing identity
+if [ -e "${HOME}/BOINCCodeSignIdentities.txt" ]; then
+ exec 8<"${HOME}/BOINCCodeSignIdentities.txt"
+ read APPSIGNINGIDENTITY <&8
+ codesign -f -o runtime -s "${APPSIGNINGIDENTITY}" wrapper
fi
rm -f wrapper_x86_64
@@ -146,7 +186,8 @@ echo
export CC="";export CXX=""
export LDFLAGS=""
export CPPFLAGS=""
+export CXXFLAGS=""
export CFLAGS=""
+export SDKROOT=""
-exit 0
-
+return 0
diff --git a/samples/wrapper/Makefile_mac b/samples/wrapper/Makefile_mac
index fdfe2c2747..8d174b0575 100644
--- a/samples/wrapper/Makefile_mac
+++ b/samples/wrapper/Makefile_mac
@@ -2,6 +2,7 @@
# This is invoked from BuildMacWrapper.sh shell script.
# It should not be used by itself without the script.
# Updated 8/28/20 for compatibility with Xcode 10
+# Updated 2/6/23 to include additional search paths
# Change the following to match your installation
BOINC_DIR = ../..
@@ -17,23 +18,24 @@ CFLAGS = $(VARIANTFLAGS) \
-I$(BOINC_DIR) \
-I$(BOINC_LIB_DIR) \
-I$(BOINC_API_DIR) \
- -I$(BOINC_ZIP_DIR)
+ -I$(BOINC_ZIP_DIR) \
+ -I$(PREFIX)/include
-CPPFLAGS = $(CFLAGS) -stdlib=libc++
-
-LDFLAGS = $(CPPFLAGS) \
+CXXFLAGS = $(CFLAGS) -stdlib=libc++
+
+LDFLAGS = \
-L$(BOINC_API_DIR) \
-L$(BOINC_LIB_DIR) \
-L$(BOINC_ZIP_DIR) \
-L$(BOINC_BUILD_DIR) \
+ -L$(PREFIX)/lib \
-L.
PROGS = wrapper
all: $(PROGS)
-clean:
- rm $(PROGS) *.o
+clean: distclean
distclean:
/bin/rm -f $(PROGS) *.o
@@ -61,4 +63,4 @@ regexp_report.o: regexp_report.c
$(CC) $(CFLAGS) -c regexp_report.c
wrapper: wrapper.o $(REGEXP_OBJS)
- $(CPP) $(LDFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) -pthread -lboinc_api -lboinc -lboinc_zip
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) -pthread -lboinc_api -lboinc -lboinc_zip
diff --git a/zip/boinc_zip.xcodeproj/project.pbxproj b/zip/boinc_zip.xcodeproj/project.pbxproj
index 721ce5f9fa..d28e1658b5 100644
--- a/zip/boinc_zip.xcodeproj/project.pbxproj
+++ b/zip/boinc_zip.xcodeproj/project.pbxproj
@@ -466,7 +466,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
STRINGS_FILE_OUTPUT_ENCODING = "UTF-8";
@@ -481,7 +481,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
SDKROOT = macosx;
STRINGS_FILE_OUTPUT_ENCODING = "UTF-8";
};