From 30c4f48fbdb4e61fa24197a950f9854256602e91 Mon Sep 17 00:00:00 2001 From: kyab Date: Fri, 4 Sep 2020 22:24:11 +0900 Subject: [PATCH] Support OSX 10.3 or later --- .../Logs/Debug/LogStoreManifest.plist | 37 ++++++++++++++++++- MySpleeter.xcodeproj/project.pbxproj | 26 ++++++++----- .../xcschemes/xcschememanagement.plist | 8 ++++ MySpleeter/MySpleeter.entitlements | 14 +++++-- MySpleeter/SpleeterWrapper.m | 5 +++ 5 files changed, 76 insertions(+), 14 deletions(-) diff --git a/DerivedData/MySpleeter/Logs/Debug/LogStoreManifest.plist b/DerivedData/MySpleeter/Logs/Debug/LogStoreManifest.plist index c8c83d1..e0f248c 100644 --- a/DerivedData/MySpleeter/Logs/Debug/LogStoreManifest.plist +++ b/DerivedData/MySpleeter/Logs/Debug/LogStoreManifest.plist @@ -5,6 +5,41 @@ logFormatVersion 10 logs - + + 27C69FD4-5085-4178-9F68-2C0D04962C95 + + className + DBGConsoleLog + documentTypeString + com.apple.dt.IDE.DebuggerLogContentType + domainType + Xcode.IDEActivityLogDomainType.DebugLog + fileName + 27C69FD4-5085-4178-9F68-2C0D04962C95.xcactivitylog + hasPrimaryLog + + primaryObservable + + highLevelStatus + S + + schemeIdentifier-containerName + MySpleeter project + schemeIdentifier-schemeName + MySpleeter + schemeIdentifier-sharedScheme + 1 + signature + Debug MySpleeter + timeStartedRecording + 620821423.58752799 + timeStoppedRecording + 620821426.40916598 + title + Debug MySpleeter + uniqueIdentifier + 27C69FD4-5085-4178-9F68-2C0D04962C95 + + diff --git a/MySpleeter.xcodeproj/project.pbxproj b/MySpleeter.xcodeproj/project.pbxproj index 61b02a9..31be206 100644 --- a/MySpleeter.xcodeproj/project.pbxproj +++ b/MySpleeter.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + EB42FA8024FFEA18005F7B49 /* MySpleeterDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MySpleeterDebug.entitlements; sourceTree = ""; }; EB716DE024FE543B00ED4FA1 /* MySpleeter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MySpleeter.app; sourceTree = BUILT_PRODUCTS_DIR; }; EB716DE324FE543B00ED4FA1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; EB716DE424FE543B00ED4FA1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -77,6 +78,7 @@ EB716DE224FE543B00ED4FA1 /* MySpleeter */ = { isa = PBXGroup; children = ( + EB42FA8024FFEA18005F7B49 /* MySpleeterDebug.entitlements */, EB716DF424FE54B700ED4FA1 /* AppController.h */, EB716DF524FE54B700ED4FA1 /* AppController.m */, EB716E0324FF9D1400ED4FA1 /* SpleeterWrapper.h */, @@ -248,7 +250,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -300,7 +302,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; @@ -311,11 +313,13 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = MySpleeter/MySpleeter.entitlements; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_ENTITLEMENTS = MySpleeter/MySpleeterDebug.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; + CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = A386R5WFZ6; - ENABLE_HARDENED_RUNTIME = NO; + DEVELOPMENT_TEAM = ""; + ENABLE_HARDENED_RUNTIME = YES; HEADER_SEARCH_PATHS = /Users/koji/work/mypython/devbuild/include/python3.7m; INFOPLIST_FILE = MySpleeter/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -331,6 +335,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.kyab.MySpleeter; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -339,10 +344,12 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = MySpleeter/MySpleeter.entitlements; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; + CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = A386R5WFZ6; - ENABLE_HARDENED_RUNTIME = NO; + DEVELOPMENT_TEAM = ""; + ENABLE_HARDENED_RUNTIME = YES; HEADER_SEARCH_PATHS = /Users/koji/work/mypython/devbuild/include/python3.7m; INFOPLIST_FILE = MySpleeter/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -358,6 +365,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.kyab.MySpleeter; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; diff --git a/MySpleeter.xcodeproj/xcuserdata/koji.xcuserdatad/xcschemes/xcschememanagement.plist b/MySpleeter.xcodeproj/xcuserdata/koji.xcuserdatad/xcschemes/xcschememanagement.plist index 4136275..6eea68b 100644 --- a/MySpleeter.xcodeproj/xcuserdata/koji.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/MySpleeter.xcodeproj/xcuserdata/koji.xcuserdatad/xcschemes/xcschememanagement.plist @@ -10,5 +10,13 @@ 0 + SuppressBuildableAutocreation + + EB716DDF24FE543B00ED4FA1 + + primary + + + diff --git a/MySpleeter/MySpleeter.entitlements b/MySpleeter/MySpleeter.entitlements index f2ef3ae..00f46d6 100644 --- a/MySpleeter/MySpleeter.entitlements +++ b/MySpleeter/MySpleeter.entitlements @@ -2,9 +2,15 @@ - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-executable-page-protection + + com.apple.security.cs.disable-library-validation + diff --git a/MySpleeter/SpleeterWrapper.m b/MySpleeter/SpleeterWrapper.m index ea24109..c1e3795 100644 --- a/MySpleeter/SpleeterWrapper.m +++ b/MySpleeter/SpleeterWrapper.m @@ -110,6 +110,11 @@ -(void)makeSeparator5stems{ NSLog(@"initializing separator..."); PyObject *pName = PyUnicode_DecodeFSDefault("spleeter.separator"); PyObject *pModule = PyImport_Import(pName); + if(!pModule){ + NSString *pyErr = [self getPythonError]; + NSLog(@"%@", pyErr); + return; + } PyObject *pFunc = PyObject_GetAttrString(pModule, "Separator"); PyObject *pArgs = PyTuple_New(1); PyObject *pArg = PyUnicode_DecodeFSDefault("spleeter:5stems");