diff --git a/client/client_state.cpp b/client/client_state.cpp index 950d75ff47..38d9fde6b4 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -1327,10 +1327,13 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) { get_pathname(fip, relpath, sizeof(relpath)); relative_to_absolute(relpath, path); #ifdef __APPLE__ - if (!can_run_on_this_CPU(path)) continue; + if (can_run_on_this_CPU(path)) + #endif - safe_strcpy(avp->graphics_exec_path, path); - safe_strcpy(avp->graphics_exec_file, fip->name); + { + safe_strcpy(avp->graphics_exec_path, path); + safe_strcpy(avp->graphics_exec_file, fip->name); + } } // any file associated with an app version must be signed diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 347cd14f0a..9351d8d01a 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -1756,9 +1756,6 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) { // See if we are already running the graphics application for this task previous_gfx_app = GetRunningGraphicsApp(rp); -#ifndef __WXMSW__ - char* argv[4]; - if (previous_gfx_app) { // If graphics app is already running, the button has changed to // "Stop graphics", so we end the graphics app. @@ -1766,6 +1763,10 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) { KillGraphicsApp(previous_gfx_app->pid); // User clicked on "Stop graphics" button return 0; } + +#ifndef __WXMSW__ + char* argv[4]; + argv[0] = "switcher"; // For unknown reasons on Macs, the graphics application // exits with "RegisterProcess failed (error = -50)" unless diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj index 4c95ff3db0..8b88017c08 100644 --- a/mac_build/boinc.xcodeproj/project.pbxproj +++ b/mac_build/boinc.xcodeproj/project.pbxproj @@ -2251,6 +2251,7 @@ DD3E14DE0A774397007E0084 /* Sources */, DD3E15300A774397007E0084 /* Frameworks */, DD3E15350A774397007E0084 /* CopyFiles */, + DDFE33E324EA9ADC00F5C838 /* ShellScript */, DD3E15390A774397007E0084 /* ShellScript */, ); buildRules = ( @@ -2501,6 +2502,7 @@ buildPhases = ( DDD74D8407CF482E0065AC9D /* Sources */, DDD74D8507CF482E0065AC9D /* Frameworks */, + DDFE33E224EA9AC300F5C838 /* ShellScript */, DD1B90070A954C9A00FF5591 /* ShellScript */, ); buildRules = ( @@ -2921,6 +2923,40 @@ shellPath = /bin/sh; shellScript = "## echo \"BuiltProductsDir = ${BUILT_PRODUCTS_DIR}\"\n# echo \"SRC ROOT = ${SRCROOT}\"\n# echo \"CONFIGURATION = ${CONFIGURATION}\"\n# echo \"PRODUCT_NAME = ${PRODUCT_NAME}\"\nmkdir -p \"${SRCROOT}/build/${CONFIGURATION}\"\nif [ \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" -nt \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\" ]; then\n cp -fp \"${BUILT_PRODUCTS_DIR}/lib${PRODUCT_NAME}.a\" \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n strip -S \"${SRCROOT}/build/${CONFIGURATION}/lib${PRODUCT_NAME}.a\"\n fi\nfi\n"; }; + DDFE33E224EA9AC300F5C838 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\nfi\n"; + }; + DDFE33E324EA9ADC00F5C838 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"$CONFIGURATION\" = \"Deployment\" ]; then\n ## echo \"Starting script 1\"\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Deployment_Dir\"\nelse\n echo ${BUILT_PRODUCTS_DIR} > \"${PROJECT_DIR}/Build_Development_Dir\"\nfi\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */