move most build settings to xcconfig files.

Add an #include to allow developer overrides of build settings so as to
soften the pain of code signing configuration
This commit is contained in:
Olof Hellman 2018-01-07 17:46:23 -08:00
parent b04a4b83f2
commit e3e68e051a
6 changed files with 137 additions and 140 deletions

View File

@ -551,6 +551,11 @@
D5558FD4200225680066386B /* NSAppleEventDescriptor+UserRecordFields.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "NSAppleEventDescriptor+UserRecordFields.swift"; path = "AppleEvents/NSAppleEventDescriptor+UserRecordFields.swift"; sourceTree = SOURCE_ROOT; };
D5558FD7200228B80066386B /* AppleEventUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleEventUtils.swift; sourceTree = "<group>"; };
D5907C9D20023249005947E5 /* testGenericScript.applescript */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.applescript; path = testGenericScript.applescript; sourceTree = "<group>"; };
D5907CDC2002F0BE005947E5 /* Evergreen_project_release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Evergreen_project_release.xcconfig; sourceTree = "<group>"; };
D5907CDD2002F0BE005947E5 /* Evergreen_project_debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Evergreen_project_debug.xcconfig; sourceTree = "<group>"; };
D5907CDE2002F0BE005947E5 /* Evergreen_project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Evergreen_project.xcconfig; sourceTree = "<group>"; };
D5907CDF2002F0F9005947E5 /* EvergreenTests_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = EvergreenTests_target.xcconfig; sourceTree = "<group>"; };
D5907CE02002F0FA005947E5 /* Evergreen_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Evergreen_target.xcconfig; sourceTree = "<group>"; };
D5D175012002039D0047B29D /* Evergreen.sdef */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = Evergreen.sdef; path = ../Resources/Evergreen.sdef; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -902,6 +907,7 @@
849A97991ED9EFB6007D329B /* Resources */,
84FB9A2C1EDCD6A4003D53B9 /* Frameworks */,
849C64741ED37A5D003D8FC0 /* EvergreenTests */,
D5907CDA2002F084005947E5 /* xcconfig */,
849C64611ED37A5D003D8FC0 /* Products */,
846E77301F6EF5D600A165E2 /* Account.xcodeproj */,
846E77161F6EF5D000A165E2 /* Database.xcodeproj */,
@ -1090,6 +1096,18 @@
path = AppleEvents;
sourceTree = "<group>";
};
D5907CDA2002F084005947E5 /* xcconfig */ = {
isa = PBXGroup;
children = (
D5907CDD2002F0BE005947E5 /* Evergreen_project_debug.xcconfig */,
D5907CDC2002F0BE005947E5 /* Evergreen_project_release.xcconfig */,
D5907CDE2002F0BE005947E5 /* Evergreen_project.xcconfig */,
D5907CE02002F0FA005947E5 /* Evergreen_target.xcconfig */,
D5907CDF2002F0F9005947E5 /* EvergreenTests_target.xcconfig */,
);
path = xcconfig;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -1675,179 +1693,45 @@
/* Begin XCBuildConfiguration section */
849C64781ED37A5D003D8FC0 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CDD2002F0BE005947E5 /* Evergreen_project_debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = M8L2WTLA8W;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
849C64791ED37A5D003D8FC0 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CDC2002F0BE005947E5 /* Evergreen_project_release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = M8L2WTLA8W;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Release;
};
849C647B1ED37A5D003D8FC0 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CE02002F0FA005947E5 /* Evergreen_target.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks/Vendor",
);
INFOPLIST_FILE = Evergreen/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
OTHER_SWIFT_FLAGS = "-DDEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.Evergreen;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Debug;
};
849C647C1ED37A5D003D8FC0 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CE02002F0FA005947E5 /* Evergreen_target.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks/Vendor",
);
INFOPLIST_FILE = Evergreen/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
OTHER_SWIFT_FLAGS = "-DRELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.Evergreen;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Release;
};
849C647E1ED37A5D003D8FC0 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CDF2002F0F9005947E5 /* EvergreenTests_target.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = EvergreenTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.EvergreenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Evergreen.app/Contents/MacOS/Evergreen";
};
name = Debug;
};
849C647F1ED37A5D003D8FC0 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D5907CDF2002F0F9005947E5 /* EvergreenTests_target.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = EvergreenTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.EvergreenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Evergreen.app/Contents/MacOS/Evergreen";
};
name = Release;
};

View File

@ -0,0 +1,16 @@
DEVELOPMENT_TEAM = 9C84TZ7Q6Z
CODE_SIGN_STYLE = Automatic
// See the notes in Evergreen_target.xcconfig on why the
// DeveloperSettings.xcconfig is #included here
#include "../../SharedXcodeSettings/DeveloperSettings.xcconfig"
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
COMBINE_HIDPI_IMAGES = YES
BUNDLE_LOADER = $(TEST_HOST)
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
INFOPLIST_FILE = EvergreenTests/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.EvergreenTests
PRODUCT_NAME = $(TARGET_NAME)
TEST_HOST = $(BUILT_PRODUCTS_DIR)/Evergreen.app/Contents/MacOS/Evergreen

View File

@ -0,0 +1,38 @@
SDKROOT = macosx
COPY_PHASE_STRIP = NO
MACOSX_DEPLOYMENT_TARGET = 10.13
ALWAYS_SEARCH_USER_PATHS = NO
GCC_NO_COMMON_BLOCKS = YES
GCC_C_LANGUAGE_STANDARD = gnu99
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
ENABLE_STRICT_OBJC_MSGSEND = YES
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
CLANG_WARN_INFINITE_RECURSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_ANALYZER_NONNULL = YES
SWIFT_SWIFT3_OBJC_INFERENCE = Off
SWIFT_VERSION = 4.0

View File

@ -0,0 +1,13 @@
#include "./Evergreen_project.xcconfig"
ONLY_ACTIVE_ARCH = YES
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
OTHER_SWIFT_FLAGS = -DDEBUG
SWIFT_OPTIMIZATION_LEVEL = -Onone
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG
MTL_ENABLE_DEBUG_INFO = YES

View File

@ -0,0 +1,8 @@
#include "./Evergreen_project.xcconfig"
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
ENABLE_NS_ASSERTIONS = NO
OTHER_SWIFT_FLAGS = -DRELEASE
SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
MTL_ENABLE_DEBUG_INFO = NO

View File

@ -0,0 +1,38 @@
CODE_SIGN_IDENTITY = Developer ID Application
DEVELOPMENT_TEAM = M8L2WTLA8W
CODE_SIGN_STYLE = Manual
PROVISIONING_PROFILE_SPECIFIER =
// developers can locally override the Xcode settings for code signing
// by creating a DeveloperSettings.xcconfig file locally at the appropriate path
// This allows a pristine project to have code signing set up with the appropriate
// developer ID and certificates, and for dev to be able to have local settings
// without needing to check in anything into source control
//
// As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and
// give it the contents
//
// CODE_SIGN_IDENTITY = Mac Developer
// DEVELOPMENT_TEAM = <Your Team ID>
// CODE_SIGN_STYLE = Automatic
// PROVISIONING_PROFILE_SPECIFIER =
//
// And you should be able to build without code signing errors and without modifying
// the Evergreen Xcode project.
//
// Example: if your Evergreen Xcode project file is at
// /Users/Shared/git/Evergreen/Evergreen.xcodeproj
// create your DeveloperSettings.xcconfig file at
// /Users/Shared/git/SharedXcodeSettings/DeveloperSettings.xcconfig
//
#include "../../SharedXcodeSettings/DeveloperSettings.xcconfig"
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
COMBINE_HIDPI_IMAGES = YES
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks
INFOPLIST_FILE = Evergreen/Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.Evergreen
PRODUCT_NAME = $(TARGET_NAME)
FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon