[macOS] Bump min. version to 10.13, and remove deprecated code.
(cherry picked from commit fd3e7e25e8
)
This commit is contained in:
parent
8a5fb8c69b
commit
5eca175816
|
@ -83,10 +83,10 @@ def configure(env):
|
|||
env.Append(CCFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
|
||||
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
|
||||
else:
|
||||
print("Building for macOS 10.12+, platform x86-64.")
|
||||
env.Append(ASFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"])
|
||||
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"])
|
||||
print("Building for macOS 10.13+, platform x86-64.")
|
||||
env.Append(ASFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.13"])
|
||||
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.13"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.13"])
|
||||
|
||||
if not "osxcross" in env: # regular native build
|
||||
if env["macports_clang"] != "no":
|
||||
|
|
|
@ -510,11 +510,7 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
|
|||
trackingArea = nil;
|
||||
imeInputEventInProgress = false;
|
||||
[self updateTrackingAreas];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
||||
[self registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeFileURL]];
|
||||
#else
|
||||
[self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||
#endif
|
||||
markedText = [[NSMutableAttributedString alloc] init];
|
||||
return self;
|
||||
}
|
||||
|
@ -660,7 +656,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||
Vector<String> files;
|
||||
NSPasteboard *pboard = [sender draggingPasteboard];
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
||||
NSArray *items = pboard.pasteboardItems;
|
||||
for (NSPasteboardItem *item in items) {
|
||||
NSString *path = [item stringForType:NSPasteboardTypeFileURL];
|
||||
|
@ -671,16 +666,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||
free(utfs);
|
||||
files.push_back(ret);
|
||||
}
|
||||
#else
|
||||
NSArray *filenames = [pboard propertyListForType:NSFilenamesPboardType];
|
||||
for (NSString *ns in filenames) {
|
||||
char *utfs = strdup([ns UTF8String]);
|
||||
String ret;
|
||||
ret.parse_utf8(utfs);
|
||||
free(utfs);
|
||||
files.push_back(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (files.size()) {
|
||||
OS_OSX::singleton->main_loop->drop_files(files, 0);
|
||||
|
|
Loading…
Reference in New Issue