From 38059738aa66502ee44cf1c1b25163bc781cae1b Mon Sep 17 00:00:00 2001 From: Andrei Aristarkhov Date: Thu, 6 Feb 2020 15:11:17 -0800 Subject: [PATCH 1/2] add ASimplePlugin.bundle build target --- .../ASimplePlugin.xcodeproj/project.pbxproj | 80 +++++++++++++++++++ .../macOS/ASimplePlugin/Info.plist | 26 ++++++ 2 files changed, 106 insertions(+) create mode 100644 SimplestPluginExample/PluginSource/macOS/ASimplePlugin/Info.plist diff --git a/SimplestPluginExample/PluginSource/macOS/ASimplePlugin.xcodeproj/project.pbxproj b/SimplestPluginExample/PluginSource/macOS/ASimplePlugin.xcodeproj/project.pbxproj index 3d32e38..7e148ea 100644 --- a/SimplestPluginExample/PluginSource/macOS/ASimplePlugin.xcodeproj/project.pbxproj +++ b/SimplestPluginExample/PluginSource/macOS/ASimplePlugin.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ /* Begin PBXFileReference section */ 751E8CC02368EE3F0015D357 /* ASimplePlugin.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = ASimplePlugin.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 75BF2C7D23EA038D00C48203 /* ASimplePlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ASimplePlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 75BF2C7F23EA038D00C48203 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 75EC0B582368FA8400157809 /* Plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Plugin.cpp; path = ../Plugin.cpp; sourceTree = ""; }; /* End PBXFileReference section */ @@ -30,6 +32,7 @@ isa = PBXGroup; children = ( 75EC0B582368FA8400157809 /* Plugin.cpp */, + 75BF2C7E23EA038D00C48203 /* ASimplePlugin */, 751E8CC12368EE3F0015D357 /* Products */, ); sourceTree = ""; @@ -38,10 +41,19 @@ isa = PBXGroup; children = ( 751E8CC02368EE3F0015D357 /* ASimplePlugin.dylib */, + 75BF2C7D23EA038D00C48203 /* ASimplePlugin.bundle */, ); name = Products; sourceTree = ""; }; + 75BF2C7E23EA038D00C48203 /* ASimplePlugin */ = { + isa = PBXGroup; + children = ( + 75BF2C7F23EA038D00C48203 /* Info.plist */, + ); + path = ASimplePlugin; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -72,6 +84,23 @@ productReference = 751E8CC02368EE3F0015D357 /* ASimplePlugin.dylib */; productType = "com.apple.product-type.library.dynamic"; }; + 75BF2C7C23EA038D00C48203 /* ASimplePlugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 75BF2C8223EA038D00C48203 /* Build configuration list for PBXNativeTarget "ASimplePlugin" */; + buildPhases = ( + 751E8CBD2368EE3F0015D357 /* Sources */, + 751E8CBE2368EE3F0015D357 /* Frameworks */, + 75BF2C7B23EA038D00C48203 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ASimplePlugin; + productName = ASimplePlugin; + productReference = 75BF2C7D23EA038D00C48203 /* ASimplePlugin.bundle */; + productType = "com.apple.product-type.bundle"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -84,6 +113,9 @@ 751E8CBF2368EE3F0015D357 = { CreatedOnToolsVersion = 11.0; }; + 75BF2C7C23EA038D00C48203 = { + CreatedOnToolsVersion = 11.3.1; + }; }; }; buildConfigurationList = 751E8CBB2368EE3F0015D357 /* Build configuration list for PBXProject "ASimplePlugin" */; @@ -100,10 +132,21 @@ projectRoot = ""; targets = ( 751E8CBF2368EE3F0015D357 /* ASimplePlugin */, + 75BF2C7C23EA038D00C48203 /* ASimplePlugin */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 75BF2C7B23EA038D00C48203 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 751E8CBD2368EE3F0015D357 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -245,6 +288,34 @@ }; name = Release; }; + 75BF2C8023EA038D00C48203 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ASimplePlugin/Info.plist; + INSTALL_PATH = /Library/Bundles; + PRODUCT_BUNDLE_IDENTIFIER = com.unity3d.ASimplePlugin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 75BF2C8123EA038D00C48203 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ASimplePlugin/Info.plist; + INSTALL_PATH = /Library/Bundles; + PRODUCT_BUNDLE_IDENTIFIER = com.unity3d.ASimplePlugin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -266,6 +337,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 75BF2C8223EA038D00C48203 /* Build configuration list for PBXNativeTarget "ASimplePlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 75BF2C8023EA038D00C48203 /* Debug */, + 75BF2C8123EA038D00C48203 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 751E8CB82368EE3F0015D357 /* Project object */; diff --git a/SimplestPluginExample/PluginSource/macOS/ASimplePlugin/Info.plist b/SimplestPluginExample/PluginSource/macOS/ASimplePlugin/Info.plist new file mode 100644 index 0000000..6a69b47 --- /dev/null +++ b/SimplestPluginExample/PluginSource/macOS/ASimplePlugin/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2020 Unity Technologies. All rights reserved. + NSPrincipalClass + + + From c03812796809161a828eeb268b68210722e6ea60 Mon Sep 17 00:00:00 2001 From: Andrei Aristarkhov Date: Tue, 11 Feb 2020 16:46:06 -0800 Subject: [PATCH 2/2] replace .dylib with .bundle in Unity project --- ...n.dylib.meta => ASimplePlugin.bundle.meta} | 3 +- .../macOS/ASimplePlugin.bundle/Contents.meta | 8 ++ .../ASimplePlugin.bundle/Contents/Info.plist | 46 +++++++ .../Contents/Info.plist.meta | 7 ++ .../ASimplePlugin.bundle/Contents/MacOS.meta | 8 ++ .../Contents/MacOS/ASimplePlugin} | Bin 22688 -> 22688 bytes .../Contents/MacOS/ASimplePlugin.meta | 7 ++ .../Contents/_CodeSignature.meta | 8 ++ .../Contents/_CodeSignature/CodeResources | 115 ++++++++++++++++++ .../_CodeSignature/CodeResources.meta | 7 ++ 10 files changed, 208 insertions(+), 1 deletion(-) rename SimplestPluginExample/Unity Project/Assets/Plugins/macOS/{ASimplePlugin.dylib.meta => ASimplePlugin.bundle.meta} (91%) create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents.meta create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist.meta create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS.meta rename SimplestPluginExample/Unity Project/Assets/Plugins/macOS/{ASimplePlugin.dylib => ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin} (97%) create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin.meta create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature.meta create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources create mode 100644 SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources.meta diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.dylib.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle.meta similarity index 91% rename from SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.dylib.meta rename to SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle.meta index c699ab3..9de7108 100644 --- a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.dylib.meta +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle.meta @@ -1,5 +1,6 @@ fileFormatVersion: 2 -guid: d833bbc254b5f43a3b51831f43c55bb8 +guid: f207ddc97576e4c9cbf425de23de4b2e +folderAsset: yes PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents.meta new file mode 100644 index 0000000..121e0c8 --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 33c116a1cf13a46bb9910981457d051e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist new file mode 100644 index 0000000..ac48d76 --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 19D76 + CFBundleDevelopmentRegion + en + CFBundleExecutable + ASimplePlugin + CFBundleIdentifier + com.unity3d.ASimplePlugin + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ASimplePlugin + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 11C504 + DTPlatformVersion + GM + DTSDKBuild + 19B90 + DTSDKName + macosx10.15 + DTXcode + 1130 + DTXcodeBuild + 11C504 + LSMinimumSystemVersion + 10.12 + NSHumanReadableCopyright + Copyright © 2020 Unity Technologies. All rights reserved. + + diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist.meta new file mode 100644 index 0000000..444e00c --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/Info.plist.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a2fd43a9bdfb14656b2fd7031f9e741e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS.meta new file mode 100644 index 0000000..f014c37 --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f7b33fc17ae3c44b3a26699d7ef89226 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.dylib b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin similarity index 97% rename from SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.dylib rename to SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin index b8ea76d3ef9144f89bf08521c0648368893b01a1..63c226b3dbac57b4aab40d71606068b60d61cf1f 100755 GIT binary patch delta 274 zcmZ3mk#WIBM(Ojv-u`1}U|?isU|`??VqPGA!NkDO%D}Kux|MPA1I7gcd4i(%(=VFu zXqv}-{&&MXrO6YR3>n!sA7VPnGdY3TVRJiw1EZx9P$S3?5KsYPpc#yO42&Qyqtvf^ zJU~9fD+VU80EoQ`hz)?4d9s6`h*ffau3l+gW=W-Sik@R|W^O@FYCukDdS)I&TH8H= zMP2$2rOi(7$UVL0g!=g-uLQGwSAT4Yi+YzdZ}#MFK?Mg1^JkYbrON-#XRhW>lkg9C zYQJQ)+j5pE%E#DmonR8-v0HVT*>+>ww2sQfWgM?fw?4h~`#`|0WqValoMRKWnZ>mE IwcsW<05LUN^Z)<= delta 302 zcmZ3mk#WIBM(Ojv-u`1}U|?isU|?VaVm=_&0CHLx1U5>yGFtHh`3^uV0mO_z3?UgA z^h=A2^mFo)6La))GL!TjgEMmra#90wO4Bp*^inE;Vv}bvE)$s3s<67~ok8cU{7m0B zs}kiW2QV2jvTbf+I?A)Toxg$6QXXg`$Zil&0b(Yg1>6vu7{!0x;{oy+o-;6ktp>4| z1F-=}-DC$r5pxu4bxnc5#L~pXGTFk^$RIJv+$c5G*ucWlGSMu}%+e$!H90ZS%+N56 zVRE0K!el`v1%-OK!`eGy{|9=Ti$4}rFYx^v{J8s##Juaz4El@?=Lkh_ekZue4dgrk D_aROJ diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin.meta new file mode 100644 index 0000000..0258d87 --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/MacOS/ASimplePlugin.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e495c039545c84567936ccef7f032da7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature.meta new file mode 100644 index 0000000..29f6e6a --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 43b6e6cb7eff642bcab2dcd24ce807e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..d5d0fd7 --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources @@ -0,0 +1,115 @@ + + + + + files + + files2 + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources.meta b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources.meta new file mode 100644 index 0000000..e741afe --- /dev/null +++ b/SimplestPluginExample/Unity Project/Assets/Plugins/macOS/ASimplePlugin.bundle/Contents/_CodeSignature/CodeResources.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9f684a86136264c35bc4690b86906ff8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: