Commit Graph
14 Commits
Author SHA1 Message Date
Zorg c9f673cda8 Use SPU prefix in many places 2016-08-05 19:10:21 -04:00
Zorg 1bb301e82a Change updateInProgress to canCheckForUpdates
This more accurately reflects its intended purpose. From the beginning,
the user cannot check for updates until the updater is ready;
however this doesn't mean that the update is in progress.
2016-04-09 11:39:02 -04:00
Zorg 0b94f56f7f Rename some user driver delegate methods 2016-03-27 19:03:28 -04:00
Zorg d12121a265 Add SUUpdaterSettings class, allowing to read default settings.
This is convenient if the updater and app live in separate processes.
No need to use XPC to find out what certain settings are, and it may take too long to find out that way.
2016-03-27 18:44:36 -04:00
Zorg a1d08a354d Add updater resumability, merge automatic & regular update prompts
Resumability works by asking the installer for its progress and for the appcast item we've given it before.

If an automatic silent download occurs, we abort it after the installer tool finishes with its basic steps.
Then, a user initiated or scheduled check can resume the update. The scheduled check fires during a longer-than-normal
span since usually the user can install by quitting the app, unless the app has been alive for a very long time.
One exception to this is when the update is marked critical; in that case, the scheduled check is fired immediately after
an automatic update download. Subsequent attempts will be fired using a normal update check interval.

Todo: delta updates probably don't work when they fail and fallback to a regular update
2016-03-21 00:46:34 -04:00
Zorg cb0b7c8cfe Remove all termination logic from the user driver
Autoupdate is now responsible for all of this. The user driver implementation is shorter and less complex now.
2016-03-13 19:18:51 -04:00
Zorg 46256b297b Do not pass the user driver in delegate methods
This is bad for a number of reasons.

1. Our SUUserDriver protocol wasn't quite the right protocol to pass in.
2. This made the UI/Core components to hold a depedency to the user driver, when it
really was not used for anything other than passing to the delegate. We can now
remove this bidirectional depedency between the components and the user driver.
3. This encourages that the client can handle multiple user drivers within the same class,
which encourages complexity. If they were able to set the delegate, they should have a reference
to the user driver.

Indeed, SUUpdater, SUUpdaterDelegate, and the update drivers all have the same problem.
An unfortunate design decision..
2016-03-12 15:53:00 -05:00
Zorg 53719cc8b7 Fix termination being delayed when connection is invalidated 2016-03-05 13:12:52 -05:00
Zorg 5dca54d904 Add custom user driver in the test app 2016-03-05 12:59:11 -05:00
Zorg f2e485df87 Add proper remote updater idling support
Meaning that we don't send a message or re-establish the XPC connection
immediately when something goes wrong
2016-03-04 19:00:47 -05:00
Zorg af8e195cd9 Handle app termination better with regards to automatic updates
We should terminate even if the update aborts.

We should also terminate even if the connection is invalidated or interrupted, if we've
already been told to quit
2016-03-03 22:28:38 -05:00
Zorg ada2688b86 Set up invalidation and interruption XPC handlers 2016-03-03 19:20:01 -05:00
Zorg f5a9cf14de s/SUSparkleUserDriver/SUStandardUserDriver/ 2016-03-03 18:29:15 -05:00
Zorg 8a42975dc2 Add test application code for Sparkle over XPC 2016-03-03 03:03:56 -05:00