Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/BOINC/boinc
Browse files Browse the repository at this point in the history
  • Loading branch information
romw committed Feb 4, 2016
2 parents d446441 + f7edb7a commit 1d8b4db
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 20 deletions.
1 change: 1 addition & 0 deletions clientscr/mac_saver_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern "C" {
#include <limits.h>
#include <sys/stat.h>
#include <sys/param.h> // for MAXPATHLEN
#include <pthread.h>

#include "gui_rpc_client.h"
#include "common_defs.h"
Expand Down
23 changes: 16 additions & 7 deletions mac_build/BuildMacBOINC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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)
Expand All @@ -68,6 +73,8 @@

targets=""
doclean="clean"
cplusplus11dialect=""
uselibcplusplus=""
buildall=0
buildlibs=0
buildclient=0
Expand All @@ -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 ;;
Expand Down Expand Up @@ -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
Expand Down
72 changes: 60 additions & 12 deletions samples/mac_build/UpperCase2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 = (
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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/;
Expand Down Expand Up @@ -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/;
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand All @@ -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/;
Expand Down Expand Up @@ -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/;
Expand Down
2 changes: 1 addition & 1 deletion samples/vboxwrapper/vboxwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d8b4db

Please sign in to comment.