Skip to content

Commit 6ba93b1

Browse files
committed
FIX: Mac IL2CPP fixes
1 parent 1808007 commit 6ba93b1

File tree

5 files changed

+31
-14
lines changed

5 files changed

+31
-14
lines changed

Assets/StandaloneFileBrowser/Plugins/StandaloneFileBrowser.bundle/Contents/Info.plist

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>BuildMachineOSBuild</key>
6-
<string>16G29</string>
6+
<string>18A391</string>
77
<key>CFBundleDevelopmentRegion</key>
88
<string>English</string>
99
<key>CFBundleExecutable</key>
@@ -31,16 +31,16 @@
3131
<key>DTCompiler</key>
3232
<string>com.apple.compilers.llvm.clang.1_0</string>
3333
<key>DTPlatformBuild</key>
34-
<string>9A235</string>
34+
<string>10A255</string>
3535
<key>DTPlatformVersion</key>
3636
<string>GM</string>
3737
<key>DTSDKBuild</key>
38-
<string>17A360</string>
38+
<string>18A384</string>
3939
<key>DTSDKName</key>
40-
<string>macosx10.13</string>
40+
<string>macosx10.14</string>
4141
<key>DTXcode</key>
42-
<string>0900</string>
42+
<string>1000</string>
4343
<key>DTXcodeBuild</key>
44-
<string>9A235</string>
44+
<string>10A255</string>
4545
</dict>
4646
</plist>

Assets/StandaloneFileBrowser/StandaloneFileBrowserMac.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ public class StandaloneFileBrowserMac : IStandaloneFileBrowser {
1212
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
1313
public delegate void AsyncCallback(string path);
1414

15+
[AOT.MonoPInvokeCallback(typeof(AsyncCallback))]
16+
private static void openFileCb(string result) {
17+
_openFileCb.Invoke(result.Split((char)28));
18+
}
19+
20+
[AOT.MonoPInvokeCallback(typeof(AsyncCallback))]
21+
private static void openFolderCb(string result) {
22+
_openFolderCb.Invoke(result.Split((char)28));
23+
}
24+
25+
[AOT.MonoPInvokeCallback(typeof(AsyncCallback))]
26+
private static void saveFileCb(string result) {
27+
_saveFileCb.Invoke(result);
28+
}
29+
1530
[DllImport("StandaloneFileBrowser")]
1631
private static extern IntPtr DialogOpenFilePanel(string title, string directory, string extension, bool multiselect);
1732
[DllImport("StandaloneFileBrowser")]
@@ -41,7 +56,7 @@ public void OpenFilePanelAsync(string title, string directory, ExtensionFilter[]
4156
directory,
4257
GetFilterFromFileExtensionList(extensions),
4358
multiselect,
44-
(string result) => { _openFileCb.Invoke(result.Split((char)28)); });
59+
openFileCb);
4560
}
4661

4762
public string[] OpenFolderPanel(string title, string directory, bool multiselect) {
@@ -58,7 +73,7 @@ public void OpenFolderPanelAsync(string title, string directory, bool multiselec
5873
title,
5974
directory,
6075
multiselect,
61-
(string result) => { _openFolderCb.Invoke(result.Split((char)28)); });
76+
openFolderCb);
6277
}
6378

6479
public string SaveFilePanel(string title, string directory, string defaultName, ExtensionFilter[] extensions) {
@@ -76,7 +91,7 @@ public void SaveFilePanelAsync(string title, string directory, string defaultNam
7691
directory,
7792
defaultName,
7893
GetFilterFromFileExtensionList(extensions),
79-
(string result) => { _saveFileCb.Invoke(result); });
94+
saveFileCb);
8095
}
8196

8297
private static string GetFilterFromFileExtensionList(ExtensionFilter[] extensions) {

Plugins/MacOS/StandaloneFileBrowser/StandaloneFileBrowser.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
1717
32BAE0B30371A71500C91783 /* Plugin.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Plugin.pch; sourceTree = "<group>"; };
1818
6A3F7D2310AAFB3D00948A73 /* Plugin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Plugin.mm; sourceTree = "<group>"; };
19-
6A3F7F7E10AC146D00948A73 /* StandaloneFileBroser.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StandaloneFileBroser.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
19+
6A3F7F7E10AC146D00948A73 /* StandaloneFileBrowser.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StandaloneFileBrowser.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
2020
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
2121
DD2760001CA14C26008BCDB8 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = ../../../../../../../../../System/Library/Frameworks/AppKit.framework; sourceTree = "<group>"; };
2222
/* End PBXFileReference section */
@@ -74,7 +74,7 @@
7474
19C28FB4FE9D528D11CA2CBB /* Products */ = {
7575
isa = PBXGroup;
7676
children = (
77-
6A3F7F7E10AC146D00948A73 /* StandaloneFileBroser.bundle */,
77+
6A3F7F7E10AC146D00948A73 /* StandaloneFileBrowser.bundle */,
7878
);
7979
name = Products;
8080
sourceTree = "<group>";
@@ -96,7 +96,7 @@
9696
);
9797
name = StandaloneFileBrowser;
9898
productName = ASimplePlugin;
99-
productReference = 6A3F7F7E10AC146D00948A73 /* StandaloneFileBroser.bundle */;
99+
productReference = 6A3F7F7E10AC146D00948A73 /* StandaloneFileBrowser.bundle */;
100100
productType = "com.apple.product-type.bundle";
101101
};
102102
/* End PBXNativeTarget section */
@@ -186,7 +186,7 @@
186186
isa = XCBuildConfiguration;
187187
buildSettings = {
188188
ALWAYS_SEARCH_USER_PATHS = NO;
189-
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
189+
ARCHS = "$(ARCHS_STANDARD)";
190190
COPY_PHASE_STRIP = NO;
191191
GCC_DYNAMIC_NO_PIC = NO;
192192
GCC_ENABLE_FIX_AND_CONTINUE = YES;
@@ -203,6 +203,7 @@
203203
PREBINDING = NO;
204204
PRODUCT_BUNDLE_IDENTIFIER = com.gkngkc.sfb;
205205
PRODUCT_NAME = StandaloneFileBrowser;
206+
VALID_ARCHS = x86_64;
206207
WRAPPER_EXTENSION = bundle;
207208
};
208209
name = Debug;
@@ -211,7 +212,7 @@
211212
isa = XCBuildConfiguration;
212213
buildSettings = {
213214
ALWAYS_SEARCH_USER_PATHS = NO;
214-
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
215+
ARCHS = "$(ARCHS_STANDARD)";
215216
COPY_PHASE_STRIP = YES;
216217
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
217218
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -227,6 +228,7 @@
227228
PREBINDING = NO;
228229
PRODUCT_BUNDLE_IDENTIFIER = com.gkngkc.sfb;
229230
PRODUCT_NAME = StandaloneFileBrowser;
231+
VALID_ARCHS = x86_64;
230232
WRAPPER_EXTENSION = bundle;
231233
ZERO_LINK = NO;
232234
};

0 commit comments

Comments
 (0)