Commit Graph
112 Commits
Author SHA1 Message Date
Zorg 27ea7ca2f5 Implement new allow installer interaction methods in sparkle-cli 2016-08-21 18:58:11 -04:00
Zorg f9c87d76db Fix SparkleCore build issues in Release configuration
We don't import SPUUserDriverUIComponent in SparkleCore because it is an exported class a part of Sparkle framework, which causes issues.

Instead, we import SPUApplicationInfo which is not exported from Sparkle.
2016-08-21 02:07:04 -04:00
Zorg 3547cb1239 Create SparkleCore target that only includes Core related files
Some build issues still need to be resolved.
2016-08-20 21:44:16 -04:00
Zorg a6a2da7a69 Add silent termination method to user driver
This is triggered if the update is automatically downloaded and the installer is started in the background, and the updater's delegate decides to handle silent installation and installs the update invoking its immediate installation block. In this scenario, this fixes an issue where the application may not be terminated silently.
2016-08-16 18:59:13 -04:00
Zorg 57325c7507 Add update permission request and response classes
We now pass these to and from the user driver.
2016-08-14 12:51:37 -04:00
Zorg 3f7c3933e7 Fix order of delegation events by dispatching async to main queue
This synchronizes more with the user driver handling events.
2016-08-14 00:55:17 -04:00
Zorg 32d9fd6526 Add flag for custom feed URL to sparkle-cli
This may be useful if user defaults can't be relied on for the feed URL.
For example, if an app is sandboxed, its user defaults may differ from the defaults sparkle-cli looks up.
2016-08-13 20:55:11 -04:00
Zorg 4ec5652a0d Add callbacks for scheduled updates occurring after a delay and being idled
I think I used to have this when the remote XPC callbacks were in the user driver and I removed them at some point.
These callbacks are now part of the SPUUpdaterDelegate and the logic is simpler now than before.
The command line utility makes use of these callbacks.
2016-08-13 20:35:14 -04:00
Zorg 29d790c63c Pass application bundle into SPUUpdater instead of relying on delegate method 2016-08-13 12:57:26 -04:00
Zorg 8eb61afe53 Use SPUUserDriverUIComponent for command line user driver 2016-08-13 10:49:45 -04:00
Zorg b8ccc5d079 Fix compiler error 2016-08-13 10:35:38 -04:00
Zorg 6dddbcc353 Add acknowledgement handler to installation did finish 2016-08-13 09:50:19 -04:00
Zorg f18d410c6a Add SPUUpdaterDelegate and deprecate SUUpdaterDelegate 2016-08-12 23:02:23 -04:00
Zorg 878c30d17c More SU -> SPU renaming for status completion results 2016-08-12 20:45:24 -04:00
Zorg f5afdc1cd8 Group download data, text encoding name, and MIME type into one class 2016-08-12 20:26:56 -04:00
Zorg 1a0e169e7f Improve displaying release notes in sparkle-cli (safer & less code) 2016-08-11 20:58:53 -04:00
Zorg f7d1cab4a0 Make sure we have a valid IANA charset name 2016-08-10 22:44:34 -04:00
Zorg 65d78d5129 Pass text encoding and MIME type to user driver for release notes
This fixes issues where the user driver may not be displaying release notes properly because it doesn't know what kind of data was downloaded (eg: html vs plain text).
2016-08-10 22:11:19 -04:00
Zorg 085724322f Use id type for updater 2016-08-10 21:44:12 -04:00
Zorg c9f673cda8 Use SPU prefix in many places 2016-08-05 19:10:21 -04:00
Zorg 4f285d2245 Rename SUUpdater -> SPUUpdater & add SUUpdater for backwards compatibility
New classes will soon be prefixed with "SPU"
I still need to look into adding a compatibility layer for -updater:willInstallUpdateOnQuit:immediateInstallationInvocation: and possibly deprecating no-DSA instead of outright rejecting it.
2016-08-03 23:30:55 -04:00
Zorg 097710e27a Update sparkle-cli help usage and interactive flag 2016-07-29 00:16:24 -04:00
Zorg 0ca688073b Disable root support & checking
Assume that the updater will be run as a logged in user.
The command line driver and progress app aren't completely root safe anyway, and running the progress app under a different user could be quite awkward from root
2016-07-26 19:16:38 -04:00
Zorg ec7766022d Add callback for showing downloaded updates that haven't started 2016-07-24 14:24:04 -04:00
Zorg 5c0ee2d74a Rename did finish downloaading callbacks to did start extracting 2016-07-24 13:29:03 -04:00
Zorg e00d303c08 Don't log that we're terminating the app
This way if installation takes a long time, it may not look like it is because of termination.
2016-07-16 12:11:52 -04:00
Zorg 8563a40cd2 Use XPC for IPC to the installer instead of CFMessagePort
We now use XPC for communication between Sparkle.framework and Autoupdate.
Autoupdate is now ran as a launchd agaent/daemon. (Most of the time, it acts as an agent).

Using XPC can only be done from non-sandboxed processes, so a connection and status service had to be created.

Currently, the GUI progress tool doesn't work properly, but everything else should be behaving like before.
2016-07-12 19:59:24 -04:00
Zorg 80bc8353ed Handle defer installation when resuming updates in sparkle-cli 2016-07-12 19:50:00 -04:00
Zorg 9acfe7f180 Don't pass allowsAutomaticUpdates to user driver
Let the user driver read from updater settings to know if automatic updates are allowed
2016-06-28 00:28:21 -04:00
Zorg c117837785 Add resumable update handler & fix normal update handler in sparkle-cli 2016-06-27 23:29:45 -04:00
Zorg 34ce18c44f Add private function for disabling stderr logging
This is useful for releasing sparkle-cli
2016-06-27 23:15:51 -04:00
Zorg dc5298ce54 Make method for finding running appliction to reduce duped code 2016-06-24 23:42:31 -04:00
Zorg 4482e2b736 Fix unsigned cast warning 2016-05-29 20:20:42 -04:00
Zorg f62285ff3b Use Appcast's content length when downloader doesn't retrieve an expected length 2016-05-29 13:17:56 -04:00
Zorg da145b2100 Log terminating target application in sparkle-cli 2016-05-29 11:28:11 -04:00
Zorg b4f1f67ddb Prevent using wrong combination of flags 2016-05-28 23:15:54 -04:00
Zorg a113ce49bd Add interactive option to sparkle-cli
This allows installation by requesting the user to enter a password when elevated privileges are necessary. This only works if the application is alive before installation begins.
2016-05-28 23:04:43 -04:00
Zorg 0cf1aee693 Add -updaterShouldDownloadReleaseNotes: delegate method 2016-05-28 10:13:18 -04:00
Zorg 0a53d51d89 Don't send NSURLResponse objects over XPC or to the user driver
This class doesn't support NSSecureCoding in OS X 10.8, so this fixes a crash there.
2016-05-19 21:52:50 -04:00
Zorg 72d63f3992 Print friendly error messages in sparkle-cli 2016-05-18 18:51:47 -04:00
Zorg fbb9fbf535 Add showing release notes from sparkle-cli 2016-05-14 21:56:35 -04:00
Zorg 1446acf519 Add methods onto user driver show showing linked release notes
These release notes are downloaded while showing that the new update is found
2016-05-14 21:45:25 -04:00
Zorg 033f59e643 Comment on why these delegate methods are being implemented 2016-05-06 19:36:46 -04:00
Zorg c9c1de30e4 Don't implement failedToDownloadUpdate delegate
It's not necessary and won't be invoked before user driver shows the error.
2016-05-06 19:35:13 -04:00
Zorg 9d1e707577 Add probing for updates to sparkle-cli 2016-05-06 19:22:15 -04:00
Zorg c2f4be611b Add usage description & options to sparkle-cli 2016-05-01 22:14:49 -04:00
Zorg 350eba452c s/SUUpdatePermissionPromptResult/SUUpdatePermission/ && s/shouldSendProfile/sendProfile/ 2016-05-01 14:54:17 -04:00
Zorg 1356024b25 Add --grant-automatic-checks and --send-profile flags
If an update permission request comes up, this alows us to make a decision.

Also I renamed the defer and checknow flags to defer-install and check-immediately
2016-05-01 14:33:13 -04:00
Zorg 7d8d5d1f46 Adjust error message for automatic updates being disabled 2016-05-01 13:51:39 -04:00
Zorg 004da55780 Add error message if bundle paths are invalid/inaccessible 2016-05-01 12:03:50 -04:00