From e0873a02aa7cfc606e612a1a08a1b0882d32e4a0 Mon Sep 17 00:00:00 2001 From: Marcus Ososbase Date: Thu, 22 Feb 2018 06:21:30 -0500 Subject: [PATCH] 1.18.1 upstream update --- .travis.yml | 2 +- CHANGELOG | 14 +++++- Configurations/ConfigCommon.xcconfig | 3 +- Configurations/ConfigSwift.xcconfig | 3 +- Sparkle.podspec | 2 +- Sparkle.xcodeproj/project.pbxproj | 12 ++--- .../xcschemes/Distribution.xcscheme | 4 +- .../xcshareddata/xcschemes/Sparkle.xcscheme | 12 +++-- .../xcshareddata/xcschemes/UITests.xcscheme | 4 +- Sparkle/Autoupdate/TerminationListener.m | 5 ++ Sparkle/SUBasicUpdateDriver.m | 3 ++ Sparkle/SUConstants.h | 1 + Sparkle/SUConstants.m | 1 + Sparkle/SUHost.h | 0 Sparkle/SUHost.m | 0 Sparkle/SUUpdater.m | 8 ++++ Sparkle/SUUpdaterDelegate.h | 7 +++ Sparkle/de.lproj/SUAutomaticUpdateAlert.xib | 12 ++--- Sparkle/de.lproj/SUUpdateAlert.xib | 4 +- Sparkle/de.lproj/SUUpdatePermissionPrompt.xib | 12 ++--- Sparkle/de.lproj/Sparkle.strings | 48 +++++++++---------- Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib | 6 +-- Sparkle/nl.lproj/SUUpdateAlert.xib | 6 +-- Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib | 16 +++---- Sparkle/nl.lproj/Sparkle.strings | 46 +++++++++--------- generate_appcast/DSASignature.swift | 6 +-- generate_appcast/FeedXML.swift | 6 +-- 27 files changed, 143 insertions(+), 100 deletions(-) mode change 100644 => 100755 Sparkle/SUHost.h mode change 100644 => 100755 Sparkle/SUHost.m diff --git a/.travis.yml b/.travis.yml index 2267c6ec..bfec1ffe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode8.2 +osx_image: xcode9 before_install: - brew update script: make ci diff --git a/CHANGELOG b/CHANGELOG index bd9c599e..6e472e0a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,16 @@ -# 1.18.0 +# 1.18.1 + + * Add optional updaterDidRelaunchApplication: method on SUUpdaterDelegate (#1115) (App Tyrant) + * Implemented sparkle:os attribute as documented (Memphiz) + * Additional termination detection in case kpoll fails. (fujisoft) + * Included bin files in CocoaPods installation (Keith Smiley) + * Updated Dutch localization (Eitot) + * Updated German localization (Eitot) + * Updated Japanese translation (1024jp) + * Updated Portuguese translation (Victor) + * Updated to Xcode 9/Swift 4 + + # 1.18.0 * Name of the host app is used in authorization prompt (the `SPARKLE_RELAUNCH_TOOL_NAME` setting is now obsolete) * More detailed progress bar for package installers (Kornel Lesiński) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 6b8560b4..c74247f5 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -17,8 +17,7 @@ SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0 SPARKLE_VERSION_MAJOR = 1 SPARKLE_VERSION_MINOR = 18 -SPARKLE_VERSION_PATCH = 0 -TUNNELBEAR_ID = TB +SPARKLE_VERSION_PATCH = 1 SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(TUNNELBEAR_ID) CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) diff --git a/Configurations/ConfigSwift.xcconfig b/Configurations/ConfigSwift.xcconfig index 8e0862f9..95c45171 100644 --- a/Configurations/ConfigSwift.xcconfig +++ b/Configurations/ConfigSwift.xcconfig @@ -1 +1,2 @@ -SWIFT_VERSION = 3.0 +SWIFT_VERSION = 4.0 +SWIFT_SWIFT3_OBJC_INFERENCE = Off; diff --git a/Sparkle.podspec b/Sparkle.podspec index ba33029c..97495152 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.18.0TB" + s.version = "1.18.1TB" s.summary = "A software update framework for macOS" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org" diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 8175d07a..de720547 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 47; objects = { /* Begin PBXAggregateTarget section */ @@ -1047,7 +1047,6 @@ 1495006D195FBBBD00BC5B5B /* Sparkle */ = { isa = PBXGroup; children = ( - 720767D01E2E3DD300F9A850 /* AppKitPrevention.h */, 61299B3909CB055000B7442F /* Appcast Support */, 55C14BD5136EEFD000649790 /* Autoupdate */, 089C1665FE841158C02AAC07 /* Framework Resources */, @@ -1056,6 +1055,7 @@ 6101354A0DD25B7F0049ACDF /* Unarchiving */, 61F83F6E0DBFE07A006FDD30 /* Update Control */, 61299B3A09CB056100B7442F /* User Interface */, + 720767D01E2E3DD300F9A850 /* AppKitPrevention.h */, ); path = Sparkle; sourceTree = ""; @@ -1633,11 +1633,11 @@ TargetAttributes = { 5AA96C541E0AE0DB00CA4346 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; 612279D80DB5470200AB99EA = { - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; TestTargetID = 8DC2EF4F0486A6940098B216; }; 722954B31D04ADAF00ECF9CA = { @@ -1651,7 +1651,7 @@ }; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 6.3"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -1879,8 +1879,8 @@ 55C14F22136EF86000649790 /* SUStandardVersionComparator.m in Sources */, 55C14F20136EF84300649790 /* SUStatusController.m in Sources */, 55C14F23136EF86700649790 /* SUSystemProfiler.m in Sources */, - 720767CF1E2DC37400F9A850 /* TerminationListener.m in Sources */, E1EC2A301E21667000245715 /* SUTouchBarButtonGroup.m in Sources */, + 720767CF1E2DC37400F9A850 /* TerminationListener.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme index ffa56e90..a02aac52 100644 --- a/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme +++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/Distribution.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme index bd218a23..4a3f3005 100644 --- a/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme +++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme @@ -15,7 +15,7 @@ @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -43,7 +44,7 @@ @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -66,7 +68,7 @@ @@ -84,7 +86,7 @@ diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme index 415d65dd..b9378c5a 100644 --- a/Sparkle.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme +++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/UITests.xcscheme @@ -10,6 +10,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -30,6 +31,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Sparkle/Autoupdate/TerminationListener.m b/Sparkle/Autoupdate/TerminationListener.m index 8c20fd07..5948fb51 100644 --- a/Sparkle/Autoupdate/TerminationListener.m +++ b/Sparkle/Autoupdate/TerminationListener.m @@ -116,6 +116,11 @@ if ([self terminated]) { [self invokeCompletionWithSuccess:YES]; } + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if ([self terminated]) { + [self invokeCompletionWithSuccess:YES]; + } + }); } static void noteExitKQueueCallback(CFFileDescriptorRef file, CFOptionFlags __unused callBackTypes, void *info) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 957aba1b..0ed1223b 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -581,6 +581,9 @@ } } + //Set relaunching flag. + [self.host setBool:YES forUserDefaultsKey:SUUpdateRelaunchingMarkerKey]; + [NSTask launchedTaskWithLaunchPath:relaunchToolPath arguments:@[[self.host bundlePath], pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], diff --git a/Sparkle/SUConstants.h b/Sparkle/SUConstants.h index 9f377e68..5ff8fb01 100644 --- a/Sparkle/SUConstants.h +++ b/Sparkle/SUConstants.h @@ -35,6 +35,7 @@ extern NSString *const SUTechnicalErrorInformationKey; extern NSString *const SUFeedURLKey; extern NSString *const SUHasLaunchedBeforeKey; +extern NSString *const SUUpdateRelaunchingMarkerKey; extern NSString *const SUShowReleaseNotesKey; extern NSString *const SUSkippedVersionKey; extern NSString *const SUScheduledCheckIntervalKey; diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index 955a9c9e..fc4e8e67 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -26,6 +26,7 @@ NSString *const SUAppcastAttributeValueMacOS = @"macos"; NSString *const SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation"; NSString *const SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore"; +NSString *const SUUpdateRelaunchingMarkerKey = @"SUUpdateRelaunchingMarker"; NSString *const SUFeedURLKey = @"SUFeedURL"; NSString *const SUShowReleaseNotesKey = @"SUShowReleaseNotes"; NSString *const SUSkippedVersionKey = @"SUSkippedVersion"; diff --git a/Sparkle/SUHost.h b/Sparkle/SUHost.h old mode 100644 new mode 100755 diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m old mode 100644 new mode 100755 diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 6d0d20ce..5d1c73b9 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -209,6 +209,14 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults if (!hasLaunchedBefore) { [self.host setBool:YES forUserDefaultsKey:SUHasLaunchedBeforeKey]; } + // Relanching from app update? + else if ([self.host boolForUserDefaultsKey:SUUpdateRelaunchingMarkerKey]) { + if ([self.delegate respondsToSelector:@selector(updaterDidRelaunchApplication:)]) { + [self.delegate updaterDidRelaunchApplication:self]; + } + //Reset flag back to NO. + [self.host setBool:NO forUserDefaultsKey:SUUpdateRelaunchingMarkerKey]; + } if (shouldPrompt) { NSArray *> *profileInfo = [SUSystemProfiler systemProfileArrayForHost:self.host]; diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index af325aee..a614ae62 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -215,6 +215,13 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; */ - (void)updaterWillRelaunchApplication:(SUUpdater *)updater; +/*! + Called immediately after relaunching. SUUpdater delegate must be set before applicationDidFinishLaunching: to catch this event. + + \param updater The SUUpdater instance. + */ +- (void)updaterDidRelaunchApplication:(SUUpdater *)updater; + /*! Returns an object that compares version numbers to determine their arithmetic relation to each other. diff --git a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib index 53f2e062..b83ef8c9 100644 --- a/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/de.lproj/SUAutomaticUpdateAlert.xib @@ -57,9 +57,9 @@