Răsfoiți Sursa

[macOS] Bump min. version to 10.13, and remove deprecated code.

(cherry picked from commit fd3e7e25e8c0bed2e8a2418d2b167720e9a532e9)
bruvzg 2 ani în urmă
părinte
comite
5eca175816
2 a modificat fișierele cu 4 adăugiri și 19 ștergeri
  1. 4 4
      platform/osx/detect.py
  2. 0 15
      platform/osx/os_osx.mm

+ 4 - 4
platform/osx/detect.py

@@ -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":

+ 0 - 15
platform/osx/os_osx.mm

@@ -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);