Skip to content

Commit

Permalink
fixes for Xcode 10 and Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehlen, David committed Oct 28, 2018
1 parent c082fd0 commit 2f64fd1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
18 changes: 11 additions & 7 deletions TRexAboutWindowController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
63FB01BC1B63AAB3001AE3EF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "David Ehlen";
TargetAttributes = {
63FB01C31B63AAB3001AE3EF = {
Expand Down Expand Up @@ -178,12 +178,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -215,7 +217,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -231,12 +233,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand All @@ -261,7 +265,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -274,8 +278,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.david-ehlen.TRexAboutWindowController";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -288,8 +292,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.david-ehlen.TRexAboutWindowController";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions TRexAboutWindowController/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
var aboutWindowController:TRexAboutWindowController

override init() {
self.aboutWindowController = TRexAboutWindowController(windowNibName: NSNib.Name(rawValue: "PFAboutWindow"))
self.aboutWindowController = TRexAboutWindowController(windowNibName: NSNib.Name("PFAboutWindow"))
super.init()
}

Expand All @@ -32,12 +32,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

@IBAction func showAboutWindow(_ sender:AnyObject) {
aboutWindowController = TRexAboutWindowController(windowNibName: NSNib.Name(rawValue: "PFAboutWindow"))
aboutWindowController = TRexAboutWindowController(windowNibName: NSNib.Name("PFAboutWindow"))
self.aboutWindowController.appURL = URL(string:"https://github.com/T-Rex-Editor/")
self.aboutWindowController.appName = "TRex-Editor"
let font = NSFont(name: "HelveticaNeue", size: 11.0) ?? NSFont.systemFont(ofSize: 11.0)
let color = NSColor.tertiaryLabelColor
let attribs:[NSAttributedStringKey : AnyObject] = [.foregroundColor : color,
let attribs:[NSAttributedString.Key : AnyObject] = [.foregroundColor : color,
.font : font]


Expand Down
2 changes: 1 addition & 1 deletion TRexAboutWindowController/TRexAboutWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ open class TRexAboutWindowController : NSWindowController {
if self.appCopyright.string.isEmpty {
let font = NSFont(name: "HelveticaNeue", size: 11.0) ?? NSFont.systemFont(ofSize: 11.0)
let color = floor(NSAppKitVersion.current.rawValue) <= Double((NSAppKitVersion.macOS10_9).rawValue) ? NSColor.lightGray : NSColor.tertiaryLabelColor
let attribs:[ NSAttributedStringKey : Any] = [.foregroundColor : color,
let attribs:[ NSAttributedString.Key : Any] = [.foregroundColor : color,
.font : font]
self.appCopyright = NSAttributedString(string: valueFromInfoDict("NSHumanReadableCopyright") ?? "", attributes:attribs)
}
Expand Down

0 comments on commit 2f64fd1

Please sign in to comment.