diff --git a/DockPhobia.xcodeproj/project.pbxproj b/DockPhobia.xcodeproj/project.pbxproj index 3c9d2ac..0ba82f6 100644 --- a/DockPhobia.xcodeproj/project.pbxproj +++ b/DockPhobia.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ A9C9AF812DE7776A0039D7A5 /* DockSide.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C9AF802DE777530039D7A5 /* DockSide.swift */; }; A9C9AF832DE77CB70039D7A5 /* SkyHigh.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C9AF822DE77CB70039D7A5 /* SkyHigh.swift */; }; A9C9B0682DE888B20039D7A5 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C9B0672DE888B20039D7A5 /* Preferences.swift */; }; + A9C9B06D2DE99E5F0039D7A5 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = A9C9B06C2DE99E5F0039D7A5 /* Sparkle */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -36,6 +37,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A9C9B06D2DE99E5F0039D7A5 /* Sparkle in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -108,6 +110,7 @@ ); name = DockPhobia; packageProductDependencies = ( + A9C9B06C2DE99E5F0039D7A5 /* Sparkle */, ); productName = DockPhobia; productReference = A966B4D62DE0841000C721A5 /* DockPhobia.app */; @@ -138,6 +141,9 @@ ); mainGroup = A966B4CD2DE0841000C721A5; minimizedProjectReferenceProxies = 1; + packageReferences = ( + A9C9B06B2DE99E5F0039D7A5 /* XCRemoteSwiftPackageReference "Sparkle" */, + ); productRefGroup = A966B4D72DE0841000C721A5 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -388,6 +394,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + A9C9B06B2DE99E5F0039D7A5 /* XCRemoteSwiftPackageReference "Sparkle" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/sparkle-project/Sparkle"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.7.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + A9C9B06C2DE99E5F0039D7A5 /* Sparkle */ = { + isa = XCSwiftPackageProductDependency; + package = A9C9B06B2DE99E5F0039D7A5 /* XCRemoteSwiftPackageReference "Sparkle" */; + productName = Sparkle; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = A966B4CE2DE0841000C721A5 /* Project object */; } diff --git a/DockPhobia.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DockPhobia.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..ce07bec --- /dev/null +++ b/DockPhobia.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "e721da7f9826abdffcb6185e886155efa2514bd6234475f1afa893e29eb258d6", + "pins" : [ + { + "identity" : "sparkle", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sparkle-project/Sparkle", + "state" : { + "revision" : "0ca3004e98712ea2b39dd881d28448630cce1c99", + "version" : "2.7.0" + } + } + ], + "version" : 3 +} diff --git a/DockPhobia/.DS_Store b/DockPhobia/.DS_Store index 30ec3dc..fcc6c95 100644 Binary files a/DockPhobia/.DS_Store and b/DockPhobia/.DS_Store differ diff --git a/DockPhobia/AppDelegate.swift b/DockPhobia/AppDelegate.swift index 27df0ab..b84e5f2 100644 --- a/DockPhobia/AppDelegate.swift +++ b/DockPhobia/AppDelegate.swift @@ -6,6 +6,7 @@ // import AppKit +import Sparkle @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @@ -14,9 +15,18 @@ class AppDelegate: NSObject, NSApplicationDelegate { var settings = DPSettingsModel() var mouseTracker: MouseTracker + let updateController: SPUStandardUpdaterController + + var checkforUpdatesMenuItem: NSMenuItem! override init() { self.mouseTracker = MouseTracker(settings: settings) + //call .startUpdater() later + updateController = SPUStandardUpdaterController( + startingUpdater: true, + updaterDelegate: nil, + userDriverDelegate: nil + ) super.init() } @@ -42,6 +52,10 @@ class AppDelegate: NSObject, NSApplicationDelegate { let start = NSMenuItem(title: describeStartButton(), action: #selector(didTapStart), keyEquivalent: "") menu.addItem(start) + checkforUpdatesMenuItem.target = updateController + checkforUpdatesMenuItem.action = #selector(SPUStandardUpdaterController.checkForUpdates(_:)) + menu.addItem(checkforUpdatesMenuItem) + let screen = NSMenuItem( title: "\(mouseTracker.screen.width)x\(mouseTracker.screen.height)", action: nil, diff --git a/DockPhobia/Views/MainMenu.xib b/DockPhobia/Views/MainMenu.xib index 7b74c7d..8f024e1 100644 --- a/DockPhobia/Views/MainMenu.xib +++ b/DockPhobia/Views/MainMenu.xib @@ -414,19 +414,6 @@ - - - - - - - - - - - - - - +