From 3864723e4daf20d2702398a65dbd9261925223aa Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Wed, 28 Sep 2016 13:22:36 -0400 Subject: [PATCH] Check for errors when postprocessing macOS app bundle --- Source/Core/DolphinQt2/CMakeLists.txt | 8 +++++++- Source/Core/DolphinWX/CMakeLists.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/CMakeLists.txt b/Source/Core/DolphinQt2/CMakeLists.txt index 3f73b69d26..1030388ef8 100644 --- a/Source/Core/DolphinQt2/CMakeLists.txt +++ b/Source/Core/DolphinQt2/CMakeLists.txt @@ -58,7 +58,13 @@ if(APPLE) message(\"(Note: This is only necessary to produce a redistributable binary.\") message(\"To skip, pass -DSKIP_POSTPROCESS_BUNDLE=1 to cmake.)\") set(BU_CHMOD_BUNDLE_ITEMS ON) - execute_process(COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py -p platforms/libqcocoa.dylib \"${BUNDLE_PATH}\") + execute_process( + COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py -p platforms/libqcocoa.dylib \"${BUNDLE_PATH}\" + RESULT_VARIABLE retcode + ) + if(NOT \${retcode} EQUAL 0) + message(FATAL_ERROR \"Error when postprocessing bundle (return code: \${retcode}).\") + endif() file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys DESTINATION ${BUNDLE_PATH}/Contents/Resources ) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 9e89e73987..dc07b17534 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -128,7 +128,13 @@ if(wxWidgets_FOUND) message(\"(Note: This is only necessary to produce a redistributable binary.\") message(\"To skip, pass -DSKIP_POSTPROCESS_BUNDLE=1 to cmake.)\") set(BU_CHMOD_BUNDLE_ITEMS ON) - execute_process(COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py \"${BUNDLE_PATH}\") + execute_process( + COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py \"${BUNDLE_PATH}\" + RESULT_VARIABLE retcode + ) + if(NOT \${retcode} EQUAL 0) + message(FATAL_ERROR \"Error when postprocessing bundle (return code: \${retcode}).\") + endif() file(INSTALL \"${CMAKE_SOURCE_DIR}/Data/Sys\" DESTINATION \"${BUNDLE_PATH}/Contents/Resources\" )