From fe13d1c73951c5cae7f44dd2147bdbe028163299 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Thu, 11 Jun 2020 16:24:01 +0200 Subject: [PATCH] Swift5 --- Docsis Toolkit.xcodeproj/project.pbxproj | 29 ++++++++++++------- .../xcshareddata/xcschemes/All.xcscheme | 10 ++----- .../xcschemes/Converter.xcscheme | 10 ++----- .../xcschemes/Graphic Analysis 2.xcscheme | 10 ++----- .../xcschemes/Logger4.xcscheme | 10 ++----- Graphic Analysis 2/Document.swift | 6 ++-- Graphic Analysis 2/GraphWindow.swift | 2 +- Graphic Analysis 2/Info.plist | 2 +- Graphic Analysis 2/PDFDraw.swift | 2 +- .../PDFItemViewController.swift | 4 +-- Graphic Analysis 2/PDFTitle.swift | 2 +- Graphic Analysis 2/buildnum.ver | 2 +- Logger4/AppDelegate.swift | 4 +-- Logger4/Info.plist | 2 +- Logger4/buildnum.ver | 2 +- 15 files changed, 45 insertions(+), 52 deletions(-) diff --git a/Docsis Toolkit.xcodeproj/project.pbxproj b/Docsis Toolkit.xcodeproj/project.pbxproj index 03b135e..22b06cc 100644 --- a/Docsis Toolkit.xcodeproj/project.pbxproj +++ b/Docsis Toolkit.xcodeproj/project.pbxproj @@ -577,19 +577,19 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1150; ORGANIZATIONNAME = "Kilian Hofmann"; TargetAttributes = { E220BF9B1EFB22D400DF5A97 = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = 795KPDV76S; - LastSwiftMigration = 0900; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; E2218C971EF2D345004298F6 = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = 795KPDV76S; - LastSwiftMigration = 0900; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; E2218CE51EF2D577004298F6 = { @@ -600,7 +600,7 @@ E2218D281EF3271F004298F6 = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = 795KPDV76S; - LastSwiftMigration = 0900; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; E2218D3D1EF32803004298F6 = { @@ -615,6 +615,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -751,6 +752,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Converter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.12; @@ -758,7 +760,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -768,6 +770,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Converter/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.12; @@ -775,7 +778,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -783,6 +786,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -843,6 +847,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -899,6 +904,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Logger4/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.weebly.alikja.Logger4; @@ -907,7 +913,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "Logger4/Logger4-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -919,6 +925,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Logger4/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.weebly.alikja.Logger4; @@ -926,7 +933,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Logger4/Logger4-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -962,6 +969,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = "Graphic Analysis 2/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.weebly.alikja.Graphic-Analysis-2"; @@ -969,7 +977,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_DISABLE_SAFETY_CHECKS = NO; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -980,6 +988,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = 795KPDV76S; + ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = "Graphic Analysis 2/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.weebly.alikja.Graphic-Analysis-2"; @@ -988,7 +997,7 @@ SWIFT_DISABLE_SAFETY_CHECKS = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Docsis Toolkit.xcodeproj/xcshareddata/xcschemes/All.xcscheme b/Docsis Toolkit.xcodeproj/xcshareddata/xcschemes/All.xcscheme index c92d46e..4ac9258 100644 --- a/Docsis Toolkit.xcodeproj/xcshareddata/xcschemes/All.xcscheme +++ b/Docsis Toolkit.xcodeproj/xcshareddata/xcschemes/All.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - - - - - + + - - - - - - + + - - - - - - + + - - NSPrintOperation { let printOperation: NSPrintOperation = NSPrintOperation(view: collectionViewMonth) printOperation.printInfo.orientation = .landscape - printOperation.printInfo.horizontalPagination = .fitPagination - printOperation.printInfo.verticalPagination = .fitPagination + printOperation.printInfo.horizontalPagination = .fit + printOperation.printInfo.verticalPagination = .fit printOperation.printInfo.topMargin = 1 printOperation.printInfo.rightMargin = 1 printOperation.printInfo.bottomMargin = 1 diff --git a/Graphic Analysis 2/GraphWindow.swift b/Graphic Analysis 2/GraphWindow.swift index 5df69d0..4f0252c 100644 --- a/Graphic Analysis 2/GraphWindow.swift +++ b/Graphic Analysis 2/GraphWindow.swift @@ -24,7 +24,7 @@ class GraphWindow: NSWindowController { let loadingQueue4: OperationQueue = OperationQueue() override var windowNibName: NSNib.Name? { - return NSNib.Name(rawValue: "GraphWindow") + return "GraphWindow" } required init?(coder: NSCoder) { diff --git a/Graphic Analysis 2/Info.plist b/Graphic Analysis 2/Info.plist index 7ffe635..d42e80a 100644 --- a/Graphic Analysis 2/Info.plist +++ b/Graphic Analysis 2/Info.plist @@ -44,7 +44,7 @@ CFBundleShortVersionString 2.1 CFBundleVersion - 496 + 499 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/Graphic Analysis 2/PDFDraw.swift b/Graphic Analysis 2/PDFDraw.swift index 469757b..d7b0f3e 100644 --- a/Graphic Analysis 2/PDFDraw.swift +++ b/Graphic Analysis 2/PDFDraw.swift @@ -48,7 +48,7 @@ class PDFDraw: NSWindowController { //override var windowNibName: NSNib.Name! { override var windowNibName: NSNib.Name? { - return NSNib.Name(rawValue: "PDFDraw") + return "PDFDraw" } required init?(coder: NSCoder) diff --git a/Graphic Analysis 2/PDFItemViewController.swift b/Graphic Analysis 2/PDFItemViewController.swift index c439efa..5ebba59 100644 --- a/Graphic Analysis 2/PDFItemViewController.swift +++ b/Graphic Analysis 2/PDFItemViewController.swift @@ -25,14 +25,14 @@ class PDFItemViewController: NSViewController { } init(dayFW: FileWrapper?, day: Int, monthName: String) { - super.init(nibName: NSNib.Name(rawValue: "PDFItemViewController"), bundle: Bundle.main) + super.init(nibName: "PDFItemViewController", bundle: Bundle.main) self.dayFW = dayFW self.dayI = day self.monthName = monthName } init(dayFW: FileWrapper?, day: Int) { - super.init(nibName: NSNib.Name(rawValue: "PDFItemViewController"), bundle: Bundle.main) + super.init(nibName: "PDFItemViewController", bundle: Bundle.main) self.dayFW = dayFW self.dayI = day } diff --git a/Graphic Analysis 2/PDFTitle.swift b/Graphic Analysis 2/PDFTitle.swift index fae7fef..35ed596 100644 --- a/Graphic Analysis 2/PDFTitle.swift +++ b/Graphic Analysis 2/PDFTitle.swift @@ -31,7 +31,7 @@ class PDFTitle: NSWindowController { } override var windowNibName: NSNib.Name? { - return NSNib.Name(rawValue: "PDFTitle") + return "PDFTitle" } required init?(coder: NSCoder) diff --git a/Graphic Analysis 2/buildnum.ver b/Graphic Analysis 2/buildnum.ver index 0ca8281..5a95f5f 100644 --- a/Graphic Analysis 2/buildnum.ver +++ b/Graphic Analysis 2/buildnum.ver @@ -1,2 +1,2 @@ version 2.1 -build 496 +build 499 diff --git a/Logger4/AppDelegate.swift b/Logger4/AppDelegate.swift index 8d20ada..a781b24 100644 --- a/Logger4/AppDelegate.swift +++ b/Logger4/AppDelegate.swift @@ -24,7 +24,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { // URL Session for DOCSIS data and Internet check let urlSession: URLSession = URLSession(configuration: .default) // Preferences - let pref: NSWindowController = NSWindowController(windowNibName: NSNib.Name(rawValue: "SettingsWindowController")) + let pref: NSWindowController = NSWindowController(windowNibName: "SettingsWindowController") // Timers var timerFreqs: Timer = Timer() var timerFails: Timer = Timer() @@ -60,7 +60,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { let menuAbout: NSMenuItem = NSMenuItem(title: "About Logger", action: #selector(NSApp.orderFrontStandardAboutPanel(_:)), keyEquivalent: "") let menuQuit: NSMenuItem = NSMenuItem.init(title: "Quit", action: #selector(NSApp.terminate(_:)), keyEquivalent: "q") let menuPref: NSMenuItem = NSMenuItem(title: "Preferences", action: #selector(self.preferences(_:)), keyEquivalent: "") - menuPref.image = NSImage(named: NSImage.Name.actionTemplate) + menuPref.image = NSImage(named: NSImage.actionTemplateName) // Layout menu menu.addItem(menuAbout) menu.addItem(NSMenuItem.separator()) diff --git a/Logger4/Info.plist b/Logger4/Info.plist index da1c648..f258208 100644 --- a/Logger4/Info.plist +++ b/Logger4/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString 4.2 CFBundleVersion - 50 + 51 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/Logger4/buildnum.ver b/Logger4/buildnum.ver index ad85d96..a316536 100644 --- a/Logger4/buildnum.ver +++ b/Logger4/buildnum.ver @@ -1,2 +1,2 @@ version 4.2 -build 50 +build 51