Commit Graph
58 Commits
Author SHA1 Message Date
Zorg aaac6cd594 Document TerminationListener a bit 2017-01-19 23:14:08 -05:00
Zorg a000e3b311 Handle listening for termination of already-dead processes
Before our TerminationListener didn't handle a process that has already been terminated. In my fork this is unlikely to be an actual issue but in master, the application can very well be dead before the termination listener initiates.
2017-01-19 23:11:20 -05:00
Zorg dfaed624ae Merge branch 'master' into ui-separation-and-xpc 2017-01-17 15:58:02 -05:00
Zorg 62c9a8c785 Merge branch '1.17.x' into ui-separation-and-xpc 2017-01-12 21:50:14 -05:00
Zorg 604d3f578a Use -[SUHost objectForInfoDictionaryKey:] in couple more places 2017-01-08 09:23:15 -05:00
Zorg 3b2ea83c6f Fix latest analyzer warnings 2017-01-07 11:22:13 -05:00
Zorg e1a4ad9371 Add level parameter to SULog()
Current levels are: default and error
2017-01-05 22:51:36 -05:00
Zorg 65c0c1e7fe Move code from SPUInstallerValidation.m to SUUpdateValidator.m 2016-12-26 21:01:47 -05:00
Zorg 36ed896d0f Rename SPUInstallerProtocol -> SUInstallerProtocol, remove -cleanup
This is to prepare for the next merge from master.
2016-12-26 19:12:02 -05:00
Zorg fd533f937e Don't pass version comparator to SUInstaller 2016-12-26 13:03:20 -05:00
Zorg d362caac98 Rename applicationPath to bundlePath in SUPlainInstaller
This is less confusing. I also documented the SUPlainInstaller initializer method.
2016-12-26 12:58:26 -05:00
Zorg cc77f11e22 Use self instead of [self class] to refer to class method 2016-12-26 11:17:27 -05:00
Zorg 1943d971fc Remove SUParameterAssert.h since I removed it in master 2016-12-23 19:17:17 -05:00
Zorg fe79d29665 Merge branch 'master' into ui-separation-and-xpc 2016-12-23 14:50:54 -05:00
Zorg 553168ba51 Merge branch 'master' into ui-separation-and-xpc 2016-12-23 14:44:32 -05:00
Zorg 2c1e996fab Update comments 2016-12-22 09:36:37 -05:00
Zorg b28fd2410d Mark SPUInstallerValidation and SUUpdateValidator as daemon-safe 2016-12-20 22:00:54 -05:00
Zorg d5e54005ce Fix static analyzer warning by marking method return type as nullable 2016-12-20 20:47:59 -05:00
Zorg 09da99f4cf Merge branch 'master' into ui-separation-and-xpc 2016-12-20 20:23:07 -05:00
Zorg 9ea4cf1bf6 Merge branch 'master' into ui-separation-and-xpc 2016-12-04 17:05:01 -05:00
Zorg 213bedfa37 Merge branch 'master' into ui-separation-and-xpc 2016-09-03 22:50:25 -04:00
Zorg 56cd205880 Merge branch 'master' into ui-separation-and-xpc 2016-08-27 22:46:14 -04:00
Zorg 7c49f722a8 Merge branch 'master' into ui-separation-and-xpc 2016-08-27 11:34:42 -04:00
Zorg fb2aea0d86 Fix normalization relaunch path setting and improve relaunching code
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=1 now works properly again. In the progress agent, we don't use the path sent from the installer unless the normalized setting is enabled.
2016-08-27 10:40:38 -04:00
Zorg 251feb7e07 Rename registerRelaunchBundlePath to registerApplicationBundlePath 2016-08-27 02:24:37 -04:00
Zorg db642a0700 Fix relaunching if multiple instances of app were running
We leave the "application was alive and needs to terminate logic" to the progress agent rather than to the installer too.
2016-08-26 18:23:42 -04:00
Zorg 46a75cde97 Terminate application in the progress agent instead of user driver
This allows us to remove SPUUserDriverUIComponent and remove a bunch of logic in the user driver regarding termination. The user drivers generally don't need to know about the application bundle anymore, and strictly now only show UI events.

This has another advantage of the agent being able to quit multiple instances of an application even if the application to update is sandboxed.

We enforce the logic that an application can only be relaunched if it was running initially.
2016-08-25 23:46:42 -04:00
Zorg 1282e42031 Defend against possible symbolic link attack 2016-08-14 23:07:44 -04:00
Zorg fa2e857b4e Add more AppKit prevention guards 2016-08-13 10:35:01 -04:00
Zorg 766dd50aeb More SU -> SPU prefix changing 2016-08-06 21:00:14 -04:00
Zorg e53539b19e Don't deprecate +defaultComparator, although discourage it and use alloc/init 2016-08-06 11:18:00 -04:00
Zorg a303859f10 Add deprecation notice to interactive package installer 2016-08-06 10:57:53 -04:00
Zorg 1663a822c8 Allow but deprecate serving download without DSA signature
This allows for a better transitioning period. In the future, this should be removed.
2016-08-06 10:20:36 -04:00
Zorg c9f673cda8 Use SPU prefix in many places 2016-08-05 19:10:21 -04:00
Zorg 5ad5598a19 Make sure update directory != nil during cleanup 2016-07-30 17:49:37 -04:00
Zorg 1ca233eadf Validate the update before extraction whenever possible
If we download a package type installation or a delta update, we should validate the update before trying to unarchive it.

We can't do this with ordinary updates because we handle changing of DSA keys for that particular case.
2016-07-30 17:36:22 -04:00
Zorg 2fc57ce288 Move installation validation to separate class 2016-07-30 16:03:52 -04:00
Zorg d42ac08bf2 Split connection agent counter into two separate variables 2016-07-30 15:38:09 -04:00
Zorg 23e027d02f Have progress agent terminate after relaunching, not after stopping progress 2016-07-30 14:18:39 -04:00
Zorg 8c564fef1f Remove +[SUFileManager defaultManager] and use alloc/init 2016-07-30 10:39:17 -04:00
Zorg ea1b04391f Improve cache storage handling of files
We first create a directory with respect to the app's bundle ID being updated, sparkle's bundle ID, and a directory inside for a specific purpose. Then we remove all old directories inside there, and create a new unique temporary directory.

This is to avoid conflicts with eg: multiple updaters running against each other around the same time, or files for one function interfering with files from another purpose, while still having a way to clean up old files.
2016-07-30 01:00:14 -04:00
Zorg 0d0258a87f Rename un/nonguided package to interactive package, and guided to normal 2016-07-29 00:22:52 -04:00
Zorg e2da47b7c7 Improve handling of storing files in cache
Create distinct subdirectories in our cache directory so files for different purposes won't conflict.

For the installer, move the download archive to the installer's cache location. If the installer is running as root, this moves it to a place only root can access I believe. This is also to prevent other functionality from touching these files.
2016-07-28 22:54:28 -04:00
Zorg 32bf570b4c Add some comments to installation process 2016-07-28 20:27:12 -04:00
Zorg bd352c7db5 Take out lot of unnecessary installation code now 2016-07-27 23:11:59 -04:00
Zorg 5ceeb3dfd3 Remove "incoming connection" log 2016-07-27 00:04:34 -04:00
Zorg 2191a2b6ed Improve termination & cleanup for progress agent & installer 2016-07-26 23:57:48 -04:00
Zorg 646ed6f3c4 Improve logic for allowing installer interaction
We now distinguish between the updater delegate allowing interaction and the update driver allowing interaction. We also remove an interaction allowed flag from the AppInstaller, letting shouldShowUI flag suffice.
2016-07-26 20:00:56 -04:00
Zorg f9e2609fa1 Update is no longer cancelable after installation begins 2016-07-26 19:25:49 -04:00
Zorg 9f4e44f919 Don't move old app to Trash
Several reasons:
* The user may not look at the trash anyway, and it would bloat their HD space
* Other sofware updaters don't move old versions to the trash either. Can confuse the user or not be seemly transparent experience.
* Moving app to trash will not work if user has to authenticate anyway
* Unclear how long and expensive this operation *could* take in all scenarios
* App replacements in Apple's new file system can be atomic-safe, but that may only be the case if the old app is no longer needed

Cons:
* Few tech savvy users may not be able to restore an app without re-downloading it. This would still be rarely done even amongst them.
2016-07-25 19:11:20 -04:00