From 22a921d89ef582898263b32066aa9b3a7ec83f41 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 3 Feb 2016 01:23:03 -0800 Subject: [PATCH 1/4] Example App (uppercase): Fix recursive header error in Mac Xcode project --- .../UpperCase2.xcodeproj/project.pbxproj | 72 +++++++++++++++---- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj b/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj index ef301545540..bc8ef26d282 100644 --- a/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj +++ b/samples/mac_build/UpperCase2.xcodeproj/project.pbxproj @@ -685,7 +685,12 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../zip, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; @@ -715,7 +720,12 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../zip, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_LDFLAGS = ( @@ -749,7 +759,12 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../zip, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; @@ -779,7 +794,12 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../zip, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_LDFLAGS = ( @@ -804,7 +824,12 @@ GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../clientgui/mac, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/; PREBINDING = NO; PRODUCT_NAME = "uc2_i686-apple-darwin"; @@ -841,7 +866,12 @@ GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../clientgui/mac, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; PREBINDING = NO; PRODUCT_NAME = "uc2_i686-apple-darwin"; @@ -883,7 +913,9 @@ HEADER_SEARCH_PATHS = ( "../../../freetype-2.4.10/include", "../../../ftgl-2.1.3~rc5/src", - "../../**", + ../.., + ../../lib, + ../../api, ); INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/; @@ -928,7 +960,9 @@ HEADER_SEARCH_PATHS = ( "../../../freetype-2.4.10/include", "../../../ftgl-2.1.3~rc5/src", - "../../**", + ../.., + ../../lib, + ../../api, ); INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; @@ -991,7 +1025,12 @@ GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../clientgui/mac, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/; PREBINDING = NO; PRODUCT_NAME = "UC2_x86_64-apple-darwin"; @@ -1009,7 +1048,12 @@ GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../../**"; + HEADER_SEARCH_PATHS = ( + ../.., + ../../lib, + ../../api, + ../../clientgui/mac, + ); LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; PREBINDING = NO; PRODUCT_NAME = "UC2_x86_64-apple-darwin"; @@ -1032,7 +1076,9 @@ HEADER_SEARCH_PATHS = ( "../../../freetype-2.4.10/include", "../../../ftgl-2.1.3~rc5/src", - "../../**", + ../.., + ../../lib, + ../../api, ); INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = ../../mac_build/build/Development/; @@ -1070,7 +1116,9 @@ HEADER_SEARCH_PATHS = ( "../../../freetype-2.4.10/include", "../../../ftgl-2.1.3~rc5/src", - "../../**", + ../.., + ../../lib, + ../../api, ); INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = ../../mac_build/build/Deployment/; From 49fc890ce635b1357705b4f10568cdf020299ef7 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 3 Feb 2016 02:33:31 -0800 Subject: [PATCH 2/4] SCR: Fix Mac screensaver for building with libc++ and c++11 --- clientscr/mac_saver_module.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clientscr/mac_saver_module.cpp b/clientscr/mac_saver_module.cpp index a9618f321d3..3efef198d50 100644 --- a/clientscr/mac_saver_module.cpp +++ b/clientscr/mac_saver_module.cpp @@ -42,6 +42,7 @@ extern "C" { #include #include #include // for MAXPATHLEN +#include #include "gui_rpc_client.h" #include "common_defs.h" From e9c7291b9504caf2c3054f34883e29e6072c9aa6 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 3 Feb 2016 02:35:38 -0800 Subject: [PATCH 3/4] Mac: Modify build script to allow building using libc++ instead of default libstdc++ and / or using c++11 language dialect instead of default --- mac_build/BuildMacBOINC.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/mac_build/BuildMacBOINC.sh b/mac_build/BuildMacBOINC.sh index 175248e3c49..e65b60bb1b1 100644 --- a/mac_build/BuildMacBOINC.sh +++ b/mac_build/BuildMacBOINC.sh @@ -27,6 +27,7 @@ # Updated 7/9/12 for Xcode 4.3 and later which are not at a fixed address # Updated 2/7/14 to also build libboinc_zip.a # Updated 11/28/15 to build ScreenSaver with ARC under Xcode 6 or later +# Updated 2/3/16 to allow optional use of libc++ and C++11 dialect # ## This script requires OS 10.8 or later # @@ -52,6 +53,10 @@ ## -noclean don't do a "clean" of each target before building. ## default is to clean all first. ## +## -libc++ build using libc++ instead of libstdc++ (requires OS 10.7) +## +## -c++11 build using c++11 language dialect instead of default (requires libc++) +## ## The following arguments determine which targets to build ## ## -all build all targets (i.e. target "Build_All" -- this is the default) @@ -68,6 +73,8 @@ targets="" doclean="clean" +cplusplus11dialect="" +uselibcplusplus="" buildall=0 buildlibs=0 buildclient=0 @@ -85,6 +92,8 @@ while [ $# -gt 0 ]; do case "$1" in -noclean ) doclean="" ; shift 1 ;; -dev ) style="Development" ; shift 1 ;; + -libc++ ) uselibcplusplus="CLANG_CXX_LIBRARY=libc++ MACOSX_DEPLOYMENT_TARGET=10.7" ; shift 1 ;; + -c++11 ) cplusplus11dialect="CLANG_CXX_LANGUAGE_STANDARD=c++11" ; shift 1 ;; -all ) buildall=1 ; shift 1 ;; -lib ) buildlibs=1 ; shift 1 ;; -client ) buildclient=1 ; shift 1 ;; @@ -151,28 +160,28 @@ SDKPATH=`xcodebuild -version -sdk macosx Path` if [ $isXcode6orLater = 0 ]; then ## echo "Xcode version < 6" ## Build the screensaver using our standard settings (with Garbage Collection) - xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk "${SDKPATH}" ${doclean} build + xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ${uselibcplusplus} ${cplusplus11dialect} else ## echo "Xcode version > 5" ## We must modify the build settings for the screensaver only, to build it with ARC - xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk "${SDKPATH}" ${doclean} build + xcodebuild -project boinc.xcodeproj ${targets} -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ${uselibcplusplus} ${cplusplus11dialect} result=$? - if [ $result -eq 0 ]; then - xcodebuild -project boinc.xcodeproj -target ScreenSaver -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ARCHS=x86_64 GCC_ENABLE_OBJC_GC=unsupported + if [ "${buildall}" = "1" ] || [ "${targets}" = "" ]; then + if [ $result -eq 0 ]; then + xcodebuild -project boinc.xcodeproj -target ScreenSaver -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ARCHS=x86_64 GCC_ENABLE_OBJC_GC=unsupported ${uselibcplusplus} ${cplusplus11dialect} + fi fi fi - - result=$? 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 - xcodebuild -project ../zip/boinc_zip.xcodeproj -target boinc_zip -configuration ${style} -sdk "${SDKPATH}" ${doclean} build + xcodebuild -project ../zip/boinc_zip.xcodeproj -target boinc_zip -configuration ${style} -sdk "${SDKPATH}" ${doclean} build ${uselibcplusplus} ${cplusplus11dialect} result=$? fi From 8f7df2a7f01611e2949a3dacf74bade166c323a5 Mon Sep 17 00:00:00 2001 From: marius Date: Thu, 4 Feb 2016 02:50:57 +0100 Subject: [PATCH 4/4] VBOX: fixed error code not being reported --- samples/vboxwrapper/vboxwrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index e0d2fa08c67..e68dc1faf32 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -138,7 +138,7 @@ void read_completion_file_info(unsigned long& exit_code, bool& is_notice, string FILE* f = fopen(path, "r"); if (f) { if (fgets(buf, 1024, f) != NULL) { - exit_code = atoi(buf) != 0; + exit_code = atoi(buf); } if (fgets(buf, 1024, f) != NULL) { is_notice = atoi(buf) != 0;