From 192e0f88b24f790a162975040f026d074b6c3010 Mon Sep 17 00:00:00 2001 From: rogerman Date: Fri, 3 Sep 2021 12:03:06 -0700 Subject: [PATCH] Cocoa Port: Perform post-build code signing for final stage of Release build. --- .../frontend/cocoa/DeSmuME (Latest).xcodeproj/project.pbxproj | 1 - ...inal Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/xcshareddata/xcschemes/DeSmuME (OS X App; Final Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme diff --git a/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/project.pbxproj b/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/project.pbxproj index 9f9b6f11b..433db94db 100755 --- a/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/project.pbxproj +++ b/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/project.pbxproj @@ -4074,7 +4074,6 @@ AB407F381A620D6E00313213 /* OptimizationProfiles */ = { isa = PBXGroup; children = ( - AB407F391A620D6E00313213 /* DeSmuME (Latest).profdata */, ); path = OptimizationProfiles; sourceTree = ""; diff --git a/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/xcshareddata/xcschemes/DeSmuME (OS X App; Final Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme b/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/xcshareddata/xcschemes/DeSmuME (OS X App; Final Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme old mode 100644 new mode 100755 index 306e4c32c..c0c452e88 --- a/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/xcshareddata/xcschemes/DeSmuME (OS X App; Final Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme +++ b/desmume/src/frontend/cocoa/DeSmuME (Latest).xcodeproj/xcshareddata/xcschemes/DeSmuME (OS X App; Final Stage v10.5 Leopard Release Build -- Xcode 12).xcscheme @@ -10,7 +10,7 @@ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction"> + scriptText = "#!/bin/sh # This script creates an application package that merges the ppc binary of an # Xcode 3 PowerPC release build, the i386 binary of an Xcode 9 x86 32-bit # release build, and the x86_64 binary of an Xcode 12 (or later) release build. # # It also replaces the .nib files with ones that are created specifically in # Xcode 6, which is the last version of Xcode that can compile Leopard-compatible # .nib files. # # Before you build this final stage of the DeSmuME release build, make sure that # you have already created the following builds of DeSmuME and that they are all # located in the ${SRCROOT}/build/Release directory: # - DeSmuME (PPC).app | Use Xcode 3 # - DeSmuME (extract NIB).app | Use Xcode 6 # - DeSmuME (32bit).app | Use Xcode 9 # Create the Merged Release directory, plus a working copy of the .app. mkdir -p "${SRCROOT}/build/Merged Release" cd "${SRCROOT}/build/Merged Release" cp -a "${SRCROOT}/build/Release/${PRODUCT_NAME}.app" "./" if test -e "${SRCROOT}/build/Release/DeSmuME (PPC).app/Contents/MacOS/DeSmuME (PPC)" then cd "${SRCROOT}/build/Release/${PRODUCT_NAME}.app/Contents/MacOS" # Create the temp binaries for Intel. cp -a "${SRCROOT}/build/Release/DeSmuME (32bit).app/Contents/MacOS/DeSmuME (32bit)" "./${EXECUTABLE_NAME}_i386" cp -a "./${EXECUTABLE_NAME}" "./${EXECUTABLE_NAME}_x86_64" # Merge the separate temp binaries into a single binary package. rm -f "${SRCROOT}/build/Merged Release/${PRODUCT_NAME}.app/Contents/MacOS/${EXECUTABLE_NAME}" lipo "${SRCROOT}/build/Release/DeSmuME (PPC).app/Contents/MacOS/DeSmuME (PPC)" "./${EXECUTABLE_NAME}_i386" "./${EXECUTABLE_NAME}_x86_64" -create -output "${SRCROOT}/build/Merged Release/${PRODUCT_NAME}.app/Contents/MacOS/${EXECUTABLE_NAME}" # Remove the temp binaries now that we're done with them. rm -f "./${EXECUTABLE_NAME}_i386" rm -f "./${EXECUTABLE_NAME}_x86_64" fi # Copy the .nib files from an "extract NIB" .app to the Merged Release .app cd "${SRCROOT}/build/Merged Release/${PRODUCT_NAME}.app/Contents/Resources/English.lproj" rm -f "./MainMenu.nib" rm -f "./DisplayWindow.nib" cp -af "${SRCROOT}/build/Release/DeSmuME (extract NIB).app/Contents/Resources/English.lproj/MainMenu.nib" "./" cp -af "${SRCROOT}/build/Release/DeSmuME (extract NIB).app/Contents/Resources/English.lproj/DisplayWindow.nib" "./" # This final stage build sets the minimum system version to macOS v10.7, so we need to reset it to macOS v10.5 here. defaults write "${SRCROOT}/build/Merged Release/${PRODUCT_NAME}.app/Contents/Info.plist" LSMinimumSystemVersion -string '10.5' # We just modified stuff in the .app, so we need to code sign again. Since this is an # open source project, we'll just use ad hoc code signing here. codesign --force --deep -s - "${SRCROOT}/build/Merged Release/${PRODUCT_NAME}.app" ">