From 3a0ed9b7281ed34c4d4c1bb64736a869ce0eec52 Mon Sep 17 00:00:00 2001 From: David Davies-Payne Date: Sun, 5 Jul 2020 14:21:22 +1200 Subject: [PATCH] Reconfigure signing credentials set-up to allow override --- .gitignore | 1 + Horos.xcodeproj/project.pbxproj | 43 +++++++++------------------- Horos/Signing Configuration.xcconfig | 29 +++++++++++++++++++ 3 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 Horos/Signing Configuration.xcconfig diff --git a/.gitignore b/.gitignore index b471a3c53f..b962518792 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ Binaries/EmbeddedPlugins/HorosCloud.horosplugin *.xcscmblueprint DICOMPrint/DICOMPrint Horos.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +Horos/Signing Override.xcconfig diff --git a/Horos.xcodeproj/project.pbxproj b/Horos.xcodeproj/project.pbxproj index cc0c29900c..a9b93468d5 100644 --- a/Horos.xcodeproj/project.pbxproj +++ b/Horos.xcodeproj/project.pbxproj @@ -3655,6 +3655,7 @@ 5F92185F23F45592000B8754 /* dcmpsprt */ = {isa = PBXFileReference; lastKnownFileType = text; name = dcmpsprt; path = DCMTK/dcmpsprt; sourceTree = BUILT_PRODUCTS_DIR; }; 5F92186123F455A8000B8754 /* dcmprscu */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = dcmprscu; path = DCMTK/dcmprscu; sourceTree = BUILT_PRODUCTS_DIR; }; 5FCC11EC2423CDCE0039EE8F /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; + 631FDDD8244D779400D60CC7 /* Signing Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Signing Configuration.xcconfig"; sourceTree = ""; }; 710EF1F11FD00E28000B555B /* Horos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Horos.h; sourceTree = ""; }; 710EF1F21FD00E29000B555B /* Horos.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Horos.m; sourceTree = ""; }; 71125D4A215376FC00EB0AA5 /* PathForImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathForImage.h; sourceTree = ""; }; @@ -6162,6 +6163,7 @@ isa = PBXGroup; children = ( 8B15E1602347CA600010A147 /* Horos.entitlements */, + 631FDDD8244D779400D60CC7 /* Signing Configuration.xcconfig */, 71BC461B1F272CA400FD6CCF /* Scripts */, 719D3F1A1FB461CA004CFB27 /* Sources */, 719D3F261FB46892004CFB27 /* Resources */, @@ -10062,6 +10064,9 @@ 71E6C0B01FBAD31E00FF75B6 = { CreatedOnToolsVersion = 9.0; }; + 7E0B3A3E067526CD00908593 = { + ProvisioningStyle = Manual; + }; AB0F3A2B1046BD2B004129DD = { ProvisioningStyle = Manual; }; @@ -10606,7 +10611,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Need to sign command-line executables. The identity defined must exist as\n# a certificate in the build user's keychain. If it does not, this step will\n# fail. Edit identity to a one that does (e.g., \"Developer ID Application\").\n#\n\nset -e; set -o xtrace\n\nidentity=\"Developer ID Application: Nimble CO LLC (TPT6TVH8UY)\"\nprefix=\"org.horosproject.\"\ncopy_dir=\"$BUILT_PRODUCTS_DIR/DCMTK\"\n\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmdump\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmpsprt\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmprscu\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dsr2html\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/echoscu\"\n"; + shellScript = "# Need to sign command-line executables. The identity defined must exist as\n# a certificate in the build user's keychain. If it does not, this step will\n# fail. Edit identity to a one that does (e.g., \"Developer ID Application\").\n#\n\nset -e; set -o xtrace\n\nidentity=\"$CODE_SIGN_IDENTITY\"\nprefix=\"org.horosproject.\"\ncopy_dir=\"$BUILT_PRODUCTS_DIR/DCMTK\"\n\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmdump\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmpsprt\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dcmprscu\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/dsr2html\"\ncodesign --verbose=4 -f --prefix \"${prefix}\" --options runtime -s \"${identity}\" \"${copy_dir}/echoscu\"\n"; }; 5F1E2A6D2411AE7E00365A0C /* CMake */ = { isa = PBXShellScriptBuildPhase; @@ -13287,6 +13292,7 @@ /* Begin XCBuildConfiguration section */ 43E98D191A32BF6A001B9E51 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 631FDDD8244D779400D60CC7 /* Signing Configuration.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -13334,11 +13340,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Horos/Horos.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 20191211; - DEVELOPMENT_TEAM = ""; - ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", Binaries, @@ -13378,7 +13380,6 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.horos; PRODUCT_NAME = Horos; - PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = NO; SYSTEM_HEADER_SEARCH_PATHS = "$CONFIGURATION_TEMP_DIR/Grok.build/Install/include $CONFIGURATION_TEMP_DIR/GDCM.build/Install/include $CONFIGURATION_TEMP_DIR/OpenSSL.build/Install/include $CONFIGURATION_TEMP_DIR/CharLS.build/Install/include $CONFIGURATION_TEMP_DIR/ITK.build/Install/include $CONFIGURATION_TEMP_DIR/VTK.build/Install/include"; USER_HEADER_SEARCH_PATHS = "$(inherited) Binaries/dcmtk-source"; @@ -13388,6 +13389,8 @@ 43E98D1C1A32BF6A001B9E51 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1.0.0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DCM Framework/prefix.pch"; @@ -13412,6 +13415,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.dcm; PRODUCT_NAME = DCM; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; @@ -13433,10 +13437,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Decompress/Decompress.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = TPT6TVH8UY; - ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = Binaries; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Decompress/prefix.pch; @@ -13456,7 +13456,6 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.horosproject.decompress; PRODUCT_NAME = Decompress; - PROVISIONING_PROFILE_SPECIFIER = ""; SYSTEM_HEADER_SEARCH_PATHS = "$CONFIGURATION_TEMP_DIR/Grok.build/Install/include $CONFIGURATION_TEMP_DIR/CharLS.build/Install/include $CONFIGURATION_TEMP_DIR/GDCM.build/Install/include $CONFIGURATION_TEMP_DIR/VTK.build/Install/include Binaries/Ming"; USER_HEADER_SEARCH_PATHS = "$(inherited) Binaries/dcmtk-source"; }; @@ -13465,9 +13464,6 @@ 43E98D231A32BF6A001B9E51 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = TPT6TVH8UY; DYLIB_COMPATIBILITY_VERSION = 1.0.0; INFOPLIST_FILE = "$(SRCROOT)/API/Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; @@ -13475,7 +13471,6 @@ OTHER_CFLAGS = "-fvisibility=default"; PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.api; PRODUCT_NAME = Horos; - PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; @@ -13594,6 +13589,8 @@ 7E76BEC1085757B60073649A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1.0.0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DCM Framework/prefix.pch"; @@ -13618,6 +13615,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.dcm; PRODUCT_NAME = DCM; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -13625,11 +13623,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Horos/Horos.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 20191211; - DEVELOPMENT_TEAM = ""; - ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", Binaries, @@ -13667,7 +13661,6 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.horos; PRODUCT_NAME = Horos; - PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = NO; SYSTEM_HEADER_SEARCH_PATHS = "$CONFIGURATION_TEMP_DIR/Grok.build/Install/include $CONFIGURATION_TEMP_DIR/GDCM.build/Install/include $CONFIGURATION_TEMP_DIR/OpenSSL.build/Install/include $CONFIGURATION_TEMP_DIR/CharLS.build/Install/include $CONFIGURATION_TEMP_DIR/ITK.build/Install/include $CONFIGURATION_TEMP_DIR/VTK.build/Install/include"; USER_HEADER_SEARCH_PATHS = "$(inherited) Binaries/dcmtk-source"; @@ -13683,6 +13676,7 @@ }; 7E76BED9085757B70073649A /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 631FDDD8244D779400D60CC7 /* Signing Configuration.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -13749,9 +13743,6 @@ AB0F3A2E1046BD2D004129DD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = TPT6TVH8UY; DYLIB_COMPATIBILITY_VERSION = 1.0.0; INFOPLIST_FILE = "$(SRCROOT)/API/Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; @@ -13759,7 +13750,6 @@ OTHER_CFLAGS = "-fvisibility=default"; PRODUCT_BUNDLE_IDENTIFIER = org.horosproject.api; PRODUCT_NAME = Horos; - PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -13767,10 +13757,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Decompress/Decompress.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = TPT6TVH8UY; - ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = Binaries; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Decompress/prefix.pch; @@ -13790,7 +13776,6 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.horosproject.decompress; PRODUCT_NAME = Decompress; - PROVISIONING_PROFILE_SPECIFIER = ""; SYSTEM_HEADER_SEARCH_PATHS = "$CONFIGURATION_TEMP_DIR/Grok.build/Install/include $CONFIGURATION_TEMP_DIR/CharLS.build/Install/include $CONFIGURATION_TEMP_DIR/GDCM.build/Install/include $CONFIGURATION_TEMP_DIR/VTK.build/Install/include Binaries/Ming"; USER_HEADER_SEARCH_PATHS = "$(inherited) Binaries/dcmtk-source"; }; diff --git a/Horos/Signing Configuration.xcconfig b/Horos/Signing Configuration.xcconfig new file mode 100644 index 0000000000..f9bd9d4727 --- /dev/null +++ b/Horos/Signing Configuration.xcconfig @@ -0,0 +1,29 @@ +// +// Signing Configuration.xcconfig +// Horos +// +// Created by David Davies-Payne on 20/04/20. +// Copyright © 2020 The Horos Project. All rights reserved. +// + +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +// Default Horos signing credentials + + +CODE_SIGN_IDENTITY = Developer ID Application +DEVELOPMENT_TEAM = TPT6TVH8UY + + + +// To use your own signing credentials, create a file named "Signing Override.xcconfig" in the Horos/Horos folder. +// "Signing Override.xcconfig" has been added to .gitignore to exclude your changes from the Git repository. + +// Include the following line, replacing "TPT6TVH8UY" with your team's identifier. +// DEVELOPMENT_TEAM = TPT6TVH8UY + +// #include? is available from Xcode 8 onward to conditionally include a .xcconfig file. It will override +// configuration settings or use those above if the file is absent. + +#include? "Signing Override.xcconfig"