Merge pull request #3975 from BOINC/mgr_add_stop_graphics_button_2

Fix bugs in my PR #3970 mgr_add_stop_graphics_button
This commit is contained in:
David Anderson 2020-08-17 10:56:22 -07:00 committed by GitHub
commit 43e78255b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */