Commit Graph
1956 Commits
Author SHA1 Message Date
Zorg d44094a692 Fix installer tests and add comment about running them 2016-03-13 19:32:58 -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 af126d9c82 Update automatic update driver to reflect AutoUpdate changes 2016-03-13 18:56:02 -04:00
Zorg f918368c72 Change SUCancelUpdateInstallation to SUDismissUpdateInstallation
Since this is not really canceling the installation anymore.
2016-03-13 16:52:25 -04:00
Zorg 85517dd0dd Don't think I need to handle this 2016-03-13 16:19:28 -04:00
Zorg d78f487596 Remove tempDir deletion warning 2016-03-13 16:17:51 -04:00
Zorg e7fdfb9dc9 Don't handle out of order messages 2016-03-13 16:17:24 -04:00
Zorg 64c17df1e6 Improve TerminationListener by observing NSRunningApplication instance
Listening for app termination doesn't require polling anymore.
2016-03-13 14:26:12 -04:00
Zorg f82a698937 Handle installer cleanup occur after any stage 2016-03-13 13:39:28 -04:00
Zorg b10202769f Documenting the SUInstaller protocol 2016-03-13 13:27:53 -04:00
Zorg 194c0ed63a Split installation into more stages.
We now have a stage where authorization is allowed (when the user intiates a relaunch).
This stage occurs before the user application is terminated (if the operation succeeds).

An install attempt will always be made after the validation is finished now. However, if the
user doesn't explicitly relaunch the app, we don't bug the user about auth prompts which means
updates can fail in this kind of scenario.
2016-03-13 13:09:36 -04:00
Zorg 72d3634f32 Merge branch 'master' into ui-separation-and-xpc 2016-03-12 20:07:39 -05:00
Zorg 25ab5a1870 Move SUUpdater references out of update drivers
This decreases coupling for the updater and updater drivers.

We still pass in the updater because we need it for invoking the updater delegate's methods,
but we now use type 'id' instead of SUUpdater* because we don't want to invoke anything on the object.
Furthermore, we never #import SUUpdater, only forward class declarations.
2016-03-12 19:57:28 -05:00
Zorg f4869e584c Improve grammar 2016-03-12 18:28:08 -05:00
Zorg 079f1e33bc Guard against more than 1 initialization more strongly 2016-03-12 18:26:54 -05:00
Zorg 84ad85c253 Don't use main bundle in SUStandardUpdaterController 2016-03-12 18:24:29 -05:00
Zorg 6753c788f8 Fix issues with unit tests
I added public DSA file, automatic update checking, disabled system profiling
in the unit test's info.plist so that SUUpdater won't complain that DSA is missing,
and it won't prompt for update permission the first time.
2016-03-12 18:21:07 -05:00
Zorg 4dcef32eb4 Fix unit tests from not building/passing.
UI tests will fail right now due to the current custom UI I'm using.
2016-03-12 16:44:52 -05:00
Zorg 38abfca4b0 Remove more unused #imports 2016-03-12 16:12:33 -05: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 2a277c24b5 Put SUInstaller protocol into its own file 2016-03-12 14:43:27 -05:00
Zorg 25b451b4c2 Remove unused #imports 2016-03-12 14:43:11 -05:00
Zorg cee120065f Split installation work into stages
This is to minimize the amount of time the app is left terminated.
App restarts should always be near instantaneous.

More work needs to be done to make authenticated installs more friendly,
and not making installs abortable after validation is done.
2016-03-12 13:25:07 -05:00
Kornel b319fb50f9 Merge pull request #756 from zorgiepoo/best-update-by-version
Best Update by Version & Date Removal
2016-03-12 15:39:38 +00:00
Kornel Lesiński 698e737b56 CocoaPods 2016-03-12 01:16:51 +00:00
Kornel Lesiński 0be862708f Merge tag '1.14.0'
* tag '1.14.0':
  v1.14.0
  Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related
2016-03-11 09:20:21 +00:00
Kornel Lesiński 1c8d54166b v1.14.0 1.14.0 2016-03-11 09:11:12 +00:00
kleuter 77511c8f19 Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related 2016-03-11 09:07:42 +00:00
Zorg 59bbcfadb0 Initial work on separating the updater & installer
The installer (Autoupdate.app) is now responsible for extracting & verifying the update.
It talks to the updater via mach ports. We can't afford to use a XPC service due to
lack of perfoming privileged tasks.
2016-03-10 01:49:59 -05:00
Kornel d9a3afb869 Merge pull request #778 from kleuter/master
Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related
2016-03-09 16:44:12 +00:00
kleuter 34a78d59fc Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related 2016-03-09 12:07:51 +01:00
Kornel Lesiński b95008e248 Merge branch '1.14.x'
* 1.14.x:
  One more attr fix
2016-03-09 00:34:10 +00:00
Kornel Lesiński 317423ae78 One more attr fix
#776
2016-03-09 00:33:59 +00:00
Kornel Lesiński 27cb8e66fe Merge branch '1.14.x'
* 1.14.x:
  More workarounds for OS X 10.7
2016-03-09 00:10:14 +00:00
Kornel Lesiński 28e8a1fdaf More workarounds for OS X 10.7
#776
2016-03-09 00:09:04 +00:00
Kornel Lesiński f43c284f14 Merge tag '1.14.0'
* tag '1.14.0':
  Fix #776
2016-03-08 23:43:46 +00:00
Kornel Lesiński cd3d7d9f98 Fix #776 2016-03-08 23:24:26 +00:00
Zorg 73a0f10010 I don't see installerForHost:error: used anywhere
We can also demote relaunchPath from being an ivar
2016-03-08 00:22:57 -05:00
Zorg 6f30ae2093 Remove passing duplicated host path 2016-03-08 00:16:03 -05:00
Zorg 7ea2d0f9cf Separating Autoupdate into separate files 2016-03-08 00:00:00 -05:00
Zorg 57f0bc4245 Make download validation function take a SUHost 2016-03-07 23:24:35 -05:00
Zorg cf3674b2d7 Exit on failure here 2016-03-07 23:15:40 -05:00
Zorg 00368011c8 Add delegate outlets to SUStandardUpdaterController
This adds delegate outlets to the updater and to the user driver, so a
developer can hook either of them up. Note we now initialize the updater and
user driver after being awoken from the nib.

We also took this chance to make the delegates to the updater and user driver read only.
This means that the delegates have to be available on initialization, which is good because
changing delegates or setting delegates too late (and missing messages) is bad.
2016-03-06 23:38:17 -05:00
Zorg 1e92d403ec Improve SUUpdater docs 2016-03-05 17:33:27 -05:00
Zorg f2b9ae97c2 Merge branch 'master' into ui-separation-and-xpc 2016-03-05 15:06:25 -05:00
Zorg 96f016a790 Add acknowledgement handlers to no update found / errors
This way, if the errors are not presented modally, they won't be dismissed
until we tell the updater we are finished acknowledging them
2016-03-05 14:42:17 -05:00
Zorg 337f39e8b9 Just log an error instead of changing update button
Because the update installation will be aborted soon anyway..
2016-03-05 13:33:32 -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 30cb984341 Split SUStandardUserDriver into re-usable components 2016-03-05 00:17:41 -05:00