Compare commits

...
1376 Commits
Author SHA1 Message Date
Kenneth Johnsen 962878b843 Fix missing Danish translations in Sparkle.strings 2020-02-03 17:23:52 +00:00
pteeson 9d8909c38d Remove .h files from Build Rules for bsdiff and ed25519 (#1538)
On branch VendorBuildPhasesFix
Changes to be committed:
	modified:   Sparkle.xcodeproj/project.pbxproj

Building the Sparkle framework produced 10 Warnings caused by .h files
being added to the Build Rules Compile Sources. Thanks to tip from
Stackoverflow https://stackoverflow.com/questions/6509600/

"Click on your project, and check that this file is not present in the
tab Build Phases. Normally no header files should stay here.
Clean and build it again, it should work!"

It does work.
2020-01-25 12:25:04 +00:00
BR Lingo 99a00a2c17 Update Sparkle.strings (#1531) 2019-12-31 11:01:10 +00:00
Kornel 1d2b74e39d Merge pull request #1527 from quinntaylor/hoist-SWIFT_VERSION-4.2
Hoist `SWIFT_VERSION = 4.2` setting up to ConfigSwift.xcconfig, remove unnecessary target overrides.
2019-12-17 00:05:43 +00:00
Kornel b097e64b56 Merge pull request #1526 from quinntaylor/array-generics
Added array generics to fix warnings, and fixed typo in variable name…
2019-12-17 00:05:19 +00:00
Kornel 28a245dd53 Merge pull request #1525 from quinntaylor/Turkish-strings-missing-quote
Fixed missing quote in Turkish strings file, caused by PR #1516.
2019-12-17 00:04:41 +00:00
Quinn Taylor 4eabf002c5 Hoist SWIFT_VERSION = 4.2 setting up to ConfigSwift.xcconfig, remove unnecessary target overrides. 2019-12-16 10:53:29 -05:00
Quinn Taylor ae4af4d61f Added array generics to fix warnings, and fixed typo in variable name when parsing BinaryDelta command-line arg flags. 2019-12-16 09:40:17 -05:00
Quinn Taylor dd9c7d0e1c Fixed missing quote in Turkish strings file, caused by PR #1516. 2019-12-16 09:18:48 -05:00
Kornel 7ab8823757 Bump 2019-12-15 21:40:47 +00:00
Kornel dd287029db Fix second bold sentence in read-only update alert dialog. (#15… (#1516)
Fix second bold sentence in read-only update alert dialog. (#1515)
2019-12-15 17:07:51 +00:00
Quinn Taylor 6ec6007091 Fix second bold sentence in read-only update alert dialog. (#1515)
• Updated error dialog code in SUBasicUpdateDriver, and created a local variable to reuse `[aHost name]`.
• Updated content of Sparkle.strings files, splitting existing affected translations into 2 chunks each.
• Fixed the Catalan translation, which was using an old string key.
• Removed a few unnecessary comments in the Polish translation.
2019-12-14 13:28:40 -05:00
Kornel 985be854c4 Merge pull request #1520 from jakob/update-readme-1.x
Update README for Sparkle 1.x
2019-12-14 16:51:18 +00:00
Kornel 8129cc1c03 Merge pull request #1519 from jakob/issue-templates
Separate issue templates for Sparkle 1.x and 2.x
2019-12-14 16:49:44 +00:00
Jakob dddba708d2 Add prominent note about Sparkle 2.x to README 2019-12-14 15:39:14 +01:00
Jakob 2596a54935 Add link to 2.x branch 2019-12-14 15:38:57 +01:00
Jakob 794a90a5e2 Add 1.x version number to README title 2019-12-14 15:38:26 +01:00
Jakob 9e7c3463e0 Add Issue templates for Sparkle 1.x and 2.x 2019-12-14 15:23:25 +01:00
CoreCode ed40ef1267 update PR #1512 again to fix compilation issues (#1518)
* Update SUPlainInstaller.m
2019-12-13 16:35:10 +00:00
CoreCode b9a4917f81 Update for PR #1512 to correctly support 10.7 and 10.8 (#1514)
* Update SUPlainInstaller.m

Try to preserve Finder tags while updating apps

* Update SUPlainInstaller.m
2019-12-12 11:06:00 +00:00
CoreCode 1081dcdda1 Update SUPlainInstaller.m (#1512)
Try to preserve Finder tags while updating apps
2019-12-11 19:11:28 +00:00
Frank Chiarulli Jr 3a497ddcbd fix spelling (#1508) 2019-12-04 00:05:09 +00:00
Alec Larson 8f6c7ccdeb feat: properly compare versions with commit SHA (#1504) 2019-11-22 15:12:19 +00:00
Alik Vovkotrub 0e9d96a303 Support generating appcast with localizations (#1499)
* 1205 generate_appcast support localized Release Notes
2019-11-12 16:43:38 +00:00
marchyang 531b767c0b feat: sign_update support key argument 2019-10-18 12:36:17 +01:00
Kenneth Johnsen 0cfedd4516 Hide "Skip..." and "Remind..." buttons. (#1480)
Show/Hide skip/later buttons based on whether update is critical / automatic updates enabled.

The skip-button is now hidden for critical updates, and the later-button is hidden if automatic updates are disabled.
Note that the user can still choose to just close the window by clicking the red dot at the top of the window.
2019-10-15 14:04:31 +01:00
Kornel 8f01babdd3 Merge pull request #1485 from bitigchi/patch-1
Update Sparkle.strings
2019-10-09 21:06:54 +01:00
Emir Sarı 5dab9c40ab Update Sparkle.strings
Added some missed translation.
2019-10-09 18:48:33 +03:00
Kornel Lesiński f2dd8fe371 Move BR locale files to correct location 2019-10-09 00:08:38 +01:00
Kornel 5d0e5dd407 Terminology Update for BR (#1484)
Terminology Update for BR
2019-10-09 00:05:44 +01:00
BR Lingo 39fb433131 Add files via upload 2019-10-08 17:40:49 -04:00
BR Lingo e68a2621ed Merge pull request #3 from sparkle-project/master
Commits from original
2019-10-08 17:28:32 -04:00
Kornel cb6545d601 Merge pull request #1483 from qwertyyb/master
fix public key doesn't match problem
2019-10-08 18:43:33 +01:00
marchyang 6dbbf08654 fix public key dont match problem when use generate_appcast with -s <private_key> <folder> arguments 2019-10-08 19:43:20 +08:00
Kornel d5222353e6 Merge pull request #1458 from BitShift-Tech/appcast-generation-file-extention
SUFeedUrl generate appcast file extension (let fix)
2019-08-21 10:57:45 +01:00
Tom Vos 2657a41d55 Update ArchiveItem.swift
feedURl was a let and therefore not assignable
2019-08-21 11:16:06 +02:00
Kornel 08d3ff747d Merge pull request #1454
SUFeedUrl generate appcast file extension
2019-08-21 09:58:08 +01:00
Tom Vos fedb22e224 Update ArchiveItem.swift
The *ing methods didn't alter the value, they provided a new value which was not assigned to anything.
2019-08-21 10:20:37 +02:00
Kornel 8293c3c6ae Merge pull request #1457 from LeoNatan/master
Fix incorrect and inconsistent selectors and delegate methods
2019-08-20 02:58:35 +01:00
Leo Natan 181f813b01 Fix incorrect and inconsistent selectors and delegate methods. 2019-08-20 04:12:33 +03:00
Kornel a10a974609 Merge pull request #1456 from webjib/patch-1
Update Sparkle.strings
2019-08-19 14:38:39 +01:00
Jean-Baptiste f8572f79cb Update Sparkle.strings
Issue #1429
https://github.com/sparkle-project/Sparkle/issues/1429
2019-08-19 15:18:14 +02:00
Kornel 2b54753090 add delegate userDidSkipThisVersion (#1409)
add delegate userDidSkipThisVersion
2019-08-14 09:40:01 +01:00
bono yusuke 2db2fffab9 Update SUUIBasedUpdateDriver.m 2019-08-14 17:12:16 +09:00
Tom Vos 035bfc4919 Fix typo 2019-08-13 12:18:42 +02:00
Tom Vos 48fc202f36 Processed requested changes
Instead of using find and replace, use the correct methods on URL to change the file name and extention.
2019-08-13 12:17:12 +02:00
Tom Vos 28ff3069ff Update ArchiveItem.swift
When the SUFeedURL extention is "php", replace filename.php with appcast.xml in generate_appcast
2019-08-13 09:45:10 +02:00
Kornel 795ce1278d Merge pull request #1445 from fujisoft/patch-1
Update Japanese localization #1429
2019-08-03 15:48:27 +01:00
fujisoft 6ac853271d Update Japanese localization
#1429
2019-08-03 13:38:13 +09:00
Kornel 7e5e91888f Merge pull request #1444 from jfenton-tsc/fix/normalize-should-respect-specified-bundle-name
check if SUBundleName is set before normalizing
2019-08-03 00:00:55 +01:00
Jake Fenton b0d29ae798 check if SUBundleName is set before normalizing
When changing the name of an app, there's a couple things to do in order
to ensure auto-updates still work:

1. set SUBundle Name. This basically tells Sparkle "ey, expect an app
of {SUBundleName}.(app|pkg) instead of the normal name."
2. set `SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME` in
commonConfig.xccconfig to reset the name of the app.

in (2), we always used the host's bundle name, instead of checking to
see if SUBundleName was set, which means normalization doesn't work as
expected during app name changes.
2019-08-02 09:29:12 -04:00
Kornel 09bbf9fdc6 Merge pull request #1443 from gotow/master
In 'newer than latest' alert, show displayVersionString instead of versionString
2019-08-02 10:49:28 +01:00
gotow f2bd7ea2b2 Update SUUIBasedUpdateDriver.m 2019-08-01 22:35:28 -06:00
Kornel 35deefdc0c Merge pull request #1439 from whakkee/master
cast to NSInteger to get rid of warning on Xcode 11
2019-07-14 21:19:51 +01:00
Marga Keuvelaar 3e53979236 cast to NSInteger to get rid of warning on Xcode 11 2019-07-12 21:53:29 +02:00
Kornel f8971098be Reset timers after computer sleep (#1437)
Update SUUpdater.m
2019-07-09 18:45:13 +01:00
CoreCode efd1840f35 Update SUUpdater.m 2019-07-08 20:51:16 +02:00
Kornel 17dbdf98e1 Merge pull request #1435 from Yakuhzi/master
Support providing private key as argument
2019-07-05 22:59:20 +02:00
Yakuhzi 79f110a17b Support providing private key as argument 2019-07-05 13:12:11 +02:00
Kornel 5ab0baf84c Merge pull request #1431 from vitu/master
BR update of new string on Sparkle.strings
2019-07-02 11:39:22 +01:00
BR Lingo 578dac0ad7 BR update of new string on Sparkle.strings
Translation for string added by CoreCode.
2019-06-30 02:56:55 -04:00
BR Lingo 920b5bac5e Merge pull request #2 from sparkle-project/master
Update from original repo
2019-06-30 02:45:09 -04:00
Kornel 9ae7224a47 Changelog 2019-06-29 14:41:52 +01:00
Kornel 685be61bc3 Use recommended locale names 2019-06-29 14:41:06 +01:00
Kornel 9be76d3d5a Build with hardened runtime 2019-06-29 14:41:06 +01:00
Kornel fc1960966a Update Sparkle.strings 2019-06-29 14:00:36 +01:00
Kornel 7248e40fda Fix issue #1411 (#1427)
Fix issue #1411
2019-06-28 18:32:20 +01:00
Julian Mayer b8d37346a6 Add translations for new string 2019-06-28 15:07:30 +02:00
CoreCode 2769221117 Update SUBasicUpdateDriver.h 2019-06-27 17:22:12 +02:00
CoreCode 6317a6c74f Update SUBasicUpdateDriver.m 2019-06-27 17:21:50 +02:00
CoreCode f785c7177c Update SUUIBasedUpdateDriver.m
Provide fix for issue #1411
2019-06-27 17:19:03 +02:00
Kornel cd78595c63 Move header copies for bsdiff and ed25519 into a Copy Files build phase (#1421)
Move header copies for bsdiff and ed25519 into a Copy Files build phase
2019-06-17 23:56:40 +01:00
Tony Arnold 4fd2a7b15f Move header copies for bsdiff and ed25519 into a Copy Files build phase
Headers build phases do not work correctly with static library targets when archiving in Xcode. Delete this phase, add a Copy Files build phase to your library, and use it to export your header files.

Reference TN2215: https://developer.apple.com/library/archive/technotes/tn2215/_index.html#//apple_ref/doc/uid/DTS40011221-CH1-PROJ

Fixes #1420
2019-06-16 15:36:54 +10:00
Kornel 186bbb83d5 Merge pull request #1413 from tonyarnold/minor-fixes
Minor fixes
2019-05-28 14:15:13 +01:00
Tony Arnold 0cc8a2f16a Fix a spelling mistake in the submodule comments 2019-05-28 22:55:11 +10:00
Tony Arnold 0eb1caeec5 Rename “Third Party” Xcode group to “Vendor” to match underlying folder name 2019-05-28 22:54:03 +10:00
Tony Arnold 7138663f86 Separate the bsdiff sources into a new static library, and use them in targets 2019-05-28 22:53:26 +10:00
Tony Arnold b767285be0 Separate the ed25519 sources into a new static library 2019-05-28 22:45:53 +10:00
Tony Arnold 5886c2b9b9 Move ed25519 dependency to the Vendor directory 2019-05-28 22:20:58 +10:00
BobZombie f9b534a6b6 add delegate userDidSkipThisVersion 2019-05-17 17:15:41 +09:00
vojtakonarik 5a586d393a Correction of Czech localization inconsistency (#1403)
* Update Sparkle.strings
2019-05-05 00:11:47 +01:00
Michael Buckley b3cc7aed8a Annotate SUHost for nullability 2019-04-22 21:50:20 +01:00
Kornel deb8ea8cc1 Merge pull request #1396 from fumoboy007/pretty-print
Use `XMLNode.Options.nodePrettyPrint` in `generate_appcast` instead of trying to add whitespace manually
2019-04-21 19:09:52 +01:00
fumoboy007 4a3cc18dc3 Use XMLNode.Options.nodePrettyPrint in generate_appcast instead of trying to add whitespace manually 2019-04-20 21:28:45 -07:00
Kornel 75404f6d83 Merge pull request #1392 from panicinc/app-translocation-fix
Improved error when running from translocated location
2019-04-18 20:20:57 +01:00
Michael Buckley 954ed60ecb Improved error when running from translocated location 2019-04-17 20:51:59 -07:00
Kornel ecb5257b2b Update README.markdown 2019-04-14 14:34:04 +01:00
Fabian Jäger fb18c1e542 Phased rollout interval is an appcast item attribute and not its own element (#1385)
* phased rollout interval is an appcast item attribute and not its own element

* add basic test for getting phased rollout interval from appcast item
2019-04-02 15:26:35 +01:00
Fabian Jäger 99f5573619 Allow updating to previous versions if newest appcast item is blocked due to phased rollout (#1384)
The current version of phased rollouts would not find other valid items if the latest one is not ready yet based on the phased rollout group. This PR changes this behavior by using the system's rollout group when finding valid appcast items.
2019-03-29 19:36:29 +00:00
Kornel Lesiński 1edfcaba71 Ignore non-standard permissions in delta updates instead of failing the build
Fixes #1383
2019-03-29 00:06:55 +00:00
Kornel Lesiński fc3221c5d2 Squashed commit of the following:
commit 89a8f1a8b3
Author: Emir Sarı <emirsari@gmail.com>
Date:   Thu Mar 21 20:35:02 2019 -0700

    Fixed capitalization

commit ad0582a89e
Author: Emir Sarı <emirsari@gmail.com>
Date:   Thu Mar 21 17:28:53 2019 -0700

    Fix for changed string

commit 77016c7dff
Author: Emir Sarı <emirsari@gmail.com>
Date:   Thu Mar 21 17:23:21 2019 -0700

    Improvements

    Improvements and layout fixes
2019-03-22 12:06:52 +00:00
Fabian Jäger 26db6982b3 Allow to configure update groups for updating in phases (#1381) 2019-03-20 12:45:48 +00:00
Kornel f550b92f72 Merge pull request #1377 from hofman/master
Fix ed25519 and UITest group paths in project
2019-03-14 11:38:35 +00:00
Christiaan Hofman 5f5fe1b5f9 Fix path for UITests group in project 2019-03-14 11:19:37 +01:00
Christiaan Hofman 6027f2852a fix path for ed5519 group in project 2019-03-14 11:14:12 +01:00
Kornel 60c2f16c9d Merge pull request #1376 from hofman/master
Use AVAILABLE macro to allow compiling with Xcode 8
2019-03-13 23:28:30 +00:00
hofman 5ae7fa7212 Use SUAVAILABLE macro in SPUURLRequest.m 2019-03-13 23:06:25 +01:00
hofman 614b2cc1f3 Use SUAVAILABLE macro in SPUDownloadData.m 2019-03-13 23:04:55 +01:00
hofman 6500bf8c2f Use SUAVAILABLE macro in SUUpdateAlert.m 2019-03-13 23:03:10 +01:00
hofman 3e060d4a7b Use SUAvailable.m in SUStatusController.m 2019-03-13 22:59:53 +01:00
hofman 5286371cb7 Use SUAVAILABLE macro in SUUpdater.m 2019-03-13 22:57:54 +01:00
hofman 2a802447a3 Use SUAVAILABLE macro in SUBasicUpdateDriver.m 2019-03-13 22:55:27 +01:00
hofman c40b42deb1 Use SUAVAILABLE macro in SUAppcast.m 2019-03-13 22:53:32 +01:00
hofman 5d9f41142b Define a macro for @available to have a workaround for Xcode 8 2019-03-13 22:51:14 +01:00
Kornel d540c6a1b9 Merge pull request #1375 from hofman/master
Add -cleanup to -downloadDidUpdate:
2019-03-13 20:47:12 +00:00
hofman e63bcbc047 Add -cleanup to -downloadDidUpdate: 2019-03-13 21:07:22 +01:00
Kornel 4f65e14ee8 Update README.markdown 2019-03-11 14:03:23 +00:00
Kornel fdca1ce6cf Bump 2019-03-10 12:07:53 +00:00
Kornel c3255ed3a7 Merge pull request #1363 from gnachman/gentleRemindersPR
Add delegate methods to suppress update alert.
2019-03-09 23:03:29 +00:00
George Nachman 9b6346516e Pass item to updaterShouldShowUpdateAlertForScheduledUpdate delegate method 2019-03-09 14:58:08 -08:00
Nate Weaver e1f13ebcad Disambiguate signing error messages. 2019-03-03 02:17:24 +00:00
nivekkagicom 420be06ba0 fix warnings when using modules (#1244) 2019-03-02 16:25:15 +00:00
Kornel c7beba948d Add issue templates 2019-02-24 17:35:21 +00:00
Kornel 639b6df47b Merge pull request #1367 from Mailbutler/master
Block-based alternatives to NSInvocation-based delegate methods
2019-02-24 17:05:10 +00:00
Fabian Jäger c9a9cba167 block-based alternatives to NSInvocation-based delegate methods 2019-02-24 16:25:31 +01:00
George Nachman 9f01fd303c Add delegate methods to suppress update alert.
Some applications may prefer to show their own unobtrusive
notification that an update is available when using the
scheduled update driver. This commit adds new delegate
methods to enable that behavior. The delegate may suppress
the alert; if the alert is shown, the delegate is informed
when the user is not interested in a particular update so
they can remove their own notification.
2019-02-21 22:19:31 -08:00
Kornel 1ff1577108 Bump 2019-02-11 14:15:20 +00:00
Kornel 74f2ea540e Merge pull request #1358 from barijaona/smallimages
Losslessly reduced the size of PNG
2019-02-05 02:00:32 +00:00
Barijaona Ramaholimihaso 2652be32f7 Losslessly reduced the size of PNG
By use of OxiPNG, PNGOUT and zopflipng.
Initially submitted by Sveinbjorn Thordarson (@sveinbjornt) at
ViennaRSS/vienna-rss#1237.
2019-02-05 04:46:18 +03:00
Kornel 5118f2b27f Merge pull request #1353 from core-code/master
fix #1352
2019-01-30 15:41:34 +00:00
Julian Mayer b97b60b611 fix 2019-01-30 15:02:13 +01:00
Julian Mayer 3c793482c8 #1352 2019-01-30 13:31:07 +01:00
Kornel 89b4bcde61 Merge pull request #1351 from Wevah/master
Use contentsOfDirectory(at:...) instead of atPath:....
2019-01-26 20:48:12 +00:00
Nate Weaver 3690dd028a Use contentsOfDirectory(at:...) instead of atPath:..., and rename apps to bundles. 2019-01-26 10:59:19 -06:00
Kornel 52e2ef88eb Merge pull request #1350 from Wevah/generate-appcast-bundle-check
Check for all bundles instead of just apps.
2019-01-25 15:41:08 +00:00
Nate Weaver d81633a7d3 Check for all bundles instead of just apps. 2019-01-24 11:49:24 -06:00
Kornel a9e20c7d0a Merge pull request #1347 from pNre/master
Check that effectiveAppearance is being observed before calling removeObserver
2019-01-18 15:21:37 +00:00
Kornel 03a9f57704 Check that effectiveAppearance is being observed before calling removeObserver 2019-01-18 15:58:43 +01:00
Kornel 2f8df626d7 Merge pull request #1340 from kant/patch-1
Semantic issue on #151. Fix typo on paragraph #149
2019-01-12 13:32:52 +00:00
Kornel f5cb6988ed Merge pull request #1341 from kant/patch-2
Fixed typo on string #021
2019-01-12 13:32:20 +00:00
Darío Hereñú 2bfab80998 Fixed typo on string #021 2019-01-12 08:41:46 -03:00
Darío Hereñú 4fa2a37798 Semantic issue on #151. Fix typo on paragraph #149 2019-01-12 08:37:30 -03:00
Kornel 888a7f48a6 Formatting 2018-12-23 11:53:21 +00:00
Kornel 82726c4386 Make it clear that quarantine error is only a warning 2018-12-23 11:53:13 +00:00
Kornel a5b23cdbee Bump 2018-12-18 21:59:38 +00:00
Kornel b19120f5cd Allow EdDSA for delta updates, too 2018-12-16 03:03:23 +00:00
Kornel 4b0a037685 Merge pull request #1331 from ProsoftEngineering/fix-xcode-10-warnings
Fix xcode 10 warnings
2018-12-13 21:05:20 +00:00
Brian Bergstrand 8dadd0003e Fix DEBUG -Wundef warning 2018-12-13 14:39:24 -06:00
Brian Bergstrand 457319f217 Suppress 'direct-ivar-access' warning for property ivar 2018-12-13 14:36:28 -06:00
Kornel 0480b9bb25 Merge pull request #1329 from Bi11/master
Fix release note web view's contextual menu
2018-12-13 19:23:21 +00:00
Bi11 4390eb9eb2 Fix release note web view's contextual menu
Code added in 8ff6c147f2 does not take effect nowadays due to missing assignment of UIDelegate.
2018-12-14 03:05:41 +08:00
Kornel f5c8314c88 Merge pull request #1328 from Bi11/dark-mode
Fix release note WebView's appearance in dark mode
2018-12-13 13:51:25 +00:00
Bi11 1b209e6726 Add a test link in test app 2018-12-13 17:35:49 +08:00
Bi11 a4373e4e0f Fix release note WebView's appearance in dark mode
Referenced commits:
502378553e (PR #1280)
7e351b52c7 (PR #1288)
2018-12-13 17:35:49 +08:00
Kornel d430c33bf4 Merge pull request #1325 from Bi11/master
Fix compile of TestApplication
2018-12-11 02:07:32 +00:00
Bi11 7ef4635d8c Fix compile of TestApplication 2018-12-11 04:16:10 +08:00
Kornel deb4be7a1b Bump 2018-12-10 12:48:46 +00:00
Kornel 5f1bc6b612 Sign appcast tools 2018-12-10 12:47:28 +00:00
Kornel 1cde8110df Explain error 25308 2018-12-10 12:45:40 +00:00
Kornel 1926b7bfa6 1.21.0 2018-11-25 16:01:20 +00:00
Kornel f80907fa2c Check if public key is configured correctly 2018-11-25 15:54:14 +00:00
Kornel 091a86f672 Merge pull request #1317 from HofiOne/2-tiny-issues
2 tiny fixes
2018-11-20 12:50:04 +00:00
Hofi 208b0dc49a 2 tiny fixes
- bogus debug build warning fixed
- fixed docs build warning message to prevent execution of  embedded shell script line
2018-11-20 05:55:17 +01:00
Kornel 5acf3989d2 Make legacy script use a smaller DSA key that macOS still supports
Sizes below 2048 get SHA-1.
2018-11-13 13:36:35 +00:00
Kornel Lesiński 5529a3610d Troubleshooting help 2018-11-12 19:38:17 +00:00
milotype 920ff7f83f Croatian localization added 2018-11-10 18:07:07 +00:00
Kornel 5ff1488f0c Bump 2018-10-31 01:00:16 +00:00
Kornel c0c1c51d8d Ignore symlink permissions in binary deltas
Fixes #1301
2018-10-31 01:00:16 +00:00
Kornel 5139179487 Refactored signature check logic 2018-10-31 01:00:16 +00:00
Kornel f50cbce0e8 Add EdDSA files to tests 2018-10-31 01:00:16 +00:00
Kornel 14f1d3520a Update signing self-check to look for EdDSA 2018-10-31 01:00:16 +00:00
Kornel 9c4729ed4a Use EdDSA keys in test app 2018-10-31 01:00:16 +00:00
Kornel f04a61e159 Sparkle version in logs 2018-10-31 00:50:41 +00:00
Kornel 80d8758fc2 Merge pull request #1302 from elgatosf/master
SPUDownloaderSession leaked because the NSURLSession wasn’t invalidated
2018-10-30 02:38:34 +00:00
Michael Ehrmann 081301d590 SPUDownloaderSession leaked because the NSURLSession wasn’t invalidated 2018-10-29 17:52:48 +01:00
Kornel 397370297b Update README.markdown 2018-09-30 01:01:16 +09:00
Kornel b30dcd979f EdDSA spelling 2018-09-17 13:44:05 +01:00
Kornel ee123edd74 Changelog 2018-09-16 21:12:11 +01:00
Kornel 984625cc7e Build new scripts 2018-09-16 20:55:32 +01:00
Kornel 7b6e7957c6 sign_update tool 2018-09-16 20:55:32 +01:00
Kornel 2815514c23 Bump 2018-09-16 20:55:32 +01:00
Kornel 49eaa4c5cc Objc bugs 2018-09-16 15:57:19 +01:00
Kornel 09bcee7280 Don't re-create unnecessary delta files 2018-09-16 15:19:43 +01:00
Kornel 49ea08b284 Sort project file 2018-09-16 15:07:53 +01:00
Kornel f9dc70ade2 Use proper Caches directory 2018-09-16 15:07:46 +01:00
Kornel 6fb3eee91b Constants for element names 2018-09-16 11:23:27 +01:00
Kornel 19be83b15f Emit edSignature in the appcast 2018-09-16 11:19:28 +01:00
Kornel d90529ccaa Fixed check for supported signatures 2018-09-16 11:19:15 +01:00
Kornel 623b7b6bda ed25519 keys in generate_* tools 2018-09-16 00:40:42 +01:00
Kornel 65bcb3815e Deprecate old DSA scripts 2018-09-16 00:40:42 +01:00
Kornel d5cd95e0ef ed25519 signature verification 2018-09-16 00:40:42 +01:00
Kornel b9150d2938 Rename method 2018-09-16 00:40:42 +01:00
Kornel 1006326157 Make SecKeyRef as needed 2018-09-16 00:40:42 +01:00
Kornel 68856e074b Ed25519 public key in Info.plist 2018-09-16 00:40:42 +01:00
Kornel a86bdb2fa8 ed25519 submodule 2018-09-16 00:40:42 +01:00
Kornel 92e00baafb Don't perform heavy work in constructor 2018-09-15 17:04:05 +01:00
Kornel 98ea3e3d57 Rename 2018-09-15 17:04:05 +01:00
Kornel c094a38231 Wrapper for public keys 2018-09-15 15:54:08 +01:00
Kornel 6df898f9b7 Use signatures object 2018-09-15 15:54:08 +01:00
Kornel 7f51a4e344 Read ed25519 signature from appcast 2018-09-15 15:54:08 +01:00
Kornel 8ad1f57672 SUSignatures 2018-09-15 15:54:08 +01:00
Kornel 8b88183c7d Merge pull request #1278 from tempelmann/master-origin
Make "sign_update" work on pre-10.13 system
2018-08-19 14:45:43 +01:00
Thomas Tempelmann d036d3e3ae Make "sign_update" work on pre-10.13 system by checking the OpenSSL version, using the older "-dss1" digest option again in that case. See ticket 1227 and commit 0cb0b2f 2018-08-19 15:28:03 +02:00
Kornel 8b13eb5dcf Merge pull request #1270 from shayr1/patch-1
Fixed some typos
2018-07-18 18:55:20 +01:00
Shay ba5b7341fa Fixed some typos
Fixed typos in the following keys:
"An error occurred during installation. Please try again later."
"An error occurred in retrieving update information. Please try again later."
Added missing key that fell back to English:
"Cancel Update" = "בטל עדכון"; (Inside alert when using a button to let user check for updates)
2018-07-18 19:16:05 +03:00
Kornel e1d4b19ce7 Bump 2018-07-17 16:37:50 +01:00
sagecook 360c2ce7a9 Fix binary delta creation on network drives
Closes  #1156
2018-07-17 16:33:58 +01:00
Kornel f9740292d4 Merge pull request #1261 from kenohori/master
New Spanish localisation
2018-06-28 12:55:05 +02:00
Ken Arroyo Ohori 558be04121 New Spanish localisation 2018-06-27 21:22:56 -05:00
Kornel b426426905 Merge pull request #1257 from LeoNatan/master
Fix compilation issues on Xcode 10 with new build system
2018-06-20 16:04:39 +01:00
Leo Natan 75835a5874 Fix compilation issues on Xcode 10 with new build system 2018-06-20 15:29:50 +03:00
Kornel 50c12d1c2b Bump 2018-06-19 22:36:19 +01:00
Kornel e452b7f6ba Merge pull request #1251 from ksuther/objc-messaging-id-fixes
Silence Xcode 10 "Messaging unqualified id" warnings by specifying types
2018-06-14 21:56:05 +03:00
Kent Sutherland 3034eca85b Updated readme to indicate that the 10.11 SDK is required to compile
Xcode 7 was released with 10.11, the reference to the 10.8 SDK is out of date.
2018-06-14 20:31:58 +02:00
Kent Sutherland 9ae41fe4ab Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10.
Removed __has_feature(objc_generics) check and use generisc to help silence the warnings.
2018-06-14 20:31:20 +02:00
Kornel 7d931e22d7 Merge pull request #1249 from JasonLPollack/update-finnish
Updated Finnish language resources
2018-06-14 18:57:56 +03:00
Jason Pollack b303ee312b Updated Finnish language resources 2018-06-14 10:05:31 -04:00
BR Lingo 9453761aef Merge pull request #1 from sparkle-project/master
Hey, self. Please let me in.
2018-06-09 00:38:49 -04:00
Kornel d19c98a877 Merge pull request #1245 from grahammiln/master
Remove executable bit on distributed source files.
2018-06-04 12:32:30 +01:00
Graham Miln 7a4caad5fe Remove executable bit on distributed source files. 2018-06-04 08:27:05 +02:00
Kornel 8f546c93f4 Merge pull request #1237 from ProsoftEngineering/spudownloadersession-main
#1236: SPUDownloaderSession main thread
2018-05-25 22:04:08 +01:00
Brian Bergstrand 1c4bcda012 Fix potential hang with dispatch_sync to main thread 2018-05-25 14:32:57 -05:00
Brian Bergstrand a18282ec79 Deliver SPUDownloaderSession delegate messages on the main queue
This is the behavior of SPDownloaderDeprecated.

Github #1236
2018-05-25 14:32:57 -05:00
Kornel 8a8ce49a23 Merge pull request #1235 from sunwenli/sunwenli
add tips for user to install doxygen
2018-05-25 12:22:32 +01:00
sunwenli 2561af8270 add tips for user to install doxygen 2018-05-25 17:12:11 +08:00
Kornel 035ad6a277 Merge pull request #1234 from horcs/add-delegate-callback-to-track-update-events
delegate callbacks for fininshed download and extraction related events
2018-05-22 17:08:25 +01:00
Csaba Horony 9cbae0edb6 add delegate callbacks for fininshed download and extraction related events 2018-05-22 10:07:50 +02:00
Kornel 3bbf84e332 Merge pull request #1230 from tamasprezi/private-key-from-keychain
Support for getting the private key from keychain for signing deltas
2018-05-13 23:22:14 +01:00
Tamás Lustyik a582d46096 Restored legacy CLI for backward compatibility 2018-05-13 21:33:03 +02:00
Tamás Lustyik 3f3ace055d Fixed index out of bounds 2018-05-13 17:28:29 +02:00
Tamás Lustyik 886e4b2c81 More complex argument parsing to support both inputs 2018-05-13 16:28:05 +02:00
Tamás Lustyik a418d8fe64 Function to load the private key directly from the keychain 2018-05-13 16:04:48 +02:00
Tamás Lustyik b48e80aa27 Minor naming improvement 2018-05-13 15:50:46 +02:00
Kornel a19dfb2be0 Bump 2018-04-29 13:36:22 +01:00
Kornel 7394593743 Explain why auth is requested
It can't be SULog, because it's not linked in tool using SUFileManager
2018-04-29 13:34:28 +01:00
Kornel 4973c0143f Whitespace 2018-04-29 13:34:06 +01:00
Kornel c171f381d4 Merge pull request #1222 from zyves72/master
French translation for critical update
2018-04-26 14:39:02 +01:00
zyves72 dde4a0aae2 Add files via upload
Translation
2018-04-26 14:53:59 +02:00
Kornel d5a1ba44ff Don't check for updates if Do Not Disturb is on 2018-04-24 04:20:51 +01:00
Kornel 0d03b4006d Merge pull request #1216 from mallexxx/master
Fix closeCheckingWindow called from background thread
2018-04-20 16:33:12 +01:00
Alexey Martemyanov 25993d0776 Fix closeCheckingWindow called from background thread 2018-04-20 22:22:16 +07:00
Kornel 276707b3da Merge pull request #1212 from sunuslee/master
expose CodesigningVerifier, add codesign info api
2018-04-17 17:51:24 +01:00
Kornel 23e88737ec Merge pull request #1211 from horcs/hungarian-localization
Hungarian localization
2018-04-16 20:54:34 +01:00
Csaba Horony d400a53ebd add missing hungarian translation 2018-04-16 13:40:34 +02:00
sunuslee f39b07fd59 expose CodesigningVerifier, add codesign info api
Signed-off-by: sunuslee <sunuslee@gmail.com>
2018-04-16 10:08:31 +08:00
Csaba Horony 5bc8f3e535 Hungarian localization 2018-04-13 10:56:17 +02:00
Csaba Horony 503a292084 added localization files for Hungarian translation 2018-04-13 10:55:50 +02:00
Karl Moskowski d60b16f633 Ensure cocoapods is installed before performing the release “sanity check” (#860) 2018-04-06 01:35:34 +01:00
Kornel de3e73b589 Merge pull request #1201 from DaveWoodCom/master
Silence some Xcode warnings
2018-03-26 12:32:08 +01:00
Dave Wood ad863775db Silence ‘This block declaration is not a prototype’ Xcode warning 2018-03-25 23:05:37 -04:00
Dave Wood 79511c982a Silence ‘decodeObjectOfClass:forKey: is only available on macOS 10.8’ Xcode warnings, similar to commit ea94969188 2018-03-25 23:05:25 -04:00
Kornel 189ed9d315 Merge pull request #1172 from nivekkagicom/fix_warnings
silence 10.9 availability and other warnings and use modules when available
2018-03-19 20:11:27 +00:00
Kornel ea94969188 10.7 compatibility 2018-03-18 13:52:13 +00:00
Kornel 57731f44d7 Avoid invalid use of main thread
Fixes #1189
2018-03-18 13:41:08 +00:00
Kornel 2a0514c93b Update wording of read-only error 2018-03-18 13:37:46 +00:00
Adrian Thomas 467e1495c0 Improve 'read-only' error message (#1192)
* Improver read-only error message German

Updated the "read-only volume" error to reflect the real-world scenarios users run into.
It's almost never a CD, it's nearly always running from ~/Downloads or the .dmg if you still ship your app that way.
2018-03-18 13:34:19 +00:00
Kornel Lesiński 8ac254951a "all" target 2018-03-18 13:27:56 +00:00
Kornel c83c9221f7 Hidden verbose flag 2018-03-18 13:27:45 +00:00
Kornel b46315df9c Outdated comment 2018-03-18 13:27:43 +00:00
Kornel 9c505dee2f Merge pull request #1181 from vitu/master
Amend to avoid gender issue
2018-02-02 17:22:50 +00:00
BR Lingo 2ed7402367 Amend to avoid gender issue
Amend to avoid gender issue

Victor committed
a01979c
1 changed file
Instead of addressing the user, which might cause gender issues, string has been adapted to include “app” (masculine, in accordance with Apple's terminology).

Would translate back as “The app is up-to-date!”
2018-02-02 10:51:47 -05:00
Kornel 3afa47b092 Changelog 2018-01-29 23:03:33 +00:00
Kornel 874d6bce36 Bump 2018-01-29 22:55:32 +00:00
B. Kevin Hardman 51a335b3fd move Xcode 9.2 automatic changes from project to xcconfig files 2018-01-18 11:19:50 -05:00
B. Kevin Hardman 578bb9ecb8 Bring project up to Xcode 9.2 settings 2018-01-18 08:02:18 -05:00
B. Kevin Hardman 76e8838eb3 silence 10.9 availability and other warnings and use modules when available 2018-01-18 07:37:26 -05:00
Kornel 0a101b7902 Merge pull request #1167 from sparkle-project/mainthread
Ensure UI is changed only on the main thread
2018-01-09 00:18:36 +00:00
Kornel 865dd2e187 Ensure UI is changed only on the main thread 2017-12-29 19:27:56 +00:00
Kornel 083bd9b453 nil checks 2017-12-29 19:26:56 +00:00
Kornel b48bc4dcac Merge pull request #1165 from Deadpikle/feature/spudownloader
[WIP] Port SPUDownloader to 1.x w/NSURLSession & NSURLDownload
2017-12-29 17:47:45 +00:00
Deadpikle bb6203f40a Fix typo in expectation description 2017-12-28 22:41:22 -05:00
Deadpikle 25204a66e0 Finish tests for persistent download 2017-12-28 22:35:27 -05:00
Deadpikle c886947f55 Set NSOperationQueue op count to 1 2017-12-28 22:34:43 -05:00
Deadpikle f0460033ba Remove commented out code 2017-12-28 21:58:42 -05:00
Deadpikle 1a71456ed9 Slight refactor of temp download test 2017-12-28 21:50:46 -05:00
Deadpikle e7cdbfc45e Add tests for temp SPUDownloader dl 2017-12-28 21:40:31 -05:00
Deadpikle 8b5c8b5cdf Fix SUAppcast tests 2017-12-28 15:52:47 -05:00
Deadpikle a7af48f0d1 Refactor cache clearing & errors to super 2017-12-24 09:38:04 -05:00
Deadpikle 03e28780d9 Fix AppKitPrevention not being included 2017-12-21 09:35:06 -05:00
Deadpikle 5b1c76db26 Fix a few header comments 2017-12-20 13:22:47 -05:00
Deadpikle 703e611eb5 Remove a bunch of warnings 2017-12-20 13:01:44 -05:00
Deadpikle 6ee88124ad SUAppcast now uses SPUDownloader 2017-12-20 12:58:45 -05:00
Deadpikle 1cc5f230a5 Check OS version before creating downloader 2017-12-20 12:40:48 -05:00
Deadpikle 429f950434 Only send back error if non-nil 2017-12-20 12:40:37 -05:00
Deadpikle 7df50ccfd3 Download path should be full path 2017-12-20 12:25:42 -05:00
Deadpikle 9c301bfbf3 Drivers now use SPUDownloader 2017-12-20 12:11:49 -05:00
Deadpikle 8a0474d644 Continue refactor of downloader to two classes 2017-12-20 11:43:13 -05:00
Deadpikle dc85d63861 Refactor download NSURLSession to a child class 2017-12-20 11:14:02 -05:00
Deadpikle dc8e8b775a Remove unnecessary delegate name in header 2017-12-20 11:13:41 -05:00
Deadpikle ecb608bb40 Bring 2.0 files for SPUDownloader to 1.x 2017-12-20 10:48:51 -05:00
Kornel c3e546d7f8 Merge pull request #1154 from 1024jp/updateJapanese
Update Japanese localization
2017-11-25 13:50:32 +00:00
1024jp 2477a92b0f Update Japanese localization 2017-11-25 15:34:15 +09:00
Kornel 7f0bc6a244 Merge pull request #1141 from stefanhp/patch-1
Update Sparkle.strings
2017-10-21 22:28:44 +01:00
Stefan Paychère 68f62e5955 Update Sparkle.strings
Translation of "Description text for SUUpdateAlert when the update informational with no download."
2017-10-21 20:29:51 +02:00
Kornel 0cb0b2f2c7 Update for newer OpenSSL 2017-10-10 12:26:01 +01:00
Kornel b590722aad Merge pull request #1135 from jkbullard/fix-frequent-polling
Fix #1061 & #835: Sparkle clients polling too frequently
2017-10-05 15:43:24 +01:00
Jonathan Bullard 10f831fce8 Move [NSDate date] to be after willChangeValueForKey
Per comment by Pornel
2017-10-05 09:36:31 -04:00
Jonathan Bullard a2ecdd2744 Fix #1061 & #835: Sparkle clients polling too frequently
The SULastCheckTimeKey preference (a/k/a "default"), which is stored
in ~/Library/Preferences/….plist, was used to store the date of the
last update check.

That causes a problem if the storage is read-only (for example, if the
.plist file is “locked” (has the uchg or schg flag set) or if the
SULastCheckTimeKey key "exists in a domain that precedes the
application domain the search list"). The date would never be modified,
and the old date would cause a new update check to be queued at the end
of an update check. If application or bundle was up-to-date, or the
user had chosen to skip the update that was available, this would cause
update checks to happen as often as the computer and network would
allow, many times each second.

The new code uses an instance variable to store the value. The variable
is initially loaded from the “SULastCheckTimeKey” preference, and each
time the variable is modified its new value is stored to that
preference. However, the variable, not the preference, is used when
calculating whether enough time has passed since the last update check
to warrant another check. The variable will always (after the first
update check) have the "correct" value, and update checks will not be
done more frequently than desired.
2017-10-05 08:57:04 -04:00
Kornel ec7f55d173 Handle SecTransformExecute errors
Fixes #1129
2017-09-27 18:45:52 +02:00
Kornel ddfc4089d2 Merge pull request #1126 from ksuther/touchbar-warnings
Silence Touch Bar availability warnings on Xcode 9
2017-09-18 23:06:08 +01:00
Kent Sutherland 80c34526e8 Silence Touch Bar availability warnings on Xcode 9 by using API_AVAILABLE.
Disable gnu-zero-variadic-macro-arguments to prevent warnings from use of API_AVAILABLE.
2017-09-18 12:17:58 -05:00
Kornel 0c3994c571 Merge pull request #1124 from dfuhrmann/xcode-7-macOS-10.11-compatibility
Restore Xcode 7 and macOS 10.11 SDK compatibility
2017-09-11 14:19:31 +01:00
David Fuhrmann fbda90ad64 Sparkle: Convert all xib files to Xcode 7 format
Only this format can be opened with Xcode 7. The previously used
Xcode 8 format only opens and compiles with Xcode 8.
2017-09-11 11:24:10 +02:00
David Fuhrmann 40750b6f24 Sparkle: Add 10.11 SDK compatibility for touch bar declarations
Those annotations are not available in 10.11 SDK yet.
2017-09-11 11:23:48 +02:00
David Fuhrmann a7ba0bea6e Sparkle: Add backwards compatibility with 10.11 SDK for logging
10.11 SDK does not contain the os_log API yet. Code is modified
in such a way that it compiles with older SDKs, and falls back
to the old implementation even if it runs on 10.12.
2017-09-11 11:22:27 +02:00
Kornel 558cfd2153 Bump 2017-08-14 13:19:03 +01:00
Kornel 94074e2bdc Merge pull request #1111 from sparkle-project/swift4
Update to Xcode 9/Swift 4
2017-08-14 13:02:21 +01:00
Kornel 56065fcf95 Merge pull request #1119 from 1024jp/patch-1
Update Xcode version for Travis CI
2017-08-14 12:46:30 +01:00
1024jp f24189e848 Update Xcode version for Travis CI 2017-08-14 18:05:49 +09:00
Kornel 65b12a2be1 Merge pull request #1116 from fujisoft/patch-3
Workaround for timing issue of termination detection.

Not sure if that is correct.
2017-08-11 19:03:05 +01:00
fujisoft 900de556a8 Fix for the timing issue of termination detection. 2017-08-08 11:12:47 +09:00
App Tyrant 7c8ff2b969 Add optional updaterDidRelaunchApplication: method on SUUpdaterDelegate (#1115)
* Added updaterDidRelaunchApplication: delegate method.

* Removed isUpdaterRelaunching property.

* Revert SUHost.
2017-08-08 00:21:51 +01:00
Kornel 43b4472d3c Better error message 2017-08-01 15:55:25 +01:00
Kornel 260170f372 Warning 2017-08-01 15:54:52 +01:00
Kornel ea85fc6442 Update to Xcode 9/Swift 4 2017-07-27 16:42:44 +01:00
Kornel a52604a264 Revert "Ensure UI code always runs on the main thread"
This reverts commit 423ee5a9d6.
2017-07-20 13:20:20 +01:00
Kornel 39d6c616b0 Merge pull request #1051 from sparkle-project/mainalert
Ensure UI code always runs on the main thread
2017-07-16 21:03:20 +01:00
Kornel 043ad0464a Merge pull request #1098 from Eitot/dutch
Update Dutch localization for informal style and changed terminology
2017-06-24 22:19:09 +01:00
Kornel d99339cf08 Merge pull request #1097 from Eitot/german
Update German localization for informal style and changed terminology
2017-06-24 22:11:16 +01:00
Eitot c541f95036 Update German localization with some terminology changes
Apple uses the term "Update" instead of "Aktualisierung" and
"laden" instead of "herunterladen".
2017-06-23 10:00:05 +02:00
Eitot e678ffb3ca Update German localization for informal style
This is the style in Apple's localizations in macOS Sierra.
Also makes some slight changes to wording.
2017-06-23 09:59:48 +02:00
Eitot 070ea362a2 Update Dutch localization for informal style
This is the style in Apple's localizations in macOS Sierra.
2017-06-23 09:57:55 +02:00
Eitot c4db636d0b Update Dutch localization with some style changes
This reflects Apple's localizations a bit better.
2017-06-23 09:57:49 +02:00
Kornel 7e9f05865a Merge pull request #1094 from keith/ks/cocoapods-bin
Include bin files in CocoaPods installation
2017-06-19 10:24:38 +01:00
Keith Smiley 3c14c950ef Include bin files in CocoaPods installation
This updates the podspec to include the bin scripts in Pods directory
when using CocoaPods. This way users don't also have to download the
Sparkle repo out of band to sign releases.
2017-06-18 20:33:24 -07:00
Kornel 4438b69b50 Simplified check 2017-06-07 23:56:45 +01:00
Kornel 6d0c734c26 Rename OSX macOS 2017-06-07 23:55:34 +01:00
Kornel e8805e0563 Merge pull request #1089 from Memphiz/add_osx_attribute
Add support for the sparkle:os attribute in the enclosure tag
2017-06-07 23:51:10 +01:00
Memphiz 193036b2c4 [BasicUpdateDriver] - extend hostSupportsItem method to also check the sparkle:os attribute from the enclosure element to decide if an update item is valid for the host 2017-06-07 22:11:08 +02:00
Memphiz 33bf6732ea [AppcastItem] - parse and save the sparkle:os attribute of the enclosure element and add isOsxUpdate method to item class 2017-06-07 22:10:56 +02:00
Kornel e94fb63ff0 Merge pull request #1087 from 1024jp/japanese
Updated Japanese translation to reflect change on 55be13c
2017-06-04 15:12:32 +01:00
Kornel 84e5925578 Merge pull request #1086 from vitu/master
Updated translation to reflect change on 55be13c
2017-06-04 15:11:51 +01:00
1024jp bb83e9a0da Updated Japanese translation to reflect change on 55be13c 2017-06-04 10:55:45 +09:00
Victor 26d4d75c36 Updated translation to reflect change on “Update error message to mention temp folders rather than optical drives”. 2017-06-03 20:23:14 -04:00
Kornel fe5737f0b6 Changelog 2017-06-02 12:21:08 +01:00
Kornel ac49a3b5b6 Merge pull request #1081 from sparkle-project/autoname
Prepend app name to Autoupdate.app name
2017-06-02 12:01:22 +01:00
Kornel cbeaeb29ec Merge pull request #1084 from ksuther/nil-progress-block
Don't assume that the progress block exists (the parameter is nullable)
2017-06-02 04:14:22 +01:00
Kent Sutherland d0a6c699da Don't assume that the progress block exists (the parameter is nullable) 2017-06-01 16:55:52 -05:00
Kornel 84b7e5e22f Prepend app name to Autoupdate.app name 2017-05-27 11:38:19 +01:00
Kornel 61774b3f7d Error message tweak 2017-05-27 11:37:06 +01:00
Kornel 55be13ca6f Update error message to mention temp folders rather than optical drives
Finder is required to remove quarantine from downloaded apps
2017-05-20 17:09:56 +01:00
Kornel fc48e5e4df 1.18.0 2017-05-18 21:54:56 +01:00
Kornel bfada07a2c Log more errors 2017-05-18 21:48:51 +01:00
Kornel 4f965660f3 Merge pull request #1072 from sparkle-project/autoerror
Unify handling of aborted updates
2017-05-03 16:51:06 +01:00
Kornel a2764158d6 Unify handling of aborted updates 2017-05-03 12:34:28 +01:00
Kornel 60727bffa5 Log key read failure 2017-04-24 18:05:13 +01:00
Kornel 715163fe0d Formatting 2017-04-24 18:05:13 +01:00
Kornel 629c42d62d Merge pull request #1050 from sparkle-project/genapp
generate_appcast improvements
2017-04-14 21:28:07 +02:00
Kornel 3e45211bbe Escape + as well 2017-03-31 15:15:22 +01:00
Kornel 89acca1318 Escape profile URLs better
Fixes #1059
2017-03-31 11:08:03 +01:00
Kornel Lesiński 4bc2e6e891 %s is deliberate in this format string
Fixes #1053
2017-03-24 12:00:12 +00:00
Kornel Lesiński 405c9fd9a1 Unused 2017-03-24 12:00:12 +00:00
Kornel 9232316b19 Merge pull request #1052 from sparkle-project/scheme
Make generate_appcast available as a shared scheme
2017-03-24 11:05:33 +00:00
Kornel Lesiński 0569c73391 Make generate_appcast available as a shared scheme
#1049
2017-03-17 09:27:00 +00:00
Kornel Lesiński 423ee5a9d6 Ensure UI code always runs on the main thread 2017-03-15 21:31:11 +00:00
Kornel Lesiński ac042821d8 Special case for .tar.gz extension 2017-03-15 18:42:08 +00:00
Kornel Lesiński 36139c57bc Shush Xcode 2017-03-15 18:42:08 +00:00
Kornel Lesiński 662e84400a Inline release notes if they don't look like a standalone HTML document 2017-03-15 18:42:08 +00:00
Kornel Lesiński b6b5c6d927 Link straight to docs from the readme 2017-03-15 18:42:08 +00:00
Kornel Lesiński 1683d2de34 Simplify release notes link check 2017-03-15 18:42:08 +00:00
Kornel Lesiński 615a08bc32 Feed formatting 2017-03-15 18:42:08 +00:00
Kornel c7bf998913 Merge pull request #1016 from sparkle-project/installprogress
Report installation progress from Installer
2017-03-12 14:39:43 +00:00
Kornel 1dd9d93090 Merge pull request #1046 from digitalmoksha/master
generate_appcast: if an .html file exists of the same name, create the releaseNotesLink
2017-03-11 11:31:58 +00:00
Brett Walker ac8c37096e ignore .html files when scanning for archives 2017-03-11 12:09:53 +01:00
Kornel c86e825a5f Merge pull request #1048 from vitu/master
Missing strings translation.
2017-03-09 17:03:57 +00:00
vitu 40a777f5d9 Missing strings translation. 2017-03-09 11:58:52 -05:00
Kornel Lesiński 3098afc90b Updated swift 2017-03-09 13:32:05 +00:00
Kornel Lesiński 3809da20bf Warn against abusing installUpdatesIfAvailable 2017-03-09 13:13:29 +00:00
Brett Walker c623480f72 when generating the appcast, if an .html file exists of the same name as
the archive, then it will be linked in as the releaseNotesLink
2017-03-08 10:57:59 +01:00
Kornel Lesiński 72ee4aa2c6 Revert "Fix pt_BR translations"
This reverts commit 83195a802e.
2017-03-08 00:36:46 +00:00
Kornel Lesiński e160f994b4 Revert "Fix pt_BR translations (#1039)"
This reverts commit 3b04c45ee9.
2017-03-08 00:36:40 +00:00
Kornel e7810c970b Merge pull request #1044 from 1024jp/fixJapanese
Fix Japanse localization
2017-03-01 10:39:35 +00:00
1024jp 0a94a6ce88 Fix Japanse localization
Generalize message to user as the previous setence was more like "Anonymous system profile information is used to help **our company** plan future development work."
2017-02-28 13:54:47 +09:00
Kornel Lesiński e54748ac87 Add more info to auth tool run failure 2017-02-26 18:03:42 +00:00
fujisoft 3b04c45ee9 Fix pt_BR translations (#1039)
* Fix pt_BR translations
2017-02-20 10:22:15 +00:00
Kornel 792e13a067 Merge pull request #1038 from fujisoft/patch-1
Fix pt_BR translations
2017-02-19 16:09:37 +00:00
fujisoft 83195a802e Fix pt_BR translations
"Translation Error Correction"
It must have a faithful consistency to the translation terminologies of Apple Inc.
2017-02-20 00:50:36 +09:00
Kornel 46d2a6aeab Merge pull request #1036 from gnachman/preventAccidentalInstalls
Disable the keyboard shortcut for the install button for scheduled updates to avoid accidental installs.
2017-02-16 17:21:55 +00:00
George Nachman 40347c0d43 Disable the keyboard shortcut for the install button for scheduled updates to avoid accidental installs. 2017-02-13 19:41:02 -08:00
Kornel e1f67cf8db Merge pull request #1034 from digitalmoksha/master
added `sparkle:shortVersionString` to the enclosure, #1032
2017-02-10 21:39:00 +00:00
Brett Walker 5210e1d3ac added sparkle:shortVersionString to the enclosure, #1032 2017-02-10 16:53:30 +01:00
Kornel Lesiński f43c83688d Changelog 2017-02-09 00:04:10 +00:00
Kornel 83709f4b30 Merge pull request #1028 from digitalmoksha/master
percent encode the filename used in the delta url, for #995
2017-02-08 22:27:17 +00:00
Brett Walker c0d4640508 percent encode the filename used in the delta url 2017-02-08 22:40:37 +01:00
Kornel c6fb841868 Merge pull request #1026 from zorgiepoo/coupling-ci
Detect and fail if any two-way dependencies exist in the project
2017-02-06 16:22:59 +00:00
Zorg 9a07c5125e Detect and fail if any two-way dependencies exist in the project
While this may or may not be perfect, this should improve code quality by preventing new code that is introduced that creates tight coupling. This test is performed when make test is executed.

I avoided retrieving objc_dep in a way that make test would require an internet connection. I also added the executable bit to the objc_dep script, and a source.txt file indicating where the source came from.
2017-02-06 08:27:10 -05:00
Kornel fb6fe6d6da Merge pull request #1025 from vitu/master
Terminology consistency update.
2017-02-06 10:22:21 +00:00
BR Lingo 9318b9f896 Update Sparkle.strings
Terminology consistency update.
2017-02-06 01:18:26 -05:00
BR Lingo d27c12f1fc Update Sparkle.strings
Terminology consistency update.
2017-02-06 01:15:22 -05:00
Kornel 016dad176e Merge pull request #1024 from vslavik/faster-noop-builds
Don't touch Info.plist unless git version changes
2017-02-05 21:31:45 +00:00
Václav Slavík 1f98f9eb36 Don't touch Info.plist unless git version changes
PlistBuddy always touches its output file, even if the value written is
identical to the value already there. In such case, Xcode sees
Info.plist as modified, therefore sees the entire target as modified and
re-runs potentially expensive operations like copying frameworks or
signing.

Avoid unnecessary build operations by checking the previous
CFBundleShortVersionString if Info.plist already exists and only
updating it if necessary.
2017-02-05 18:29:22 +01:00
Kornel 6e51231966 Merge pull request #1021 from zorgiepoo/copyright
Add my name to LICENSE
2017-02-02 08:54:51 +00:00
Zorg dc1d83e904 Add my name to LICENSE 2017-02-01 23:56:17 -05:00
Kornel Lesiński 9d966e68f0 Merge remote-tracking branch 'origin/1.16.x'
* origin/1.16.x:
  Fix #1020
2017-01-28 12:15:28 +00:00
Kornel Lesiński 03abfe2739 Fix #1020 2017-01-28 12:10:03 +00:00
Kornel Lesiński 155816b609 Formatting 2017-01-28 12:07:10 +00:00
Kornel 313352fe26 Merge pull request #1018 from sparkle-project/filesystemnormalization
fileSystemRepresentation normalization
2017-01-28 12:06:32 +00:00
Kornel Lesiński 67b1e08a45 Delta minor version fix 2017-01-28 11:31:08 +00:00
Kornel Lesiński 21214e8623 Simplify minor delta version down to int
+ minor version bump
2017-01-28 11:08:53 +00:00
Kornel Lesiński ed16c5c2a0 Use the same fileSystemRepresentation function for both parts of the path 2017-01-27 18:37:35 +00:00
Kornel Lesiński 0a869e87bf Make normalizedInstallationPathForHost also normalize Unicode 2017-01-27 18:34:56 +00:00
Kornel Lesiński 14c543ccb3 Test with non-ASCII names 2017-01-27 18:17:05 +00:00
Kornel Lesiński 0fd0331464 Typo 2017-01-27 18:04:43 +00:00
Kornel Lesiński 0cba214f07 1.17.0 2017-01-24 14:07:32 +00:00
Kornel Lesiński 2a644672ca Report installer progress 2017-01-24 13:46:21 +00:00
Kornel Lesiński 81e71844d6 Report plain install progress 2017-01-24 13:46:01 +00:00
Kornel Lesiński e4821e0454 Ability to report installation progress 2017-01-24 13:45:50 +00:00
Kornel a97538f931 Merge pull request #1014 from zorgiepoo/fix-unarchive-temp-removal
Don't remove the temporary unarchive directory in unit tests
2017-01-23 09:48:22 +00:00
Zorg c61767f501 Don't remove the temporary unarchive directory in unit tests
This should fix a potential bug where the unit tests try to unarchive a file that does not exist.
2017-01-22 22:02:45 -05:00
Kornel Lesiński c0d45952a9 Removed unimportant changelog entry 2017-01-23 01:21:31 +00:00
Kornel Lesiński 06629310e2 Updated changelog 2017-01-22 18:40:39 +00:00
Kornel 7e99561d9c Merge pull request #1010 from zorgiepoo/termination-autoupdate
Termination autoupdate
2017-01-20 13:56:05 +00:00
Zorg 5c71eebf59 Remove nonsense logging I had for debugging purposes 2017-01-19 23:28:56 -05:00
Zorg 5368dbfb41 Merge branch '1.17.x' into termination-autoupdate 2017-01-19 23:22:27 -05:00
Zorg 0e978e3faf Add kqueue based termination listener
Note this termination listener is not polling or timer based and will work on processes that aren't GUI applications.
2017-01-19 23:21:26 -05:00
Kornel f9dfa3dd9d Merge pull request #1006 from sparkle-project/subsystem
Use app-independent subsystem identifier
2017-01-18 22:33:22 +00:00
Kornel Lesiński c104c1b27e Fix facility identifier 2017-01-18 22:31:03 +00:00
Kornel Lesiński 7e7c97a09f Use app-independent subsystem identifier 2017-01-18 19:01:45 +00:00
Kornel a75ad96719 Merge pull request #1005 from Bi11/touchbar
Update button outlets for all xib files
2017-01-18 12:32:03 +00:00
Bi11 22f5d1f0f8 Update button outlets for all xib 2017-01-18 15:45:00 +08:00
Kornel b9753cbd81 Merge pull request #1003 from Bi11/touchbar
Add forward declaration for Xcode7
2017-01-17 22:53:21 +00:00
Bi11 548ae6e2b6 Change SDK checking macro to match existing code base 2017-01-18 05:34:37 +08:00
Bi11 db7f4acc83 Add forward declaration for Xcode7 2017-01-18 05:06:09 +08:00
Bi11 942d70d3aa Suppress partial availability warning on line level 2017-01-18 04:53:37 +08:00
Kornel Lesiński 2ccac610f6 Added declaration for Xcode 7 2017-01-17 20:38:22 +00:00
Kornel Lesiński 7a0d402a01 Merge remote-tracking branch 'origin/master' into 1.17.x
* origin/master:
  Explain why I'm not relying on the compiler to throw linkage errors
  Add AppKitPrevention header to reduce redundancy.
  Add AppKit prevention guards to modules that shouldn't import it
  Add Obj-C generics where applicable
  Adds test cases for "sparkle:criticalUpdate" tag. (#999)
2017-01-17 19:39:48 +00:00
Kornel Lesiński d070bca0b0 Sort project file 2017-01-17 19:38:02 +00:00
Kornel 682f8f32c6 Merge pull request #1002 from Bi11/touchbar
Add touch bar build support for Xcode 8.0 and earlier
2017-01-17 19:36:28 +00:00
Bi11 56db200f06 Add touch bar build support for Xcode 8.0 and earlier 2017-01-18 01:44:16 +08:00
Kornel 34179edd6d Merge pull request #1001 from zorgiepoo/appkit-prevention
Add AppKit prevention guards to modules that shouldn't import it
2017-01-17 13:09:38 +00:00
Zorg 530f3a4a63 Explain why I'm not relying on the compiler to throw linkage errors 2017-01-17 07:17:14 -05:00
Zorg 135d05b8b8 Add AppKitPrevention header to reduce redundancy.
Note this header should be included last in implementation files, which is why I added extra padding.
2017-01-17 07:08:29 -05:00
Zorg c56694382e Add AppKit prevention guards to modules that shouldn't import it 2017-01-16 21:17:25 -05:00
Kornel a39023e95b Merge pull request #1000 from zorgiepoo/generics
Add Obj-C generics where applicable
2017-01-17 00:58:20 +00:00
Zorg 282f0ae58e Add Obj-C generics where applicable
In headers that are exported, we test to see if generic support is available.
2017-01-16 18:09:04 -05:00
Kornel Lesiński 55e1a24431 Formatting 2017-01-16 22:25:37 +00:00
Kornel Lesiński 9fa0519811 Comments 2017-01-16 22:07:55 +00:00
Kornel ecc72f834d Merge pull request #987 from Bi11/touchbar
Add Touch Bar Support
2017-01-16 12:12:47 +00:00
Thomas Tempelmann c1488b0515 Adds test cases for "sparkle:criticalUpdate" tag. (#999)
* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift).

* Tests the "criticalUpdate" appcast tag, using the proper XCTest swift class. I haven't tested this, though, due to the lack of the needed Xcode version.

* Test case for Appcast now checks all 4 items for the correct "criticalUpdate" state.

* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift). (reverted from commit 3ce1c9790b)
2017-01-16 00:02:32 +00:00
Bi11 aa29a754e6 Merge branch '1.17.x' into touchbar 2017-01-13 21:30:09 +08:00
Bi11 65bd11df8a Use NSView’s designated initializer 2017-01-13 20:33:41 +08:00
Kornel Lesiński 397eb8a379 Merge remote-tracking branch 'origin/master' into 1.17.x
* origin/master:
  Proper fix for #995
2017-01-13 01:03:21 +00:00
Kornel Lesiński 27c560b7d5 Proper fix for #995 2017-01-13 01:02:55 +00:00
Kornel Lesiński 5121d74ad9 Merge remote-tracking branch 'origin/master' into 1.17.x
* origin/master:
  Fix URL/path confusion
  Add 10.12 as SDK to run in Makefile and use Xcode 8.2 for Travis
2017-01-13 00:45:50 +00:00
Kornel Lesiński fbb040926e Fix URL/path confusion
Fixes #995
2017-01-13 00:44:41 +00:00
Bi11 e2426784ac Add constrains to set touch bar buttons width equally 2017-01-13 01:35:09 +08:00
Bi11 118c72e61c Add touch bar button group view to replace NSGroupTouchBarItem 2017-01-13 01:22:33 +08:00
Bi11 6f11c1ce02 Set up touch bar in each window controller 2017-01-12 03:44:01 +08:00
Bi11 d5f4c312ee Keep consistent coding style 2017-01-11 23:11:02 +08:00
Kornel 9b3753f5d7 Merge pull request #990 from sparkle-project/bgnet
Tell OS when networking happens without UI
2017-01-11 04:45:24 +00:00
Bi11 5dda7462c1 Merge sparkle-project/master into touchbar 2017-01-11 02:20:28 +08:00
Bi11 c059dc8ae8 remove hardcoded array capacity 2017-01-11 02:07:48 +08:00
Bi11 6ca4b05cad Change touch bar identifier prefix to sparkle bundle identifier 2017-01-11 01:57:16 +08:00
Bi11 d95f420360 Set touch bar default button directly instead of changing its keyEquivalent 2017-01-11 00:44:15 +08:00
Bi11 7ae0e71b02 Fix compile issue with older SDK < 10.12.2 2017-01-11 00:42:03 +08:00
Kornel 548908628f Merge pull request #991 from zorgiepoo/upgrade-ci
Add 10.12 as SDK to run in Makefile and use Xcode 8.2 for Travis
2017-01-10 13:07:39 +00:00
Zorg d40bdb615a Add 10.12 as SDK to run in Makefile and use Xcode 8.2 for Travis 2017-01-10 06:40:35 -05:00
Bi11 b16d881808 Fix default button on touch bar 2017-01-10 18:44:48 +08:00
Kornel Lesiński 392cb65716 Tell OS when networking happens without UI 2017-01-10 02:37:00 +00:00
Bi11 6e01dd272f Use outlets instead of iterating through subviews 2017-01-10 08:34:25 +08:00
Bi11 762d527463 Merge branch 1.17.x into touchbar 2017-01-10 07:43:35 +08:00
Bi11 07599c2ffd Bind enabled and title for touch bar buttons by default 2017-01-10 07:34:52 +08:00
Bi11 f795802d60 Use NSTouchBarDelegate to avoid subclassing NSTouchBar 2017-01-10 07:22:44 +08:00
Kornel 073ce22015 Merge pull request #988 from zorgiepoo/host-info-dict
Re-read SUHost Info dictionary when necessary
2017-01-08 21:38:28 +00:00
Zorg 7ef468e8ea Use -[SUHost objectForInfoDictionaryKey:] in couple more places 2017-01-08 15:47:44 -05:00
Zorg fc9b2b38fa Make SUBundleIcon & SUApplicationInfo take SUHost, not NSBundle
When we retrieve the "CFBundleIconFile" key from the Info dictionary, we should rely on SUHost's method of obtaining that value now.
2017-01-08 15:36:30 -05:00
Kornel 717921cfa1 Merge pull request #977 from sparkle-project/skipcrit
Disable skip button if update is critical
2017-01-08 11:44:09 +00:00
Kornel e621622c8b Merge pull request #983 from zorgiepoo/logging
Upgrade SULog to use logging APIs that Apple provides built in
2017-01-08 11:43:44 +00:00
Bi11 6902b80ab6 Fix UITests multiple matches issue introduced in touch bar 2017-01-08 15:23:26 +08:00
Bi11 d44a122a21 Add Touch Bar support 2017-01-08 15:17:47 +08:00
Zorg 0b6b6fe4ca Improve -[SUHost objectForInfoDictionaryKey:]
We use the cached host bundle if the host bundle is equal to the main bundle.
Otherwise we read in the latest Info dictionary every time.

The cached case is the most common case. The odd case (updating other bundles) is less common. Thus we have better performance for the common case, and we retain correct code in both cases.

Also we invoke our own implementation of -objectForInfoDictionaryKey: rather than NSBundle's implementation in a few places.
2017-01-07 23:52:56 -05:00
Kornel f43b9f7f02 Merge pull request #982 from sparkle-project/genapp
Workaround for bugs in NSXMLDocument prefix handling
2017-01-07 22:07:56 +00:00
Kornel Lesiński eafbb2cfad Copy debug symbols for generate_appcast 2017-01-07 21:57:39 +00:00
Kornel 5c408f5019 Merge pull request #984 from zorgiepoo/appcast-nonnil
The SUAppcast * is not going to be nil here; fixes analyzer warning
2017-01-07 17:43:46 +00:00
Zorg 9d35c819fd The SUAppcast * is not going to be nil here; fixes analyzer warning 2017-01-07 11:26:53 -05:00
Zorg b9d113924e Upgrade SULog to use logging APIs that Apple provides built in
With this change, we ensure distinct per-app, per-process logging.
Note that the global file ~/Library/Logs/SparkleUpdateLog.log is no longer written into.

On 10.12 and above, SULog uses the os_log APIs. You may want to use log(1) to view logs in addition to Console.app. See the WWDC video on the new logging API and how the Console app has changed.

On older systems, this uses ASL (Apple System Log).

We don't want to reinvent logging, or rely on 3rd party libraries, thus we use what the system provides to us.

Two logging levels were added: Default and Error. The code documents their intended purpose. Now when you call SULog you must make a decision which level to use rather than rely on an implicit level.
2017-01-07 11:02:11 -05:00
Kornel Lesiński ee80a66896 Don't try to preserve namespace prefixes, because Apple's serializer is buggy
filed as rdar 29901669
2017-01-06 16:29:29 +00:00
Kornel Lesiński 187ae4fe57 Verify that the XML is serialized properly 2017-01-06 16:29:29 +00:00
Kornel Lesiński ca4d51561e Silence too-verbose delta 2017-01-06 16:29:29 +00:00
Kornel Lesiński 915c2047bf Fix accuracy of error message 2017-01-06 16:29:29 +00:00
Kornel f172cd32a8 Merge pull request #980 from sparkle-project/features
Updated README
2017-01-06 10:31:49 +00:00
Kornel Lesiński 8481035fb9 No server-side logic is a plus 2017-01-05 22:50:26 +00:00
Kornel Lesiński 7238c2aeb6 Updated README 2017-01-05 22:35:20 +00:00
Kornel Lesiński d9d62299be Disable Skip if the update is critical
Fixes #976
2017-01-04 15:23:47 +00:00
Kornel Lesiński 478bbf303b XIB churn 2017-01-04 15:23:47 +00:00
Kornel Lesiński ee16e5ae55 1.16.0a2 2017-01-04 13:59:17 +00:00
Kornel d50e823b3d Merge pull request #972 from sparkle-project/misc
Misc
2017-01-04 00:07:29 +00:00
Kornel 4636588e76 Merge pull request #973 from sparkle-project/nothrowaway
Resume pending automatic update when possible
2017-01-04 00:07:10 +00:00
Kornel Lesiński 2be4dc11a0 Resume pending automatic update when possible
Fixes #970
2017-01-03 17:44:40 +00:00
Kornel Lesiński 6181c9276a Close alert on abort 2017-01-03 17:42:18 +00:00
Kornel Lesiński 49845d8246 Re-init alert when called again
A lazy way to bring it to front
2017-01-03 17:42:18 +00:00
Kornel Lesiński 8fa136c0a3 Invalidate timer when auto-update window is shown
In case it's shown manually, not by the timer
2017-01-03 17:42:18 +00:00
Kornel Lesiński dc1151a5ff Null warning 2017-01-03 16:13:15 +00:00
Kornel a920ecc197 Merge pull request #964 from zorgiepoo/guided-default
Make guided package installs the default for updating packages
2017-01-02 20:40:39 +00:00
Kornel Lesiński 271d504f6d Expose magic numbers 2017-01-01 14:14:25 +00:00
Kornel Lesiński 9c0ccd4a57 Put latest version first to make wildcard filename matching easier 2017-01-01 14:14:25 +00:00
Kornel 266be254d2 Merge pull request #967 from zorgiepoo/length-fallback
Fallback to the appcast's length value if HTTP doesn't give us one
2017-01-01 15:12:44 +01:00
Kornel efe93c492f Merge pull request #968 from Bi11/info-only
Hide automatic updates checkbox for information only updates
2016-12-31 19:45:46 +01:00
Kornel 74b09ad904 Merge pull request #966 from zorgiepoo/update-podspec-file
Update pod spec file so that `make release` works
2016-12-31 19:44:05 +01:00
Kornel b9012aa8dc Merge pull request #965 from zorgiepoo/unarchiver-test-no-ivar
Remove instance variables from SUUnarchiverTest.swift
2016-12-31 19:43:05 +01:00
Kornel ae41185267 Merge pull request #963 from zorgiepoo/remove-old-app
Remove the old app/bundle instead of moving it to the trash
2016-12-31 18:29:08 +01:00
Bi11 6634ed7d69 Hide automatic updates checkbox for information only updates 2016-12-31 23:37:53 +08:00
Zorg 799ebdcf7d Fallback to the appcast's length value if HTTP doesn't give us one 2016-12-29 14:08:14 -05:00
Zorg d911db7357 Update pod spec file so that make release works 2016-12-29 11:15:22 -05:00
Zorg d2e1987ce3 Remove instance variables from SUUnarchiverTest.swift
I have been receiving unarchiver test errors lately (after the unarchiver blocks changes) somewhat rarely (it's very hard to reproduce) when running all the tests locally. Thus, hoping this change may make a difference.
2016-12-28 23:44:31 -05:00
Zorg 2d1688c063 Make guided package installs the default for updating packages
Interactive package installs now need to be opted into (foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg)

The website documentation may need to be updated later, and this should be noted as an important point in the change log.
2016-12-28 23:15:22 -05:00
Zorg b56910f455 Remove the old app/bundle instead of moving it to the trash
Fixes #827
2016-12-28 22:01:00 -05:00
Kornel Lesiński a3e96581b4 We're not testing with old Xcode, so we can't promise that compatibility 2016-12-27 22:44:01 +01:00
Kornel Lesiński 94423a10c9 Sorted project file 2016-12-27 21:25:52 +01:00
Kornel Lesiński b14c00136e Changelog 2016-12-27 21:23:15 +01:00
Kornel ebf8d2105b Merge pull request #953 from zorgiepoo/gen-appcast-xcconfig
Add xcconfig file for generate_appcast target
2016-12-27 20:53:53 +01:00
Zorg 14ac885ea0 Add ConfigGenerateAppcastDebug.xcconfig 2016-12-27 11:13:32 -05:00
Zorg 355e239df9 Add xcconfig file for generate_appcast target
Also remove swift configurations from Common config files, and change swift optimization from fast to whole module.
2016-12-27 11:01:25 -05:00
Kornel Lesiński e7ae7d5330 Version bump 2016-12-27 15:32:43 +01:00
Kornel daaadf1c44 Merge pull request #946 from sparkle-project/appcast
Tool to generate appcasts automatically
2016-12-27 15:31:30 +01:00
Kornel 87064c9304 Merge pull request #952 from zorgiepoo/small-changes
Small changes
2016-12-27 14:21:33 +01:00
Zorg 0af392f808 Remove SUWindowController.m because it wasn't really being used 2016-12-26 22:51:55 -05:00
Zorg fb8ad9f75d Enhance SUUpdatePermissionPrompt by using a reply block
Also add SUUpdatePermissionResponse class which matches the response class from my fork.
2016-12-26 22:42:58 -05:00
Zorg b4210a85b9 Add and use normal initializer for SUStandardVersionComparator 2016-12-26 21:23:30 -05:00
Kornel 091986b12f Merge pull request #951 from zorgiepoo/installer-protocol
Decouple and simplify installation code using protocols
2016-12-27 00:48:57 +01:00
Zorg 1ecb620986 Decouple and simplify installation code using protocols
This also fixes a bug where the status window would stay visible during interactive (non-guided) package installations.
2016-12-26 17:59:32 -05:00
Kornel 21f3c8a157 Merge pull request #950 from zorgiepoo/updater-delegation
Updater delegation
2016-12-26 15:44:58 +01:00
Zorg 468bcb9640 Remove typecasting self.updater to id 2016-12-26 09:20:52 -05:00
Kornel Lesiński d38b29c858 Use more precise version for deltas to avoid filename clashes 2016-12-26 14:32:26 +01:00
Kornel Lesiński e2b9fc7ffd Fix path 2016-12-26 14:26:03 +01:00
Zorg f016cd8086 Add nullability annotations to SUUpdaterDelegate.h 2016-12-25 18:45:49 -05:00
Zorg 796967cf24 Allow delegate methods that return an object to return nil
Returning nil from these delegate methods is equivalent to not implementing the delegate method. The caller should be able to make this kind of decision when implementing an optional delegate method.
2016-12-25 18:41:38 -05:00
Zorg 578e78876c Separate SUUpdater delegate methods into different file
Also create SUUpdaterPrivate protocol to expose as little as possible to the internal update drivers. Ideally this would be minimized and not even exist at all, but I don't want to make the architectural and potential backwards-incompatible changes required to do that.
2016-12-25 18:25:42 -05:00
Kornel 2f438186d6 Merge pull request #949 from zorgiepoo/decouple-host
Decrease responsibility of SUHost and move code into other components
2016-12-24 14:22:56 +01:00
Zorg 2c1820f2a9 Decrease responsibility of SUHost and move code into other components 2016-12-23 22:21:19 -05:00
Kornel a30eff3680 Merge pull request #947 from zorgiepoo/remove-deps
Remove Sparkle.pch and many file #includes
2016-12-24 00:06:56 +01:00
Zorg 1a09baf0ed Remove Sparkle.pch and many file #includes
This eliminates many dependencies that don't need to exist.
2016-12-23 16:13:35 -05:00
Kornel Lesiński a1095ff29c Null fix 2016-12-23 20:00:45 +01:00
Kornel Lesiński 51b3931485 Simpler suffix check 2016-12-23 19:59:48 +01:00
Kornel Lesiński 1e3f5482d0 Additional files 2016-12-23 19:26:30 +01:00
Kornel Lesiński 0a45be54c4 Appcast helper tool 2016-12-23 19:22:13 +01:00
Kornel b5bc2a7374 Merge pull request #940 from sparkle-project/nulz
Nulz
2016-12-23 18:56:57 +01:00
Kornel 3666b89add Merge pull request #933 from sparkle-project/statevars
Minor tweaks
2016-12-23 18:56:06 +01:00
Kornel 23f9e747c1 Merge pull request #942 from zorgiepoo/unarchiver-protocol
Unarchiver protocol
2016-12-23 18:54:25 +01:00
Kornel Lesiński c77895066a Appropriate deployment target for test app xib 2016-12-23 17:01:16 +01:00
Kornel Lesiński c98017dbe2 Fixed binary delta tool 2016-12-23 16:33:12 +01:00
Kornel Lesiński 657e3d47d0 Removed unnecessary nullability 2016-12-23 16:25:09 +01:00
Kornel 4d34e4358a Merge pull request #943 from zorgiepoo/improve-tests
Improve tests
2016-12-22 23:32:19 +01:00
Zorg 6fcd6beb84 Fix UI tests from not working when update alert automatically shows 2016-12-22 12:18:31 -05:00
Zorg 98b3a9828a Use localhost instead of 0.0.0.0. Latter doesn't work when offline. 2016-12-22 12:17:45 -05:00
Zorg 137b73af4e Fix subclass compatibility and update schedule unarchiving behavior 2016-12-21 16:39:33 -05:00
Zorg dd1bda5066 Some error reason is better than no reason 2016-12-21 16:14:25 -05:00
Zorg 7bc7a90a09 Fix UI update scheduler not prompting for install & relaunch 2016-12-21 15:59:13 -05:00
Zorg 91d13c7239 Merge branch 'master' into unarchiver-protocol 2016-12-21 15:53:41 -05:00
Zorg fd6ba1820a Merge branch 'master' into unarchiver-protocol 2016-12-21 15:39:38 -05:00
Kornel fb61777024 Merge pull request #941 from sparkle-project/unarch
Error handling test + fix
2016-12-21 19:18:23 +01:00
Kornel Lesiński 2519eb573f Test unarchiving failure 2016-12-21 18:06:22 +01:00
Kornel Lesiński 8a3338b078 Extracted function 2016-12-21 18:06:22 +01:00
Kornel Lesiński b03ae0d765 Moved assert 2016-12-21 18:06:19 +01:00
Kornel Lesiński 97c652e3b0 Fixed method name 2016-12-21 17:42:38 +01:00
Kornel 301af71228 Merge pull request #938 from sparkle-project/unarch
Unarchiving blocks
2016-12-21 17:07:19 +01:00
Zorg 60d4f05743 Add SUUnarchiverProtocol & remove runtime registration of unarchivers 2016-12-21 11:07:03 -05:00
Kornel Lesiński 464972126c Unwrap early 2016-12-21 16:44:04 +01:00
Kornel Lesiński c1392bc190 Nullability 2016-12-21 16:44:04 +01:00
Kornel Lesiński 921aed0fae Temp vars 2016-12-21 16:44:04 +01:00
Kornel Lesiński 59d90e0bb1 Basic binary delta progress 2016-12-21 15:23:41 +01:00
Kornel Lesiński e3fb6bb1a8 Report DMG extraction progress 2016-12-21 15:23:41 +01:00
Kornel Lesiński 8103f5fd43 Replaced progress delegate with a block 2016-12-21 15:23:40 +01:00
Kornel Lesiński 70f5681797 Use completion block for unarchiving 2016-12-21 15:22:59 +01:00
Kornel Lesiński 5ee02e954e Renamed callbacks 2016-12-21 15:22:59 +01:00
Kornel Lesiński 23b2b49663 Ability to report specific unarchiving error 2016-12-21 15:22:59 +01:00
Kornel Lesiński 311ed493b4 Unused 2016-12-21 15:22:59 +01:00
Kornel Lesiński 9d8b3c0c36 DRY async dispatch of unarchiver notifications 2016-12-21 15:22:59 +01:00
Kornel Lesiński f3f268388b Nullability declarations 2016-12-21 15:22:57 +01:00
Kornel 8d0effe327 Merge pull request #934 from sparkle-project/msg
Less alarming error message
2016-12-17 23:51:34 +01:00
Kornel Lesiński 19455099ff Formatting 2016-12-10 16:15:02 +00:00
Kornel Lesiński 6e754d7e4f Use return instead of state variable 2016-12-10 16:15:02 +00:00
Kornel Lesiński ab6fa76303 Xcode 8 now 2016-12-10 12:04:26 +00:00
Kornel Lesiński 93fc4b0151 Highlight Sierra compat 2016-12-10 12:03:58 +00:00
Kornel Lesiński 021950a5b2 Less alarming error message 2016-12-10 11:59:47 +00:00
Kornel 2ff0da4f15 Merge pull request #881 from zorgiepoo/separate-validation
Separate validation
2016-12-04 13:35:07 +00:00
Kornel Lesiński 945968a0ef Reminder 2016-12-04 12:19:25 +00:00
Kornel Lesiński 1e4f126f7e Podspec version bump 2016-12-04 12:18:11 +00:00
Kornel Lesiński f47115d81f Version bump 2016-12-04 12:14:24 +00:00
Kornel Lesiński 49781561f3 Cocoapods fudge 2016-12-04 12:10:27 +00:00
Zorg 1587dd1dc3 Refactor pre & post update validation into its own class 2016-12-03 15:37:00 -05:00
Zorg c0b9eaaa0e s/requiresValidationBeforUnarchiving/unsafeIfArchiveIsNotValidated/ 2016-12-03 11:06:10 -05:00
Kornel 91ac90ffcf Merge pull request #928 from sparkle-project/script
Fix #926
2016-12-03 00:05:09 +00:00
Kornel Lesiński 8375922755 Fix #926 2016-12-02 21:10:37 +00:00
Kornel 9dec304f64 Merge pull request #919 from sparkle-project/tag
Don't append hash to versions of builds with a tag
2016-12-01 20:16:43 +00:00
Kornel 8acd915b7b Merge branch 'master' into tag 2016-11-12 23:44:03 +00:00
Kornel Lesiński eb36100388 Allow 2.x 2016-11-12 17:14:56 +00:00
Kornel Lesiński fb22a01a08 Don't append hash to versions of builds with a tag 2016-11-12 14:22:42 +00:00
Zorg 9a32766aeb Merge branch 'master' into separate-validation 2016-11-11 23:35:28 -05:00
Kornel fc468771c1 Merge pull request #916 from zorgiepoo/swift-xcconfig
Move swift and other build settings into xcconfig files
2016-11-11 23:09:15 +00:00
Zorg 42dbf94738 Move swift and other build settings into xcconfig files 2016-11-10 15:51:30 -05:00
Kornel 86a0ca3883 Merge pull request #914 from sparkle-project/appiconname
Rename Sparkle.icns to be consistent with ASSETCATALOG_COMPILER_APPICON_NAME
2016-11-09 22:46:27 +00:00
Kornel Lesiński ddb53f330d Rename Sparkle.icns to be consistent with ASSETCATALOG_COMPILER_APPICON_NAME 2016-11-09 21:45:03 +00:00
Kornel 9dbaae64f1 Merge pull request #908 from sparkle-project/icon
Use optimized icon for Autoupdate.app
2016-11-01 22:56:27 +00:00
Kornel Lesiński d2f4687333 Specify requirements 2016-11-01 21:52:23 +00:00
Kornel Lesiński 143045d673 Use optimized icon for Autoupdate.app
#803
2016-11-01 00:44:54 +00:00
Kornel d67351cb62 Merge pull request #906 from vslavik/stable-byte-counts
Fix flickering download progress status text
2016-10-31 13:06:40 +00:00
Václav Slavík 07d2897250 Fix flickering download progress status text
Fix status text during download (e.g. "10MB of 22MB") so that it no
longer distractingly jumps around and flickers. This was caused by two
things:

1. Flicker on macOS >= 10.8 due to the use of NSByteCountFormatter's
   default mode which isn't optimized for stable display and is not
   suitable for rapidly updated values.

2. Smaller movements of text on macOS >= 10.11 due to the use of San
   Francisco font's default variant, where digits don't have fixed
   width.

Fixed by using monospacedDigitSystemFontOfSize for the text field and
enabling NSByteCountFormatter's zeroPadsFractionDigits mode.
2016-10-31 11:13:15 +01:00
Jake Petroules 625c942561 Update references to MaxCDN to StackPath
The latter acquired the former and requested this change.
2016-10-04 17:56:44 -07:00
Kornel bb299d075b Merge pull request #884 from sparkle-project/xcode8
Xcode8
2016-09-16 11:02:53 +01:00
Kornel 73229f84f7 Merge pull request #889 from zorgiepoo/swift3
Swift 3
2016-09-16 11:02:10 +01:00
Zorg 8152516b7f Remove coveralls
Coveralls hasn't worked properly in months since Swift code started being used, and it's causing a build failure at the moment.
2016-09-14 23:14:41 -04:00
Zorg 96baf2b2ce Update travis to use Xcode 8 2016-09-14 23:05:45 -04:00
Zorg ed5dca3423 Update unit tests to Swift 3 2016-09-14 23:05:05 -04:00
Kornel 3a5c620b60 Merge pull request #886 from zorgiepoo/debug-warning
Warn a developer if they're using a debug version of Sparkle
2016-09-06 17:03:40 +01:00
Kornel 23ae527b96 Merge pull request #885 from zorgiepoo/docs
Add more documentation to SUUpdater.h
2016-09-05 11:50:00 +01:00
Zorg 2268f96759 Add more documentation to SUUpdater.h 2016-09-04 22:11:29 -04:00
Zorg 898e063b4f Remove unnecessary 'return;' 2016-09-04 18:38:08 -04:00
Zorg e8f88bf0f1 Merge branch 'master' into separate-validation 2016-09-04 18:37:14 -04:00
Kornel Lesiński a3407a2dbf Xcode 8 config 2016-09-04 17:04:54 +01:00
Kornel Lesiński 88933a1e65 Unused 2016-09-04 17:04:54 +01:00
Kornel Lesiński c3d8e4bbc5 Changelog 2016-09-04 17:02:56 +01:00
Kornel f70c2a15b1 Merge pull request #883 from sparkle-project/nulfix
Test nullability
2016-09-04 16:50:36 +01:00
Kornel Lesiński 4eb518de7e Test nullability 2016-09-04 16:07:11 +01:00
Zorg 5b2ce958bd Merge branch 'master' into separate-validation 2016-09-03 23:27:16 -04:00
Kornel 077c64419f Merge pull request #882 from sparkle-project/bundleurl
Use bundle URLs
2016-09-03 17:09:14 +01:00
Kornel Lesiński 1195d4b5d2 Fixed test 2016-09-03 16:14:02 +01:00
Kornel Lesiński c7a7704f3b Switch test to NSURL 2016-09-02 19:08:42 +01:00
Kornel Lesiński 64af6d04c2 Use bundle URLs instead of paths to avoid creation of temp bundle objects 2016-09-02 18:53:23 +01:00
Kornel 0af27ea783 Merge pull request #877 from zorgiepoo/host-independent-signing
Improve Host Signing Verification
2016-09-02 18:31:37 +01:00
Kornel Lesiński c36413ce46 CoC 2016-09-02 12:43:37 +01:00
Kornel Lesiński 13b9081873 Readme text refresh 2016-09-02 12:33:48 +01:00
Kornel Lesiński 3dccca8044 Coveralls badge is a year out of date 2016-09-02 12:31:50 +01:00
Zorg e28c62244a Re-show download status if we attempt a 2nd download
This fixes a bug where the status would stay at "Extracting update" after validation from the 1st delta patch failed, and it continued on to a full download.
2016-09-01 23:19:58 -04:00
Zorg fec76fee12 Validate binary delta patches before unarchiving
Also keep package and bundle validation separate.
2016-09-01 23:14:26 -04:00
Kornel ed3eab64d2 Merge pull request #878 from zorgiepoo/automatic-writability
Improve host writability check by testing ownership/group changes
2016-08-28 14:10:02 +01:00
Kornel ee257c4070 Merge pull request #876 from zorgiepoo/delta-spotlight-import
Update mdimporter modification dates after delta extractions
2016-08-28 02:34:49 +01:00
Zorg bfec7a82c0 Improve host writability check by testing ownership/group changes 2016-08-27 21:09:51 -04:00
Zorg 4cd472abe6 Update comment on why kSecCSCheckNestedCode is not used 2016-08-27 19:16:48 -04:00
Zorg 39268a13e5 Add unit tests for Apple code signature matching 2016-08-27 19:06:58 -04:00
Zorg 4864dfb5aa Update signing verifier to take any host and s/application/bundle/ 2016-08-27 18:07:40 -04:00
Zorg 71125e3d16 Add unit test for updating spotlight mdimporter bundles 2016-08-27 17:03:54 -04:00
Zorg 779d16e5a7 Update spotlight bundles after delta extraction; don't use mdimport 2016-08-27 15:27:11 -04:00
Kornel Lesiński ee2e7fb46b Version bump 2016-08-27 17:01:33 +01:00
Kornel d350cf33e0 Merge pull request #865 from denniss/bug-864_missing-abort-update
[BUG-864] Call abort update after updater cannot find valid update
2016-08-27 16:21:03 +01:00
Kornel Lesiński 20be93e96b Version bump 2016-08-27 16:13:05 +01:00
Kornel Lesiński 668e258cff Updated CHANGELOG 2016-08-27 16:12:02 +01:00
Kornel 20f90f1544 Merge pull request #873 from zorgiepoo/dsa-existence
Dsa existence
2016-08-27 16:05:26 +01:00
Kornel 6dbb0d9988 Merge pull request #874 from zorgiepoo/dmg-remove-vendor
Remove NTSynchronousTask
2016-08-27 16:04:58 +01:00
Zorg f700c96e47 Read stdout to end before waiting for task to end to prevent deadlock 2016-08-27 09:27:06 -04:00
Zorg 626d2c96f5 Show the public DSA file key that doesn't exist in the insecure alert 2016-08-27 09:11:08 -04:00
Kornel 5db4e1505b Merge pull request #872 from zorgiepoo/menuvalidation
Menu item validation
2016-08-27 10:42:25 +01:00
Zorg 115686cd07 Change dmg and test verifying code by removing NTSynchronousTask 2016-08-27 01:09:24 -04:00
Zorg e2fc8b4258 Prevent public DSA key -> no public DSA key downgrade
This may prevent developers from making accidental downgrades.
2016-08-27 00:32:01 -04:00
Zorg 99f34299f1 Show alert if no pub key exists, but SUPublicDSAKeyFileKey exists 2016-08-27 00:07:11 -04:00
Zorg fdf79bc3a6 Enable check for updates menu item if update driver is interruptible 2016-08-26 23:07:13 -04:00
Zorg eb810c7d8f Implement menu item validation in Test Applications window controller 2016-08-26 23:03:08 -04:00
Zorg 38af7cd8cd Export -validateMenuItem: as a method in SUUpdater.h for public use 2016-08-26 23:01:30 -04:00
Dennis Suratna 09889d01b1 [BUG-864] Call abort update after updater cannot find valid update 2016-08-15 14:36:41 -07:00
Kornel 5f2ebb8edf Merge pull request #862 from moubry/master
Remove <link> from SampleAppCast.xml
2016-08-10 23:37:09 +01:00
Sean Moubry ac4ef7d9a0 Remove <link> from SampleAppCast.xml
Sparkle doesn’t use the channel’s link element. This resolves issue:
https://github.com/sparkle-project/Sparkle/issues/861.
2016-08-10 17:11:48 -05:00
Kornel cc7c0ae052 Merge pull request #858 from catnapgames/patch-1
Make sign_update work when Bash is not the default
2016-08-09 16:34:51 +01:00
Tomas Andrle b8dc5b3f3d Make sign_update work when Bash is not the default
This script fails when Bash is not the default shell. This fixes it and allows the script to run on a default Ubuntu system, for example.
2016-08-09 14:52:26 +02:00
Kornel 43e96f7ee8 Merge pull request #847 from sparkle-project/relaunch
Better error message when relaunch tool bundle is not found.
2016-08-01 19:15:18 +01:00
Kornel dbff23ea9d Merge pull request #851 from sorccu/patch-1
Add Carthage/Build to .gitignore
2016-07-22 13:02:36 +01:00
Simo Kinnunen ed97e6cb75 Add Carthage/Build to .gitignore
With Carthage, if Sparkle is included as a Git submodule (e.g. with the --use-submodules option), the main module's .gitignore can't reach all the way inside the submodule to ignore the added Carthage/Build symlink, and Git keeps complaining about untracked changes in the submodule forever, which is very annoying. To avoid that issue, ignore here in Sparkle instead.
2016-07-22 18:26:15 +09:00
Kornel Lesiński 492664c611 Clarify comment 2016-07-21 20:01:22 +01:00
Kornel Lesiński fdf07644d0 Better error message when relaunch tool bundle is not found. 2016-07-19 16:06:03 +01:00
Kornel 092feba9f9 Merge pull request #836 from zorgiepoo/remove-reachability
Don't use reachability as a preflight check
2016-07-08 10:27:13 +01:00
Zorg 91c813b6ab Don't use reachability as a preflight check
This removes the reachability code that we have for background scheduled updates.
Apple (and others) don't recommend using reachability to test if a network connection is online.

See:
http://stackoverflow.com/questions/7178330/what-is-the-advantage-of-using-reachability
https://www.mikeash.com/pyblog/friday-qa-2013-06-14-reachability.html (just the comments)
Apple 2012/2011 WWDC videos on networking

Also, our current reachability code is rather illogical:

* reachabilityResult is always NO
* isNetworkReachable is always YES
* flags is ignored
* horrible use of dispatch_sync & putFeedURLIntoDictionary is terrifying
* NSException handling shouldn't be done

Removing this code which wasn't even coded properly, and which would still be misusing the reachability API anyway, also leads to removing some multithreading races and simpler logic :)
2016-07-06 22:38:49 -04:00
Kornel 1ced9c428a Merge pull request #834 from zorgiepoo/dsa-key-comment
DSA security check comment
2016-07-05 14:44:11 +01:00
Zorg 16de00d81d If the old & new DSA keys are the same, then DSA validation must pass for security 2016-07-04 23:43:05 -04:00
Jake Petroules 3f637c9674 Sanity check that the Podspec version matches the Sparkle version. 2016-06-26 15:03:48 -07:00
Kornel 4a4dc3629f Merge pull request #828 from zorgiepoo/fileop-compile-error
Fix SUFileOperationConstants not found in Test App under Release
2016-06-25 11:45:10 +01:00
Zorg 6437e0448a Warn a developer if they're using a debug version of Sparkle
Due to different values for min/default update check intervals, production apps should not use a debug version of Sparkle
2016-06-24 20:13:17 -04:00
Zorg c77cd49036 Fix SUFileOperationConstants not found in Test App under Release 2016-06-24 19:55:40 -04:00
Kornel 9d7e4d676d Merge pull request #823 from nivekkagicom/master
update Sparkle framework headers to use modules if modules are available
2016-06-23 17:41:44 +01:00
Kornel 1aa0ee8152 Merge pull request #825 from jerrykrinock/xcode8
Changes for Xcode 8
2016-06-23 17:38:47 +01:00
Kornel Lesiński 9944f2496c Comment 2016-06-23 17:24:16 +01:00
Jerry Krinock 33907ec4ed • In SUUpdater.m, use SULocalizedString macro instead of NSLocalizedString.
• In SUOperatingSystem.m, assert instead of test for nil URL.
2016-06-17 22:24:43 -07:00
Jerry Krinock 7892e41b27 Fix for warning in in SUAppcast.m now tests for nil instead of using setValue:forKey: 2016-06-17 20:23:32 -07:00
Jerry Krinock 53983d9452 The following changes were made to clear warnings from static analyzer in Xcode 8:
• In ConfigCommon.xcconfig, removed references to CLANG_WARN_OBJC_RECEIVER_WEAK and -Wno-receiver-is-weak, because apparently these had been deprecated and are now no longer recognized.
• In SUAppcast.m, changed to method which can accept nil.
• In SUOperatingSystem.h, added a check for nil which probably never happens.
• In SUUpdateAlert.m, swapped receiver with parameter in -isEqualToString, 3 places, so that nonnull parameter could never be nil.
• In SUUpdater.m, added NSLocalizedString() wrappers around 8 recently-added (in the last few years, I think) user-facing warning strings.
2016-06-17 14:42:44 -07:00
B. Kevin Hardman f3a151d473 update Sparkle framework headers to use modules if modules are available 2016-06-16 12:16:31 -04:00
Jake Petroules bb624ffa59 Replace OS X with macOS or more generic terminology. 2016-06-15 13:46:19 -07:00
Jake Petroules 2963f788e1 Fix version number in Doxyfile. 2016-06-15 13:43:40 -07:00
Kornel 9017962ab9 Merge pull request #818 from zorgiepoo/auth-wait-fileop
Improve Authorization Usage (Take 2)
2016-06-11 00:24:22 +01:00
Zorg dd0805c05b No need to log the underlying error
This is already logged when logging the main error
2016-06-10 16:13:18 -04:00
Zorg e4c3c29a85 Fix SUFileOperationConstants link errors in BinaryDelta 2016-06-09 07:59:46 -04:00
Zorg be1e86174a Wait for the appropriate process when authorizing file operations
This changes the way we authorize & execute commands, and how we wait for their completion. In order to obtain the correct child to wait (instead of another one terminating intermediately), we use a wrapper tool (fileop) to output its pid onto the communication pipe that we read from the other end.
2016-06-08 21:49:58 -04:00
Kornel 8b56fba39b Merge pull request #814 from DivineDominion/master
add Carthage & CocoaPods compatibility indicators to README
2016-05-26 11:06:42 +01:00
Christian Tietze db232a263b add CocoaPods indicator 2016-05-26 10:44:15 +02:00
Christian Tietze 4d952e9961 add Carthage indicator 2016-05-26 10:43:29 +02:00
Kornel Lesiński 64fd27d918 Fix 10.7 compat in new code 2016-05-22 23:09:23 +01:00
Kornel Lesiński 666e86b0bb Merge remote-tracking branch 'origin/master' into nsparse
* origin/master: (31 commits)
  Fix indentation with bspatch.c
  Fix warnings for bsdiff.c
  Improve error handling on readfile()
  Don't forget to free the buffer on failure
  Don't exit the program on failure for bsdiff.c
  Don't exit the program on failure for bspatch.c
  Use FILE* functions in bspatch.c
  Use FILE* (fopen/fread/etc) functions for bsdiff.c
  Fix warnings for bspatch
  Don't hide warnings for bsdiff/bspatch
  Reorganize checks for clarity
  Update changelog
  Update screenshot with new logo.
  Remove Sparkle.png. This does not appear to be used anywhere anymore.
  Set correct DPI for all images (72 for @1x, 144 for @2x).
  Assign newly added icon images in asset catalog (#801) (#804)
  Update app icon for Autoupdate.app (#347)
  Updated sponsored by text and links (#800)
  Upgrade warning to alert for signing update over HTTP with no DSA key
  Clear update caches directory before downloading new update
  ...
2016-05-22 23:09:08 +01:00
Kornel 601b4a7a7f Merge pull request #811 from zorgiepoo/bsdiff-fixes
bsdiff fixes
2016-05-22 22:31:12 +01:00
Zorg 1316707136 Fix indentation with bspatch.c 2016-05-16 22:30:48 -04:00
Zorg e485baf8b8 Fix warnings for bsdiff.c 2016-05-16 22:20:35 -04:00
Zorg d71fe4a17d Improve error handling on readfile() 2016-05-16 22:05:53 -04:00
Zorg f990f5fcfc Don't forget to free the buffer on failure 2016-05-16 22:05:43 -04:00
Zorg 07ac154e2e Don't exit the program on failure for bsdiff.c 2016-05-16 22:05:29 -04:00
Zorg 48eb25fbf3 Don't exit the program on failure for bspatch.c
We call warn type functions instead of err ones now and do some cleanup
2016-05-16 22:05:19 -04:00
Zorg 914bf9e333 Use FILE* functions in bspatch.c 2016-05-16 22:04:44 -04:00
Zorg 271b7a1daf Use FILE* (fopen/fread/etc) functions for bsdiff.c
This way we don't have to handle EINTR
2016-05-16 22:01:41 -04:00
Zorg c11c660f22 Fix warnings for bspatch 2016-05-16 21:58:32 -04:00
Zorg 0e2fe68399 Don't hide warnings for bsdiff/bspatch 2016-05-16 21:57:19 -04:00
Kornel 852965d824 Merge pull request #807 from sparkle-project/seccheck
Simpler conditions for security config check
2016-05-12 23:19:08 +01:00
Kornel Lesiński e2c60be805 Reorganize checks for clarity 2016-05-12 15:19:57 +01:00
Kornel Lesiński 71e15f4b1d Update changelog 2016-05-10 13:32:27 +01:00
Jake Petroules 8a4e4aea2c Update screenshot with new logo. 2016-04-30 17:47:37 -07:00
Jake Petroules 8fea6670c2 Remove Sparkle.png. This does not appear to be used anywhere anymore. 2016-04-30 17:27:26 -07:00
Jake Petroules 19fcca11f0 Set correct DPI for all images (72 for @1x, 144 for @2x). 2016-04-30 17:24:02 -07:00
1024jp fd082a93d4 Assign newly added icon images in asset catalog (#801) (#804) 2016-04-30 17:20:51 -07:00
Kornel b9e8830f60 Merge pull request #801 from 1024jp/appIcon
Update app icon for Autoupdate.app (#347)
2016-04-30 13:40:04 +01:00
1024jp 8576eb7cad Update app icon for Autoupdate.app (#347) 2016-04-30 18:42:17 +09:00
Justin Dorfman cf4c02f1b0 Updated sponsored by text and links (#800)
We are migrating the Bandwidth Hog brand with MaxCDN.
2016-04-28 19:51:32 -07:00
Kornel 8e57ca9284 Merge pull request #798 from zorgiepoo/http-no-dsa-alert
Upgrade warning to alert for signing update over HTTP with no DSA key
2016-04-20 22:56:02 +01:00
Kornel 3c2f24c340 Merge pull request #797 from zorgiepoo/download-cleanup
Download cleanup
2016-04-19 10:16:48 +01:00
Kornel 7a9ff3de48 Merge pull request #780 from zorgiepoo/fix-tests
Fix issues with unit tests
2016-04-19 10:11:35 +01:00
Zorg a3d4d9fac4 Upgrade warning to alert for signing update over HTTP with no DSA key 2016-04-19 02:59:33 -04:00
Zorg a937fa0a17 Clear update caches directory before downloading new update
This aims to make it impossible to have download data accumulate inside the caches directory.
We still try to deal with if an intermediate file is created at the path we want.

appCachePath method was also moved away from SUHost into SUBasicUpdateDriver which is the only class that needs it.
This method also has very little to do with host bundles.

appCachePath is also called less when checking for the existence of intermediate file paths.

Lastly, we now create a directory whose name is the sparkle bundle ID instead of just "Sparkle"
This is to improve potential name collision issues.
2016-04-19 02:39:00 -04:00
Zorg 99be33d83b Move Test App server directory data into subdirectory inside Caches
We want to wipe the caches directory we create for the test app data on launch,
and want to make sure no other data is being inserted into the same directory.
Before, Sparkle was inserting data into the same directory when downloading an update.
2016-04-19 02:31:02 -04:00
Kornel 0132377a2a Merge pull request #795 from zorgiepoo/check-parent-writability
Check the bundle's parent directory for writability too
2016-04-13 00:02:55 +01:00
Kornel 7fdedad68e Merge pull request #794 from zorgiepoo/fix-symlinks
Don't follow symbolic links for file operations
2016-04-12 15:58:29 +01:00
Zorg aa7c46ba4f Check the bundle's parent directory for writability too
This is to decide if we should allow automatic downloading & installing of updates or not.
2016-04-11 03:15:36 -04:00
Zorg d263bf4fd0 Don't follow symbolic links for file operations
This fixes issues with updating modification/access time, and changing owner/group
where symbolic links used to be followed. Symbolic link tests are included.
2016-04-11 03:05:53 -04:00
Kornel bdb3dd8c36 Merge pull request #790 from zorgiepoo/no-auth-cleanup
Don't bring up an authorized dialog during cleanup
2016-04-04 14:41:25 +01:00
Zorg c8ff1c0453 Don't bring up an authorized dialog during cleanup
If permissions are abnormal during cleanup or somewhere along the lines, it may be
possible to bring up authorization dialog that is not really needed. Prevent this from happening.

We would want to restrict authorization from being possible anyway when not needed.
2016-04-04 01:54:02 -04:00
Kornel bb40663d37 Merge pull request #789 from Eitot/patch
Remove SUEnableAutomaticChecksKeyOld and SUCheckAtStartup constants
2016-04-02 12:18:45 +01:00
Eitot b8588543cf Remove SUEnableAutomaticChecksKeyOld and SUCheckAtStartup constants 2016-04-02 00:07:20 +02:00
Kornel cc332de4d1 Merge pull request #786 from zorgiepoo/fix-warnings
Fix warnings
2016-03-23 09:32:50 +00:00
Zorg d6b1c7de54 Fix another place where I accidently swapped key & object value 2016-03-22 23:51:20 -04:00
Zorg 3a3f46f2c1 Fix one place where I accidently swapped key & object value 2016-03-22 22:52:40 -04:00
Zorg 1ae0999082 Fix nullability warnings 2016-03-22 22:08:14 -04:00
Zorg c265e3f7bf Fix warnings caused by -Wpartial-availability
Most of this is removing Obj-C subscripting usage
Some bits are adding pragma ignores to places where we are careful to not use the API at runtime on older OS's

Note that for NSMutableDictionary:
x[y] = z is not the same as [x setObject:z forKey:y]

In particular, z can be nil for subscripting (removing the element if it exists) where it cannot for setObject:forKey:
Personally I like the non-subscripting semantics better. Most cases we were using this we were checking if the object was non-nil anyway
2016-03-22 22:07:49 -04:00
Kornel 2faf8ccdd2 Merge pull request #783 from sebcode/l10n-fixes
Fix german l10n.
2016-03-20 00:45:14 +00:00
Sebastian Volland 2f724659a7 Fix german l10n.
Update german translation.
Update german version of SUAutomaticUpdateAlert.xib (Button widths).
Update CheckLocalizations.swift for Swift 2.
2016-03-19 18:40:41 +01:00
Kornel Lesiński 8cca51d08b Merge remote-tracking branch 'origin/master' into nsparse 2016-03-14 12:32:15 +00:00
Kornel Lesiński c9fa1142c9 Formatting/comments 2016-03-14 12:22:35 +00:00
Kornel 445cc55794 Merge pull request #781 from zorgiepoo/subscripting
Don't use subscripting where it may potentially be risky on 10.7
2016-03-14 12:16:43 +00:00
Zorg 013e60204d Don't use subscripting where it may potentially be risky on 10.7 2016-03-13 23:40:23 -04:00
Zorg b8fecf1f36 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.

I also made SUUpdater use the correct bundle in SUUpdaterTest
2016-03-13 22:27:57 -04: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 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
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
Kornel 864044e44e Merge pull request #772 from zorgiepoo/fix-codesigning-tests
Fix code signing verifier tests when ran locally
2016-03-01 00:39:49 +00:00
Kornel Lesiński 48f18d000c Support XML namespace prefixes when parsing appcasts
Fixes #771
2016-03-01 00:37:52 +00:00
Zorg d0adc0af39 Fix code signing verifier tests when ran locally
The tests sometimes fail for me when copying these files over,
because they already may exist. I guess they're not torn down properly.
2016-02-29 18:30:36 -05:00
Kornel Lesiński 64d95bb36f Error code for download errors
Fixes #770
2016-02-29 13:39:08 +00:00
Kornel a52cbc38a1 Merge pull request #769 from zorgiepoo/update-last-check-date
Update last update check date when the update driver finishes
2016-02-28 00:04:45 +00:00
Zorg 530a90cb73 Update last update check date when the update driver finishes
This fixes the issue where if an update alert is present for a long time,
and the user dismisses it, they may be prompted with another update alert
immediately after.
2016-02-27 18:39:18 -05:00
Kornel 168c769eb0 Merge pull request #764 from nriley/icon-scaling
Scale app icon up if needed in Software Update window (#763)
2016-02-21 01:11:45 +00:00
Nicholas Riley 5b3577c14c Scale app icon up if needed in Software Update window (#763) 2016-02-20 13:56:28 -05:00
Zorg b9c664687d Take delta updates in account and add tests for them 2016-02-19 12:43:41 -05:00
Zorg 2a3e88bf96 Test the dateString field 2016-02-19 11:45:54 -05:00
Zorg 004ac3f9ae Test the best chosen appcast item 2016-02-19 11:26:35 -05:00
Zorg 8a04cc726f Appcast items are no longer sorted; reflect that in unit tests 2016-02-19 10:19:00 -05:00
Zorg 9f2604b888 Merge branch 'master' into best-update-by-version 2016-02-19 10:17:27 -05:00
Kornel 0171ab2d84 Merge pull request #761 from zorgiepoo/automatic-update-termination
Fix Installation process being initiated twice
2016-02-19 14:52:25 +00:00
Zorg c3ffd7f739 Don't register for termination notifications more than once. Fixes #757
These notifications are already added by -unarchiverDidFinish: which is
always invoked before -showUpdateAlert
2016-02-19 09:38:42 -05:00
Kornel 91e929cbf9 Merge pull request #760 from sparkle-project/appcastparse
Fixed appcast parsing issue
2016-02-19 08:53:13 +00:00
Kornel Lesiński 9671f7f52d Fixed duplicated appcast item properties
Corrected scope of per-node objects
2016-02-18 19:29:05 +01:00
Kornel Lesiński 2668d18266 Appcast test 2016-02-18 19:28:58 +01:00
Kornel Lesiński a4bdbb7ab3 Merge commit 'a11b1209a97bafd713189f9b0fa14584ba6e100a' into 1.14.x
* commit 'a11b1209a97bafd713189f9b0fa14584ba6e100a':
  Unit test for appcast parsing
  v1.13.1
2016-02-18 19:28:41 +01:00
Kornel Lesiński a11b1209a9 Unit test for appcast parsing 2016-02-18 13:50:05 +01:00
Zorg 625f229a65 Don't terminate the app if we're already terminating 2016-02-18 00:40:14 -05:00
Kornel 0d52e27968 Merge pull request #755 from zorgiepoo/disable-javascript
Disable javascript
2016-02-18 00:04:44 +01:00
Zorg 674b2238b8 Make Sparkle look for the highest compatible version
Sparkle's past behavior was sorting appcast items by published dates and
picking the first compatible item. However, it makes more sense to pick
the compatible item with the highest version (see issue #31).

The NSDate instance creation & sorting has also been removed from the code.
The methods we were using to parse the string into a NSDate have been deprecated,
and are strongly discouraged. Namely, all methods taking an arbitrary/natural string
have been nuked signaling they were probably a really bad idea. Furthermore, the
date code we had created a NSCalendarDate which has been long deprecated.

So we just don't handle date parsing. Even if there is a proper format for the pubDate,
It is an extra burden on the developer to insert a conforming date.
And we shouldn't want to rely on a potentially error-prone input field.
2016-02-17 00:04:07 -05:00
Zorg 4eb2e9af00 Disable Java in the web view too
Plug-ins have already been disabled but I'm not sure if that encompasses Java or not.
May as well be explicit in either case and disable it.
2016-02-16 23:21:28 -05:00
Zorg b64cee8055 Disable javascript by default and make it opt-in
To opt-in to enabling Javascript, set SUEnableJavaScript to true in the app's info.plist
2016-02-16 23:21:08 -05:00
Kornel Lesiński 3163b6a729 1.14.0rc2 2016-02-15 21:01:25 +01:00
Kornel 7b61cdd8f8 Merge pull request #744 from sparkle-project/logs
Refactored error handling in appcast parsing
2016-02-15 10:58:15 +01:00
Kornel Lesiński b29bbdd14b Refactored error handling in appcast parsing 2016-02-12 11:52:53 +01:00
Kornel 5b79151690 Merge pull request #741 from ferben/master
Czech localizations update
2016-02-12 00:04:18 +01:00
Frantisek Erben c315a66151 Czech localizations update 2016-02-10 22:57:54 +01:00
Kornel b1d7c3ade9 Merge pull request #737 from zorgiepoo/uitests
UI Tests for Test Application
2016-02-08 15:43:37 +00:00
Zorg 682de21978 Test if the updated app is the frontmost one 2016-02-06 21:00:45 -05:00
Zorg b5b1e3d51d Add UITests scheme so UI tests can run from xcodebuild 2016-02-06 20:12:39 -05:00
Zorg efd94e2de0 Add UI Tests for the Test Application
This tests the test application checking for updates, downloading & installing, and relaunching
2016-02-06 11:32:18 -05:00
Kornel b3dbb5db1f Merge pull request #728 from sparkle-project/logs
Logs
2016-02-05 00:30:24 +00:00
Kornel b795f56842 Merge pull request #724 from xhacker/fix-zh-hans
Update zh_Hans localization
2016-02-05 00:29:50 +00:00
Kornel Lesiński c0bda0c372 Changelog 2016-02-05 00:12:14 +00:00
Kornel Lesiński 2a693e62bf v1.13.1 2016-02-04 23:57:25 +00:00
Kornel Lesiński eb3d962526 Merge branch '1.11.x' into 1.13.0
* 1.11.x:
  Prevent inclusion of local files via file:// XML entities
  Disable redirects to non-HTTP URLs in release notes webview
2016-02-04 23:56:40 +00:00
Kornel Lesiński f90700e830 Version bump 2016-02-04 23:52:55 +00:00
Kornel 2b7f61f2a2 Merge pull request #733 from FlixelPhotos/master
Remove test resource from the FW target
2016-02-03 14:20:09 +00:00
Karl Moskowski ffa449742d Remove test resource from the FW target
Fixes #732.
2016-02-03 08:35:57 -05:00
Kornel Lesiński b40a4eefde Log detailed XML parsing error 2016-02-01 10:57:18 +00:00
Kornel Lesiński 4e60a61036 Notify when URLs are blocked 2016-02-01 10:57:18 +00:00
Kornel Lesiński b3835717ab Version bump 2016-01-31 12:14:52 +00:00
Kornel Lesiński e05b397a00 Version bump 2016-01-31 12:13:55 +00:00
LIU Dongyuan / 柳东原 7c48061b85 Update zh_Hans localization 2016-01-29 16:20:10 -08:00
Kornel 03ca628eef Merge pull request #723 from xhacker/testapp-l10n
Make test app available in all languages, fix #695
2016-01-30 00:06:20 +00:00
LIU Dongyuan / 柳东原 7aad8d3586 Make test app available in all languages, fix #695 2016-01-29 15:54:54 -08:00
Jake Petroules 1e89891577 Merge pull request #721 from xhacker/patch-2
Update Sparkle.podspec
2016-01-29 13:19:55 -08:00
LIU Dongyuan / 柳东原 dd77e6bc5d Update Sparkle.podspec 2016-01-29 13:17:53 -08:00
Kornel Lesiński 0fe520f95b Merges fixes for HTTP MITM security vulnerability:
https://sparkle-project.github.io/documentation/security/#http-mitm-vulnerability
2016-01-29 15:14:11 +00:00
Kornel Lesiński a6e9c8aff6 Prevent inclusion of local files via file:// XML entities 2016-01-29 14:52:55 +00:00
Kornel Lesiński 70f6929ac7 Disable redirects to non-HTTP URLs in release notes webview 2016-01-29 14:52:55 +00:00
Kornel a360e60f76 Merge pull request #719 from vitu/master
Translated new string, fixed double space, fixed “archive” and “relau…
2016-01-25 15:29:33 +00:00
vitu 2c6941e975 Translated new string, fixed double space, fixed “archive” and “relaunch” terminologies for pt-BR. 2016-01-25 13:05:07 -02:00
Kornel 2afc553e03 Merge pull request #716 from sparkle-project/alertdriver
Alert driver
2016-01-18 15:50:38 +00:00
Kornel Lesiński 5ed9c2615c Avoid two copies in unit tests 2016-01-17 22:34:27 +00:00
Kornel Lesiński ca22a43e46 Check configuration after driver has been configured 2016-01-17 22:22:42 +00:00
Kornel Lesiński d157a6fb2a Move showing of alert to the update driver 2016-01-17 22:22:41 +00:00
Kornel Lesiński 503faf49e1 Unused 2016-01-17 22:22:41 +00:00
Kornel Lesiński 45f597cd2a Merge branch 'master' of https://github.com/GeneralElectric/Sparkle into GeneralElectric-master
* 'master' of https://github.com/GeneralElectric/Sparkle:
  Remove newline, Add explicit property synthesis
  Encrypted dmg support
2016-01-17 16:39:11 +00:00
Kornel 26fd1b168a Merge pull request #710 from sparkle-project/logerror
Don't show bad-release-notes-url error to the user
2016-01-10 13:41:25 +00:00
Kornel a9a0fe54b8 Merge pull request #711 from sparkle-project/urlencode
Don't re-encode URLs
2016-01-10 13:41:03 +00:00
Kornel 1c976de2b7 Merge pull request #712 from orta/patch-1
Adds dates to releases in the CHANGELOG
2016-01-09 20:38:55 +00:00
Orta 00ea872b76 Adds dates to releases in the CHANGELOG 2016-01-09 20:29:38 +00:00
Kornel Lesiński 836c0848cc Don't re-encode URLs
Fixes #99
2016-01-09 16:45:54 +00:00
Kornel Lesiński 95372134c8 Don't show bad-release-notes-url error to the user
Webview having local file access doesn't seem worse than the app having local file access, but still it seems like a bad idea that relies on files being in predetermined location.
2016-01-09 16:15:00 +00:00
Kornel 27ce4ee92c Merge pull request #702 from sparkle-project/secckey
Make it clear which file is secret
2016-01-09 16:00:39 +00:00
Kornel 6889b9b080 Merge pull request #706 from 1024jp/japanese
Add some Japanese lozalized strings
2016-01-04 12:30:40 +00:00
1024jp c81d190908 Add some Japanese lozalized strings 2016-01-04 11:33:23 +09:00
Kornel Lesiński 06826d426d Re-add forgotten tests 2015-12-30 13:24:52 +00:00
Kornel Lesiński 62afa6b9a9 Give time to set a delegate
#704
2015-12-30 13:24:51 +00:00
Kornel 14839e4ab5 Merge pull request #692 from sparkle-project/atswarn
Warn about ATS
2015-12-30 13:09:47 +00:00
Jake Petroules 58003a8501 Merge pull request #703 from xhacker/patch-1
Make 1.13.0 available via CocoaPods
2015-12-28 00:33:56 -08:00
LIU Dongyuan / 柳东原 698fa40647 Update Sparkle.podspec 2015-12-28 00:31:51 -08:00
Kornel Lesiński 5fe3ee1300 Make it clear which file is secret 2015-12-18 17:26:44 +00:00
Kornel Lesiński b83f4c30f2 Merge commit '75551e8d0a0ee1fa3b39840fea504e01865ec81b'
* commit '75551e8d0a0ee1fa3b39840fea504e01865ec81b':
  v1.13.0
2015-12-18 17:26:34 +00:00
Kornel Lesiński 75551e8d0a v1.13.0 2015-12-18 17:23:52 +00:00
Kornel e3d89ec3db Merge pull request #701 from sparkle-project/nondelta
Get non-delta update from delegate
2015-12-18 15:02:25 +00:00
Kornel Lesiński 27f00c04b0 Ask delegate for non-delta updates
Fixes #700
2015-12-17 23:05:09 +00:00
Kornel Lesiński 30a72a1bd6 Removed old objectEnumerator 2015-12-17 22:55:03 +00:00
Kornel bbe3d4a811 Merge pull request #696 from sparkle-project/bundleid
Change bundle ID
2015-12-17 21:12:36 +00:00
Kornel Lesiński e83540a1e9 Change bundle ID
Fixes #687
2015-12-15 10:22:43 +00:00
Kornel Lesiński 254ae41759 Limit alert to main bundle 2015-12-14 20:22:58 +00:00
Kornel Lesiński aa11a9e934 Warn about ATS blocking 2015-12-14 20:13:32 +00:00
Kornel Lesiński 0abe9ad994 Deduped alert code 2015-12-14 20:13:18 +00:00
Kornel Lesiński 452ff64740 Move sanity checks to a separate function 2015-12-14 19:49:45 +00:00
Kornel 4b2c4a5823 ATS note 2015-12-14 01:10:45 +00:00
Kornel Lesiński db3c9cb9c5 Explain rejection for installer packages 2015-12-08 18:08:03 +00:00
Kornel 68e7fb5caa Merge pull request #690 from ksuther/permission-prompt-xibs
SUUpdatePermissionPrompt xib fixes
2015-12-08 02:03:29 +00:00
Kent Sutherland 8420abe5b9 Updated button sizes in SUUpdatePermissionPrompt.
Fixed overlapping title and message text in some languages in SUUpdatePermissionPrompt.
2015-12-07 11:18:25 -05:00
Jake Petroules 5e90d987de Fix Podfile.
Closes #658
2015-11-29 23:47:40 -08:00
Kornel a0716aac49 #686 2015-11-14 17:46:17 +00:00
Kornel Lesiński 1659180864 Merge tag '1.12.0b1'
* tag '1.12.0b1':
  Release build fix
2015-11-14 17:24:41 +00:00
Kornel Lesiński d308707f09 Added docs, screenshot to cocoapod metadata 2015-11-14 17:23:43 +00:00
Kornel Lesiński 916554046d Merge remote-tracking branch 'origin/1.11.x'
* origin/1.11.x:
  Updated podspec
  1.11.1
  Don't install automatic updates if the system might shut off
2015-11-14 17:23:21 +00:00
Andrew K. Boyd 47c1761137 Remove newline, Add explicit property synthesis 2015-11-13 16:49:12 -05:00
Kornel Lesiński 4022b01041 Updated podspec 2015-11-13 19:15:26 +00:00
Kornel Lesiński 558f3bb10e Release build fix 2015-11-12 21:00:27 +00:00
Kornel Lesiński ccc2c7cb5d Updated changelog 2015-11-12 21:00:01 +00:00
Kornel 3ed092e764 Merge pull request #678 from sparkle-project/sufsref
fsref func and --
2015-11-12 15:16:54 +00:00
Kornel 3bdf4aab9b Merge pull request #681 from sparkle-project/newxibs
Re-generated XIBs
2015-11-12 14:00:43 +00:00
Kornel Lesiński 373a3b4227 Protect shell commands from filenames starting with - 2015-11-12 13:55:32 +00:00
Kornel Lesiński c78a314385 Wording 2015-11-12 13:55:22 +00:00
Kornel Lesiński 533a0ecf17 cp -- to stop argument parsing 2015-11-12 13:55:22 +00:00
Kornel Lesiński 155782708b Helper function for FSRef 2015-11-12 13:55:20 +00:00
Kornel Lesiński b6c023fdea typo 2015-11-12 13:52:46 +00:00
Kornel 6351ee86b9 Merge pull request #683 from zorgiepoo/copy-auth-perm
Handle additional permission denied code when copying files
2015-11-12 13:51:28 +00:00
Zorg a4bd5443f3 Handle additional permission denied code when copying files
afpAccessDenied can be returned even when not using a AFP mount,
at least according to my testing.

Having an installation do a copy (because of different mounts) and auth
may not be a likely scenario, so this may not be hit often.
2015-11-11 23:08:41 -05:00
Kornel 3120b47404 Merge pull request #665 from GabrielUlici/master
Updated the latest iMac - Late 2015
2015-11-10 23:35:11 +00:00
Kornel Lesiński 2ae4e42561 Re-generated Arabic XIBs 2015-11-10 10:57:56 +00:00
Kornel Lesiński 5112748e1b Re-generated XIBs 2015-11-10 10:53:56 +00:00
Kornel Lesiński 1388639079 Upgraded XIBs 2015-11-10 10:30:37 +00:00
Kornel Lesiński 72618a0d3a 1.11.1 2015-11-09 00:33:29 +00:00
Zorg 66a11b83f0 Don't install automatic updates if the system might shut off 2015-11-08 23:43:12 +00:00
Kornel 0bc66ab011 Merge pull request #657 from zorgiepoo/fileop-copy
File Operations Copy Fixes
2015-11-08 23:18:51 +00:00
Zorg c98ef7c614 Merge branch 'master' into fileop-copy 2015-11-08 17:03:19 -05:00
Zorg 896a01cd40 Remove compiled classes in the Test App that exist in the framework
This removes run-time warnings that SUFileManager and SUOperatingSystem are
defined in both the test app and the framework, and which one
is used is undefined.
2015-11-08 17:00:27 -05:00
Andrew K. Boyd 4f88994cf0 Encrypted dmg support
Add the capability to set a decryption password for updating with an
encrypted dmg file.

This enables the the ability to update using an encrypted disk image without having to prompt the user for a password. This is useful when access to the application binaries is only available via distribution or from a location in which authentication is required. This can help prevent an attacker from having unwanted access to application binaries for reverse engineering.

This assists with a defense in depth approach to security.
2015-11-02 10:02:31 -05:00
Kornel 93a5228f5b Merge pull request #669 from AutoScout24/x2on-patch-1
Fix framework imports
2015-10-27 11:10:38 +00:00
Felix Schulze 124d9a901f Fix framework imports
Fixes #668
2015-10-27 11:26:25 +01:00
Gabriel Ulici 97c1a222ab corrected the comma 2015-10-25 20:08:53 +02:00
Gabriel Ulici 35802dbb4d Updated the latest iMac - Late 2015 2015-10-25 17:25:37 +02:00
Zorg c848882778 Merge branch 'master' into fileop-copy 2015-10-24 21:57:07 -04:00
Kornel 374b8d6195 Merge pull request #655 from kainjow/webserver
Replace use of Python with built-in web server
2015-10-23 16:25:35 +01:00
Kornel 27c1b0f045 Merge pull request #650 from zorgiepoo/binarydelta-no-write-perm
Fix segfault when patch path has insufficient write permissions
2015-10-23 00:35:06 +01:00
Kornel Lesiński 154aa1b0db Subclassing fixes #661 2015-10-22 13:55:01 +01:00
Kornel 658e5fcb9f Merge pull request #661 from osolo/misc-fixes
Misc fixes
2015-10-21 16:41:16 +02:00
Oz Solomon 292ba01dbf Removed invalid deployment target version 2015-10-21 09:39:26 -04:00
Oz Solomon ff7966d96a Fix: sparkleBundle not calculated correctly when SUUpdater is subclassed by a class in a different bundle. 2015-10-21 09:39:14 -04:00
Zorg 9cf7437392 Update explanation of why copyfile() is insufficient 2015-10-17 14:47:16 -04:00
Zorg 9f1884f100 Add compile sources to Test App to fix building issues 2015-10-10 18:23:45 -04:00
Zorg 8a208ce520 Move OS methods from SUHost to SUOperatingSystem
This reduces the bloat that BinaryDelta and SUFileManager need to include
2015-10-10 18:14:06 -04:00
Zorg c850146ef6 Forgot to update SUFileManager constuctor in Test App 2015-10-10 18:10:24 -04:00
Zorg ccf4f81ea0 Use SUFileManager for copyTree in BinaryDelta
Fixes app not being able to be patched because the original app
was on a network mounted volume
2015-10-10 17:58:44 -04:00
Zorg 3c957096c6 Use class constructor instead of an init method for SUFileManager
I think it's more natural this way
2015-10-10 17:42:27 -04:00
Zorg bc5ad0d919 Merge branch 'master' into binarydelta-no-write-perm 2015-10-10 00:38:38 -04:00
Zorg 9d06f5bc4d Meant to use NSFileNoSuchFileError here 2015-10-10 00:28:12 -04:00
Zorg 6818d1f180 Verify existence of destination parent directory for moving/copying 2015-10-10 00:12:58 -04:00
Zorg ee72ec3dab Fix issues with copying files from different mounted drives
The move operation now does an explict copy & remove.

We also copy items using FSCopyObjectSync due to issues
existing in copyfile (and NSFileManager).

Both of these fix bugs in some cases where items cannot be moved
from one network drive to another. In my testing before this patch,
I was unable to get the test application to launch and was unable
to move the old installation to the trash.
2015-10-09 23:58:23 -04:00
Zorg 9b74309eb5 Make allowsAuthorization apply to all of SUFileManager's methods 2015-10-09 17:49:46 -04:00
Kevin Wojniak 948eccb169 Use properties to avoid having to disable warning for entire file 2015-10-09 09:37:25 -07:00
Kevin Wojniak ff342f1e5b Use nil instead of 0. Fix pointer style. 2015-10-09 09:22:20 -07:00
Kornel a7af6fb82d Merge pull request #654 from zorgiepoo/nstask-string
Fix Test App crashing on systems earlier than 10.9
2015-10-09 16:02:48 +01:00
Zorg d7e3b01bd6 Merge branch 'master' into binarydelta-no-write-perm 2015-10-09 08:26:22 -04:00
Kevin Wojniak 117716da9e Replace use of Python with built-in web server
See issue #637
2015-10-08 20:41:26 -07:00
Zorg 17da7b5fb8 Fix Test App crashing on systems earlier than 10.9
Passing a NSURL instance to a NSTask's arguments calls
-[NSURL fileSystemRepresentation] which is only available on 10.9+
2015-10-08 22:49:03 -04:00
Kornel 545b8f2416 Merge pull request #653 from artillery/artillery-seamless2
Fire didFindValidUpdate even if automatically installing updates
2015-10-08 23:45:44 +01:00
Ian Langworth ☠ d1a62bba89 Fire didFindValidUpdate even if automatically installing updates 2015-10-08 15:33:00 -07:00
Kornel Lesiński 7ccf706a1d Synthesize automaticallyInstallUpdates 2015-10-08 23:25:21 +01:00
Kornel ef61691b34 Merge pull request #620 from artillery/artillery-seamless
Add automatically-install-updates option
2015-10-08 23:17:21 +01:00
Ian Langworth ☠ a92c23bb26 Add automatically install updates option 2015-10-08 14:45:05 -07:00
Zorg 21e4cc42cc Fix segfault when patch path has insufficient write permissions 2015-10-07 18:44:14 -04:00
Kornel abc307dc35 Merge pull request #647 from kainjow/patch-1
Fix readme headings
2015-10-05 11:10:02 +01:00
Kevin Wojniak 49e262e718 Fix readme headings 2015-10-04 16:36:57 -07:00
Jake Petroules 25be040bfc Merge pull request #643 from sparkle-project/maxcdn
MaxCDN
2015-10-03 05:56:59 -07:00
Kornel 46c677ea57 Merge pull request #641 from sparkle-project/charconv
Char conversions
2015-09-30 19:00:16 +01:00
Kornel Lesiński 165b772f8f MaxCDN 2015-09-29 00:39:35 +01:00
Kornel Lesiński bac2463ff2 Use a C formatting function for a C string 2015-09-28 10:54:30 +01:00
Kornel Lesiński c61b5d99a2 Avoid conversion from NSString to char[] 2015-09-28 10:46:36 +01:00
Jake Petroules e54498dd35 Merge pull request #640 from sparkle-project/fix-warnings
Fix warnings.
2015-09-27 16:21:28 -07:00
Jake Petroules 9ca70a5157 Fix warnings. 2015-09-27 16:16:37 -07:00
Jake Petroules f9b9184a39 Merge pull request #639 from sparkle-project/at-least-version
Use proper version checking.
2015-09-27 16:00:32 -07:00
Jake Petroules b943af3b59 Use proper version checking. 2015-09-27 15:55:26 -07:00
Jake Petroules 5afdc4f20e Implement isOperatingSystemAtLeastVersion: 2015-09-27 15:41:23 -07:00
Kornel f85ac88595 Merge pull request #635 from zorgiepoo/update-mod-time
Update modification & access time for new update
2015-09-27 23:02:29 +01:00
Zorg e9e04e2cb4 Merge branch 'master' into update-mod-time 2015-09-27 17:05:07 -04:00
Jake Petroules 114252dd09 Merge pull request #637 from kainjow/test-app-urls
Test app cleanup
2015-09-27 13:35:31 -07:00
Zorg 2f41dec805 Log any installation error that may occur 2015-09-27 16:19:35 -04:00
Kevin Wojniak 2ad01ad672 Reuse file manager variable 2015-09-27 12:33:14 -07:00
Kevin Wojniak 079666643d Set the task working directories instead of changing the process working directory 2015-09-27 12:31:45 -07:00
Kevin Wojniak da370c0f2b Avoid converting URLs to paths to check for existence 2015-09-27 12:24:47 -07:00
Zorg b98026040f Merge branch 'master' into update-mod-time 2015-09-27 11:19:36 -04:00
Kornel Lesiński 6d833143fe Xcode 7.1 config upgrade marker 2015-09-27 16:09:33 +01:00
Zorg 83578c1f38 Merge branch 'master' into update-mod-time 2015-09-27 11:05:22 -04:00
Kornel Lesiński 2bc0b2a2b3 Updated changelog 2015-09-27 15:58:55 +01:00
Zorg 6af2fbfb6e Update modification & access time for new update
If we don't do this, Finder may not report the correct file size for the new update.
The system also may not register the new app in its database if we don't do this.

We may have been able to get away with not doing this before because we used to perform a copy
to install the update. However, now updates in some cases can be done with only move operations.

This should also be an alternative way of addressing issue #508
2015-09-27 10:53:22 -04:00
Kornel 999b265908 Merge pull request #631 from kainjow/patch-1
Make requirements more explicit
2015-09-27 15:33:42 +01:00
Kornel 6599ba3a2d Merge pull request #632 from zorgiepoo/fileop-tests
Fileop tests
2015-09-27 15:33:12 +01:00
Kornel 888f35c756 Merge pull request #634 from zorgiepoo/autolayout-issues
Fix releasenotes container not being right-aligned with its box
2015-09-27 12:32:57 +01:00
Zorg cc354cf8cf Fix releasenotes container not being right-aligned with its box
This fixes an issue where the vertical border of the release notes view would sometimes not be visible.

Instead of making the widths of the views equal, we use the trailing property.
This is consistent with leading and bottom being used elsewhere
2015-09-26 23:58:56 -04:00
Zorg 2b6ae33911 Merge branch 'master' into fileop-tests 2015-09-26 21:35:48 -04:00
Kornel 93a87a4dfd Merge pull request #633 from zorgiepoo/no-auto-updates
Disallow automatic updates when user can't write to the bundle
2015-09-27 02:20:11 +01:00
Zorg a7ff41b3ce If the developer disables automatic updating, don't check writability 2015-09-26 21:10:09 -04:00
Zorg 6079739534 Disallow automatic updates when user can't write to the bundle
The automatic updates checkbox is also hidden in this scenario, and
we also update the layout constraints if the releasenotes are still visible
2015-09-26 20:56:44 -04:00
Zorg 9822b4d2a1 Fix typo 2015-09-26 15:21:33 -04:00
Zorg 03655cf8b2 Resolve nullability warnings 2015-09-26 15:11:23 -04:00
Zorg 32591954bc Add SUFileManager tests and fix issues along the way
* Fix uid / gid not being applied to the root path or non-directory inputs
* Remove the code that released quarantines using the NSURL way.
  It turned out not to be very reliable and didn't pass the tests.
  More explanation is given in the code.
* Prefix private methods with _ and expose some of them to the tests
2015-09-26 14:28:53 -04:00
Kornel e17d4fc99f Merge pull request #623 from zorgiepoo/update-delay
Keep Auto Updater alive for small delay before launching app
2015-09-26 01:19:46 +01:00
Kornel b746fc56bf Merge pull request #630 from sparkle-project/fix-1080-build
Avoid firstObject method in order to build with older SDKs.
2015-09-26 01:18:48 +01:00
Zorg 831947ff55 Merge branch 'master' into update-delay 2015-09-25 18:56:12 -04:00
Zorg e1002f0662 Revert using -[NSWorkspace openFile:] 2015-09-25 18:52:54 -04:00
Kevin Wojniak 222fe94a05 Specify required SDK 2015-09-25 09:54:32 -07:00
Kevin Wojniak aae9e12b8a Make requirements more explicit 2015-09-25 09:34:40 -07:00
Jake Petroules dc0aca1d16 Avoid firstObject method in order to build with older SDKs. 2015-09-25 09:26:54 -07:00
Kornel 452aee0b83 Merge pull request #629 from zorgiepoo/poweroff-note
Don't install automatic updates if the system might shut off
2015-09-25 16:09:40 +01:00
Kornel 73977c9aa5 Merge pull request #575 from zorgiepoo/fileoperations
Rewrite file operations for updating an app
2015-09-25 16:09:02 +01:00
Kornel f9731c92c1 Merge pull request #627 from zorgiepoo/no-dock
Don't show Autoupdate dock icon if we shouldn't show UI
2015-09-25 16:05:05 +01:00
Kornel 88f308e2ae Merge pull request #628 from kainjow/master
Fix analyzer warning "Value stored to completionBlock is never read"
2015-09-25 16:00:53 +01:00
Zorg aa4cc6a7dc Don't install automatic updates if the system might shut off 2015-09-25 00:31:53 -04:00
Kevin Wojniak eead36eb47 Fix analyzer warning "Value stored to completionBlock is never read" 2015-09-24 19:28:31 -07:00
Zorg 39f17764e3 Don't show Autoupdate dock icon if we shouldn't show UI 2015-09-24 20:43:20 -04:00
Zorg a9743f01fa Merge branch 'master' into fileoperations 2015-09-24 00:05:34 -04:00
Zorg e60baaeec8 Keep Auto Updater alive for small delay before launching app
This increases the likelihood that the updated launched app will
be brought up front and active.
2015-09-21 23:26:41 -04:00
Jake Petroules 9a32f6f21d Add missing __bridge casts. 2015-09-19 15:06:27 -07:00
Jake Petroules 175e84e618 Fix configs. 2015-09-19 14:58:06 -07:00
Zorg 2ff488c8c9 Move SWIFT_OPTIMIZATION_LEVEL into global configs 2015-09-19 10:50:29 -04:00
Zorg 34652305ab Merge branch 'master' into unarchiver-test 2015-09-19 01:58:07 -04:00
Zorg bd3be288f2 Merge branch 'master' into fileoperations 2015-09-19 01:28:31 -04:00
Kornel 00bcf21bc8 Merge pull request #619 from zorgiepoo/window-loading
Replace awakeFromNib with windowDidLoad
2015-09-18 22:39:45 +01:00
Zorg 2c5d5fb40d Replace awakeFromNib with windowDidLoad
awakeFromNib should never be used; proper window loading methods
from the window controller should be used instead. awakeFromNib
can also be called multiple times in certain scenarios.
2015-09-18 13:57:50 -04:00
Zorg 394225a01a Merge branch 'master' into unarchiver-test 2015-09-18 10:04:22 -04:00
Zorg ff22549aa9 Make make ci compile without error 2015-09-18 10:00:50 -04:00
Zorg 7c16bf8572 Use Xcode7 image for Travis 2015-09-18 09:15:05 -04:00
Kornel 92c41cbb34 Merge pull request #618 from 1024jp/fixChangelog
Fix CHANGELOG
2015-09-18 10:03:54 +01:00
1024jp 54747c24d1 Fix CHANGELOG 2015-09-18 16:27:16 +09:00
Zorg d1a5aae242 Merge branch 'master' into fileoperations 2015-09-18 01:51:23 -04:00
Zorg d255967a73 Merge branch 'master' into unarchiver-test 2015-09-18 01:38:10 -04:00
Jake Petroules 637eaae9c7 Don't run tests for SDKs < 10.10. 2015-09-05 14:56:34 -07:00
Zorg 926bdc8655 Try to fix unit test configurations 2015-09-05 10:25:32 -04:00
Zorg 2ba0fa254f Improve Unarchiver Tests
* All supported compression formats are now tested including dmg, which
has a license agreement included
* The hash of the extracted directory is now checked, which encompasses
every file's existence, its contents, and its permissions.
* Re-written using Swift
2015-09-05 10:00:59 -04:00
Jake Petroules 16c3534d40 Merge pull request #614 from kolpanic/master
Check for empty strings (as well as nil) in SUHost's -name method
2015-09-04 08:49:20 -07:00
Karl Moskowski 3c436ce844 Check for string length instead of emptiness 2015-09-04 10:35:08 -04:00
Karl Moskowski 0b4488339d Check for empty strings (as well as nil) in SUHost's -name method 2015-09-04 10:29:11 -04:00
Kornel c0b73fe618 Merge pull request #611 from zorgiepoo/binarydelta-errors
Improve BinaryDelta error handling & logging
2015-09-03 22:20:12 +01:00
Zorg 309aa157ab No if one-liners 2015-09-02 21:39:49 -04:00
Zorg b79d717933 Fix Indentation 2015-09-02 21:35:13 -04:00
Zorg c78070c748 Improve BinaryDelta error handling & logging
* Fix issue #608. From the framework, the error is logged via SULog.
From the tool, the error is logged to stderr. Uses NSError handling for
both.
* Move patch version validation for creating a binary diff into the
BinaryDelta tool
* Add parameter assertions to createBinaryDelta and handle if
-getFileSystemRepresentation:maxLength: fails
2015-09-02 21:09:11 -04:00
Kornel Lesiński 1159746505 Polish translation update 2015-09-03 00:06:13 +01:00
Kornel Lesiński b895d5af85 Merge branch 'info-only-updates' of https://github.com/danielpunkass/Sparkle into danielpunkass-info-only-updates
* 'info-only-updates' of https://github.com/danielpunkass/Sparkle:
  Put back some "—" characters that had shifted to "--" in the mix.
  Update string formulation to use the new separated localized strings for each case. Also update the code formatting a bit to be at least a little internally consistent. Switch to using dot notation within this method.
  Revise approach for localizing the "Would you like to learn more about this update on the web?" case.
  Revisions for style as requested.
  Remove old localized string which is now superseded by broken-down versions.
  Finesse the wording of the message displayed in SUUpdateAlert when the item is "information only."
  Declare informationOnlyUpdate as a property of SUAppcastItem.
2015-09-02 23:58:47 +01:00
Kornel Lesiński 43f246d33f Updated changelog, version 2015-08-24 22:39:15 +01:00
Jake Petroules 400014765a Merge pull request #601 from 1024jp/fixGerman
Fix German localization
2015-08-22 19:31:30 -07:00
1024jp 47c2bf31d4 Fix German localization
Add spaces before ellipses in German localization
2015-08-23 10:59:09 +09:00
Kornel f2cf1d8714 Merge pull request #600 from xhacker/update-zh-cn-translation
Update zh_CN translation
2015-08-22 22:27:10 +01:00
LIU Dongyuan / 柳东原 3d3372b485 Update zh_CN translation 2015-08-22 12:46:11 -07:00
Kornel 964427eae5 Merge pull request #599 from zorgiepoo/deprecate-http-no-dsa
Deprecate serving over http without DSA
2015-08-19 11:49:22 +01:00
Zorg 3c583db3da Deprecate serving over http without DSA
This deprecates only using Apple's code signing for validation. See
issue #543
2015-08-18 23:31:26 -04:00
Jake Petroules f63e606600 Set LD_RUNPATH_SEARCH_PATHS in Podspec.
Closes #598
2015-08-17 23:53:59 -07:00
Zorg 2782b426d9 Reduce even more releasing quarantine duplication 2015-08-16 12:08:24 -04:00
Zorg 182652a231 Error if file doesn't exist when releasing quarantine 2015-08-16 11:01:04 -04:00
Zorg ba73e52f09 Reduce more duplication for releasing quarantine 2015-08-16 10:47:37 -04:00
Zorg 5b469d702e Reduce code duplication for releasing quarantine 2015-08-16 01:38:41 -04:00
Zorg 758ed1dc38 Remove installation URL != old URL case
By not taking account the rare case, we simplify the code by having
less duplication. The tradeoff is that the rare case will be slightly
less efficient.
2015-08-15 22:56:47 -04:00
Jake Petroules 0a840f11da Exclude /Applications - coveralls is tracking headers from the OS X SDK. 2015-08-15 17:17:27 -07:00
Kornel Lesiński 9f674f6547 Updated Polish translation 2015-08-16 01:14:56 +01:00
Jake Petroules 2e226f65ac Try xcode-coveralls instead. 2015-08-15 17:08:19 -07:00
Jake Petroules 06876e723f Exclude build directory from Coveralls. 2015-08-15 16:53:04 -07:00
Zorg 5d53d7277c Merge branch 'master' into fileoperations 2015-08-15 19:27:38 -04:00
Kornel Lesiński d3aed95e39 Disable App Transport Security in the test app 2015-08-16 00:06:21 +01:00
Kornel 4559b2bbf3 Merge pull request #578 from zorgiepoo/testapplication
Rewrite test app so it works again, and locally
2015-08-16 00:05:26 +01:00
Kornel e6b39b6055 Merge pull request #596 from zorgiepoo/autoupdate-improvements
Improvements to Autoupdate application
2015-08-15 23:50:34 +01:00
Zorg ea959cbd87 Release quarantine for Autoupdate.app
I don't think this is actually needed, but better be safe than sorry.
2015-08-15 18:10:55 -04:00
Jake Petroules 931424fa1b Merge pull request #597 from zorgiepoo/suhost-changes
Minor SUHost.m improvements
2015-08-15 15:08:05 -07:00
Zorg fd7628e658 Don't follow symlinks for checking file existence 2015-08-15 17:39:06 -04:00
Zorg 8496bd030a Minor SUHost.m improvements 2015-08-15 17:03:06 -04:00
Zorg 8830ef5447 Improvements to Autoupdate application
* Do all the installation work after the runloop is set up (hope this helps #441)
* TerminationListener only does termination listening now..
* Renamed folderpath to updateFolderPath. Likewise with some other variables. Since these are passed by command line arguments, updateFolderPath cannot be nil, so those checks for if folderpath is nil in the old code is removed
* Removed pointless global variable access [SUInstaller updateFolder]
* Old code does not handle if host path is not installation path *and* host path is not desired executable path. This does.
2015-08-15 16:30:13 -04:00
Jake Petroules 246130abec Add Coveralls for code coverage. 2015-08-13 13:58:47 -07:00
Kornel Lesiński ec587ac7dc IB warning 2015-08-04 11:03:51 +01:00
Kornel 2205a8ab6b Merge pull request #593 from GabrielUlici/master
Update with all the available mac models until July 2015
2015-08-03 17:08:36 +01:00
Gabriel Ulici 0cabab22be Update with all the available mac models until July 2015 (iMac 15.1,
MacBook 8.1, MacBook Air 7.2, MacBook Pro 12.1, MacMini 7.1, MacPro 6.1)
2015-08-03 19:02:28 +03:00
Zorg 232fc61b90 Removing conditions with side-effects from assert() 2015-08-02 16:52:47 -04:00
Jake Petroules 1b0ca7b8ab Define DEBUG to 1. 2015-08-02 13:17:44 -07:00
Zorg 531c012292 Update layout constraints when removing release notes
We also add height constraints to the automatically install & download updates button. Since we don't have a custom layout view, we also shouldn't call -[NSView setNeedsLayout:]
Fixes #369
2015-08-02 12:14:53 -04:00
Jake Petroules 4187ec8655 Remove deprecated API usage. 2015-07-28 20:25:55 -07:00
Jake Petroules 333cbd9384 Disable Pascal strings. There is no reason to enable this. 2015-07-28 19:31:05 -07:00
Jake Petroules d302814f62 Remove unnecessary includes. 2015-07-28 19:23:08 -07:00
Zorg a746219a3f Merge branch 'master' into fileoperations 2015-07-28 21:04:34 -04:00
Jake Petroules 3e1c6da584 Turn off Clang modules for SDK 10.7 and 10.8.
Apparently this causes problems...
2015-07-28 17:36:12 -07:00
Jake Petroules 8a026f2f6e Make CI fail properly. 2015-07-28 17:23:18 -07:00
Kornel Lesiński 3c02940c7e Updated model translation plist 2015-07-29 00:38:11 +01:00
Daniel Jalkut abdeade019 Put back some "—" characters that had shifted to "--" in the mix. 2015-07-28 00:41:24 -04:00
Daniel Jalkut 99ac9eaf7c Update string formulation to use the new separated localized strings for each case. Also update the code formatting a bit to be at least a little internally consistent. Switch to using dot notation within this method. 2015-07-28 00:37:48 -04:00
Daniel Jalkut ee56cea7fd Revise approach for localizing the "Would you like to learn more about this update on the web?" case.
Previously I had broken down the description text into one localizable string for the main clause of the sentence, e.g.: "MyApp 1.1 is available--you have 1.0", and separate localizable strings for the follow-up question about whether to download or get more information. This breakdown didn't work well with some languages e.g. Arabic where the existing localization mixes the placeholder values differently. The new approach is to localize the two complete sentences separately. Unfortunately this means that for the "Would you like to learn more about this update on the web?" case, the localization is missing for all languages except English. But, at least the localization files are properly populated with the expected keys, and await localization updates when possible.

I also spotted a few instances in which an outdated version of the existing localization key was being used (with parens instead of --), so there was no localization occurring in those cases. I fixed those by updating the key to match the current status quo.
2015-07-28 00:30:10 -04:00
Jake Petroules e1fa4804f9 Merge pull request #588 from danielpunkass/revert-584-disable-timestamp-server
Revert "For Debug builds, disabling timestamps in code signing means …
2015-07-27 21:09:20 -07:00
Daniel Jalkut b016cfb4b7 Merge branch 'sparkle-project/master' into info-only-updates
* sparkle-project/master:
  Use NSByteCountFormatter if available.
  Fix a few more easy translation issues.
  Fix some simple translation issues.
  Delete languages which don't actually have any translations.
  Add existing localization files to Xcode project.
  Add SparkleLocalizations.swift to the Xcode project.
  Use NSXML the whole way through for building the report document.
  Remove unused temporaryName: parameter and supporting code.
  CheckLocalizations: use swift shebang
  CheckLocalizations: use NSUserDefaults to read args
  CheckLocalizations: add a helper for error handling
  CheckLocalizations: escape HTML
  Add script to generate a report comparing the Sparkle.strings files
2015-07-28 00:06:56 -04:00
Daniel Jalkut e447041337 Revert "For Debug builds, disabling timestamps in code signing means the buil…" 2015-07-28 00:00:39 -04:00
Jake Petroules 147906f067 Use NSByteCountFormatter if available. 2015-07-27 16:45:54 -07:00
Jake Petroules 87702985dc Fix a few more easy translation issues.
Here, the English text changed slightly but the original meaning is
mostly kept, so the translations can be reconnected.
2015-07-27 16:10:59 -07:00
Jake Petroules f3e44d39ee Fix some simple translation issues. 2015-07-27 16:00:33 -07:00
Jake Petroules 59b94a2c7d Delete languages which don't actually have any translations. 2015-07-27 15:54:12 -07:00
Jake Petroules c1f10ac7f0 Add existing localization files to Xcode project.
Catalan, Finnish, Hebrew.
2015-07-27 15:54:12 -07:00
Jake Petroules 0167c50b1d Add SparkleLocalizations.swift to the Xcode project. 2015-07-27 15:27:36 -07:00
Jake Petroules 73c337b14e Use NSXML the whole way through for building the report document. 2015-07-27 15:27:24 -07:00
Jake Petroules f625c4435c Merge branch 'master' of https://github.com/kainjow/Sparkle into kainjow-master 2015-07-27 14:35:14 -07:00
Daniel Jalkut 0418566e4c Revisions for style as requested. 2015-07-27 17:26:33 -04:00
Daniel Jalkut 831e8fda9f Remove old localized string which is now superseded by broken-down versions. 2015-07-27 15:23:16 -04:00
Daniel Jalkut f739101b4f Finesse the wording of the message displayed in SUUpdateAlert when the item is "information only."
Previously when an information-only update is displayed to the user, it uses the inappropriate text "Would you like to download it now?" Since the alert is modified in this case to provide a 'Learn More' button, then text should match the action that is being offered. In this commit I break the localized string up into parts such that the notice about the updated version is the same in either case, but the action offered differs depending on the type of update being presented.

Note that this commit only represents changes to the English Sparkle.strings file. Until and unless localized versions of Sparkle.strings add translations for the new broken-up strings, they will display this information in English only.
2015-07-27 15:15:59 -04:00
Daniel Jalkut d75856cfee Declare informationOnlyUpdate as a property of SUAppcastItem.
Declaring a property makes it obvious where changes to the logic about whether an update is "information only" should be made, and leaves the code at the calling point more readable. Instead of inferring that an appast item is information only by the simple omission of a fileURL, require that it also have a infoURL.
2015-07-27 15:13:07 -04:00
Kornel 973ef01be8 Merge pull request #585 from danielpunkass/remove-temporaryname-cruft
Remove unused temporaryName: parameter and supporting code.
2015-07-27 19:53:47 +01:00
Daniel Jalkut 59d372222e Remove unused temporaryName: parameter and supporting code.
The temporaryName: parameter to SUPlainInstaller's copyPathWithAuthentication... method was not being used internally but was still mucking up the (already long) method signature for the method and related methods up the chain. Also remove related, no-longer-used temporaryNameForPath method.
2015-07-27 14:40:15 -04:00
Jake Petroules 70dcb05319 Merge pull request #584 from danielpunkass/disable-timestamp-server
For Debug builds, disabling timestamps in code signing means the buil…
2015-07-27 11:31:18 -07:00
Daniel Jalkut ce4dfe2507 For Debug builds, disabling timestamps in code signing means the builds can take place without a network connection. 2015-07-27 14:24:25 -04:00
Jake Petroules 01caea1611 Commit some auto-generated Xcode changes. 2015-07-27 10:56:40 -07:00
Jake Petroules 7554daca65 Remove obsolete build phase that Xcode 7 complains about.
This does not seem to lose any functionality as testing is handled by
the test scheme.
2015-07-27 10:50:13 -07:00
Jake Petroules 7347631d34 Don't pollute headers with version checks. 2015-07-27 10:47:09 -07:00
Kornel d7b4d7c761 Merge pull request #583 from danielpunkass/quiet-warnings
Quiet warnings
2015-07-27 18:30:53 +01:00
Daniel Jalkut 43442f8b9b Beginning with the 10.11 SDK, WebView expects delegates to conform with explicit protocols. Declare these protocols on SUUpdateAlert, and define dummy protocols when building with an earlier SDK. 2015-07-27 13:10:01 -04:00
Daniel Jalkut 93957e5183 Quiet warning about casting away const-ness of CFTypeRef. 2015-07-27 13:05:13 -04:00
Daniel Jalkut e08422234b Quiet warnings generated by -Wassign-enum by casting to the expected enum type. Most of these warnings are inevitable because of the design of the enum type to separately declare enum constants for specific APIs, but to stick to the more generic shared enum type in the function prototype. 2015-07-27 12:22:40 -04:00
Zorg 62f7b7aa0c Merge branch 'master' into fileoperations 2015-07-26 22:48:13 -04:00
Zorg b7073dc3ce Make sure launch path is not nil before setting it
If we don't do this, -[NSTask setLaunchPath:] will complain
2015-07-26 22:26:17 -04:00
Zorg d26f94fab1 Merge branch 'master' into testapplication
Change code to use "sign_update" instead of "sign_update.sh"
2015-07-26 22:02:43 -04:00
Jake Petroules ca86ce0a1c Remove extensions from shell scripts. 2015-07-26 13:30:30 -07:00
Jake Petroules 90b3e00e8d Merge pull request #581 from zorgiepoo/removechmodpubkey
Don't set chmod 0444 on public DSA key file
2015-07-26 13:09:34 -07:00
Zorg 04d1f22d16 Don't set chmod 0444 on public DSA key file
Nothing inside an app/update bundle should be altered anyway, and these permissions will be lost by revision control systems. They also conflict with BinaryDelta's permissions validation
2015-07-26 16:00:50 -04:00
Zorg 4d4bee73e3 Change #define into static const 2015-07-26 13:49:21 -04:00
Zorg b13ae2e972 Use -[NSFileManager defaultManager] 2015-07-26 13:42:59 -04:00
Zorg 1fdfb80fe4 Missing newline at end of file 2015-07-26 13:41:11 -04:00
Zorg dcd50d54e1 Move build settings to xcconfig
Also enable -Wobjc-missing-property-synthesis because I can't figure out how to turn it off for just the test application
2015-07-26 13:39:41 -04:00
Zorg b165a419d5 Rewrite test app so it works again, and locally
This creates and signs the update on the fly, so
we can alter the test app without too much hassle.
This also starts up a local web server.
Refs #564
2015-07-25 17:02:22 -04:00
Zorg dbae37bb5b Make errors/directory names more user friendly
Since it is possible for the user to see these strings, we should not make them seem as 'gibberish' or unfriendly. More detailed error information is logged to the console.
2015-07-25 12:57:01 -04:00
Zorg d4b7a696af Append bundle version for older app when moving it 2015-07-25 12:13:16 -04:00
Zorg 19876c5a56 -moveItemAtURLToTrash:error: now works on 10.7 2015-07-24 23:47:16 -04:00
Zorg 9c8fb99184 Move deciding to abort an update into a procedure 2015-07-24 18:47:50 -04:00
Jake Petroules 5f88af7099 Add original Sparkle icon PSD. 2015-07-24 05:52:06 -07:00
Kornel Lesiński 57101a1c5b Updated changelog 2015-07-24 00:19:47 +01:00
Kornel 382b04fe4a Merge pull request #574 from sparkle-project/unbundle
Don’t keep important settings in Sparkle’s Info.plist
2015-07-24 00:11:02 +01:00
Kornel Lesiński 07c773ace2 Move sparkleBundle from SUHost to SUUpdater 2015-07-23 11:28:20 +01:00
Zorg 984c3dc0e1 Rewrote file operations for updating an app
The improvements we want to achieve:
* Stability - No more corrupt / incomplete updates by ensuring atomic move operations
* Efficiency - Faster updates because of reduction of file copies that need to be done
* Separation from Host and Helper - No usage of SUFileManager in the host application
* Cleanness - Minimized deprecated APIs (no FSPathMakeRef, FSGetCatalogInfo, FSFindFolder, etc), use modern Cocoa APIs when possible, robust error handling, strong documentation, easier to read code.

Many other small notes:
* SUFileManager does not have class methods. Methods across an instance share an AuthorizationRef, instead of having to authorize every time a privileged operation needs to be done
* The odd logic of `while (authStat == errAuthorizationDenied)` was removed
* Instead of checking if we have write access, we try to invoke a normal operation first. If that doesn't work, with the right error returned back, we try authorizing, which is what Apple recommends doing
* The trash is not used as a temporary location anymore. Rather we now request for a temporary directory to be created. This is more likely to succeed too (eg: on a drive that has no trash folder)
* The old method for releasing the quarantine did not work until I used the "com.apple.quarantine" key instead of the LS constant that was being used.
* For the old method for releasing the quarantine, we now check if a file has the quarantine xattr bit set before removing it. Just like how the new method works.
* Quarantines can now be removed with authorization
* The result of calling temporaryNameForPath: was never actually used in the old code
* -[NSString fileSystemRepresentation] which can throw an exception is not used. Only getFileSystemRepresentation:maxLength: is used and the error on it is always checked
* The desperate/hopeless check for if the code signature for the update is valid after the installation is complete is removed

Potential issues that still needs to be looked in to:
* Currently the method to move a file to the trash only works on 10.8+
* Appending of version number / picking destination name of app moved to trash
2015-07-22 23:38:07 -04:00
Kornel Lesiński a85a48c59a Don’t keep important settings in Sparkle’s Info.plist 2015-07-22 14:34:24 +01:00
Kornel cf17fff3fc Merge pull request #573 from sparkle-project/bundleid
Use bundleForClass instead of finding bundle by ID
2015-07-22 11:44:36 +01:00
Kornel Lesiński 4cc1702093 Use bundleForClass instead of finding bundle by ID
It should prevent confusion when multiple copies of Sparkle are available

Fixes #571
2015-07-22 10:37:34 +01:00
Kornel Lesiński 86fdb0c2ac Version bump 2015-07-16 23:27:50 +01:00
Kornel Lesiński 3e7c7fe249 Updated readme 2015-07-16 23:26:49 +01:00
Kornel Lesiński ce21e1b7e7 Updated changelog 2015-07-16 23:22:28 +01:00
Kornel Lesiński e9fa7c3d4a Verify relaunchToolPath is not nil
#571
2015-07-13 07:03:50 +01:00
Kevin Wojniak 9992fa28ed CheckLocalizations: use swift shebang 2015-07-10 13:14:22 -07:00
Kevin Wojniak 14fe42e7da CheckLocalizations: use NSUserDefaults to read args 2015-07-10 13:10:38 -07:00
Kevin Wojniak 0d9597c9a9 CheckLocalizations: add a helper for error handling 2015-07-10 13:02:16 -07:00
Kevin Wojniak b3d8cf11f7 CheckLocalizations: escape HTML 2015-07-10 12:56:13 -07:00
Kevin Wojniak c7184c21da Add script to generate a report comparing the Sparkle.strings files 2015-07-10 09:40:49 -07:00
Jake Petroules ceee82c4b1 Ignore stderr from xcrun. 2015-07-09 18:18:43 -07:00
Jake Petroules 7c39af9c99 Let CI test as many SDKs as are available. 2015-07-09 18:16:36 -07:00
Jake Petroules e086125cb8 Fix image height on GitHub. 2015-07-09 17:57:43 -07:00
Jake Petroules 5e6acc824e Add ship.io badge, which lets us prove that the build works on Xcode 5. 2015-07-09 17:48:17 -07:00
Jake Petroules ae27726b3b Rename continuous integration Makefile target to the more general 'ci'. 2015-07-09 17:40:51 -07:00
Jake Petroules 83f6dd3052 Guard some test cases for use on Xcode 6+ only. 2015-07-09 17:38:14 -07:00
Jake Petroules fb9b4a4f35 Fix nullability warnings. 2015-07-09 17:27:31 -07:00
Jake Petroules 6d7f95d912 Fix const warnings for both Xcode 6 and 7. 2015-07-09 17:16:06 -07:00
Jake Petroules 46249cc49f Turn on more warnings. 2015-07-09 17:16:06 -07:00
Jake Petroules 51712d2322 Fix a bunch of warnings so Xcode 5 still compiles cleanly. 2015-07-09 17:16:06 -07:00
Jake Petroules 24898ad60d Fix warnings in sais. These have been sent upstream as well. 2015-07-09 17:16:06 -07:00
Kornel cf9edce775 Merge pull request #569 from vokal/master
Add delegate methods for pre-download and immediately post-failed-download.
2015-07-08 01:13:45 +01:00
designatednerd 2387feeb7c Merge pull request #1 from vokal-isaac/master
Add delegate methods for pre-download and immediately post-failed-download.
2015-07-07 12:46:32 -05:00
Isaac Greenspan 363a41234d Indent new documenting comments to match existing ones. 2015-07-07 12:44:14 -05:00
Isaac Greenspan 06573e4b81 Add delegate methods for pre-download and immediately post-failed-download. 2015-07-07 12:35:49 -05:00
Kornel e702246bb5 Merge pull request #540 from zorgiepoo/code-sign-xattr
BinaryDelta Code Signed Extended Attributes Validation
2015-07-06 09:49:29 +01:00
Kornel 78c14cc574 Merge pull request #568 from xhacker/fix-default-font
Fix Lucida Grande is always used for release notes
2015-07-06 09:46:29 +01:00
LIU Dongyuan / 柳东原 976e83159f Fix Lucida Grande is always used for release notes
Use "-apple-system-font" to use system default font.
2015-07-05 21:32:07 -07:00
Kornel d7e532d268 Merge pull request #565 from sparkle-project/errtxt
More verbose error message when DSA keys don't match
2015-07-05 12:45:24 +01:00
Kornel Lesiński 33ef8ca2b4 Clarify that DSA is for archives and Apple Code Signing is for apps 2015-07-05 12:44:45 +01:00
Kornel e5e560e751 Merge pull request #566 from zorgiepoo/bundle-nil-check
Don't use main bundle if passed in bundle is nil
2015-07-03 14:46:17 +01:00
Kornel 4e33285068 Merge pull request #567 from savoirfairelinux/master
builddir: use predefined BUILDDIR
2015-07-02 17:09:59 +01:00
Alexandre Lision 313f4a497d builddir: use predefined BUILDDIR
This commit allows user to control where Sparkle will be build
2015-07-02 11:38:06 -04:00
Zorg ddb67d1c84 Added assert to make sure bundle isn't nil 2015-07-01 22:00:29 -04:00
Kornel Lesiński 99dedafc67 Fixed condition 2015-07-01 09:54:46 +01:00
Zorg 0b7e343a56 Don't use main bundle if passed in bundle is nil 2015-07-01 00:35:27 -04:00
Kornel Lesiński cd4da94cb9 GitHub pages don't support HTTPS for custom domains 2015-07-01 00:35:08 +01:00
Kornel 882fecea6b Merge pull request #564 from zorgiepoo/fixtestapp
Add public DSA file to updated test app
2015-07-01 00:34:33 +01:00
Kornel Lesiński efdf9d4421 More verbose error message when DSA keys don't match 2015-07-01 00:30:35 +01:00
Zorg 33c2eb89c9 Add public DSA file to updated test app 2015-06-30 18:42:29 -04:00
Kornel dc1cd3a259 Merge pull request #563 from kainjow/master
Fix NSAlert deprecations
2015-06-29 17:28:47 +01:00
Kevin Wojniak 11eaa3e092 Replace deprecated alertWithMessageText 2015-06-29 08:45:08 -07:00
Kevin Wojniak 4adb53dc51 Replace deprecated NSRunAlertPanel 2015-06-29 08:39:06 -07:00
Kornel d0cc3b63b4 Merge pull request #538 from zorgiepoo/verifying-update
Only check if new path is code signed
2015-06-29 12:11:56 +01:00
Jake Petroules 2aefacb7f2 Merge pull request #561 from sparkle-project/null
Nullability
2015-06-29 02:41:40 -07:00
Kornel Lesiński 3f433561d4 Hide __nonnull from Xcode 6 2015-06-29 10:10:18 +01:00
Kornel Lesiński 7bb0c69f76 Nullability 2015-06-29 10:03:31 +01:00
Kornel Lesiński 2c7ad5bc29 Const/casts 2015-06-29 10:03:31 +01:00
Kornel Lesiński 7ebb603ab7 Null checks 2015-06-29 10:03:31 +01:00
Kornel Lesiński 7b9e1fb431 Safer initialization 2015-06-28 22:50:50 +01:00
Kornel Lesiński 9f23c4f11e Comments 2015-06-28 22:50:36 +01:00
Kornel ce2a721a73 Merge pull request #560 from ksuther/pt-BR-warning-fix
pt-BR warning fix
2015-06-25 12:55:39 +01:00
Kent Sutherland eebadf5230 Fixed a warning about the window being offscreen (introduced from the pt-BR localization update). 2015-06-24 19:07:10 -04:00
Jake Petroules 51b62de4cb Fix some warnings. 2015-06-13 02:30:13 -07:00
Jake Petroules 4643becaff Upgrade settings. 2015-06-13 02:22:20 -07:00
Jake Petroules 4bbfac11aa Fix build with < 10.9 SDK. 2015-06-06 09:23:26 -07:00
Jake Petroules 0f4f7c3509 Fix build with < 10.10 SDK. 2015-06-06 08:40:17 -07:00
Jake Petroules 91af4db0c0 Update Podspec for 1.10.0. 2015-06-06 08:35:07 -07:00
Jake Petroules 21a894cd63 Fix warnings in unit test. 2015-06-06 08:35:07 -07:00
Jake Petroules e8035cc912 Silence warnings in third party code. 2015-06-06 08:35:07 -07:00
Jake Petroules 342aec164d Comment problematic clang-format property. 2015-06-06 08:35:07 -07:00
Kornel 517f7862ab Merge pull request #534 from zorgiepoo/app-update-validation
Improved app update validation
2015-06-06 11:53:41 +01:00
Zorg 6ca90a8c11 Clarification that DSA keys differ or are absent 2015-06-05 22:22:05 -04:00
Zorg a7e8e2aad5 Validate with the new public DSA key, not the old one 2015-06-05 21:59:32 -04:00
Zorg e9e5791e51 s/Pubic/Public/ 2015-06-05 21:46:52 -04:00
Zorg 7c705e5fff Remove redundant check that SUDSAVerifier does 2015-06-05 21:39:57 -04:00
Zorg b1d887264f Fix package validation from previous commit
Modern packages aren't distributed as bundles, and we wouldn't be able to obtain a "new" public DSA key from an update
2015-06-05 21:37:09 -04:00
Zorg da06dc80d6 Rely on code signing and the DSA key in the new app
Instead of relying on whether the DSA signature is provided in the appcast (which we can't trust), we rely on detecting if the public key in the new and old app differ. If they differ, then the code signatures from both apps must match. The idea is that code signing is reliable in being able to tell that the Info.plist and public DSA files came from the developer and are intact. This still allows a developer to lose access to their DSA private key, or to their Apple code signature, and be able to push new updates (as long as they didn't lose access to both). The new change, however, is that if the new app has a public DSA key, then the appcast item must have a DSA signature for the app, even if the app is code signed.
2015-06-05 18:57:36 -04:00
Kornel 2ed2f3def3 Merge pull request #554 from MaddTheSane/headers
Import the Foundation umbrella header in all the public headers.
2015-06-05 00:04:12 +01:00
C.W. Betts 3292c4ea10 Import the Foundation umbrella header in all the public headers.
This should prevent any undefined declaration warnings.
2015-06-04 11:13:48 -06:00
Kornel Lesiński fbc7a7fbf7 Log URL on appcast error 2015-05-27 19:16:55 +01:00
Kornel Lesiński 4733fe7785 Log URL on download error 2015-05-27 19:16:54 +01:00
Victor Figueiredo 8585d06bb5 pt-BR localization update 2015-05-21 00:27:57 +01:00
Kornel 4d111b96e4 Merge pull request #541 from zorgiepoo/unable-quarantine-fix
Only remove quarantine with -[NSURL setResourceValue:] when it's present
2015-05-10 02:15:54 +02:00
Zorg 0557a5ba5c Only remove quarantine with setResourceValue: when it's present
This should stop "Unable to quarantine: 93" messages from showing up in the console. Fixes issue #452
2015-05-08 23:55:23 -04:00
Zorg 61d43f860a Add tests for aborting on code signed xattr's 2015-05-05 22:04:18 -04:00
Zorg 4dd4548be4 Added comment on why code-signed xattr is not diff'ed 2015-05-05 21:47:23 -04:00
Zorg 9c3ef30f4c Diff'ing code-signed xattr's should actually not be supported
According to Apple's code signing document: https://developer.apple.com/library/mac/technotes/tn2206/_index.html
They don't recommend storing signed non-Mach-O files inside an app. They'd prefer script files for example to be in Resources directory and be unsigned.
2015-05-05 21:13:01 -04:00
Zorg 585194908e Bumping minor diff version 2015-05-05 20:32:16 -04:00
Zorg 330c733958 Don't forget to free the buffer 2015-05-05 20:25:42 -04:00
Zorg 4c782a67ed Abort if code signed xattr exists anywhere
Code signatures on non-mach-o files is not currently supported, but I'd like to implement this eventually.
2015-05-05 20:22:02 -04:00
Zorg 3a304123d9 Renaming newBundlePath to installSourcePath 2015-05-04 23:15:17 -04:00
Zorg 87da4cc0f2 Distinguish between install path found and update being a package 2015-05-04 22:49:57 -04:00
Kornel 12f29384ea Merge pull request #539 from vslavik/fix-incomplete-implementation-warning
Fix appcastDidFinishLoading: incomplete implementation warning
2015-05-04 15:13:32 +02:00
Václav Slavík 253f7c1023 Fix appcastDidFinishLoading: incomplete implementation warning
appcastDidFinishLoading: was declared in SUUIBasedUpdateDriver, but
defined and used in SUUIBasedUpdateDriver. Move the declaration back to
the base class where it belongs.
2015-05-04 14:34:49 +02:00
Zorg 65bfa1ccf2 Only check if new path is code signed
If the original app is signed, and the update is not, this is actually fine if the DSA validation goes through. And this may be desirable for people that don't want to pay cash to code sign their application anymore.
2015-05-03 20:06:41 -04:00
Kornel Lesiński f19038e5fe Add test cases 2015-05-02 23:16:58 +02:00
Kornel Lesiński 619e4a60a2 Fixed test name 2015-05-02 22:49:55 +02:00
Kornel 6e92311aaa Merge pull request #537 from antonc27/master
Fix for crash while applying delta update
2015-04-29 18:41:57 +01:00
antonc27 7d7aeb9f65 - Fix for crash while applying delta update 2015-04-29 17:54:58 +02:00
Jake Petroules ae3d04660e Merge pull request #535 from tonyarnold/hotfix/foundation-import
Properly import Foundation to fix errors when building as a module
2015-04-27 18:36:31 -07:00
Tony Arnold 2068da1cf9 Properly import Foundationto fix errors when building as a module 2015-04-28 09:40:54 +10:00
Zorg 19fdb9276d Only do DSA verification if public key is available 2015-04-27 19:18:21 -04:00
Zorg f55d2a4439 Host app needn't be signed to verify signature of updated app 2015-04-26 16:28:17 -04:00
Zorg 28ea47f796 Improved app update validation. See discussion in issue #441
If an invalid DSA or invalid code signature is provided, the update will fail, regardless if one of these requirements is valid. The logic before is that the update will succeed if either a valid DSA or matched code signature is provided.
This still allows a code signature to change, be added, or be removed, as long as the DSA and the code signature (if provided) is valid. If no DSA is provided, then this is not possible, and the code signature from the host and update app must match.
2015-04-26 13:58:40 -04:00
Kornel Lesiński 9646b0b790 Optimized images 2015-04-26 00:31:02 +01:00
Kornel Lesiński afb524a46a Yosemite screenshot 2015-04-26 00:22:57 +01:00
Kornel Lesiński 56ac1c931b Preserve underlying errors 2015-04-25 21:37:08 +01:00
Jake Petroules 3a788e9546 Merge pull request #532 from sparkle-project/guidedinstall
Simpler guided install opt-in
2015-04-25 13:20:33 -07:00
Jake Petroules 0b2f37beb9 Merge pull request #533 from sparkle-project/dedelegate
De-delegate
2015-04-25 13:12:20 -07:00
Kornel Lesiński 353a5635e1 Removed appcast delegate 2015-04-25 21:08:44 +01:00
Kornel Lesiński 35dfed44de Removed update alert delegate 2015-04-25 20:37:01 +01:00
Kornel Lesiński 3680b0bb67 Removed automatic update alert delegate 2015-04-25 20:36:59 +01:00
Kornel Lesiński 209d6db3a1 Test guided installation 2015-04-25 12:44:21 +01:00
Kornel Lesiński bb7af6145f Removed unused arg 2015-04-25 12:42:11 +01:00
Kornel Lesiński 77fd19a134 Use completion block instead of a delegate 2015-04-25 12:41:09 +01:00
Kornel Lesiński 38a70c61c4 Use package.sparkle_guided.pkg instead of .sparkle_guided.plist indirection 2015-04-25 12:38:32 +01:00
Jake Petroules d2fd67ac84 Merge pull request #529 from sparkle-project/testsymbols
Expose Sparkle symbols to unit test app
2015-04-24 18:42:40 -07:00
Kornel Lesiński f911c29bf0 Expose Sparkle symbols to unit test app 2015-04-24 10:59:25 +01:00
Kornel Lesiński 63052aa3d1 Cache strings 2015-04-24 01:22:36 +01:00
Kornel Lesiński eb28fe7ebd Updated changelog 2015-04-24 00:35:20 +01:00
Kornel Lesiński 06c6a3b7f2 Use Cocoa to pipe to unarchivers 2015-04-23 01:37:13 +01:00
Kornel Lesiński d4843c90e8 Don't tie unarchiver to host 2015-04-23 01:21:37 +01:00
Kornel Lesiński 5ba0b2d656 Test unarchiver 2015-04-23 01:20:12 +01:00
Kornel Lesiński 482301aa0d Sorted xcodeproj 2015-04-23 01:06:05 +01:00
Kornel 87dfb72484 Merge pull request #523 from iwankerl/verify-final-code-signature
Verify final code signature for issue #441
2015-04-22 23:52:04 +01:00
Kornel Lesiński ea07f716b8 Revert "Register update with Launch Services; see #508"
This reverts commit a7d11f88c7.

Fixes #525
2015-04-22 23:46:27 +01:00
Kornel Lesiński e7786dde97 Travis :sadpanda:
Revert "CodeSignOnCopy in a parent project won't sign Autoupdate.app, so codesign by default"

This reverts commit 836c6ef09e.
2015-04-22 23:43:38 +01:00
Kornel Lesiński b02a65974d One-off post-update test app 2015-04-22 23:37:20 +01:00
Kornel Lesiński 6017c982c5 Silence warning (code is OK) 2015-04-22 23:27:47 +01:00
Kornel Lesiński 836c6ef09e CodeSignOnCopy in a parent project won't sign Autoupdate.app, so codesign by default 2015-04-22 23:22:00 +01:00
Kornel ab4a058ac4 Merge pull request #527 from zorgiepoo/binary-diff-verbose
BinaryDelta Verbosity/Improved Logging
2015-04-20 01:20:57 +01:00
Zorg da9e48cf29 Added comment why -[NSFileManager fileExistsAtPath:] is not used 2015-04-19 19:23:00 -04:00
Zorg 08aed29870 Fix tests from not compiling 2015-04-19 18:48:22 -04:00
Zorg f31921e775 Re-format BinaryDelta create usage slightly 2015-04-19 18:18:55 -04:00
Zorg 578ba9adaf Removing ()'s in Adding file log 2015-04-19 18:08:06 -04:00
Zorg efac6b053d Improved command line argument parsing 2015-04-19 18:02:28 -04:00
Zorg e978cb0a3a Update BinaryDelta formatting for creating/applying logs 2015-04-19 17:29:51 -04:00
Zorg b780b476c6 Add version command for BinaryDelta and for patches 2015-04-19 15:53:36 -04:00
Zorg ba75b79a97 Fix verbose & version flag parsing 2015-04-19 15:22:00 -04:00
Zorg f9043aa0e6 Added verbose logging to the files being applied/created
Files can be Added, Removed, Replaced, have a new permissions Mode, or changed via a Delta patch
2015-04-19 14:04:59 -04:00
Kornel 5890ec6cfe Merge pull request #519 from ProsoftEngineering/suppress-deprecated-warning
Suppress AuthorizationExecuteWithPrivileges deprecated warning
2015-04-19 15:30:49 +01:00
Zorg fef73cc297 Added verbose option to BinaryDelta
Everything is now printed to stderr now, now that we have a verbose option. Printing to same stream avoids out-of-order messages
2015-04-19 03:40:54 -04:00
Kornel c7a8d5d42a Merge pull request #524 from zorgiepoo/binary-delta-permissions
Binary delta Improvements
2015-04-19 00:31:53 +01:00
Zorg 9e9fef0d51 Add an extract property for creating/applying binary diffs
Before, an extract was assumed if nothing else matched. This can get quite confusing when adding new properties, so we shouldn't treat any property to be handled if nothing else was handled.
2015-04-18 17:59:52 -04:00
Kornel 509df736bc Merge pull request #526 from zorgiepoo/arc-autoupdate-release
Ensure termListen is not deallocated before -[NSRunningApplication run]
2015-04-18 18:47:28 +01:00
Zorg 063056e193 Ensure termListen is not deallocated before -[NSRunningApplication run]
Related: Issue #441
I have no evidence that this is the cause of the issue, but from what we do know from the crash logs submitted, it looks like Sparkle crashes or errors on the main thread. It also looks like it might be from an object release rather than copying (which is done on a different thread) being the issue (see issue #417 also). I'm leaning towards this being an issue after the project was converted to ARC.
2015-04-18 13:14:57 -04:00
Kornel Lesiński d1908b1645 Unused 2015-04-18 18:00:44 +01:00
Kornel Lesiński 06a1ab8787 Formatting 2015-04-18 18:00:44 +01:00
Zorg cd478a4c48 Fixing unused variable warnings 2015-04-17 19:07:36 -04:00
Zorg acbd622369 Add tests for invalid patch version inputs 2015-04-17 19:03:21 -04:00
Zorg 817bbc46b1 Add a test to make sure old patches still work 2015-04-17 18:52:42 -04:00
Zorg dbc9123dce Use SUBinaryDeltaMajorVersion instead of uint16_t for this cast 2015-04-17 18:40:08 -04:00
Zorg c2cb3094af Use after-tree instead of before-tree here. Oops. 2015-04-17 18:38:44 -04:00
Zorg 65931f6277 First delta minor version should now be 0 2015-04-17 17:55:32 -04:00
Zorg 0f6697214d Increase minor version for version 1 patches
Since BinaryDelta can still create patches for older versions, and since I've made fixes recently even for version 1 patches, we should increment this counter.
2015-04-17 17:53:05 -04:00
Zorg 3c78139ec8 Use enums for major/minor versions instead of #defines
This should be more typesafe
2015-04-17 17:50:21 -04:00
Zorg 5c921de24f Removing couple of unused variables 2015-04-17 17:20:54 -04:00
Zorg a715babce3 Create #defines for diff properties 2015-04-17 16:32:38 -04:00
Zorg fd68e649db Clarifying which BinaryDiff fields are available when 2015-04-17 15:14:51 -04:00
Zorg 186cfa8486 New patches will now be at major version 2
This will break backwards compatibility with version 1 patches, which generated tree hashes differently and did not handle applying permission changes in some cases.
A version flag is also added to BinaryDelta create for creating patches an older version of BinaryDelta apply can handle. This is only meant for transition purposes.
2015-04-17 14:53:54 -04:00
Zorg c5bc6fe95b s/executablePermissions/permissions/ 2015-04-17 02:29:27 -04:00
Zorg 285cd3063f Fix removeTree not working for symbolic links and added tests
I accidently broke this a few commits ago where I inserted a return value for it
2015-04-17 02:28:03 -04:00
Zorg 8a4f4677bd Add detection for ACLs and fail if they are present
Applications probably shouldn't contain ACLs for files inside their bundle. Dealing with these could be complicated, so we should just reject them.
2015-04-17 01:35:17 -04:00
Isaac Wankerl 57122a40e6 Back out of using the kSecCSCheckNestedCode flag.
This is less secure, but should enable the code to work with older code signatures.
2015-04-15 14:26:53 -05:00
Zorg e2fca42f6c Add error checking to a removeTree call 2015-04-15 00:09:32 -04:00
Zorg 443a6064b3 Add test with no files in before/after trees 2015-04-14 01:48:50 -04:00
Zorg 86754e0537 Adding another test case for empty directories 2015-04-14 01:47:01 -04:00
Zorg 78a940fcf4 Add tests for symlink permissions 2015-04-14 01:46:24 -04:00
Zorg 4029788163 Use lchmod for symlinks; fixes not being able to modify them 2015-04-14 01:44:19 -04:00
Zorg 16cd57b8eb Use XCTFail where appropriate 2015-04-14 00:36:30 -04:00
Zorg a5687d9c1d Track all Unix permissions
Rationale: given a before-hash and an after-hash, there should only be one way to create the diff file. It was possible to violate this before, if we let a file differ in a permission bit that wasn't executable.
2015-04-14 00:12:12 -04:00
Zorg e93888ad3f Add more permissions tests with directories and files 2015-04-14 00:09:03 -04:00
Zorg 7aaf002651 Track directories in binary delta hashes
This code was intended to track directories from the start, but it looks like it never did.
2015-04-13 20:41:10 -04:00
Isaac Wankerl 742648a166 Check the code signature of installed app in the SUPlainInstaller.
This should help prevent situations like issue #441 where Sparkle
creates broken app bundles.  In this case, the update will just report
as a failure instead of succeeding.
2015-04-13 15:48:17 -05:00
Isaac Wankerl c1f9fcb456 Add SUCodeSigningVerifier unit tests.
There's a zipped up sample app in the unit test target.  This gets unzipped to
a temporary folder and there are three versions of it: the original which is not
code signed at all, another with a valid code signature, and a third which
has had one of its resources removed after code signing to make it invalid.
2015-04-13 15:27:59 -05:00
Isaac Wankerl 47d56a5485 Use the bundleURL instead of executableURL with SecStaticCodeCreateWithPath()
The API docs say "For bundles, pass a URL to the root directory of the bundle…
If you pass a URL to the main executable of a bundle, the bundle as a whole is generally recognized."
2015-04-13 12:55:20 -05:00
Isaac Wankerl 498ed027dd Perform a deep code signature verification with kSecCSCheckNestedCode 2015-04-13 12:51:20 -05:00
Isaac Wankerl 31d03b314d Add +[SUCodeSigningVerifier codeSignatureIsValidAtPath:error:]
Let's you check the validity of an arbitrary code signed app.
2015-04-13 11:47:34 -05:00
Isaac Wankerl 8bbe487c86 Refactor +[SUCodeSigningVerifier codeSignatureIsValidAtPath:error:] to +[SUCodeSigningVerifier codeSignatureMatchesHostAndIsValidAtPath:error:]
Explains more clearly what the method does.
2015-04-13 11:31:34 -05:00
Isaac Wankerl 4d6eeb363c Add +[SUCodeSigningVerifier applicationAtPathIsCodeSigned:]
Tests whether a particular app is code signed or not.  It does not verify the signature.
2015-04-13 11:25:44 -05:00
Zorg 419b6aabef Extracting files should take priority over changing permissions
Fixes a bug where permissions would change but a new (small) file would not be updated
2015-04-13 00:05:46 -04:00
Zorg 54522aa725 Reworked diffing file permissions
My initial attempt did not work correctly for directories that differed in permissions (since it removed them and all the files inside them). We are now setting a property for permission changes which can happen when a binary diff is created, or when it is skipped. Still have to figure out how backwards compatibility is going to work now..
2015-04-12 23:21:40 -04:00
Zorg d374d99e51 Only allow 0755 and 0644 permissions in after-tree 2015-04-12 19:57:40 -04:00
Zorg 33de6ed878 Don't think _DARWIN_NO_64_BIT_INODE is needed 2015-04-12 16:30:17 -04:00
Zorg 0c40d99740 Added invalid source test for BinaryDelta 2015-04-12 15:55:28 -04:00
Zorg bcab57d8f5 Handle exec. file changes, versioning, more error handling
BinaryDelta can now create proper diffs in the case if a non-executable file becomes an executable file, or vise versa. Currently for simplicit
y and backward-compatibility we delete then extract if an executable difference is found, rather than creating a diff. Files that contain an executable difference are unlikely to be large anyway.

We also change the tree hash function so it can track executable permission differences on files. It also now tracks file types so it is less collision-resistant for example in the case where a regular file becoming a symlink could have resulted in the same hash. Because the tree hash function changed, major & minor versioning to the format was introduced. Older minor versions remain compatible, but older major versions do not. In this case, we've only bumped the minor version. In this case, older versions can apply a patch created by a newer version, and newer versions can apply a patch created by an older version.

More error handling is now checked, some code improvements were made, and some adjustments were made to the tests with regard to the changes above.
2015-04-12 14:46:26 -04:00
Kornel 2ca0a739e5 Merge pull request #522 from zorgiepoo/binary-delta-tests
Binary delta tests
2015-04-11 16:13:02 +01:00
Zorg 9895f123a7 Comments changes to SUBinaryDeltaTest.m 2015-04-11 00:40:50 -04:00
Zorg 87dfe0a4ed Adding BinaryDelta creating/applying tests 2015-04-11 00:13:27 -04:00
Zorg 08434edf79 Move creating diffs into separate source file
Since a function for creating diffs is now exposed, this should make testing easier
This is also consistent with applying diffs being in a separate source file from the delta tool as well
2015-04-09 21:39:11 -04:00
Kornel 695e05eba4 Merge pull request #520 from ProsoftEngineering/xcode-63-update
Xcode 6.3 update
2015-04-09 23:58:59 +01:00
Brian Bergstrand b9a8adba73 Suppress Xcode 6.3 -Wcstring-format-directive warning
New warning fires for every NS/CF string format function.
2015-04-09 14:29:32 -05:00
Brian Bergstrand 91f504ed9f Update to Xcode 6.3 2015-04-09 14:27:48 -05:00
Brian Bergstrand 6033bd4228 Suppress AuthorizationExecuteWithPrivileges deprecated warning 2015-04-09 13:56:53 -05:00
Kornel 3de3b11523 Merge pull request #518 from zorgiepoo/binary-delta-stdout
Use stdout for Binary delta info messages
2015-04-09 00:36:25 +01:00
Zorg 707f86a2f4 Patch BinaryDeltaApply to use stdout for info messages too
See issue #516
2015-04-07 21:51:26 -04:00
JDuquennoy e9817380d2 Stdout used for non error outputs 2015-04-07 21:45:20 -04:00
Kornel 21999e4a75 Merge pull request #515 from zorgiepoo/bsdiff-sais
Change bsdiff's suffix sort algorithm to sais. Fixes #132
2015-04-05 23:28:14 +01:00
Zorg 616cc70775 Change bsdiff's suffix sort algorithm to sais. Fixes #132
Although #132 is marked as closed, the issue is still real. bsdiff can crash or hang when creating diffs on some files. In particular, bsdiff hangs/crashes in its recursive split function.

As you can see from:
http://stackoverflow.com/a/20305493/871119
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409664

bsdiff 4.3 uses qsufsort for its suffix sorting algorithm, which has a bug causing the hanging/crashing. Our solution is to change the algorithm to use sais for suffix sorting:
https://sites.google.com/site/yuta256/sais

Notes:
*I had to change sais_index_type #define from int to off_t in sais.h/c and in some other places, to eliminate all warnings. Compiles cleanly with clang's -Weverything
*sais is claimed to be more efficient than other algorithms including qsufsort. If a more efficient (and stable) algorithm comes out, we may be able to swap it out in the future.
2015-04-05 15:01:49 -04:00
Kornel 09d98932d9 Merge pull request #513 from zorgiepoo/binary-delta-case-issue
Fix BinaryDelta failing on filenames changing case
2015-04-04 23:37:48 +01:00
Kornel 3b8513546e Merge pull request #514 from zorgiepoo/binary-delta-dir-change-issue
Fix BinaryDelta sometimes failing when a dir becomes a dir link
2015-04-04 23:37:36 +01:00
Zorg 5589a604b8 Use child/parent names with paths for better clarity 2015-04-04 16:44:36 -04:00
Zorg 44b027a178 Fix BinaryDelta sometimes failing when a dir becomes a dir link
This can occur in the following case:
--
original_tree:
	A/
	Current/
		B
new_tree:
	A/
		B
	Current -> A/
--
Because symbolic links are not followed, Current/B can be marked as deleted. If A/B is added before the deletion, then A will end up as an empty directory.
Our fix is to remove all subpaths of a file when it changes from a directory to another type of file. This should also decrease the size of the diff even in harmless cases such as when a directory changes into a regular file.
2015-04-04 13:29:29 -04:00
Zorg 2dfc8494d7 Fix BinaryDelta failing on filenames changing case
When a filename changes case, make sure we have the file deleted in the old tree before being extracted into the new one.
Note that we don't try creating a diff if a file is renamed with a different case, just like we don't track file names changing in other ways.
See issue #474
2015-04-03 17:45:43 -04:00
Kornel 729087f696 Merge pull request #511 from grahammiln/imageoptim
Crunching image size with ImageOptim
2015-04-01 17:15:31 +01:00
Graham Miln 7656128c55 Crunching image size with ImageOptim 2015-04-01 17:21:00 +02:00
Kornel 5fe670ce05 Merge pull request #510 from grahammiln/remove-cast
Removing redundate `NSString` cast; see #509
2015-04-01 15:34:54 +01:00
Graham Miln d700b69072 Removing redundate NSString cast; see #590 2015-04-01 16:23:29 +02:00
Kornel ddde2822fa Merge pull request #509 from grahammiln/launch-services
Register update with Launch Services; see #508
2015-04-01 11:20:16 +01:00
Graham Miln a7d11f88c7 Register update with Launch Services; see #508 2015-04-01 11:16:46 +02:00
Kornel e7ed4aa32f Merge pull request #492 from ksuther/french-change
Changed French string for automatically install updates checkbox
2015-03-12 17:06:20 +00:00
Kent Sutherland 090285ec7e Changed French string for automatically install updates as suggested by a French user:
« Automatiquement » before the two verbs is a little akward, not incorrect but unusual. And « à l’avenir » (« in the future » is really not necessary, usually they don’t mention it.
2015-03-12 11:43:15 -04:00
Jake Petroules bc99dbd560 Merge pull request #491 from MaddTheSane/xCode63someFix
Remove binaryDeltaSupported…
2015-02-25 22:47:47 -08:00
Jake Petroules fbd90763f9 Merge pull request #490 from MaddTheSane/modulesToXcconfig
Move the module build settings out of Xcode.
2015-02-25 22:46:53 -08:00
C.W. Betts f88439923f Fix some issues discovered when building on Xcode 6.3:
Remove binaryDeltaSupported, as libxar is no longer weak-linked.
2015-02-25 22:17:23 -07:00
C.W. Betts 8f4ab3eb56 Move the module build settings out of Xcode.
Because all of the other build settings are in the xcconfig files.
2015-02-25 21:51:09 -07:00
Kornel f216ef7a13 Merge pull request #489 from mgunneras/http-headers
Ability to add custom http headers to appcast request
2015-02-26 01:10:55 +00:00
Mattias Gunneras 1db20c4882 Bugfix for setting headers properly, not just key-value pairs on the class 2015-02-25 10:56:56 -05:00
Mattias Gunneras 0a6de47783 Added ability to inject custom http headers in appcast request 2015-02-25 09:42:31 -05:00
Kornel 2a1760a5a9 Merge pull request #482 from sparkle-project/hasLaunched
Always set hasLaunchedBefore
2015-02-08 11:10:47 +00:00
Kornel 65238c35a9 Merge pull request #472 from millerdev/fix-invalid-parameter
Fix invalid parameter error on check for updates
2015-02-08 11:10:32 +00:00
Kornel 5e4e904efd Merge pull request #469 from kainjow/master
Add ability for host bundle to specify a custom name
2015-02-08 11:07:55 +00:00
Kornel 4d6d766a21 Merge pull request #377 from grahammiln/guided-pkg-install
Added headless guided package installation
2015-02-08 11:04:14 +00:00
Kornel 2cb531066c Merge pull request #483 from stel/patch-1
Update podspec for 1.9.0
2015-01-27 08:40:59 +00:00
Dmitry Obukhov e41fbdee49 Update podspec for 1.9.0 2015-01-27 10:52:54 +03:00
Kornel Lesiński c2672cf89c Always set hasLaunchedBefore
Fixes #475
2015-01-25 11:00:23 +00:00
Kornel Lesiński 6146b0a002 Version bump 2015-01-25 10:54:43 +00:00
Kornel ce22598d13 Merge pull request #481 from MaddTheSane/useModules
Have Sparkle build a framework module.
2015-01-22 16:45:20 +00:00
C.W. Betts c067f7a13b Have Sparkle build a framework module. 2015-01-20 14:57:07 -07:00
Kornel Lesiński 89c21b3acd Updated changelog 2015-01-15 09:54:06 +00:00
Kornel Lesiński 2adadf56e1 Explicit @synthesize 2015-01-15 09:41:00 +00:00
Kornel 57530564a6 Merge pull request #446 from tonyarnold/skip-install
Skip installing the framework by default — fixes #419
2015-01-15 09:30:25 +00:00
Kornel 3bebcfdd68 Merge pull request #476 from greenbuffo/master
Fix Autoupdate.app crash on 10.7 (issue #441)
2015-01-14 23:12:36 +00:00
Chris Campbell b5fc2be113 Fix Autoupdate.app crash on 10.7 (issue #441)
Autoupdate.app can crash in the middle of installing an update, leaving
the user with a broken application. The crash is caused by the status
window’s controller (SUStatusController) being prematurely deallocated
before the window is closed. This change prevents such a crash by
keeping a strong reference to the SUStatusController in
TerminationListener.
2015-01-14 11:42:33 -05:00
Daniel Miller a8d96e0dce Fix invalid parameter error on check for updates
reason: Invalid parameter not satisfying: windowNibPath

See https://github.com/sparkle-project/Sparkle/issues/237#issuecomment-11618894
2014-12-31 00:17:46 -05:00
Kornel 6dc6240fab Merge pull request #471 from GerTeunis/master
Using a weak id delegate property will crash during instantiation of NIB on OS X 10.7
2014-12-28 21:05:36 +00:00
Ger Teunis 4aecd9056b Using a weak id delegate will crash during instantiation of NIB on OS X 10.7 2014-12-27 14:05:09 +01:00
Kevin Wojniak 979ab661de Add ability for host bundle to specify a custom name 2014-12-23 08:47:11 -08:00
Kornel fbd20b7084 Merge pull request #442 from sparkle-project/cachedir
Use Library/Caches rather than app support directory
2014-12-23 11:30:38 +00:00
Kornel d695893329 Merge pull request #465 from bitigchi/patch-1
Capital Case Correction
2014-12-22 20:55:48 +00:00
Kornel 8443f88bb2 Merge pull request #466 from bitigchi/patch-2
Small fixes
2014-12-22 20:55:35 +00:00
Kornel acb1568708 Merge pull request #467 from bitigchi/patch-3
Small fixes
2014-12-22 20:55:24 +00:00
Kornel 51581fd3f5 Merge pull request #468 from bitigchi/patch-4
Context fixes
2014-12-22 20:53:47 +00:00
Emir 15b2d6256f Context fixes
Fixed poor spelling and context issues.
2014-12-22 21:08:25 +02:00
Emir 5d2fd5ca6d Small fixes
Capitalisation and context fixes
2014-12-22 21:01:54 +02:00
Emir 6f0e194705 Small fixes
Capitalisation and context fixes
2014-12-22 20:58:33 +02:00
Emir 4f4800bf26 Capital Case Correction
Turkish-lang specific capitalisation correction.
2014-12-22 20:55:16 +02:00
Kornel 1d3d15d5c1 Merge pull request #461 from kylef/lzma
Add support for lzma compressed tarballs
2014-11-23 12:22:36 +00:00
Kyle Fuller f139ccc5e7 Add support for lzma compressed tarballs 2014-11-22 17:16:30 +01:00
Jake Petroules 760a1589ba Merge pull request #456 from vslavik/defer-SUClearLog
Don't call SUClearLog() unless logging something
2014-11-16 11:45:12 -08:00
Václav Slavík b9f987382c Don't call SUClearLog() unless logging something
Don't delete the log file and log app name to it when only checking for
updates - this is something done frequently, on many apps' startup.
Instead, clear the log before writing the first entry to it, so that it
stays untouched if there's nothing to add to it.

Log the application name before the first "real" log entry, instead of
doing it unconditionally every time checkForUpdatesWithDriver: is called.
2014-11-16 17:00:36 +01:00
Jake Petroules 313b146b8e Merge pull request #448 from ivira/master
Proofing of Ukrainian localization.
2014-11-02 11:04:28 -08:00
Jake Petroules 3676feef94 Merge pull request #449 from orzFly/patch-1
Fix a repeated string in Traditional Chinese
2014-11-02 11:01:22 -08:00
Yeechan Lu 7157782c4c Fix a repeated string in Traditional Chinese 2014-11-03 01:22:48 +08:00
Vera Tkachenko f803d31274 Proofing of Ukrainian localization. 2014-11-02 11:36:14 +02:00
Tony Arnold f996ad8e04 Skip installing the framework by default — fixes #419 2014-10-31 13:26:54 +11:00
Jake Petroules 91166ca7ea Merge pull request #445 from tonyarnold/fix-xcode-6.1-warnings
Update LastUpgradeCheck within xcschemes and pbjproject to 0610 for Xcode 6.1
2014-10-30 00:20:08 -07:00
Tony Arnold e1a6467792 Fix warnings under Xcode 6.1 relating the SUUpdateAlert XIB 2014-10-30 12:30:10 +11:00
Tony Arnold 152ed05389 Update LastUpgradeCheck within xcschemes and pbjproject to 0610 for Xcode 6.1 2014-10-30 12:24:53 +11:00
Kornel df57ff045d Merge pull request #444 from kainjow/master
Removed some pragmas
2014-10-27 22:22:30 +00:00
Kevin Wojniak c5868c6eea Removed useless sole pragma mark 2014-10-27 13:55:41 -07:00
Kevin Wojniak ebcbb71e8c Removed outdated SUClearLog comment 2014-10-27 13:54:59 -07:00
Kevin Wojniak a90b075eec Removed use of pragma once in SULog to be consistent with the other headers 2014-10-27 13:54:14 -07:00
Kevin Wojniak f7629eb044 Changed NSSortDescriptor key input to allow for removal of pragma 2014-10-27 13:52:03 -07:00
Kevin Wojniak f1132002b9 Removed pragma which disabled a warning that is no longer shown in Xcode 6.1 2014-10-27 13:51:05 -07:00
Kornel Lesiński 82674cfa9b Use Library/Caches rather than app support directory
Fixes #146
2014-10-20 23:49:33 +01:00
Kornel 096180e879 Merge pull request #439 from erik999/master
Fixed Swedish translations
2014-10-16 13:16:16 +01:00
Erik Vikström be7e968834 Fixing Swedish translations
See https://github.com/sparkle-project/Sparkle/issues/436
2014-10-16 08:59:51 +02:00
Kornel 7fcd8be9d2 Merge pull request #437 from MaddTheSane/exportErrors
Make the error definitions public
2014-10-14 11:57:36 +01:00
C.W. Betts 85f1815d8b Make the error definitions public 2014-10-13 18:24:32 -06:00
Kornel bb5e302980 Merge pull request #434 from codyrobbins/master
Changed a straight apostrophe into a curly one
2014-10-08 01:51:55 -04:00
Cody Robbins 814028cb83 Changed a straight apostrophe into a curly one
Changed the apostrophe in the title of the ‘Don’t Check’ button on the update permissions prompt dialog from a straight one to a curly one.
2014-10-07 14:28:52 -04:00
Kornel 7e1b47976d Merge pull request #432 from yetamrra/master
Add delegate method for errors
2014-10-04 13:38:42 -10:00
Benjamin Gordon feae8bf7b3 Call delegate didAbort in other drivers when showErrors is false. 2014-10-04 16:25:34 -06:00
Benjamin Gordon 7a6d4bd380 Added SUUpdater delegate method for failures. 2014-10-04 16:18:49 -06:00
Kornel 3f9e50d10f Merge pull request #426 from alfwatt/master
Check for a modal window being onscreen before trying to put up the Spar...
2014-09-23 19:30:52 -07:00
Kornel Lesiński ba407a84b9 Updated changelog 2014-09-23 18:57:43 -07:00
Alf Watt 86429ecd50 Check for a modal window being onscreen before trying to put up the Sparkle prompt. 2014-09-23 18:57:10 -07:00
Jake Petroules 0344e2d5fa Add screenshot to README showing Sparkle in action. 2014-09-06 21:51:47 -04:00
Jake Petroules 46f2c07587 Add instructions to the README for building release packages. 2014-08-27 22:15:12 -04:00
Jake Petroules 1690bfa9bd Fix package building for Debug configuration. 2014-08-27 22:03:22 -04:00
Jake Petroules 19c6098d30 Share the distribution scheme and configure it to run tests.
This way, we don't rely on automatic scheme creation in Travis, nor do
we have to update the Makefile for Travis if we want to add an
additional test target to the project.

Also, Travis should now build all targets (including BinaryDelta and
Sparkle Test App), giving us better build coverage.
2014-08-27 21:52:40 -04:00
Jake Petroules ecf602f589 Avoid hardcoded file paths. 2014-08-27 21:37:47 -04:00
Jake Petroules 49721abdaa Add ARM support to the system profiler as OS X might later run on it. 2014-08-27 21:19:09 -04:00
Jake Petroules d7ef18ec91 Use string constants in system profiler. 2014-08-27 21:11:45 -04:00
Jake Petroules 89081ca030 Eliminate a few more string constants. 2014-08-27 20:53:38 -04:00
Jake Petroules 8d74807b23 Use string constants for RSS element and attribute names. 2014-08-27 20:53:27 -04:00
Jake Petroules f72bd52e87 Fix minor spelling error. 2014-08-27 20:48:58 -04:00
Jake Petroules 771a4c9b6b Rename Sparkle appcast keys to make clear elements vs attributes. 2014-08-27 20:08:57 -04:00
Jake Petroules 945a82e9f0 Prefer string constants to strings. 2014-08-27 19:58:10 -04:00
Jake Petroules a4c5e78794 Merge branch 'tamasprezi-tags_fix' 2014-08-27 19:49:39 -04:00
Tamás Lustyik 25cda72d66 Fixed Sparkle tags parsing 2014-08-27 19:49:03 -04:00
Kornel d3c6bd0250 Merge pull request #414 from sparkle-project/visibility
Only export public symbols.
2014-08-26 10:22:21 +01:00
Jake Petroules aa88b40b24 Only export public symbols. 2014-08-25 18:58:12 -04:00
Jake Petroules c87ab4b9c1 Merge pull request #399 from MaddTheSane/errEnum
Have Sparkle’s error codes be defined using NS_ENUM.
2014-08-23 20:41:23 -04:00
Jake Petroules 352aa18377 Merge branch 'kainjow-master' 2014-08-23 20:35:15 -04:00
Jake Petroules 6638b7f9c4 Merge branch 'master' of https://github.com/kainjow/Sparkle into kainjow-master
Conflicts:
	Sparkle/SUUpdater.h
2014-08-23 20:34:49 -04:00
Jake Petroules ec5b2a22c8 Make sure CFBundleVersion is a semantic version number.
CFBundleShortVersionString is now used to embed the Git rev info instead.
2014-08-23 18:03:12 -04:00
Jake Petroules c926aa48f5 Spaces to tabs in Info.plist 2014-08-23 16:44:40 -04:00
Jake Petroules c839ccf916 BinaryDelta: avoid crash with bad paths. 2014-08-23 01:04:41 -04:00
Jake Petroules 0171677513 Fix Clang static analyzer warning.
Closes #385
2014-08-22 23:13:44 -04:00
Jake Petroules 3314d9e3a5 Add Sparkle Appcast attributes as constants. 2014-08-22 22:31:39 -04:00
Jake Petroules 2d33875017 Prefer named constants where available. 2014-08-22 22:04:59 -04:00
Jake Petroules 0ff409a3d9 Improve formatting in license file.
Use a more standard header and fix line length.
2014-08-22 21:50:35 -04:00
Jake Petroules e89d3a7e15 Clean up Autoupdate.m a bit. 2014-08-22 21:37:00 -04:00
Jake Petroules bce54912ee Remove dead code.
Does nothing, not needed.
2014-08-22 21:10:24 -04:00
Jake Petroules 0851dc9a67 Fix regression in SULocalizedString macro. 2014-08-22 20:39:56 -04:00
Jake Petroules bfaeffc8f9 Simplify code path. 2014-08-21 19:53:38 -04:00
Jake Petroules 223436a6b7 Silence direct ivar access warning. 2014-08-21 19:38:21 -04:00
Jake Petroules 8db491ade0 Further reduce macro usage. 2014-08-21 19:25:53 -04:00
Jake Petroules b774241f25 Use Info.plist keys instead of macros.
This helps ensure that all code paths are compiled during development, reducing the chance of build errors (especially in CI). Additionally, developers can change these values without having to rebuild Sparkle (but it is still safe because modifying the plist will break the code-signing seal).
2014-08-21 19:12:29 -04:00
Jake Petroules bb743d80e0 Reduce duplication and macros. 2014-08-21 18:41:16 -04:00
Jake Petroules 888c3d4797 Copy Autoupdate.app in a separate phase. 2014-08-21 18:12:46 -04:00
Jake Petroules 54de8d1f2a Properly set install names and rpaths for targets. 2014-08-21 17:52:35 -04:00
Jake Petroules 68dff7ac81 Keep settings in xcconfig, remove unnecessary ones. 2014-08-21 17:17:58 -04:00
Jake Petroules 83032dc7ac Use proper variables in shell scripts. 2014-08-21 17:14:48 -04:00
Jake Petroules 2820b36d7e Silence warnings in XCTest framework. 2014-08-21 17:01:44 -04:00
Jake Petroules 2a7b94bc9d Add CodeSignOnCopy, RemoveHeadersOnCopy attributes. 2014-08-21 17:01:27 -04:00
Jake Petroules c393d58fe5 Update podspec for v1.8. 2014-08-21 16:46:04 -04:00
Kevin Wojniak 8d8cc35c96 Use standard Denial-of-Service acronym. 2014-08-04 09:17:41 -07:00
C.W. Betts 69bfc27960 Retain binary compatibility with older versions of Sparkle. 2014-08-02 12:38:53 -06:00
C.W. Betts d2ebc47c1e Have Sparkle’s error codes be defined using NS_ENUM.
This has the benefit of setting their size/type (OSStatus), and more usable with Swift.
2014-07-29 20:03:10 -06:00
Kornel Lesiński ee73e4c3e9 Code formatting 2014-07-29 02:05:22 +01:00
Kornel Lesiński 8ecbb25274 Warn when version is missing 2014-07-29 02:05:12 +01:00
Jake Petroules e437b720a4 Merge pull request #398 from MaddTheSane/nsEnumedEnums
Change enums to NS_ENUMs
2014-07-26 17:00:00 -04:00
C.W. Betts b8e28910ba Change SUCharacterType to an NSInteger. 2014-07-26 14:50:49 -06:00
C.W. Betts 852b6e0976 Change ints in NS_ENUMs to NSIntegers. 2014-07-26 11:12:59 -06:00
C.W. Betts b7eb5403ff Replace typedef enums with typedef NS_ENUM.
For one thing, it make Swift happier. Also, we don’t have to worry about what size/type the value is.
2014-07-26 11:03:18 -06:00
grahammiln 21657c9fb1 Added headless guided package installation
Added headless guided installation of pkg and mpkg files. Ported to
using ARC
and inlined documentation. The use of
`AuthorizationExecuteWithPrivileges` should be replaced with an XPC or
assistive external process in a future update. See
https://github.com/sparkle-project/Sparkle/issues/348
2014-07-13 16:53:45 +02:00
434 changed files with 24498 additions and 8242 deletions

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
#DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: foreach,Q_FOREACH
#ForEachMacros: foreach,Q_FOREACH
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 4
+10
View File
@@ -0,0 +1,10 @@
---
name: Other issues
about: Found a bug? Want to implement a new feature?
title: ''
labels: '1.x'
assignees: ''
---
+10
View File
@@ -0,0 +1,10 @@
---
name: Other issues related to Sparkle 2.x
about: Found a bug? Want to implement a new feature?
title: ''
labels: '2.x'
assignees: ''
---
@@ -0,0 +1,34 @@
---
name: Sparkle 1.x doesn't work in my app
about: Problems with integration, unexpected errors
title: ''
labels: '1.x'
assignees: ''
---
<!--
The answer to your issue is probably already in Console.app on your computer.
Please use Console.app and search for Sparkle.
Please try troubleshooting steps:
https://github.com/sparkle-project/Sparkle#troubleshooting
-->
### Description of the problem
### Do you use Sandboxing in your app?
### Version of `Sparkle.framework` in the latest version of your app
### Version of `Sparkle.framework` in the old version of app that your users have (or N/A)
### Sparkle's output from Console.app
```
```
### Steps to reproduce the behavior
@@ -0,0 +1,34 @@
---
name: Sparkle 2.x doesn't work in my app
about: Problems with using the beta version of Sparkle 2
title: ''
labels: '2.x'
assignees: ''
---
<!--
The answer to your issue is probably already in Console.app on your computer.
Please use Console.app and search for Sparkle.
Please try troubleshooting steps:
https://github.com/sparkle-project/Sparkle#troubleshooting
-->
### Description of the problem
### Do you use Sandboxing in your app?
### Version of `Sparkle.framework` in the latest version of your app
### Version of `Sparkle.framework` in the old version of app that your users have (or N/A)
### Sparkle's output from Console.app
```
```
### Steps to reproduce the behavior
+7
View File
@@ -28,6 +28,13 @@ Icon
.Spotlight-V100
.Trashes
# With Carthage, if Sparkle is included as a Git submodule (e.g. with the
# --use-submodules option), the main module's .gitignore can't reach all the
# way inside the submodule to ignore the added Carthage/Build symlink, and Git
# keeps complaining about untracked changes in the submodule forever, which
# is very annoying. To avoid that issue, ignore here in Sparkle instead.
Carthage/Build
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
+3
View File
@@ -0,0 +1,3 @@
[submodule "Vendor/ed25519"]
path = Vendor/ed25519
url = https://github.com/orlp/ed25519
+4 -1
View File
@@ -1,2 +1,5 @@
language: objective-c
script: make travis
osx_image: xcode9
before_install:
- brew update
script: make ci
+324 -5
View File
@@ -1,15 +1,334 @@
# 1.8.0
# 1.23.0
* New SUDSAVerifier based on up-to-date OS X APIs (Zachary Waldowski)
* Support generating appcast with localizations (#1499) (Alik Vovkotrub)
* Support versions with git commit SHA (#1504) (Alec Larson)
* Hide "Skip..." and "Remind..." buttons when they're not relevant (#1480) (Kenneth Johnsen)
* Preserve Finder tags while updating apps (#1512) (CoreCode)
* Read-only update alert dialog formatting improvements (#1515) (Quinn Taylor)
* Check if `SUBundleName` is set before normalizing (Jake Fenton)
* `NSInteger` cast warning on Xcode 11 (Marga Keuvelaar)
* Correct appcast file extension (Tom Vos)
* Update Sparkle.strings (Emir Sarı)
* Fix spelling (#1508) (Frank Chiarulli Jr)
# 1.22.0
* Enabled "Hardened Runtime" build option for Apple's notarization requirement
* Add delegate methods to suppress update alerts (George Nachman)
* Improved error when running from translocated location (Michael Buckley)
* Add phased rollout feature (#1381) (Fabian Jäger)
* Ignore non-standard permissions in delta updates instead of failing the build (Kornel Lesiński)
* Notify user when installed version is newer than the latest in the appcast (CoreCode)
* Reset timers after computer sleep (CoreCode)
* Block-based alternatives to `NSInvocation`-based delegate methods (Fabian Jäger)
* Add delegate `userDidSkipThisVersion` (BobZombie, Leo Natan, bono yusuke)
* Pass item to updaterShouldShowUpdateAlertForScheduledUpdate delegate method (George Nachman)
* Support providing private key as argument in `generate_appcast` (Yakuhzi, marchyang)
* Separate the ed25519 sources into a new static library (Tony Arnold)
* Disambiguate signing error messages (Nate Weaver)
* Use `XMLNode.Options.nodePrettyPrint` in `generate_appcast` instead of trying to add whitespace manually (fumoboy007)
* Annotate SUHost for nullability (Michael Buckley)
* Use SUAVAILABLE macro (Christiaan Hofman)
* Fix warnings when using modules (nivekkagicom)
* Correction of Czech localization inconsistency (#1403) (vojtakonarik)
* BR locale fix (BR Lingo)
* Update Japanese localization (fujisoft)
* French Sparkle.strings (Jean-Baptiste)
# 1.21.3
* Losslessly reduced the size of PNG (Barijaona Ramaholimihaso)
* Catch exceptions from subcommands (Julian Mayer)
* `generate_appcast` can sign any bundles instead of just apps (Nate Weaver)
* Check that effectiveAppearance is being observed before calling removeObserver (Pierluigi)
# 1.21.2
* Allow EdDSA for delta updates, too (Kornel)
* Warning fixes (Brian Bergstrand)
* Improvements to release notes view context menu and dark mode (Bi11)
# 1.21.0
* Added support EdDSA (ed25519) signatures (Kornel)
* DSA signatures are considered outdated, and Apple's `Security.framework` only supports weaker SHA-1-based DSA.
* Both old DSA and new EdDSA are still supported (and one app can use both), but new applications should use EdDSA only, and we recommend migrating away from DSA signatures.
* `generate_keys` is now a Swift tool that stores EdDSA private keys in the Keychain
* Existing apps can continue using their old DSA keys, but we've dropped support for generation of old DSA keys
* `sign_update` is now a Swift tool that signs using EdDSA from private keys in the Keychain
* The old DSA-based signing script has been moved to `bin/old_dsa_scripts`
* The old DSA-based signing script has been fixed to work on pre-10.13 systems (Thomas Tempelmann)
* `generate_appcast` has been updated to support EdDSA signatures
* It can sign both DSA (if `dsa_priv.pem` file is specified) and EdDSA (from Keychain)
* The tool now uses Caches directory and doesn't generate unnecessary delta files
* Fixed verification of delta updates on filesystems that change permissions of symlinks
* Fixed `NSURLSession` leak (Michael Ehrmann)
# 1.20.0
* `generate_appcast` option to read private key directly from the keychain (Tamás Lustyik)
* Add delegate callbacks for fininshed download and extraction related events (Csaba Horony)
* Don't check for updates if Do Not Disturb is on (Kornel)
* Expose `CodesigningVerifier`, add codesign info API (sunuslee)
* Threading fixes:
* Fix potential hang with `dispatch_sync` to main thread (Brian Bergstrand)
* Fix closeCheckingWindow called from background thread (Alexey Martemyanov)
* Improve 'read-only' error message (#1192) (Adrian Thomas)
* New Spanish localisation (Ken Arroyo Ohori)
* Updated Finnish language resources (Jason Pollack)
* Hungarian localization (Csaba Horony)
* Log more information about authentication requests (Kornel)
* Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings. (Kent Sutherland)
* Fix binary delta creation on network drives (sagecook)
* Fix compilation issues on Xcode 10 with new build system (Leo Natan)
# 1.19.0
* Refactoring of downloader code to avoid deprecated methods (Deadpikle)
* Changes to which methods run on the main thread.
Note: some delegate methods may be called on non-main thread now. (Kornel)
* Update Japanese localization (1024jp)
* Update Sparkle.strings (Stefan Paychère)
* Fix Sparkle clients polling too frequently (Jonathan Bullard)
* Handle SecTransformExecute errors (Kornel)
* Silence Touch Bar availability warnings on Xcode 9 by using API_AVAILABLE. Disable gnu-zero-variadic-macro-arguments to prevent warnings from use of API_AVAILABLE. (Kent Sutherland)
* 10.11 SDK compatibility (David Fuhrmann)
# 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)
* Disabled the keyboard shortcut for the install button for scheduled updates to avoid accidental installs. (George Nachman)
* generate_appcast tool adds release notes if there's an .html file with the same base name as the archive (Brett Walker)
* Added `sparkle:shortVersionString` to the enclosure, #1032 (Brett Walker)
* Fixed Japanese localization (1024jp)
* Fixed escaping of system profile URLs
* Added more logging in various failure cases (Kornel Lesiński)
* Better error message for quarantined apps that can't be updated
# 1.17.0
* Added Touch Bar support (Bi11)
* Upgraded SULog to use logging APIs that Apple provides built-in (Zorg)
* Skip buttons are disabled if the update is marked as critical (Kornel Lesiński)
* Background updates ask OS for lower-priority networking (Kornel Lesiński)
* Refactorings to sync with upcoming 2.0
* Added kqueue based termination listener (Zorg)
* Added AppKit prevention guards to modules that shouldn't import it (Zorg)
* Added Obj-C generics where applicable (Zorg)
* Made SUBundleIcon & SUApplicationInfo take SUHost, not NSBundle (Zorg)
* Improved -[SUHost objectForInfoDictionaryKey:] (Zorg)
* Detect and fail if any two-way dependencies exist in the project (Zorg)
* generate_appcast:
* fixed handling of multiple directories in an archive
* percent encode the filename used in the delta url (Brett Walker)
* Update Sparkle.strings (BR Lingo)
* Improved handling of non-ASCII names in delta archives (Kornel Lesiński)
* Don't touch Info.plist unless git version changes (Václav Slavík)
# 1.16.0
* Guided package installs are now the default for updating packages (Zorg)
- `pkg` installers won't show any UI. If you require the old behavior of showing a full installer window, rename the `*.pkg` file to `*.sparkle_interactive.pkg`
* Previous version of the app is now deleted instead of staying in the trash (Zorg)
* Added `generate_appcast` helper tool (Kornel Lesiński)
* Made manual check resume pending automatic updates instead of starting a new update (Kornel Lesiński)
* Started using `length` value from RSS if HTTP doesn't give one (Zorg)
* Hidden automatic updates checkbox for information only updates (Bi11)
* Added progressbar for DMG and binary delta extraction (Kornel Lesiński)
* Fixed showing of download status if we attempt a 2nd download (Zorg)
* Refactorings to sync with upcoming 2.0
* Decoupled and simplified installation code using protocols (Zorg)
* Added nullability annotations (Zorg)
* Allowed delegate methods that return an object to return nil (Zorg)
* Decreased responsibility of SUHost and moved code into other components (Zorg)
* Removed Sparkle.pch and many file #includes (Zorg)
# 1.15.0
* A new icon! Thanks to 1024jp
* Show alert when an update is sent over insecure HTTP with no DSA key (Zorg)
- If you can't use HTTPS, you must at least sign updates with a DSA key.
* Improved binary delta implementation (Zorg)
* Added improved -validateMenuItem: as a method in SUUpdater.h for public use (Zorg)
* Removed reachability preflight check (Zorg)
* Clear update caches directory before downloading new update (Zorg)
* Check the bundle's parent directory for writability too (Zorg)
* Don't follow symbolic links for file operations (Zorg)
* Don't bring up an authorized dialog during cleanup (Zorg)
* Made Sparkle look for the highest compatible version regardless of timestamps (Zorg)
* Fixed compatibility with 10.7
* Fixed crash on 10.7 - subscript operator not available (kleuter)
* Fixed warnings caused by -Wpartial-availability (Zorg)
* Fixed german l10n. (Sebastian Volland)
* Error code for download errors (Kornel Lesiński)
* Update last update check date when the update driver finishes (Zorg)
* Scale app icon up if needed in Software Update window (Nicholas Riley)
* Don't register for termination notifications more than once (Zorg)
* Don't terminate the app if we're already terminating (Zorg)
* Removed SUEnableAutomaticChecksKeyOld and SUCheckAtStartup constants (Eitot)
* Updated Sparkle framework headers to use modules if modules are available (B. Kevin Hardman)
* Fixed warnings, fixed uses of SULocalizedString (Jerry Krinock)
* Improved signing verifier to take any host and s/application/bundle/ (Zorg)
* Improved Spotlight updates after delta extraction (Zorg)
# 1.14.0 (Mar 11, 2016)
* Disable javascript by default and make it opt-in (Zorg)
* URL-encoding of appcast URLs is preserved (Kornel Lesiński)
* Delegate is asked for fallback updates if delta update fails (Kornel Lesiński)
* Fixed crash on 10.7 - subscript operator not available (kleuter)
* Fixed check of feed URL before delegate had a chance to set it (Kornel Lesiński)
* Re-added support for password-protected dmg images (Andrew K. Boyd)
* Added warning about ATS blocking (Kornel Lesiński)
* Translation fixes for pt-BR. (vitu)
* Add some Japanese lozalized strings (1024jp)
* Made test app available in all languages #695 (LIU Dongyuan / 柳东原)
* Czech localizations update (Frantisek Erben)
* Removed a test resource from the framework bundle (Karl Moskowski)
* Test if the updated app is the frontmost one (Zorg)
* UI Tests for the Test Application (Zorg)
# 1.13.1 (Jan 31, 2016)
Important security fixes:
* Prevent inclusion of local files via file:// XML entities
* Disable redirects to non-HTTP URLs in release notes webview
# 1.13.0 (Dec 18, 2015)
* Changed framework's bundle ID from `org.andymatuschak.Sparkle` to `org.sparkle-project.Sparkle`.
# 1.12.0 (Dec 13, 2015)
* Rewritten file operations for updating an app (Zorg)
- Ensuring atomic move operations, robust error handling.
- Faster.
- Using modern APIs where possible (no FSPathMakeRef, FSGetCatalogInfo, FSFindFolder, etc.)
- Strong documentation, easier to read code.
* Automatic updates won't be installed if the system is about to shut off (Zorg)
* Deprecated serving over HTTP without DSA (Zorg)
- Note that Apple has deprecated insecure HTTP in macOS 10.11
* Improved Autoupdate application (Zorg)
* Do all the installation work after the runloop is set up
* TerminationListener only does termination listening now
* Handle cases where host path is not installation path and host path is not desired executable path
* Don't show Autoupdate dock icon if we shouldn't show UI
* Update modification & access time for new update
* Added installUpdatesIfAvailable (Ian Langworth)
* Removed extensions from shell scripts (Jake Petroules)
* Rewritten test app so it works again, and from a local web server (Zorg)
* Replaced use of Python with built-in web server (Kevin Wojniak)
* Set LD_RUNPATH_SEARCH_PATHS in Podspec (Jake Petroules)
* Don't install automatic updates if the system might shut off (Zorg)
* Don't show Autoupdate dock icon if we shouldn't show UI (Zorg)
* Updated layout constraints when removing release notes (Zorg)
* Improved BinaryDelta error handling & logging (Zorg)
* Refactored quarantine removal (Zorg)
* Fixed German localization (1024jp)
* Updated zh_CN translation (LIU Dongyuan / 柳东原)
* Updated Mac models list until July 2015 (Gabriel Ulici)
* Updated Polish translation (Kornel Lesiński)
* Updated Xcode project languages for which we have translations (Jake Petroules)
* Updated XIB files (Kornel Lesiński)
* Use NSByteCountFormatter if available (Jake Petroules)
* Declared protocols on SUUpdateAlert for the 10.11 SDK (Daniel Jalkut)
* Silenced warning about casting away const-ness and -Wassign-enum (Daniel Jalkut)
* Added script to generate a report comparing the Sparkle.strings files (Kevin Wojniak)
* Check for empty strings (as well as nil) in SUHost's -name method (Karl Moskowski)
* Don't follow symlinks for checking file existence (Zorg)
* Unit tests in Swift (Zorg, Jake Petroules)
* Fixed framework imports (Felix Schulze)
* Fixed issues with copying files from different mounted drives (Zorg)
* Disallowed automatic updates when user can't write to the bundle (Zorg)
* Set the task working directories instead of changing the process working directory (Kevin Wojniak)
# 1.11.1 (Nov 9, 2015)
* Don't install automatic updates when system is about to shut down
# 1.11.0 (Aug 24, 2015)
* Big improvements to code signing and DSA verification
- Sparkle now checks not only whether an update is correctly signed, but also whether the updated version will be able to verify future updates. Updates now must either use DSA keys correctly, or not try to use them at all. Same goes for Apple Code Signing.
- Rely on code signing and the DSA key in the new app instead of appcast. If the new app has a public DSA key, then the appcast item must have a DSA signature for the app, even if the app is code signed. (Zorg)
* More verbose error message when DSA keys don't match (Kornel Lesiński)
* Added delegate methods for pre-download and immediately post-failed-download (Isaac Greenspan)
* Fix Lucida Grande is always used for release notes (LIU Dongyuan / 柳东原)
* Only remove quarantine with setResourceValue: when it's present. Fixes "Unable to quarantine: 93" messages from showing up in the console. (Zorg)
* Fixed const and nullability warnings (Jake Petroules, Kornel Lesiński)
* Replaced deprecated NSRunAlertPanel/alertWithMessageText (Kevin Wojniak)
* Imported the Foundation umbrella header in all the public headers (C.W. Betts)
* pt-BR localization update (Victor Figueiredo)
* Reject unsupported code-signing xattrs in binary delta (Zorg)
* Fixed crash while applying delta update (antonc27)
* Added logging of appcast/download URL on error (Kornel Lesiński)
* More robust reading of Autoupdate.app path from Sparkle bundle
# 1.10.0 (Apr 26, 2015)
* Massive improvements to the BinaryDelta tool (Zorg)
- Ability to track file permissions (Zorg)
- Nicely formatted log output (Zorg)
- Numerous bug fixes in handling of symlinks, empty directories, case-insensitive names, etc. (Zorg)
- Refactored and modernized code (Zorg)
- libxar is no longer weak-linked (C.W. Betts)
* Double-check the code signature of the the app after installation (Isaac Wankerl)
* Added headless guided package installation (Graham Miln)
* Added ability to inject custom HTTP headers in appcast request (Mattias Gunneras)
* Changes to make unarching more reliable (Zorg, Kornel Lesiński)
* Have Sparkle build a framework module (C.W. Betts)
* Stdout used for non error outputs (JDuquennoy)
* French locale update (Kent Sutherland)
# 1.9.0 (Jan 26, 2015)
* Added SUUpdater delegate method for failures. (Benjamin Gordon)
* Make the error definitions public (C.W. Betts)
* Add support for lzma compressed tarballs (Kyle Fuller)
* Back to SKIP_INSTALL=YES by default (Tony Arnold)
* Properly set install names and rpaths for targets (Jake Petroules)
* Use Library/Caches rather than app support directory (Kornel Lesiński)
* Check for a modal window being onscreen before trying to put up the Sparkle prompt (Alf Watt)
* Fixed crashes on 10.7 (Chris Campbell, Ger Teunis)
* Fixed Sparkle tags parsing (Tamás Lustyik)
* SULog code cleanups (Kevin Wojniak)
* Make sure CFBundleVersion is a semantic version number. (Jake Petroules)
* Replace typedef enums with typedef NS_ENUM to make Swift happier (C.W. Betts)
* Fix warnings under Xcode 6.1 relating the SUUpdateAlert XIB (Tony Arnold)
* Prefer string constants to strings (Jake Petroules)
* Use Info.plist keys instead of macros (Jake Petroules)
* Only export public symbols. (Jake Petroules)
* BinaryDelta: avoid crash with bad paths (Jake Petroules)
* Fixing Swedish translations (Erik Vikström)
* Turkish localization fixes (Emir)
* Proofing of Ukrainian localization (Vera Tkachenko)
# 1.8.0 (Jul 26, 2014)
* New SUDSAVerifier based on up-to-date macOS APIs (Zachary Waldowski)
* Detailed error log for failed signature checks (Kornel Lesiński)
* Converted Sparkle to ARC (C.W. Betts)
* Converted ivars to properties. (Jake Petroules)
* Cocoapod support (Xhacker Liu)
* Quarantine removal on OS X 10.10 (C.W. Betts)
* Quarantine removal on macOS 10.10 (C.W. Betts)
* Updated Japanese localization (1024jp)
* Added Greek localization
# 1.7.1
# 1.7.1 (Jul 2, 2014)
* Removed option to install unverified updates (Kornel Lesiński)
* Added detailed log when code signing verification fails (Sam Deane)
@@ -26,7 +345,7 @@
# 1.7.0
* Dropped support for OS X 10.6. Sparkle now supports 10.7 and newer (including 10.10 Yosemite) on 64-bit Intel Macs (the last 32-bit Mac was released in 2006).
* Dropped support for macOS 10.6. Sparkle now supports 10.7 and newer (including 10.10 Yosemite) on 64-bit Intel Macs (the last 32-bit Mac was released in 2006).
* Removed use of deprecated functions (Zachary Waldowski)
* Switched to modern Obj-C runtime and new literals syntax
* Removed pre-10.7 code. (C.W. Betts)
+74
View File
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at kornel+sparkle@geekhood.net. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
@@ -1,4 +1 @@
// BinaryDelta tool only
PRODUCT_NAME = BinaryDelta
GCC_PREFIX_HEADER =
+37 -7
View File
@@ -1,27 +1,51 @@
// Common
FINISH_INSTALL_TOOL_NAME = Autoupdate
SPARKLE_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle
SPARKLE_RELAUNCH_TOOL_NAME = Autoupdate
SPARKLE_FILEOP_TOOL_NAME = fileop
SPARKLE_APPEND_VERSION_NUMBER = 1
// Sparkle usually doesn't allow downgrades as they're usually accidental, but
// if your app has a downgrade function or URL handler, turn this on
SPARKLE_AUTOMATED_DOWNGRADES = 0
// If your app file on disk is named "MyApp 1.1b4", Sparkle usually updates it
// in place, giving you an app named 1.1b4 that is actually 1.2. Turn the
// following on to always reset the name back to "MyApp":
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0
SPARKLE_VERSION_MAJOR = 1
SPARKLE_VERSION_MINOR = 8
SPARKLE_VERSION_MINOR = 23
SPARKLE_VERSION_PATCH = 0
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION)
ALWAYS_SEARCH_USER_PATHS = NO
GCC_PRECOMPILE_PREFIX_HEADER = YES
GCC_PREFIX_HEADER = $(SDKROOT)/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h
ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_SYMBOLS_PRIVATE_EXTERN = YES
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
ARCHS = $(ARCHS_STANDARD)
MACOSX_DEPLOYMENT_TARGET = 10.7
PRODUCT_NAME = ${TARGET_NAME}
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
GCC_PREPROCESSOR_DEFINITIONS = FINISH_INSTALL_TOOL_NAME=$(FINISH_INSTALL_TOOL_NAME)
GCC_PREPROCESSOR_DEFINITIONS_COMMON = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_AUTOMATED_DOWNGRADES=$(SPARKLE_AUTOMATED_DOWNGRADES) SPARKLE_APPEND_VERSION_NUMBER=$(SPARKLE_APPEND_VERSION_NUMBER) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" SPARKLE_FILEOP_TOOL_NAME=\"$(SPARKLE_FILEOP_TOOL_NAME)\"
ENABLE_HARDENED_RUNTIME = YES;
CLANG_ENABLE_OBJC_ARC = YES
GCC_ENABLE_PASCAL_STRINGS = NO
GCC_NO_COMMON_BLOCKS = YES;
COMBINE_HIDPI_IMAGES = NO;
// Enable warnings
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
CLANG_ENABLE_MODULES = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_ASSIGN_ENUM = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
@@ -30,9 +54,11 @@ CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES
CLANG_WARN_OBJC_RECEIVER_WEAK = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
CLANG_WARN_UNREACHABLE_CODE = YES
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
@@ -55,8 +81,12 @@ GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VARIABLE = YES
// Fixes a strange issue where the compiler thinks references to some enums are ambiguous
CLANG_ENABLE_MODULES[sdk=macosx10.7] = NO
CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO
// These should be removed once the conversion to ARC is complete
WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties
// Turn on all warnings, then disable a few which are almost impossible to avoid
WARNING_CFLAGS = -Wall -Weverything -Wno-empty-translation-unit -Wno-unused-macros -Wno-gnu-statement-expression -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak $(WARNING_CFLAGS_EXTRA)
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments $(WARNING_CFLAGS_EXTRA)
@@ -0,0 +1,10 @@
#include "ConfigCommonDebug.xcconfig"
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = YES
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
+8 -2
View File
@@ -2,10 +2,16 @@
// Debug only
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
GCC_OPTIMIZATION_LEVEL = 0
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
SPARKLE_EXTRA_DEBUG = -DDEBUG
OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG)
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON) DEBUG=1
ONLY_ACTIVE_ARCH = YES
COPY_PHASE_STRIP = NO
@@ -2,9 +2,16 @@
// Release only
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
GCC_OPTIMIZATION_LEVEL = s
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON)
DEAD_CODE_STRIPPING = YES
GCC_TREAT_WARNINGS_AS_ERRORS = NO
GCC_WARN_UNINITIALIZED_AUTOS = YES
+5
View File
@@ -0,0 +1,5 @@
// Fileop tool only
PRODUCT_NAME = $(SPARKLE_FILEOP_TOOL_NAME)
SKIP_INSTALL = YES
CLANG_ENABLE_MODULES = NO
+5 -4
View File
@@ -1,12 +1,13 @@
// Framework only
INSTALL_PATH = @loader_path/../Frameworks
DYLIB_INSTALL_NAME_BASE = @rpath
DYLIB_COMPATIBILITY_VERSION = 1.6
DYLIB_CURRENT_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
PRODUCT_NAME = Sparkle
WRAPPER_EXTENSION = framework
FRAMEWORK_VERSION = A
INFOPLIST_FILE = Sparkle/Sparkle-Info.plist
GCC_PREFIX_HEADER = Sparkle/Sparkle.pch
SKIP_INSTALL = YES
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BUILDING_SPARKLE=1
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
SKIP_INSTALL = YES
DEFINES_MODULE = YES
PRODUCT_BUNDLE_IDENTIFIER = ${SPARKLE_BUNDLE_IDENTIFIER}
@@ -1,2 +1,4 @@
#include "ConfigFramework.xcconfig"
// Unit tests need access to non-public classes
GCC_SYMBOLS_PRIVATE_EXTERN = NO
@@ -0,0 +1,7 @@
// Generate Appcast only
#include "ConfigSwift.xcconfig"
SWIFT_OBJC_BRIDGING_HEADER = generate_appcast/Appcast-Bridging-Header.h
MACOSX_DEPLOYMENT_TARGET = 10.11
PRODUCT_NAME = generate_appcast
@@ -0,0 +1,4 @@
// Generate Appcast Debug
#include "ConfigGenerateAppcast.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -0,0 +1,4 @@
// Generate Appcast Release
#include "ConfigGenerateAppcast.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
@@ -0,0 +1,7 @@
// Generate Appcast only
#include "ConfigSwift.xcconfig"
SWIFT_OBJC_BRIDGING_HEADER = generate_keys/Bridging-Header.h
MACOSX_DEPLOYMENT_TARGET = 10.11
PRODUCT_NAME = generate_keys
@@ -0,0 +1,4 @@
// Generate Appcast Debug
#include "ConfigGenerateKeys.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -0,0 +1,4 @@
// Generate Appcast Release
#include "ConfigGenerateKeys.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
+2 -2
View File
@@ -1,8 +1,8 @@
// Relaunch Tool only
INFOPLIST_FILE = Sparkle/Autoupdate/Autoupdate-Info.plist
PRODUCT_NAME = $(FINISH_INSTALL_TOOL_NAME)
PRODUCT_NAME = $(SPARKLE_RELAUNCH_TOOL_NAME)
SKIP_INSTALL = YES
GCC_PREFIX_HEADER = Sparkle/Autoupdate/Autoupdate.pch
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CLANG_ENABLE_MODULES = NO
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
+2
View File
@@ -0,0 +1,2 @@
SWIFT_VERSION = 4.2
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
+1
View File
@@ -0,0 +1 @@
SWIFT_OPTIMIZATION_LEVEL = -Onone
@@ -0,0 +1 @@
SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+2 -2
View File
@@ -1,7 +1,7 @@
// Test Application only
INFOPLIST_FILE = TestApplication/TestApplication-Info.plist
PRODUCT_NAME = Sparkle Test App
WRAPPER_EXTENSION = app
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CLANG_ENABLE_OBJC_ARC = NO
LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.SparkleTestApp
+13
View File
@@ -0,0 +1,13 @@
// UI Test only
#include "ConfigSwift.xcconfig"
INFOPLIST_FILE = UITests/UITests-Info.plist
WRAPPER_EXTENSION = xctest
MACOSX_DEPLOYMENT_TARGET = 10.11
FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR)
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
TEST_TARGET_NAME = Sparkle Test App
USES_XCTRUNNER = YES
@@ -0,0 +1,4 @@
#include "ConfigUITest.xcconfig"
GCC_GENERATE_TEST_COVERAGE_FILES = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
@@ -0,0 +1,2 @@
#include "ConfigUITest.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -0,0 +1,2 @@
#include "ConfigUITest.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
+9 -1
View File
@@ -1,6 +1,14 @@
// Unit Test only
#include "ConfigSwift.xcconfig"
INFOPLIST_FILE = Tests/SparkleTests-Info.plist
PRODUCT_NAME = Sparkle Unit Tests
WRAPPER_EXTENSION = xctest
OTHER_CFLAGS = $(inherited) -iframework"$(DEVELOPER_FRAMEWORKS_DIR)" -iframework"$(PLATFORM_DIR)/Developer/Library/Frameworks"
GCC_SYMBOLS_PRIVATE_EXTERN = NO
WARNING_CFLAGS = $(inherited) -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments
FRAMEWORK_SEARCH_PATHS = $(inherited) $(DEVELOPER_FRAMEWORKS_DIR)
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
MACOSX_DEPLOYMENT_TARGET = 10.9
CLANG_ENABLE_MODULES = YES
SWIFT_OBJC_BRIDGING_HEADER = Tests/Sparkle Unit Tests-Bridging-Header.h
@@ -0,0 +1,4 @@
#include "ConfigUnitTest.xcconfig"
GCC_GENERATE_TEST_COVERAGE_FILES = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
@@ -1 +1,2 @@
#include "ConfigUnitTest.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -1 +1,2 @@
#include "ConfigUnitTest.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
+3
View File
@@ -0,0 +1,3 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
#include "bsdiff-Shared.xcconfig"
+3
View File
@@ -0,0 +1,3 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
#include "bsdiff-Shared.xcconfig"
+14
View File
@@ -0,0 +1,14 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
// Deployment
SKIP_INSTALL = YES
// Packaging
EXECUTABLE_PREFIX = lib
PRODUCT_NAME = $(TARGET_NAME)
// Search Paths
ALWAYS_SEARCH_USER_PATHS = NO
// Disable Warnings - this is a third-party project, and we'll trust that the maintainers know what they're doing.
WARNING_CFLAGS = $(inherited) -Wno-comma
+3
View File
@@ -0,0 +1,3 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
#include "ed25519-Shared.xcconfig"
+3
View File
@@ -0,0 +1,3 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
#include "ed25519-Shared.xcconfig"
+14
View File
@@ -0,0 +1,14 @@
// Copyright © 2019 Sparkle Project. All rights reserved.
// Deployment
SKIP_INSTALL = YES
// Packaging
EXECUTABLE_PREFIX = lib
PRODUCT_NAME = $(TARGET_NAME)
// Search Paths
ALWAYS_SEARCH_USER_PATHS = NO
// Disable Warnings - this is a third-party project, and we'll trust that the maintainers know what they're doing.
WARNING_CFLAGS = $(inherited) -Wno-cast-qual -Wno-conversion -Wno-sign-conversion
+23 -3
View File
@@ -2,6 +2,15 @@
set -e
if [ "$ACTION" = "" ] ; then
# If using cocoapods, sanity check that the Podspec version matches the Sparkle version
if [ -x "$(command -v pod)" ]; then
spec_version=$(printf "require 'cocoapods'\nspec = %s\nprint spec.version" "$(cat "$SRCROOT/Sparkle.podspec")" | LANG=en_US.UTF-8 ruby)
if [ "$spec_version" != "$CURRENT_PROJECT_VERSION" ] ; then
echo "podspec version '$spec_version' does not match the current project version '$CURRENT_PROJECT_VERSION'" >&2
exit 1
fi
fi
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2"
@@ -9,11 +18,22 @@ if [ "$ACTION" = "" ] ; then
cp "$SRCROOT/CHANGELOG" "$SRCROOT/LICENSE" "$SRCROOT/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$SRCROOT/bin" "$CONFIGURATION_BUILD_DIR/staging"
cp "$CONFIGURATION_BUILD_DIR/BinaryDelta" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp "$CONFIGURATION_BUILD_DIR/generate_appcast" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp "$CONFIGURATION_BUILD_DIR/generate_keys" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp "$CONFIGURATION_BUILD_DIR/sign_update" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
# Only copy dSYMs for Release builds, but don't check for the presence of the actual files
# because missing dSYMs in a release build SHOULD trigger a build failure
if [ "$CONFIGURATION" = "Release" ] ; then
cp -R "$CONFIGURATION_BUILD_DIR/BinaryDelta.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/generate_appcast.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/generate_keys.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/sign_update.dSYM" "$CONFIGURATION_BUILD_DIR/staging/bin"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle Test App.app.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework.dSYM" "$CONFIGURATION_BUILD_DIR/staging"
fi
cd "$CONFIGURATION_BUILD_DIR/staging"
# Sorted file list groups similar files together, which improves tar compression
+40
View File
@@ -0,0 +1,40 @@
#!/bin/sh
set -e
if ! which -s git ; then
exit 0
fi
if [ -z "$SRCROOT" ] || \
[ -z "$BUILT_PRODUCTS_DIR" ] || \
[ -z "$INFOPLIST_PATH" ] || \
[ -z "$CURRENT_PROJECT_VERSION" ]; then
echo "$0: Must be run from Xcode!" 1>&2
exit 1
fi
version="$CURRENT_PROJECT_VERSION"
# Get version in format 1.x.x-commits-hash
gitversion=$( cd "$SRCROOT"; git describe --tags --match '[12].*' || true )
if [ -z "$gitversion" ] ; then
echo "$0: Can't find a Git hash!" 1>&2
exit 0
fi
# remove everything before the first "-" to keep the hash part only
versionsuffix=${gitversion#*-};
if [ "$versionsuffix" != "$gitversion" ]; then
version="$version $versionsuffix"
fi
# and use it to set the CFBundleShortVersionString value
export PATH="$PATH:/usr/libexec"
if [ -f "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" ] ; then
oldversion=$(PlistBuddy -c "Print :CFBundleShortVersionString" "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH")
fi
if [ "$version" != "$oldversion" ] ; then
PlistBuddy -c "Set :CFBundleShortVersionString '$version'" \
"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
fi
+2 -2
View File
@@ -1,6 +1,6 @@
PROJECT_NAME = Sparkle
PROJECT_NUMBER = 1.7.1
PROJECT_BRIEF = "A software update framework for OS X"
PROJECT_NUMBER = 1.14.0
PROJECT_BRIEF = "A software update framework for macOS"
PROJECT_LOGO = Resources/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png
RECURSIVE = YES
+1
View File
@@ -5,6 +5,7 @@ if [ "$ACTION" = "" ] ; then
doxygen Documentation/Doxyfile
else
echo "warning: Doxygen not found in PATH"
echo "open Terminal and type this command 'brew install doxygen' then click 'enter/return' key. finally build this target again"
fi
elif [ "$ACTION" = "clean" ] ; then
rm -rf "$SRCROOT/Documentation/html"
+15 -8
View File
@@ -1,9 +1,10 @@
© 2006-2013 Andy Matuschak
© 2009-2013 Elgato Systems GmbH.
© 2011-2014 Kornel Lesiński
© 2014 C.W. Betts
© 2014 Petroules Corporation, Sparkle Project contributors
© 2014 Big Nerd Ranch
Copyright (c) 2006-2013 Andy Matuschak.
Copyright (c) 2009-2013 Elgato Systems GmbH.
Copyright (c) 2011-2014 Kornel Lesiński.
Copyright (c) 2015-2017 Mayur Pawashe.
Copyright (c) 2014 C.W. Betts.
Copyright (c) 2014 Petroules Corporation.
Copyright (c) 2014 Big Nerd Ranch.
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -27,8 +28,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
EXTERNAL LICENSES
=================
bspatch.c and bsdiff.c, from bsdiff 4.3 <http://www.daemonology.net/bsdiff/>: © 2003-2005 Colin Percival.
SUDSAVerifier.m: © 2011 Mark Hamlin.
bspatch.c and bsdiff.c, from bsdiff 4.3 <http://www.daemonology.net/bsdiff/>:
Copyright (c) 2003-2005 Colin Percival.
sais.c and sais.c, from sais-lite (2010/08/07) <https://sites.google.com/site/yuta256/sais>:
Copyright (c) 2008-2010 Yuta Mori.
SUDSAVerifier.m:
Copyright (c) 2011 Mark Hamlin.
All rights reserved.
+29 -5
View File
@@ -1,6 +1,10 @@
.PHONY: all localizable-strings release build test travis
.PHONY: all localizable-strings release build test ci
BUILDDIR := $(shell mktemp -d "$(TMPDIR)/Sparkle.XXXXXX")
all: build
ifndef BUILDDIR
BUILDDIR := $(shell mktemp -d "$(TMPDIR)/Sparkle.XXXXXX")
endif
localizable-strings:
rm -f Sparkle/en.lproj/Sparkle.strings
@@ -9,13 +13,33 @@ localizable-strings:
rm Sparkle/en.lproj/Localizable.strings
release:
xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)"
xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build
open -R "$(BUILDDIR)/Build/Products/Release/Sparkle-"*.tar.bz2
cat Sparkle.podspec
@echo "Don't forget to update CocoaPods! pod trunk push"
build:
xcodebuild clean build
test:
xcodebuild -target 'Sparkle Unit Tests' -scheme 'Sparkle' test
xcodebuild -scheme Distribution -configuration Debug test
./objc_dep/objc_dep.py -t .
travis: test
uitest:
xcodebuild -scheme UITests -configuration Debug test
ci:
for i in {7..9} ; do \
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build ) || exit 1 ; \
fi ; \
done
for i in {10..12} ; do \
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build test ) || exit 1 ; \
fi ; \
done
check-localizations:
./Sparkle/CheckLocalizations.swift -root . -htmlPath "$(TMPDIR)/LocalizationsReport.htm"
open "$(TMPDIR)/LocalizationsReport.htm"
+24
View File
@@ -0,0 +1,24 @@
# To update the icon run make -f Makefile-icon
# Requires:
# autoconf, automake, libtool, pkg-config, pngquant
ICONDIR=./Resources/Images.xcassets/AppIcon.appiconset
OPTIMIZEDICONS=$(ICONDIR)/optimized_16x16.png $(ICONDIR)/optimized_32x32.png $(ICONDIR)/optimized_128x128.png $(ICONDIR)/optimized_512x512.png
DESTICON=Resources/AppIcon.icns
all: $(DESTICON)
libicns:
git clone https://github.com/pornel/libicns.git
libicns/Makefile: libicns
( cd libicns && autoreconf -vif && ./configure )
libicns/icnsutils/png2icns: libicns/Makefile
( cd libicns && make -j8 )
optimized_%.png: icon_%.png
pngquant -s1 -f -o $@ $<
$(DESTICON): libicns/icnsutils/png2icns $(OPTIMIZEDICONS)
./libicns/icnsutils/png2icns $@ $(OPTIMIZEDICONS)
+61 -23
View File
@@ -1,30 +1,68 @@
# Sparkle <img src="Resources/Sparkle.png" width=48 height=48 alt=""/>
is an easy-to-use software update framework for Cocoa developers.
# Sparkle 1.x [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/Sparkle.svg?maxAge=2592000)]() <a href="https://www.stackpath.com/?utm_source=sparkle-github&amp;utm_medium=badge&amp;utm_campaign=readme"><img src="https://img.shields.io/badge/sponsored%20by-StackPath-orange.svg" alt="sponsored by: StackPath"></a>
[![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle)
Secure and reliable software update framework for Cocoa developers.
## Changes since 1.5b
<img src="Resources/Screenshot.png" width="732" alt="Sparkle shows familiar update window with release notes">
* Up-to-date with 10.10 SDK and Xcode 6. Supports OS X 10.7+.
* Cleaned up and modernized code, using ARC and Autolayout.
* Merged bugfixes, security fixes and some features from multiple Sparkle forks.
* Truly automatic background updates (no UI at all) when user agreed to "Automatically download and install updates in the future."
* Ability to mark updates as critical.
* Progress and status notifications for the host app.
* Name of finish_installation.app can be configured to match your app's name.
This branch is the production ready, battle-tested version of Sparkle used by thousands of Mac apps.
The upcoming Sparkle 2 (currently in beta) can be found in the [2.x branch](https://github.com/sparkle-project/Sparkle/tree/2.x).
## Features
* True self-updating—the user can choose to automatically download and install all updates.
* Displays a detailed progress window to the user.
* Supports authentication for installing in secure locations.
* Supports Apple code signing and DSA signatures for ultra-secure updates.
* Easy to install. Sparkle requires no code in your app, so it's trivial to upgrade or remove the framework.
* Uses appcasts for release information. Appcasts are supported by 3rd party update-tracking programs and websites.
* Displays release notes to the user via WebKit.
* Sparkle doesn't bug the user until second launch for better first impressions.
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
* Deep delegate support to make Sparkle work exactly as you need.
* Optionally sends system information to the server when checking for updates.
* Seamless. There's no mention of Sparkle; your icons and app name are used.
* Secure. Updates are verified using EdDSA signatures and Apple Code Signing.
* Fast. Supports delta updates which only patch files that have changed.
* Easy to install. Sparkle requires no code in your app, and only needs static files on a web server.
* Supports bundles, preference panes, plugins, and other non-.app software. Can install .pkg files for more complicated products.
* Supports branches due to minimum OS version requirements.
* Handles permissions, quarantine and automatically asks for authentication if needed.
* Uses RSS-based appcasts for release information. Appcasts are a de-facto standard supported by 3rd party update-tracking programs and websites.
* Stays hidden until second launch for better first impressions.
* Truly self-updating — the user can choose to automatically download and install all updates in the background.
* Ability to mark updates as critical.
* Progress and status notifications for the host app.
## Requirements
* Runtime: macOS 10.7 or greater
* Build: Xcode 9 and 10.11 SDK or greater
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
* No sandboxing. Sparkle 1.x can't update sandboxed apps. [Sparkle 2.x](https://github.com/sparkle-project/Sparkle/tree/2.x) can.
## Usage
See [getting started guide](https://sparkle-project.org/documentation/). No code is necessary, but a bit of Xcode configuration is required.
## Development
This repository uses git submodules, and will not build unless you clone recursively. Also, GitHub-provided ZIP/tar archives are broken due to GitHub not supporting git submodules properly.
git clone --recursive https://github.com/sparkle-project/Sparkle
### Troubleshooting
* Please check **Console.app**. Sparkle prints detailed information there about all problems it encounters. It often also suggests solutions to the problems, so please read Sparkle's log messages carefully.
* Use the `generate_appcast` tool which creates appcast files, correct signatures, and delta updates automatically.
* Make sure the URL specified in [`SUFeedURL`](https://sparkle-project.org/documentation/customization/) is valid (typos/404s are a common error!), and that it uses modern TLS ([test it](https://www.ssllabs.com/ssltest/)).
* Delete your app's preferences (in `~/Library/Preferences/<your bundle id>`) if you've set another feed URL programmatically via Sparkle's Objective-C interface.
### API symbols
Sparkle is built with `-fvisibility=hidden -fvisibility-inlines-hidden` which means no symbols are exported by default.
If you are adding a symbol to the public API you must decorate the declaration with the `SU_EXPORT` macro (grep the source code for examples).
### Building the distribution package
`cd` to the root of the Sparkle source tree and run `make release`. Sparkle-*VERSION*.tar.bz2 will be created in a temporary directory and revealed in Finder after the build has completed.
Alternatively, build the Distribution scheme in the Xcode UI.
### Code of Conduct
We pledge to have an open and welcoming environment. See our [Code of Conduct](CODE_OF_CONDUCT.md).
## Project Sponsor
[StackPath](https://www.stackpath.com/?utm_source=sparkle-github&utm_medium=link&utm_campaign=readme-footer)
Binary file not shown.
@@ -43,18 +43,21 @@
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256@2x.png",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512@2x.png",
"scale" : "2x"
}
],
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

+96 -10
View File
@@ -16,6 +16,8 @@
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac7,1</key>
<string>iMac Intel Core 2 Duo (aluminum enclosure)</string>
<key>iMac8,1</key>
<string>iMac (Core 2 Duo, 20 or 24 inch, Early 2008 )</string>
<key>iMac9,1</key>
@@ -25,7 +27,7 @@
<key>iMac11,1</key>
<string>iMac (Core i5 or i7, 27 inch Late 2009)</string>
<key>iMac11,2</key>
<string>iMac (Core i3 or i5, 27 inch Mid 2010)</string>
<string>21.5&quot; iMac (mid 2010)</string>
<key>iMac11,3</key>
<string>iMac (Core i5 or i7, 27 inch Mid 2010)</string>
<key>iMac12,1</key>
@@ -42,6 +44,16 @@
<string>iMac (Core i5 or i7, 27 inch Late 2013)</string>
<key>iMac14,3</key>
<string>iMac (Core i5 or i7, 21.5 inch Late 2013)</string>
<key>iMac14,4</key>
<string>iMac (Core i5, 21.5 inch Mid 2014)</string>
<key>iMac15,1</key>
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2014 or Mid 2015)</string>
<key>iMac16,1</key>
<string>iMac (Core i5, 21,5 inch Late 2015)</string>
<key>iMac16,2</key>
<string>iMac (Retina 4K Core i5 or i7, 21.5 inch Late 2015)</string>
<key>iMac17,1</key>
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2015)</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
@@ -56,6 +68,8 @@
<string>MacBook (Core 2 Duo, Late 2009, Unibody)</string>
<key>MacBook7,1</key>
<string>MacBook (Core 2 Duo, Mid 2010, White)</string>
<key>MacBook8,1</key>
<string>MacBook (Core M, 12 inch, Early 2015)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (Core 2 Duo, 13 inch, Early 2008)</string>
<key>MacBookAir2,1</key>
@@ -76,6 +90,10 @@
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2013 or Early 2014)</string>
<key>MacBookAir6,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2013 or Early 2014)</string>
<key>MacBookAir7,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Early 2015)</string>
<key>MacBookAir7,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Early 2015)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
@@ -90,8 +108,70 @@
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>MacBookPro5,1</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,2</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,3</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,4</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,5</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro6,1</key>
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
<key>MacBookPro6,2</key>
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
<key>MacBookPro7,1</key>
<string>MacBook Pro Intel Core 2 Duo (mid 2010)</string>
<key>MacBookPro8,1</key>
<string>MacBook Pro Intel Core i5, Intel Core i7, 13&quot; (early 2011)</string>
<key>MacBookPro8,2</key>
<string>MacBook Pro Intel Core i7, 15&quot; (early 2011)</string>
<key>MacBookPro8,3</key>
<string>MacBook Pro Intel Core i7, 17&quot; (early 2011)</string>
<key>MacBookPro9,1</key>
<string>MacBook Pro (15-inch, Mid 2012)</string>
<key>MacBookPro9,2</key>
<string>MacBook Pro (13-inch, Mid 2012)</string>
<key>MacBookPro10,1</key>
<string>MacBook Pro (Retina, Mid 2012)</string>
<key>MacBookPro10,2</key>
<string>MacBook Pro (Retina, 13-inch, Late 2012)</string>
<key>MacBookPro11,1</key>
<string>MacBook Pro (Retina, 13-inch, Late 2013)</string>
<key>MacBookPro11,2</key>
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
<key>MacBookPro11,3</key>
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
<key>MacbookPro11,4</key>
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
<key>MacbookPro11,5</key>
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
<key>MacbookPro12,1 </key>
<string>MacBook Pro (Retina, 13-inch, Early 2015)</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>Macmini2,1</key>
<string>Mac mini Intel Core</string>
<key>Macmini3,1</key>
<string>Mac mini Intel Core</string>
<key>Macmini4,1</key>
<string>Mac mini Intel Core (Mid 2010)</string>
<key>Macmini5,1</key>
<string>Mac mini (Core i5, Mid 2011)</string>
<key>Macmini5,2</key>
<string>Mac mini (Core i5 or Core i7, Mid 2011)</string>
<key>Macmini5,3</key>
<string>Mac mini (Core i7, Server, Mid 2011)</string>
<key>Macmini6,1</key>
<string>Mac mini (Core i5, Late 2012)</string>
<key>Macmini6,2</key>
<string>Mac mini (Core i7, Normal or Server, Late 2012)</string>
<key>Macmini7,1</key>
<string>Mac mini (Core i5 or Core i7, Late 2014)</string>
<key>MacPro1,1,Quad</key>
<string>Mac Pro</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
@@ -101,7 +181,9 @@
<key>MacPro4,1</key>
<string>Mac Pro (March 2009)</string>
<key>MacPro5,1</key>
<string>Mac Pro (August 2010)</string>
<string>Mac Pro (2010 or 2012)</string>
<key>MacPro6,1</key>
<string>Mac Pro (Late 2013)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
@@ -164,14 +246,6 @@
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
@@ -198,6 +272,8 @@
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac5,2</key>
<string>Power Mac G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
@@ -214,6 +290,14 @@
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
@@ -224,5 +308,7 @@
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
<key>Xserve3,1</key>
<string>Xserve (early 2009)</string>
</dict>
</plist>
+3 -1
View File
@@ -2,7 +2,6 @@
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Your Great App's Changelog</title>
<link>http://you.com/app/appcast.xml</link>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
@@ -11,6 +10,7 @@
http://you.com/app/2.0.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
<enclosure url="http://you.com/app/Your%20Great%20App%202.0.zip" sparkle:version="2.0" length="1623481" type="application/octet-stream" sparkle:dsaSignature="BAFJW4B6B1K1JyW30nbkBwainOzrN6EQuAh" />
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
</item>
@@ -21,6 +21,7 @@
http://you.com/app/1.5.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 01 Jan 2006 12:20:11 +0000</pubDate>
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
<enclosure url="http://you.com/app/Your%20Great%20App%201.5.zip" sparkle:version="1.5" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" />
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
</item>
@@ -32,6 +33,7 @@
http://you.com/app/1.4.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 25 Dec 2005 12:20:11 +0000</pubDate>
<!-- Sparkle 1.21+ uses sparkle::edSignature="ed25519" instead of sparkle::dsaSignature="deprecated DSA" -->
<enclosure url="http://you.com/app/Your%20Great%20App%201.4.zip" sparkle:version="241" sparkle:shortVersionString="1.4" sparkle:dsaSignature="MC0CFBfeCa1JyW30nbkBwainOzrN6EQuAh=" length="1472349" type="application/octet-stream" />
<sparkle:minimumSystemVersion>10.7</sparkle:minimumSystemVersion>
</item>
Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

+19 -12
View File
@@ -1,26 +1,33 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "1.7.1"
s.summary = "A software update framework for OS X"
s.version = "1.22.0"
s.summary = "A software update framework for macOS"
s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers."
s.homepage = "https://github.com/sparkle-project/Sparkle"
s.homepage = "http://sparkle-project.org"
s.documentation_url = "http://sparkle-project.org/documentation/"
s.screenshot = "http://sparkle-project.org/images/screenshot-noshadow@2x.png"
s.license = {
:type => 'MIT',
:file => 'LICENSE'
}
s.authors = {
'Andy Matuschak' => 'andy@andymatuschak.org',
'Mayur Pawashe' => 'zorgiepoo@gmail.com',
'Kornel Lesiński' => 'pornel@pornel.net',
'C.W. Betts' => 'computers57@hotmail.com',
'Jake Petroules' => 'jake.petroules@petroules.com',
'C.W. Betts' => 'computers57@hotmail.com',
'Andy Matuschak' => 'andy@andymatuschak.org',
}
s.platform = :osx
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.zip" }
s.platform = :osx, '10.7'
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" }
s.source_files = 'Sparkle.framework/Versions/A/Headers/*.h'
s.public_header_files = 'Sparkle.framework/Headers/*.h'
s.vendored_framework = 'Sparkle.framework'
s.resources = 'Sparkle.framework'
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Sparkle"' }
s.requires_arc = false
s.preserve_paths = 'bin/*'
s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h'
s.vendored_frameworks = 'Sparkle.framework'
s.xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Sparkle"',
'LD_RUNPATH_SEARCH_PATHS' => '@loader_path/../Frameworks'
}
s.requires_arc = true
end
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "14732BC51960F69300593899"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "612279D80DB5470200AB99EA"
BuildableName = "Sparkle Unit Tests.xctest"
BlueprintName = "Sparkle Unit Tests"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "14732BC51960F69300593899"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "14732BC51960F69300593899"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "14732BC51960F69300593899"
BuildableName = "Distribution"
BlueprintName = "Distribution"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
LastUpgradeVersion = "0920"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
@@ -23,10 +23,11 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
@@ -48,16 +49,20 @@
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugXPCServices = "NO"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
@@ -72,10 +77,10 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "726B2B5C1C645FC900388755"
BuildableName = "UI Tests.xctest"
BlueprintName = "UI Tests"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
BuildableName = "generate_appcast"
BlueprintName = "generate_appcast"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
BuildableName = "generate_appcast"
BlueprintName = "generate_appcast"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
BuildableName = "generate_appcast"
BlueprintName = "generate_appcast"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5AA96C541E0AE0DB00CA4346"
BuildableName = "generate_appcast"
BlueprintName = "generate_appcast"
ReferencedContainer = "container:Sparkle.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+20
View File
@@ -0,0 +1,20 @@
//
// AppKitPrevention.h
// Sparkle
//
// Created by Mayur Pawashe on 1/17/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
// #include (not #import) this header to prevent AppKit from being imported
// Note this should be your LAST #include in your implementation file
// If this error is triggered, you can have Xcode indicate to you which source file including this header caused the issue
// One may wonder for certain targets where AppKit is banned completely, why just not link AppKit instead.
// Well, Xcode has thing called auto-linking that I don't trust very much.
// Even after trying to disable the setting, I've had targets able to link to AppKit without AppKit being specified in the list of linked libraries.
#ifdef _APPKITDEFINES_H
#error This is a core or daemon-safe module and should NOT import AppKit
#endif
+3 -1
View File
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@@ -28,5 +28,7 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleIconFile</key>
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}.icns</string>
</dict>
</plist>
+202 -167
View File
@@ -1,10 +1,13 @@
#import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#import "SULocalizations.h"
#import "SUErrors.h"
#import "SUInstaller.h"
#import "SUHost.h"
#import "SUStandardVersionComparator.h"
#import "SUStatusController.h"
#import "SUPlainInstallerInternals.h"
#import "SULog.h"
#import "SUInstallerProtocol.h"
#import "TerminationListener.h"
#include <unistd.h>
@@ -14,209 +17,241 @@
static const NSTimeInterval SUInstallationTimeLimit = 5;
/*!
* Time this app uses to recheck if the parent has already died.
* Terminate the application after a delay from launching the new update to avoid OS activation issues
* This delay should be be high enough to increase the likelihood that our updated app will be launched up front,
* but should be low enough so that the user doesn't ponder why the updater hasn't finished terminating yet
*/
static const NSTimeInterval SUParentQuitCheckInterval = .25;
static const NSTimeInterval SUTerminationTimeDelay = 0.5;
@interface TerminationListener : NSObject <SUInstallerDelegate>
@interface AppInstaller : NSObject <NSApplicationDelegate>
@property (assign) const char *hostpath;
@property (assign) const char *executablepath;
@property (assign) pid_t parentprocessid;
@property (assign) const char *folderpath;
@property (copy) NSString *selfPath;
@property (copy) NSString *installationPath;
@property (strong) NSTimer *watchdogTimer;
@property (strong) NSTimer *longInstallationTimer;
@property (strong) SUHost *host;
@property (assign) BOOL shouldRelaunch;
@property (assign) BOOL shouldShowUI;
- (void)parentHasQuit;
- (void)relaunch;
- (void)install;
- (void)showAppIconInDock:(NSTimer *)aTimer;
- (void)watchdog:(NSTimer *)aTimer;
/*
* hostPath - path to host (original) application
* relaunchPath - path to what the host wants to relaunch (default is same as hostPath)
* parentProcessId - process identifier of the host before launching us
* updateFolderPath - path to update folder (i.e, temporary directory containing the new update)
* shouldRelaunch - indicates if the new installed app should re-launched
* shouldShowUI - indicates if we should show the status window when installing the update
*/
- (instancetype)initWithHostPath:(NSString *)hostPath relaunchPath:(NSString *)relaunchPath parentProcessId:(pid_t)parentProcessId updateFolderPath:(NSString *)updateFolderPath shouldRelaunch:(BOOL)shouldRelaunch shouldShowUI:(BOOL)shouldShowUI;
@end
@implementation TerminationListener
@interface AppInstaller ()
@synthesize hostpath;
@synthesize executablepath;
@synthesize parentprocessid;
@synthesize folderpath;
@property (nonatomic, strong) TerminationListener *terminationListener;
@property (nonatomic, strong) SUStatusController *statusController;
@synthesize selfPath;
@synthesize installationPath;
@synthesize watchdogTimer;
@synthesize longInstallationTimer;
@synthesize host;
@synthesize shouldRelaunch;
@synthesize shouldShowUI;
@property (nonatomic, copy) NSString *updateFolderPath;
@property (nonatomic, copy) NSString *hostPath;
@property (nonatomic, copy) NSString *relaunchPath;
@property (nonatomic, assign) BOOL shouldRelaunch;
@property (nonatomic, assign) BOOL shouldShowUI;
- (instancetype)initWithHostPath:(const char *)inhostpath executablePath:(const char *)execpath parentProcessId:(pid_t)ppid folderPath:(const char *)infolderpath shouldRelaunch:(BOOL)relaunch shouldShowUI:(BOOL)showUI selfPath:(NSString *)inSelfPath
@property (nonatomic, assign) BOOL isTerminating;
@end
@implementation AppInstaller
@synthesize terminationListener = _terminationListener;
@synthesize statusController = _statusController;
@synthesize updateFolderPath = _updateFolderPath;
@synthesize hostPath = _hostPath;
@synthesize relaunchPath = _relaunchPath;
@synthesize shouldRelaunch = _shouldRelaunch;
@synthesize shouldShowUI = _shouldShowUI;
@synthesize isTerminating = _isTerminating;
- (instancetype)initWithHostPath:(NSString *)hostPath relaunchPath:(NSString *)relaunchPath parentProcessId:(pid_t)parentProcessId updateFolderPath:(NSString *)updateFolderPath shouldRelaunch:(BOOL)shouldRelaunch shouldShowUI:(BOOL)shouldShowUI
{
if (!(self = [super init])) {
return nil;
}
hostpath = inhostpath;
executablepath = execpath;
parentprocessid = ppid;
folderpath = infolderpath;
selfPath = inSelfPath;
shouldRelaunch = relaunch;
shouldShowUI = showUI;
BOOL alreadyTerminated = (getppid() == 1); // ppid is launchd (1) => parent terminated already
if (alreadyTerminated)
[self parentHasQuit];
else
watchdogTimer = [NSTimer scheduledTimerWithTimeInterval:SUParentQuitCheckInterval target:self selector:@selector(watchdog:) userInfo:nil repeats:YES];
self.hostPath = hostPath;
self.relaunchPath = relaunchPath;
SULog(SULogLevelDefault, @"PID to listen: %d", parentProcessId);
self.terminationListener = [[TerminationListener alloc] initWithProcessIdentifier:@(parentProcessId)];
self.updateFolderPath = updateFolderPath;
self.shouldRelaunch = shouldRelaunch;
self.shouldShowUI = shouldShowUI;
return self;
}
- (void)dealloc
- (void)applicationDidFinishLaunching:(NSNotification __unused *)notification
{
[longInstallationTimer invalidate];
}
- (void)parentHasQuit
{
[self.watchdogTimer invalidate];
self.longInstallationTimer = [NSTimer scheduledTimerWithTimeInterval:SUInstallationTimeLimit
target: self selector: @selector(showAppIconInDock:)
userInfo:nil repeats:NO];
if (self.folderpath)
[self.terminationListener startListeningWithCompletion:^(BOOL terminationSuccess) {
self.terminationListener = nil;
if (!terminationSuccess) {
SULog(SULogLevelError, @"Failed to listen for application termination");
// Continue on with the installation anyway?
}
if (self.shouldShowUI) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUInstallationTimeLimit * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (!self.isTerminating) {
// Show app icon in the dock
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
}
});
}
[self install];
else
[self relaunch];
}];
}
- (void)watchdog:(NSTimer *)__unused aTimer
- (void)showError:(NSError *)error
{
if (![NSRunningApplication runningApplicationWithProcessIdentifier:self.parentprocessid]) {
[self parentHasQuit];
if (self.shouldShowUI) {
NSAlert *alert = [[NSAlert alloc] init];
alert.messageText = @"";
alert.informativeText = [NSString stringWithFormat:@"%@", [error localizedDescription]];
[alert runModal];
}
}
- (void)showAppIconInDock:(NSTimer *)__unused aTimer
{
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
}
- (void)relaunch __attribute__((noreturn))
{
if (self.shouldRelaunch)
{
NSString *appPath = nil;
if (!self.folderpath || strcmp(self.executablepath, self.hostpath) != 0)
appPath = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:self.executablepath length:strlen(self.executablepath)];
else
appPath = self.installationPath;
[[NSWorkspace sharedWorkspace] openFile:appPath];
}
if (self.folderpath)
{
NSError *theError = nil;
if (![SUPlainInstaller _removeFileAtPath:[SUInstaller updateFolder] error:&theError])
SULog(@"Couldn't remove update folder: %@.", theError);
}
[[NSFileManager defaultManager] removeItemAtPath:self.selfPath error:NULL];
exit(EXIT_SUCCESS);
}
- (void)install
{
NSBundle *theBundle = [NSBundle bundleWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:self.hostpath length:strlen(self.hostpath)]];
self.host = [[SUHost alloc] initWithBundle:theBundle];
self.installationPath = [[self.host installationPath] copy];
if (self.shouldShowUI) {
SUStatusController *statusCtl = [[SUStatusController alloc] initWithHost:self.host]; // We quit anyway after we've installed, so leak this for now.
[statusCtl setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
[statusCtl beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
maxProgressValue: 0 statusText: @""];
[statusCtl showWindow:self];
NSBundle *theBundle = [NSBundle bundleWithPath:self.hostPath];
SUHost *host = [[SUHost alloc] initWithBundle:theBundle];
NSString *fileOperationToolPath = [[[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@""SPARKLE_FILEOP_TOOL_NAME];
if (![[NSFileManager defaultManager] fileExistsAtPath:fileOperationToolPath]) {
SULog(SULogLevelError, @"Potential Installation Error: File operation tool path %@ is not found", fileOperationToolPath);
}
NSError *retrieveInstallerError = nil;
id<SUInstallerProtocol> installer = [SUInstaller installerForHost:host fileOperationToolPath:fileOperationToolPath updateDirectory:self.updateFolderPath error:&retrieveInstallerError];
if (installer == nil) {
SULog(SULogLevelError, @"Retrieved Installer Error: %@", retrieveInstallerError);
exit(EXIT_FAILURE);
}
if (self.shouldShowUI && [installer canInstallSilently]) {
self.statusController = [[SUStatusController alloc] initWithHost:host];
[self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
maxProgressValue:100 statusText: @""];
[self.statusController showWindow:self];
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *initialInstallationError = nil;
if (![installer performInitialInstallation:&initialInstallationError]) {
SULog(SULogLevelError, @"Failed to perform initial installation with error: %@", initialInstallationError);
dispatch_async(dispatch_get_main_queue(), ^{
[self showError:initialInstallationError];
exit(EXIT_FAILURE);
});
return;
}
void(^progressBlock)(double) = ^(double progress){
dispatch_async(dispatch_get_main_queue(), ^(){
self.statusController.progressValue = progress * 100.0;
});
};
[SUInstaller installFromUpdateFolder:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:self.folderpath length:strlen(self.folderpath)]
overHost:self.host
installationPath:self.installationPath
delegate:self
versionComparator:[SUStandardVersionComparator defaultComparator]];
NSError *finalInstallationError = nil;
if (![installer performFinalInstallationProgressBlock:progressBlock error:&finalInstallationError]) {
NSError *underlyingError = [finalInstallationError.userInfo objectForKey:NSUnderlyingErrorKey];
dispatch_async(dispatch_get_main_queue(), ^{
if (underlyingError == nil || underlyingError.code != SUInstallationCancelledError) {
SULog(SULogLevelError, @"Failed to perform final installation Error: %@", finalInstallationError);
[self showError:finalInstallationError];
}
exit(EXIT_FAILURE);
});
return;
}
NSString *installationPath = [installer installationPath];
dispatch_async(dispatch_get_main_queue(), ^{
NSString *pathToRelaunch = nil;
// If the relaunch path is the same as the host bundle path, use the installation path from the installer which may be normalized
// Otherwise use the requested relaunch path in all other cases
if ([self.relaunchPath.pathComponents isEqualToArray:host.bundlePath.pathComponents]) {
pathToRelaunch = installationPath;
} else {
pathToRelaunch = self.relaunchPath;
}
[self cleanupAndTerminateWithPathToRelaunch:pathToRelaunch];
});
});
}
- (void)installerFinishedForHost:(SUHost *)__unused aHost
- (void)cleanupAndTerminateWithPathToRelaunch:(NSString *)relaunchPath
{
[self relaunch];
}
- (void)installerForHost:(SUHost *)__unused host failedWithError:(NSError *)error __attribute__((noreturn))
{
if (self.shouldShowUI)
NSRunAlertPanel(@"", @"%@", @"OK", @"", @"", [error localizedDescription]);
exit(EXIT_FAILURE);
self.isTerminating = YES;
dispatch_block_t cleanupAndExit = ^{
NSError *theError = nil;
if (![[NSFileManager defaultManager] removeItemAtPath:self.updateFolderPath error:&theError]) {
SULog(SULogLevelError, @"Couldn't remove update folder: %@.", theError);
}
[[NSFileManager defaultManager] removeItemAtPath:[[NSBundle mainBundle] bundlePath] error:NULL];
exit(EXIT_SUCCESS);
};
if (self.shouldRelaunch) {
// The auto updater can terminate before the newly updated app is finished launching
// If that happens, the OS may not make the updated app active and frontmost
// (Or it does become frontmost, but the OS backgrounds it afterwards.. It's some kind of timing/activation issue that doesn't occur all the time)
// The only remedy I've been able to find is waiting an arbitrary delay before exiting our application
// Don't use -launchApplication: because we may not be launching an application. Eg: it could be a system prefpane
if (![[NSWorkspace sharedWorkspace] openFile:relaunchPath]) {
SULog(SULogLevelError, @"Failed to launch %@", relaunchPath);
}
[self.statusController close];
// Don't even think about hiding the app icon from the dock if we've already shown it
// Transforming the app back to a background one has a backfiring effect, decreasing the likelihood
// that the updated app will be brought up front
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUTerminationTimeDelay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
cleanupAndExit();
});
} else {
cleanupAndExit();
}
}
@end
int main(int argc, const char *argv[])
int main(int __unused argc, const char __unused *argv[])
{
if (argc < 5 || argc > 7) {
return EXIT_FAILURE;
}
@autoreleasepool {
//ProcessSerialNumber psn = { 0, kCurrentProcess };
//TransformProcessType( &psn, kProcessTransformToForegroundApplication );
#if 0 // Cmdline tool
NSString* selfPath = nil;
if (argv[0][0] == '/') {
selfPath = [[NSFileManager defaultManager] stringWithFileSystemRepresentation: argv[0] length: strlen(argv[0])];
}
else
{
selfPath = [[NSFileManager defaultManager] currentDirectoryPath];
selfPath = [selfPath stringByAppendingPathComponent: [[NSFileManager defaultManager] stringWithFileSystemRepresentation: argv[0] length: strlen(argv[0])]];
}
#else
NSString *selfPath = [[NSBundle mainBundle] bundlePath];
#endif
BOOL shouldShowUI = (argc > 6) ? !!atoi(argv[6]) : YES;
if (shouldShowUI)
{
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
@autoreleasepool
{
NSArray<NSString *> *args = [[NSProcessInfo processInfo] arguments];
if (args.count < 5 || args.count > 7) {
return EXIT_FAILURE;
}
NSApplication *application = [NSApplication sharedApplication];
[NSApplication sharedApplication];
TerminationListener *termListen = [[TerminationListener alloc] initWithHostPath:(argc > 1) ? argv[1] : NULL
executablePath:(argc > 2) ? argv[2] : NULL
parentProcessId:(argc > 3) ? atoi(argv[3]) : 0
folderPath:(argc > 4) ? argv[4] : NULL
shouldRelaunch:(argc > 5) ? !!atoi(argv[5]) : YES
shouldShowUI:shouldShowUI
selfPath:selfPath];
[termListen class];
[[NSApplication sharedApplication] run];
BOOL shouldShowUI = (args.count > 6) ? [[args objectAtIndex:6] boolValue] : YES;
if (shouldShowUI) {
[application activateIgnoringOtherApps:YES];
}
AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:[args objectAtIndex:1]
relaunchPath:[args objectAtIndex:2]
parentProcessId:[[args objectAtIndex:3] intValue]
updateFolderPath:[args objectAtIndex:4]
shouldRelaunch:(args.count > 5) ? [[args objectAtIndex:5] boolValue] : YES
shouldShowUI:shouldShowUI];
[application setDelegate:appInstaller];
[application run];
}
return EXIT_SUCCESS;
-16
View File
@@ -1,16 +0,0 @@
//
// Sparkle.pch
// Sparkle
//
// Created by Andy Matuschak on 7/23/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#define SPARKLE_BUNDLE [NSBundle mainBundle]
#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", SPARKLE_BUNDLE, comment)
#define SUAbstractFail() NSAssert2(nil, @"Can't call %@ on an instance of %@; this is an abstract method!", __PRETTY_FUNCTION__, [self class]);
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import "SUConstants.h"
#endif
+24
View File
@@ -0,0 +1,24 @@
//
// TerminationListener.h
// Sparkle
//
// Created by Mayur Pawashe on 3/7/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TerminationListener : NSObject
- (instancetype)initWithProcessIdentifier:(NSNumber * _Nullable)processIdentifier;
@property (nonatomic, readonly) BOOL terminated;
// If the process identifier provided was nil, then the completion block will invoke immediately with a YES success
- (void)startListeningWithCompletion:(void (^)(BOOL success))completionBlock;
@end
NS_ASSUME_NONNULL_END
+136
View File
@@ -0,0 +1,136 @@
//
// TerminationListener.m
// Sparkle
//
// Created by Mayur Pawashe on 3/7/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import "TerminationListener.h"
#import "SULog.h"
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include "AppKitPrevention.h"
@interface TerminationListener ()
@property (nonatomic, readonly, nullable) NSNumber *processIdentifier;
@property (nonatomic) BOOL watchedTermination;
@property (nonatomic, copy) void (^completionBlock)(BOOL);
@end
@implementation TerminationListener
@synthesize completionBlock = _completionBlock;
@synthesize processIdentifier = _processIdentifier;
@synthesize watchedTermination = _watchedTermination;
- (instancetype)initWithProcessIdentifier:(NSNumber * _Nullable)processIdentifier
{
self = [super init];
if (self != nil) {
_processIdentifier = processIdentifier;
}
return self;
}
- (BOOL)terminated
{
return (self.watchedTermination || self.processIdentifier == nil) ? YES : (kill(self.processIdentifier.intValue, 0) != 0);
}
- (void)invokeCompletionWithSuccess:(BOOL)success
{
if (self.completionBlock != nil) {
self.completionBlock(success);
self.completionBlock = nil;
}
}
- (void)startListeningWithCompletion:(void (^)(BOOL))completionBlock
{
self.completionBlock = completionBlock;
if (self.processIdentifier == nil) {
[self invokeCompletionWithSuccess:YES];
return;
}
// Use kqueues to determine when the process will terminate
// As described in https://developer.apple.com/library/mac/technotes/tn2050/_index.html#//apple_ref/doc/uid/DTS10003081-CH1-SUBSECTION10
// By using kqueues, we can stay away from using AppKit in case we ever decide to abandon it
pid_t processIdentifier = self.processIdentifier.intValue;
int queue = kqueue();
if (queue == -1) {
SULog(SULogLevelError, @"Failed to create kqueue() due to error %d: %@", errno, @(strerror(errno)));
[self invokeCompletionWithSuccess:NO];
return;
}
struct kevent changes;
EV_SET(&changes, processIdentifier, EVFILT_PROC, EV_ADD | EV_RECEIPT, NOTE_EXIT, 0, NULL);
if (kevent(queue, &changes, 1, &changes, 1, NULL) == -1) {
SULog(SULogLevelError, @"Failed to invoke kevent() due to error %d: %@", errno, @(strerror(errno)));
[self invokeCompletionWithSuccess:NO];
return;
}
// We will assume this terminationListener will never be deallocated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
CFFileDescriptorContext context = { 0, (void *)CFBridgingRetain(self), NULL, NULL, NULL };
#pragma clang diagnostic pop
CFFileDescriptorRef noteExitKQueueRef = CFFileDescriptorCreate(NULL, queue, true, noteExitKQueueCallback, &context);
if (noteExitKQueueRef == NULL) {
SULog(SULogLevelError, @"Failed to create file descriptor via CFFileDescriptorCreate()");
CFRelease((__bridge CFTypeRef)(self));
[self invokeCompletionWithSuccess:NO];
return;
}
CFRunLoopSourceRef runLoopSource = CFFileDescriptorCreateRunLoopSource(NULL, noteExitKQueueRef, 0);
if (runLoopSource == NULL) {
SULog(SULogLevelError, @"Failed to create runLoopSource via CFFileDescriptorCreateRunLoopSource()");
CFRelease((__bridge CFTypeRef)(self));
[self invokeCompletionWithSuccess:NO];
return;
}
CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopDefaultMode);
CFRelease(runLoopSource);
CFFileDescriptorEnableCallBacks(noteExitKQueueRef, kCFFileDescriptorReadCallBack);
// Make sure we didn't set the listener callback to a dead PID
// If we did, we could hang forever. To avoid this, we check if the process has terminated *after* we set up the callback
// If we tried to do this check before setting the callback, we could run into an issue where the process can terminate after our check
// but before setting the callback
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)
{
struct kevent event;
kevent(CFFileDescriptorGetNativeDescriptor(file), NULL, 0, &event, 1, NULL);
TerminationListener *self = CFBridgingRelease(info);
self.watchedTermination = YES;
[self invokeCompletionWithSuccess:YES];
}
@end
+115
View File
@@ -0,0 +1,115 @@
#!/usr/bin/xcrun swift
import Foundation
func die(_ msg: String) {
print("ERROR: \(msg)")
exit(1)
}
extension XMLElement {
convenience init(name: String, attributes: [String: String], stringValue string: String? = nil) {
self.init(name: name, stringValue: string)
setAttributesWith(attributes)
}
}
let ud = UserDefaults.standard
let sparkleRoot = ud.object(forKey: "root") as? String
let htmlPath = ud.object(forKey: "htmlPath") as? String
if sparkleRoot == nil || htmlPath == nil {
die("Missing arguments")
}
let enStringsPath = sparkleRoot! + "/Sparkle/en.lproj/Sparkle.strings"
let enStringsDict = NSDictionary(contentsOfFile: enStringsPath)
if enStringsDict == nil {
die("Invalid English strings")
}
let enStringsDictKeys = enStringsDict!.allKeys
let dirPath = NSString(string: sparkleRoot! + "/Sparkle")
let dirContents = try! FileManager.default.contentsOfDirectory(atPath: dirPath as String)
let css =
"body { font-family: sans-serif; font-size: 10pt; }" +
"h1 { font-size: 12pt; }" +
".missing { background-color: #FFBABA; color: #D6010E; white-space: pre; }" +
".unused { background-color: #BDE5F8; color: #00529B; white-space: pre; }" +
".unlocalized { background-color: #FEEFB3; color: #9F6000; white-space: pre; }"
var html = XMLDocument(rootElement: XMLElement(name: "html"))
html.dtd = XMLDTD()
html.dtd!.name = html.rootElement()!.name
html.characterEncoding = "UTF-8"
html.documentContentKind = XMLDocument.ContentKind.xhtml
var body = XMLElement(name: "body")
var head = XMLElement(name: "head")
html.rootElement()!.addChild(head)
html.rootElement()!.addChild(body)
head.addChild(XMLElement(name: "meta", attributes: ["charset": html.characterEncoding!]))
head.addChild(XMLElement(name: "title", stringValue: "Sparkle Localizations Report"))
head.addChild(XMLElement(name: "style", stringValue: css))
let locale = Locale.current
for dirEntry in dirContents {
if NSString(string: dirEntry).pathExtension != "lproj" || dirEntry == "en.lproj" {
continue
}
let lang = (locale as NSLocale).displayName(forKey: NSLocale.Key.languageCode, value: NSString(string: dirEntry).deletingPathExtension)
body.addChild(XMLElement(name: "h1", stringValue: "\(dirEntry) (\(lang!))"))
let stringsPath = NSString(string: dirPath.appendingPathComponent(dirEntry)).appendingPathComponent("Sparkle.strings")
let stringsDict = NSDictionary(contentsOfFile: stringsPath)
if stringsDict == nil {
die("Invalid strings file \(dirEntry)")
continue
}
var missing: [String] = []
var unlocalized: [String] = []
var unused: [String] = []
for key in enStringsDictKeys {
let str = stringsDict?.object(forKey: key) as? String
if str == nil {
missing.append(key as! String)
} else if let enStr = enStringsDict?.object(forKey: key) as? String {
if enStr == str {
unlocalized.append(key as! String)
}
}
}
let stringsDictKeys = stringsDict!.allKeys
for key in stringsDictKeys {
if enStringsDict?.object(forKey: key) == nil {
unused.append(key as! String)
}
}
let sorter = { (s1: String, s2: String) -> Bool in
return s1 < s2
}
missing.sort(by: sorter)
unlocalized.sort(by: sorter)
unused.sort(by: sorter)
let addRow = { (prefix: String, cssClass: String, key: String) -> Void in
body.addChild(XMLElement(name: "span", attributes: ["class": cssClass], stringValue: [prefix, key].joined(separator: " ") + "\n"))
}
for key in missing {
addRow("Missing", "missing", key)
}
for key in unlocalized {
addRow("Unlocalized", "unlocalized", key)
}
for key in unused {
addRow("Unused", "unused", key)
}
}
var err: NSError?
if !((try? html.xmlData.write(to: URL(fileURLWithPath: htmlPath!), options: [.atomic])) != nil) {
die("Can't write report: \(err!)")
}
+9
View File
@@ -0,0 +1,9 @@
html {
color: #FFFFFFD8;
}
:link {
color: #419CFF;
}
:link:active {
color: #FF1919;
}
+43
View File
@@ -0,0 +1,43 @@
//
// SPUDownloadData.h
// Sparkle
//
// Created by Mayur Pawashe on 8/10/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
NS_ASSUME_NONNULL_BEGIN
/*!
* A class for containing downloaded data along with some information about it.
*/
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>
- (instancetype)initWithData:(NSData *)data textEncodingName:(NSString * _Nullable)textEncodingName MIMEType:(NSString * _Nullable)MIMEType;
/*!
* The raw data that was downloaded.
*/
@property (nonatomic, readonly) NSData *data;
/*!
* The IANA charset encoding name if available. Eg: "utf-8"
*/
@property (nonatomic, readonly, nullable, copy) NSString *textEncodingName;
/*!
* The MIME type if available. Eg: "text/plain"
*/
@property (nonatomic, readonly, nullable, copy) NSString *MIMEType;
@end
NS_ASSUME_NONNULL_END
+75
View File
@@ -0,0 +1,75 @@
//
// SPUDownloadData.m
// Sparkle
//
// Created by Mayur Pawashe on 8/10/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import "SPUDownloadData.h"
#import "SUOperatingSystem.h"
#include "AppKitPrevention.h"
static NSString *SPUDownloadDataKey = @"SPUDownloadData";
static NSString *SPUDownloadTextEncodingKey = @"SPUDownloadTextEncoding";
static NSString *SPUDownloadMIMETypeKey = @"SPUDownloadMIMEType";
@implementation SPUDownloadData
@synthesize data = _data;
@synthesize textEncodingName = _textEncodingName;
@synthesize MIMEType = _MIMEType;
+ (BOOL)supportsSecureCoding
{
return YES;
}
- (instancetype)initWithData:(NSData *)data textEncodingName:(NSString * _Nullable)textEncodingName MIMEType:(NSString *)MIMEType
{
self = [super init];
if (self != nil) {
_data = data;
_textEncodingName = textEncodingName;
_MIMEType = MIMEType;
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:self.data forKey:SPUDownloadDataKey];
if (self.textEncodingName != nil) {
[coder encodeObject:self.textEncodingName forKey:SPUDownloadTextEncodingKey];
}
if (self.MIMEType != nil) {
[coder encodeObject:self.MIMEType forKey:SPUDownloadMIMETypeKey];
}
}
- (nullable instancetype)initWithCoder:(NSCoder *)decoder
{
if (SUAVAILABLE(10, 8)) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
NSData *data = [decoder decodeObjectOfClass:[NSData class] forKey:SPUDownloadDataKey];
if (data == nil) {
return nil;
}
NSString *textEncodingName = [decoder decodeObjectOfClass:[NSString class] forKey:SPUDownloadTextEncodingKey];
NSString *MIMEType = [decoder decodeObjectOfClass:[NSString class] forKey:SPUDownloadMIMETypeKey];
#pragma clang diagnostic pop
return [self initWithData:data textEncodingName:textEncodingName MIMEType:MIMEType];
} else {
abort(); // Not used on 10.7
}
}
@end
+25
View File
@@ -0,0 +1,25 @@
//
// SPUDownloader.h
// Downloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloaderProtocol.h"
@protocol SPUDownloaderDelegate;
// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface SPUDownloader : NSObject <SPUDownloaderProtocol>
// Due to XPC remote object reasons, this delegate is strongly referenced
// Invoke cleanup when done with this instance
- (instancetype)initWithDelegate:(id <SPUDownloaderDelegate>)delegate;
@end
+118
View File
@@ -0,0 +1,118 @@
//
// SPUDownloader.m
// Downloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import "SPUDownloader.h"
#import "SPUDownloaderDelegate.h"
#import "SPULocalCacheDirectory.h"
#import "SPUURLRequest.h"
#import "SPUDownloadData.h"
#import "SUErrors.h"
#import "SPUDownloader_Private.h"
#include "AppKitPrevention.h"
@interface SPUDownloader ()
@end
@implementation SPUDownloader
@synthesize delegate = _delegate;
@synthesize bundleIdentifier = _bundleIdentifier;
@synthesize desiredFilename = _desiredFilename;
@synthesize downloadFilename = _downloadFilename;
@synthesize disabledAutomaticTermination = _disabledAutomaticTermination;
@synthesize mode = _mode;
@synthesize receivedExpectedBytes = _receivedExpectedBytes;
- (instancetype)initWithDelegate:(id <SPUDownloaderDelegate>)delegate
{
self = [super init];
if (self != nil) {
_delegate = delegate;
}
return self;
}
// Don't implement dealloc - make the client call cleanup, which is the only way to remove the reference cycle from the delegate anyway
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)__unused request bundleIdentifier:(NSString *)__unused bundleIdentifier desiredFilename:(NSString *)__unused desiredFilename
{
}
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)__unused request
{
}
- (void)enableAutomaticTermination
{
if (self.disabledAutomaticTermination) {
[[NSProcessInfo processInfo] enableAutomaticTermination:SUDownloadingReason];
self.disabledAutomaticTermination = NO;
}
}
- (void)cleanup
{
[self enableAutomaticTermination];
self.delegate = nil;
if (self.mode == SPUDownloadModeTemporary && self.downloadFilename != nil)
{
[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:NULL];
self.downloadFilename = nil;
}
}
- (void)cancel
{
}
- (void)downloadDidFinish
{
}
-(void)downloadDidFinishWithData:(SPUDownloadData*)data
{
switch (self.mode) {
case SPUDownloadModeTemporary:
if (data != nil) {
[self.delegate downloaderDidFinishWithTemporaryDownloadData:data];
} else {
[self.delegate downloaderDidFailWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUDownloadError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to read temporary downloaded data from %@", self.downloadFilename]}]];
}
break;
case SPUDownloadModePersistent:
[self.delegate downloaderDidFinishWithTemporaryDownloadData:nil];
break;
}
}
-(NSString*)getAndCleanTempDirectory
{
NSString *rootPersistentDownloadCachePath = [[SPULocalCacheDirectory cachePathForBundleIdentifier:self.bundleIdentifier] stringByAppendingPathComponent:@"PersistentDownloads"];
[SPULocalCacheDirectory removeOldItemsInDirectory:rootPersistentDownloadCachePath];
NSString *tempDir = [SPULocalCacheDirectory createUniqueDirectoryInDirectory:rootPersistentDownloadCachePath];
if (tempDir == nil) {
// Okay, something's really broken with this user's file structure.
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Can't make a temporary directory for the update download at %@.", tempDir] }];
[self.delegate downloaderDidFailWithError:error];
[self cancel];
}
return tempDir;
}
@end
+38
View File
@@ -0,0 +1,38 @@
//
// SPUDownloaderDelegate.h
// Sparkle
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@class SPUDownloadData;
@protocol SPUDownloaderDelegate <NSObject>
// This is only invoked for persistent downloads
- (void)downloaderDidSetDestinationName:(NSString *)destinationName temporaryDirectory:(NSString *)temporaryDirectory;
// Under rare cases, this may be called more than once, in which case the current progress should be reset back to 0
// This is only invoked for persistent downloads
- (void)downloaderDidReceiveExpectedContentLength:(int64_t)expectedContentLength;
// This is only invoked for persistent downloads
- (void)downloaderDidReceiveDataOfLength:(uint64_t)length;
// downloadData is nil if this is a persisent download, otherwise it's non-nil if it's a temporary download
- (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData;
- (void)downloaderDidFailWithError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END
+13
View File
@@ -0,0 +1,13 @@
//
// SPUDownloaderDeprecated.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#import "SPUDownloader.h"
@interface SPUDownloaderDeprecated : SPUDownloader <SPUDownloaderProtocol>
@end
+168
View File
@@ -0,0 +1,168 @@
//
// SPUDownloaderDeprecated.m
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#import "SPUDownloaderDeprecated.h"
#import "SPUURLRequest.h"
#import "SPUDownloader_Private.h"
#import "SPUDownloadData.h"
#import "SPULocalCacheDirectory.h"
#import "SUErrors.h"
#include "AppKitPrevention.h"
@interface SPUDownloaderDeprecated () <NSURLDownloadDelegate>
@property (nonatomic) NSURLDownload *download;
@property (nonatomic) NSURLResponse *response;
@end
@implementation SPUDownloaderDeprecated
@synthesize download = _download;
@synthesize response = _response;
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename
{
dispatch_async(dispatch_get_main_queue(), ^{
if (self.download == nil && self.delegate != nil) {
// Prevent service from automatically terminating while downloading the update asynchronously without any reply blocks
[[NSProcessInfo processInfo] disableAutomaticTermination:SUDownloadingReason];
self.disabledAutomaticTermination = YES;
self.mode = SPUDownloadModePersistent;
self.desiredFilename = desiredFilename;
self.bundleIdentifier = bundleIdentifier;
self.download = [[NSURLDownload alloc] initWithRequest:request.request delegate:self];
}
});
}
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request
{
dispatch_async(dispatch_get_main_queue(), ^{
if (self.download == nil && self.delegate != nil) {
// Prevent service from automatically terminating while downloading the update asynchronously without any reply blocks
[[NSProcessInfo processInfo] disableAutomaticTermination:SUDownloadingReason];
self.disabledAutomaticTermination = YES;
self.mode = SPUDownloadModeTemporary;
self.download = [[NSURLDownload alloc] initWithRequest:request.request delegate:self];
}
});
}
- (void)download:(NSURLDownload *)__unused d decideDestinationWithSuggestedFilename:(NSString *)name
{
if (self.mode == SPUDownloadModeTemporary) {
// Files downloaded in temporary mode should not last for very long,
// so it's ideal to place them in a system temporary directory
NSString *destinationFilename = NSTemporaryDirectory();
if (destinationFilename) {
destinationFilename = [destinationFilename stringByAppendingPathComponent:name];
[self.download setDestination:destinationFilename allowOverwrite:NO];
}
} else {
NSString *tempDir = [super getAndCleanTempDirectory];
if (tempDir != nil) {
NSString *downloadFileName = self.desiredFilename;
NSString *downloadFileNameDirectory = [tempDir stringByAppendingPathComponent:downloadFileName];
NSError *createError = nil;
if (![[NSFileManager defaultManager] createDirectoryAtPath:downloadFileNameDirectory withIntermediateDirectories:NO attributes:nil error:&createError]) {
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Can't make a download file name %@ directory inside temporary directory for the update download at %@.", downloadFileName, downloadFileNameDirectory] }];
[self.delegate downloaderDidFailWithError:error];
} else {
[self.download setDestination:[downloadFileNameDirectory stringByAppendingPathComponent:name] allowOverwrite:YES];
[self.delegate downloaderDidSetDestinationName:name temporaryDirectory:downloadFileNameDirectory];
}
}
}
}
- (void)download:(NSURLDownload *)__unused aDownload didCreateDestination:(NSString *)path
{
self.downloadFilename = path;
}
- (void)download:(NSURLDownload *)__unused download didReceiveResponse:(NSURLResponse *)response
{
self.response = response;
if (self.mode == SPUDownloadModePersistent) {
// It might be tempting to send over the response object instead of the expected content length but this isn't a good idea
// For one, we are only ever concerned about the expected content length
// Another reason is that NSURLResponse doesn't support NSSecureCoding in older OS releases (eg: 10.8), which cause issues with XPC
[self.delegate downloaderDidReceiveExpectedContentLength:response.expectedContentLength];
}
}
- (void)download:(NSURLDownload *)__unused download didReceiveDataOfLength:(NSUInteger)length
{
if (self.mode == SPUDownloadModePersistent) {
[self.delegate downloaderDidReceiveDataOfLength:length];
}
}
- (void)downloadDidFinish:(NSURLDownload *)__unused d
{
[self downloadDidFinish];
[self cleanup];
}
- (void)download:(NSURLDownload *)__unused download didFailWithError:(NSError *)error
{
self.download = nil;
[self.delegate downloaderDidFailWithError:error];
[self cleanup];
}
- (BOOL)download:(NSURLDownload *)__unused download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
{
// We don't want the download system to extract our gzips for persistent downloads
// Note that we use a substring matching here instead of direct comparison because the docs say "application/gzip" but the system *uses* "application/x-gzip". This is a documentation bug.
return (self.mode == SPUDownloadModeTemporary || [encodingType rangeOfString:@"gzip"].location == NSNotFound);
}
- (void)downloadDidFinish
{
assert(self.response != nil);
assert(self.downloadFilename != nil);
SPUDownloadData *downloadData = nil;
if (self.mode == SPUDownloadModeTemporary) {
NSData *data = [NSData dataWithContentsOfFile:self.downloadFilename];
if (data != nil) {
downloadData = [[SPUDownloadData alloc] initWithData:data textEncodingName:self.response.textEncodingName MIMEType:self.response.MIMEType];
}
}
self.download = nil;
[super downloadDidFinishWithData:downloadData];
}
-(void)cleanup
{
[self.download cancel];
self.download = nil;
self.response = nil;
[super cleanup];
}
- (void)cancel
{
[self cleanup];
}
@end
+34
View File
@@ -0,0 +1,34 @@
//
// SPUDownloaderProtocol.h
// PersistentDownloader
//
// Created by Mayur Pawashe on 4/1/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@class SPUURLRequest;
// The protocol that this service will vend as its API. This header file will also need to be visible to the process hosting the service.
@protocol SPUDownloaderProtocol
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename;
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request;
- (void)downloadDidFinish;
- (void)cleanup;
- (void)cancel;
@end
NS_ASSUME_NONNULL_END
+20
View File
@@ -0,0 +1,20 @@
//
// SPUDownloaderSession.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SPUDownloader.h"
#import "SPUDownloaderProtocol.h"
NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0)
@interface SPUDownloaderSession : SPUDownloader <SPUDownloaderProtocol>
@end
+167
View File
@@ -0,0 +1,167 @@
//
// SPUDownloaderSession.m
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#import "SPUDownloaderSession.h"
#import "SPUURLRequest.h"
#import "SPUDownloader_Private.h"
#import "SPULocalCacheDirectory.h"
#import "SUErrors.h"
#import "SPUDownloadData.h"
#include "AppKitPrevention.h"
@interface SPUDownloaderSession () <NSURLSessionDelegate>
@property (nonatomic) NSURLSession *downloadSession;
@property (nonatomic) NSURLSessionDownloadTask *download;
@end
@implementation SPUDownloaderSession
@synthesize downloadSession = _downloadSession;
@synthesize download = _download;
- (void)startDownloadWithRequest:(SPUURLRequest *)request
{
NSOperationQueue *queue = [NSOperationQueue mainQueue];
self.downloadSession = [NSURLSession
sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]
delegate:self
delegateQueue:queue];
self.download = [self.downloadSession downloadTaskWithRequest:request.request];
[self.download resume];
}
- (void)startPersistentDownloadWithRequest:(SPUURLRequest *)request bundleIdentifier:(NSString *)bundleIdentifier desiredFilename:(NSString *)desiredFilename
{
dispatch_async(dispatch_get_main_queue(), ^{
if (self.download == nil && self.delegate != nil) {
// Prevent service from automatically terminating while downloading the update asynchronously without any reply blocks
[[NSProcessInfo processInfo] disableAutomaticTermination:SUDownloadingReason];
self.disabledAutomaticTermination = YES;
self.mode = SPUDownloadModePersistent;
self.desiredFilename = desiredFilename;
self.bundleIdentifier = bundleIdentifier;
[self startDownloadWithRequest:request];
}
});
}
- (void)startTemporaryDownloadWithRequest:(SPUURLRequest *)request
{
dispatch_async(dispatch_get_main_queue(), ^{
if (self.download == nil && self.delegate != nil) {
// Prevent service from automatically terminating while downloading the update asynchronously without any reply blocks
[[NSProcessInfo processInfo] disableAutomaticTermination:SUDownloadingReason];
self.disabledAutomaticTermination = YES;
self.mode = SPUDownloadModeTemporary;
[self startDownloadWithRequest:request];
}
});
}
- (void)URLSession:(NSURLSession *)__unused session downloadTask:(NSURLSessionDownloadTask *)__unused downloadTask didFinishDownloadingToURL:(NSURL *)location
{
if (self.mode == SPUDownloadModeTemporary) {
self.downloadFilename = location.path;
[self downloadDidFinish]; // file is already in a system temp dir
} else {
NSString *tempDir = [super getAndCleanTempDirectory];
if (tempDir != nil) {
NSString *downloadFileName = self.desiredFilename;
NSString *downloadFileNameDirectory = [tempDir stringByAppendingPathComponent:downloadFileName];
NSError *createError = nil;
if (![[NSFileManager defaultManager] createDirectoryAtPath:downloadFileNameDirectory withIntermediateDirectories:NO attributes:nil error:&createError]) {
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Can't make a download file name %@ directory inside temporary directory for the update download at %@.", downloadFileName, downloadFileNameDirectory] }];
[self.delegate downloaderDidFailWithError:error];
} else {
NSString *name = self.download.response.suggestedFilename;
if (!name) {
name = location.lastPathComponent; // This likely contains nothing useful to identify the file (e.g. CFNetworkDownload_87LVIz.tmp)
}
NSString *toPath = [downloadFileNameDirectory stringByAppendingPathComponent:name];
NSString *fromPath = location.path; // suppress moveItemAtPath: non-null warning
NSError *error = nil;
if ([[NSFileManager defaultManager] moveItemAtPath:fromPath toPath:toPath error:&error]) {
self.downloadFilename = toPath;
[self.delegate downloaderDidSetDestinationName:name temporaryDirectory:downloadFileNameDirectory];
[self downloadDidFinish];
} else {
[self.delegate downloaderDidFailWithError:error];
}
}
}
}
}
- (void)URLSession:(NSURLSession *)__unused session downloadTask:(NSURLSessionDownloadTask *)__unused downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)__unused totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
{
if (self.mode == SPUDownloadModePersistent && totalBytesExpectedToWrite > 0 && !self.receivedExpectedBytes) {
self.receivedExpectedBytes = YES;
[self.delegate downloaderDidReceiveExpectedContentLength:totalBytesExpectedToWrite];
}
if (self.mode == SPUDownloadModePersistent && bytesWritten >= 0) {
[self.delegate downloaderDidReceiveDataOfLength:(uint64_t)bytesWritten];
}
}
- (void)URLSession:(NSURLSession *)__unused session task:(NSURLSessionTask *)__unused task didCompleteWithError:(NSError *)error
{
self.download = nil;
if (error) {
[self.delegate downloaderDidFailWithError:error];
}
[self cleanup];
}
- (void)downloadDidFinish
{
assert(self.downloadFilename != nil);
SPUDownloadData *downloadData = nil;
if (self.mode == SPUDownloadModeTemporary) {
NSData *data = [NSData dataWithContentsOfFile:self.downloadFilename];
if (data != nil) {
NSURLResponse *response = self.download.response;
assert(response != nil);
downloadData = [[SPUDownloadData alloc] initWithData:data textEncodingName:response.textEncodingName MIMEType:response.MIMEType];
}
}
self.download = nil;
[super downloadDidFinishWithData:downloadData];
}
-(void)cleanup
{
[self.download cancel];
[self.downloadSession invalidateAndCancel];
self.download = nil;
self.downloadSession = nil;
[super cleanup];
}
- (void)cancel
{
[self cleanup];
}
// NSURLDownload has a [downlaod:shouldDecodeSourceDataOfMIMEType:] to determine if the data should be decoded.
// This does not exist for NSURLSessionDownloadTask and appears unnecessary. Data tasks will decode data, but not download tasks.
@end
+41
View File
@@ -0,0 +1,41 @@
//
// SPUDownloader_Private.h
// Sparkle
//
// Created by Deadpikle on 12/20/17.
// Copyright © 2017 Sparkle Project. All rights reserved.
//
#ifndef SPUDownloader_Private_h
#define SPUDownloader_Private_h
#import "SPUDownloaderDelegate.h"
typedef NS_ENUM(NSUInteger, SPUDownloadMode)
{
SPUDownloadModePersistent,
SPUDownloadModeTemporary
};
static NSString *SUDownloadingReason = @"Downloading update related file";
@interface SPUDownloader ()
// Delegate is intentionally strongly referenced; see header
@property (nonatomic) id <SPUDownloaderDelegate> delegate;
@property (nonatomic, copy) NSString *bundleIdentifier;
@property (nonatomic, copy) NSString *desiredFilename;
@property (nonatomic, copy) NSString *downloadFilename;
@property (nonatomic) BOOL disabledAutomaticTermination;
@property (nonatomic) SPUDownloadMode mode;
@property (nonatomic) BOOL receivedExpectedBytes;
// returns temp directory location if successful; if not successful,
// returns nil after sending error message to client and canceling download
-(NSString*)getAndCleanTempDirectory;
-(void)downloadDidFinishWithData:(SPUDownloadData*)data;
@end
#endif /* SPUDownloader_Private_h */
+35
View File
@@ -0,0 +1,35 @@
//
// SULocalCacheDirectory.h
// Sparkle
//
// Created by Mayur Pawashe on 6/23/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SPULocalCacheDirectory : NSObject
// Returns a path to a suitable cache directory to create specifically for Sparkle
// Intermediate directories to this path may not exist yet
// This path may depend on the type of running process,
// such that sandboxed vs non-sandboxed processes could yield different paths
// The caller should create a subdirectory from the path that is returned here so they don't have files that
// conflict with other callers. Once that subdirectory name is decided, the caller can remove old items inside it (using +removeOldItemsInDirectory:)
// and then create a unique temporary directory inside it (using +createUniqueDirectoryInDirectory:)
+ (NSString *)cachePathForBundleIdentifier:(NSString *)bundleIdentifier;
// Remove old files inside a directory
// A caller may want to invoke this on a directory they own rather than remove and re-create an entire directory
// This does nothing if the supplied directory does not exist yet
+ (void)removeOldItemsInDirectory:(NSString *)directory;
// Create a unique directory inside a parent directory
// The parent directory doesn't have to exist yet. If it doesn't exist, intermediate directories will be created.
+ (NSString * _Nullable)createUniqueDirectoryInDirectory:(NSString *)directory;
@end
NS_ASSUME_NONNULL_END
+80
View File
@@ -0,0 +1,80 @@
//
// SULocalCacheDirectory.m
// Sparkle
//
// Created by Mayur Pawashe on 6/23/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import "SPULocalCacheDirectory.h"
#import "SULog.h"
#include "AppKitPrevention.h"
static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days
@implementation SPULocalCacheDirectory
// It is important to note this may return a different path whether invoked from a sanboxed vs non-sandboxed process, or from a different user
// For this reason, this method should not be a part of SUHost because its behavior depends on what kind of process it's being invoked from
+ (NSString *)cachePathForBundleIdentifier:(NSString *)bundleIdentifier
{
NSURL *cacheURL = [[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:NULL];
assert(cacheURL != nil);
NSString *resultPath = [[[cacheURL URLByAppendingPathComponent:bundleIdentifier] URLByAppendingPathComponent:@SPARKLE_BUNDLE_IDENTIFIER] path];
assert(resultPath != nil);
return resultPath;
}
+ (void)removeOldItemsInDirectory:(NSString *)directory
{
NSMutableArray<NSString *> *filePathsToRemove = [NSMutableArray array];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:directory]) {
NSDirectoryEnumerator *directoryEnumerator = [fileManager enumeratorAtPath:directory];
NSDate *currentDate = [NSDate date];
for (NSString *filename in directoryEnumerator)
{
NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:[directory stringByAppendingPathComponent:filename] error:NULL];
if (fileAttributes != nil)
{
NSDate *lastModificationDate = [fileAttributes objectForKey:NSFileModificationDate];
if ([currentDate timeIntervalSinceDate:lastModificationDate] >= OLD_ITEM_DELETION_INTERVAL)
{
[filePathsToRemove addObject:[directory stringByAppendingPathComponent:filename]];
}
}
[directoryEnumerator skipDescendants];
}
for (NSString *filename in filePathsToRemove)
{
[fileManager removeItemAtPath:filename error:NULL];
}
}
}
+ (NSString * _Nullable)createUniqueDirectoryInDirectory:(NSString *)directory
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *createError = nil;
if (![fileManager createDirectoryAtPath:directory withIntermediateDirectories:YES attributes:nil error:&createError]) {
SULog(SULogLevelError, @"Failed to create directory with intermediate components at %@ with error %@", directory, createError);
return nil;
}
NSString *templateString = [directory stringByAppendingPathComponent:@"XXXXXXXXX"];
char buffer[PATH_MAX] = {0};
if ([templateString getFileSystemRepresentation:buffer maxLength:sizeof(buffer)]) {
if (mkdtemp(buffer) != NULL) {
return [[NSString alloc] initWithUTF8String:buffer];
}
}
return nil;
}
@end
+35
View File
@@ -0,0 +1,35 @@
//
// SPUURLRequest.h
// Sparkle
//
// Created by Mayur Pawashe on 5/19/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN
// A class that wraps NSURLRequest and implements NSSecureCoding
// This class exists because NSURLRequest did not support NSSecureCoding in macOS 10.8
// I have not verified if NSURLRequest in 10.9 implements NSSecureCoding or not
@interface SPUURLRequest : NSObject <NSSecureCoding>
// Creates a new URL request
// Only these properties are currently tracked:
// * URL
// * Cache policy
// * Timeout interval
// * HTTP header fields
// * networkServiceType
+ (instancetype)URLRequestWithRequest:(NSURLRequest *)request;
@property (nonatomic, readonly) NSURLRequest *request;
@end
NS_ASSUME_NONNULL_END
+102
View File
@@ -0,0 +1,102 @@
//
// SPUURLRequest.m
// Sparkle
//
// Created by Mayur Pawashe on 5/19/16.
// Copyright © 2016 Sparkle Project. All rights reserved.
//
#import "SPUURLRequest.h"
#import "SUOperatingSystem.h"
#include "AppKitPrevention.h"
static NSString *SPUURLRequestURLKey = @"SPUURLRequestURL";
static NSString *SPUURLRequestCachePolicyKey = @"SPUURLRequestCachePolicy";
static NSString *SPUURLRequestTimeoutIntervalKey = @"SPUURLRequestTimeoutInterval";
static NSString *SPUURLRequestHttpHeaderFieldsKey = @"SPUURLRequestHttpHeaderFields";
static NSString *SPUURLRequestNetworkServiceTypeKey = @"SPUURLRequestNetworkServiceType";
@interface SPUURLRequest ()
@property (nonatomic, readonly) NSURL *url;
@property (nonatomic, readonly) NSURLRequestCachePolicy cachePolicy;
@property (nonatomic, readonly) NSTimeInterval timeoutInterval;
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *httpHeaderFields;
@property (nonatomic, readonly) NSURLRequestNetworkServiceType networkServiceType;
@end
@implementation SPUURLRequest
@synthesize url = _url;
@synthesize cachePolicy = _cachePolicy;
@synthesize timeoutInterval = _timeoutInterval;
@synthesize httpHeaderFields = _httpHeaderFields;
@synthesize networkServiceType = _networkServiceType;
- (instancetype)initWithURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval httpHeaderFields:(NSDictionary<NSString *, NSString *> *)httpHeaderFields networkServiceType:(NSURLRequestNetworkServiceType)networkServiceType
{
self = [super init];
if (self != nil) {
_url = url;
_cachePolicy = cachePolicy;
_timeoutInterval = timeoutInterval;
_httpHeaderFields = httpHeaderFields;
_networkServiceType = networkServiceType;
}
return self;
}
+ (instancetype)URLRequestWithRequest:(NSURLRequest *)request
{
return [(SPUURLRequest *)[[self class] alloc] initWithURL:request.URL cachePolicy:request.cachePolicy timeoutInterval:request.timeoutInterval httpHeaderFields:request.allHTTPHeaderFields networkServiceType:request.networkServiceType];
}
+ (BOOL)supportsSecureCoding
{
return YES;
}
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:self.url forKey:SPUURLRequestURLKey];
[coder encodeInteger:(NSInteger)self.cachePolicy forKey:SPUURLRequestCachePolicyKey];
[coder encodeDouble:self.timeoutInterval forKey:SPUURLRequestTimeoutIntervalKey];
[coder encodeInteger:(NSInteger)self.networkServiceType forKey:SPUURLRequestNetworkServiceTypeKey];
if (self.httpHeaderFields != nil) {
[coder encodeObject:self.httpHeaderFields forKey:SPUURLRequestHttpHeaderFieldsKey];
}
}
- (instancetype)initWithCoder:(NSCoder *)decoder
{
if (SUAVAILABLE(10, 8)) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
NSURL *url = [decoder decodeObjectOfClass:[NSURL class] forKey:SPUURLRequestURLKey];
NSURLRequestCachePolicy cachePolicy = (NSURLRequestCachePolicy)[decoder decodeIntegerForKey:SPUURLRequestCachePolicyKey];
NSTimeInterval timeoutInterval = [decoder decodeDoubleForKey:SPUURLRequestTimeoutIntervalKey];
NSDictionary<NSString *, NSString *> *httpHeaderFields = [decoder decodeObjectOfClasses:[NSSet setWithArray:@[[NSDictionary class], [NSString class]]] forKey:SPUURLRequestHttpHeaderFieldsKey];
#pragma clang diagnostic pop
NSURLRequestNetworkServiceType networkServiceType = (NSURLRequestNetworkServiceType)[decoder decodeIntegerForKey:SPUURLRequestNetworkServiceTypeKey];
return [self initWithURL:url cachePolicy:cachePolicy timeoutInterval:timeoutInterval httpHeaderFields:httpHeaderFields networkServiceType:networkServiceType];
} else {
abort(); // Not used on 10.7
}
}
- (NSURLRequest *)request
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:self.url cachePolicy:self.cachePolicy timeoutInterval:self.timeoutInterval];
if (self.httpHeaderFields != nil) {
request.allHTTPHeaderFields = self.httpHeaderFields;
}
request.networkServiceType = self.networkServiceType;
return [request copy];
}
@end
+15 -10
View File
@@ -9,22 +9,27 @@
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@protocol SUAppcastDelegate;
#if __has_feature(modules)
@import Foundation;
#else
#import <Foundation/Foundation.h>
#endif
#import "SUExport.h"
NS_ASSUME_NONNULL_BEGIN
@class SUAppcastItem;
@interface SUAppcast : NSObject <NSURLDownloadDelegate>
SU_EXPORT @interface SUAppcast : NSObject
@property (weak) id<SUAppcastDelegate> delegate;
@property (copy) NSString *userAgentString;
@property (copy, nullable) NSString *userAgentString;
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
- (SUAppcast *)copyWithoutDeltaUpdates;
@property (readonly, copy) NSArray *items;
@property (readonly, copy, nullable) NSArray *items;
@end
@protocol SUAppcastDelegate <NSObject>
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
NS_ASSUME_NONNULL_END
#endif
+259 -167
View File
@@ -6,14 +6,20 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "SUUpdater.h"
#import "SUAppcast.h"
#import "SUAppcastItem.h"
#import "SUVersionComparisonProtocol.h"
#import "SUAppcast.h"
#import "SUConstants.h"
#import "SULog.h"
#import "SULocalizations.h"
#import "SUErrors.h"
#import "SPUURLRequest.h"
#import "SUOperatingSystem.h"
#import "SPUDownloadData.h"
#import "SPUDownloaderDelegate.h"
#import "SPUDownloaderDeprecated.h"
#import "SPUDownloaderSession.h"
#include "AppKitPrevention.h"
@interface NSXMLElement (SUAppcastExtensions)
@property (readonly, copy) NSDictionary *attributesAsDictionary;
@@ -26,220 +32,294 @@
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
for (NSXMLNode *attribute in attributeEnum) {
dictionary[[attribute name]] = [attribute stringValue];
NSString *attrName = [attribute name];
if (!attrName) {
continue;
}
NSString *attributeStringValue = [attribute stringValue];
if (attributeStringValue != nil) {
[dictionary setObject:attributeStringValue forKey:attrName];
}
}
return dictionary;
}
@end
@interface SUAppcast () <NSURLDownloadDelegate>
@property (copy) NSString *downloadFilename;
@property (strong) NSURLDownload *download;
@interface SUAppcast () <SPUDownloaderDelegate>
@property (strong) void (^completionBlock)(NSError *);
@property (strong) SPUDownloader *download;
@property (copy) NSArray *items;
- (void)reportError:(NSError *)error;
- (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes;
@end
@implementation SUAppcast
@synthesize downloadFilename;
@synthesize delegate;
@synthesize completionBlock;
@synthesize userAgentString;
@synthesize httpHeaders;
@synthesize download;
@synthesize items;
- (void)fetchAppcastFromURL:(NSURL *)url
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)background completionBlock:(void (^)(NSError *))block
{
self.completionBlock = block;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0];
if (background) {
request.networkServiceType = NSURLNetworkServiceTypeBackground;
}
if (self.userAgentString) {
[request setValue:self.userAgentString forHTTPHeaderField:@"User-Agent"];
}
if (self.httpHeaders) {
for (NSString *key in self.httpHeaders) {
NSString *value = [self.httpHeaders objectForKey:key];
[request setValue:value forHTTPHeaderField:key];
}
}
[request setValue:@"application/rss+xml,*/*;q=0.1" forHTTPHeaderField:@"Accept"];
self.download = [[NSURLDownload alloc] initWithRequest:request delegate:self];
if (SUAVAILABLE(10, 9)) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
self.download = [[SPUDownloaderSession alloc] initWithDelegate:self];
#pragma clang diagnostic pop
}
else {
self.download = [[SPUDownloaderDeprecated alloc] initWithDelegate:self];
}
SPUURLRequest *urlRequest = [SPUURLRequest URLRequestWithRequest:request];
[self.download startTemporaryDownloadWithRequest:urlRequest];
}
- (void)download:(NSURLDownload *)__unused aDownload decideDestinationWithSuggestedFilename:(NSString *)filename
- (void)downloaderDidSetDestinationName:(NSString *)__unused destinationName temporaryDirectory:(NSString *)__unused temporaryDirectory
{
NSString *destinationFilename = NSTemporaryDirectory();
if (destinationFilename)
{
destinationFilename = [destinationFilename stringByAppendingPathComponent:filename];
[self.download setDestination:destinationFilename allowOverwrite:NO];
}
}
- (void)download:(NSURLDownload *)__unused aDownload didCreateDestination:(NSString *)path
- (void)downloaderDidReceiveExpectedContentLength:(int64_t)__unused expectedContentLength
{
self.downloadFilename = path;
}
- (void)downloadDidFinish:(NSURLDownload *)__unused aDownload
- (void)downloaderDidReceiveDataOfLength:(uint64_t)__unused length
{
NSError *error = nil;
}
NSXMLDocument *document = nil;
BOOL failed = NO;
NSArray *xmlItems = nil;
NSMutableArray *appcastItems = [NSMutableArray array];
if (self.downloadFilename)
{
NSUInteger options = 0;
options = NSXMLNodeLoadExternalEntitiesSameOriginOnly;
document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:self.downloadFilename] options:options error:&error];
[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil];
self.downloadFilename = nil;
}
else
{
failed = YES;
}
if (nil == document)
{
failed = YES;
}
else
{
xmlItems = [document nodesForXPath:@"/rss/channel/item" error:&error];
if (nil == xmlItems)
{
failed = YES;
- (void)downloaderDidFinishWithTemporaryDownloadData:(SPUDownloadData * _Nullable)downloadData
{
if (downloadData != nil) {
NSError *parseError = nil;
NSArray *appcastItems = [self parseAppcastItemsFromXMLData:downloadData.data error:&parseError];
if (appcastItems != nil) {
self.items = appcastItems;
self.completionBlock(nil);
self.completionBlock = nil;
} else {
NSMutableDictionary *userInfo = [NSMutableDictionary
dictionaryWithObject: SULocalizedString(@"An error occurred while parsing the update feed.", nil)
forKey: NSLocalizedDescriptionKey];
if (parseError != nil) {
[userInfo setObject:parseError forKey:NSUnderlyingErrorKey];
}
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain
code:SUAppcastParseError
userInfo:userInfo]];
}
}
if (failed == NO)
{
NSEnumerator *nodeEnum = [xmlItems objectEnumerator];
NSXMLNode *node;
NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
while (failed == NO && (node = [nodeEnum nextObject]))
{
// First, we'll "index" all the first-level children of this appcast item so we can pick them out by language later.
if ([[node children] count])
{
node = [node childAtIndex:0];
while (nil != node)
{
NSString *name = [node name];
if (name)
{
NSMutableArray *nodes = nodesDict[name];
if (nodes == nil)
{
nodes = [NSMutableArray array];
nodesDict[name] = nodes;
}
[nodes addObject:node];
}
node = [node nextSibling];
}
}
for (NSString *name in nodesDict)
{
node = [self bestNodeInNodes:nodesDict[name]];
if ([name isEqualToString:@"enclosure"])
{
// enclosure is flattened as a separate dictionary for some reason
NSDictionary *encDict = [(NSXMLElement *)node attributesAsDictionary];
dict[@"enclosure"] = encDict;
}
else if ([name isEqualToString:@"pubDate"])
{
// pubDate is expected to be an NSDate by SUAppcastItem, but the RSS class was returning an NSString
NSDate *date = [NSDate dateWithNaturalLanguageString:[node stringValue]];
if (date)
dict[name] = date;
}
else if ([name isEqualToString:@"sparkle:deltas"])
{
NSMutableArray *deltas = [NSMutableArray array];
NSEnumerator *childEnum = [[node children] objectEnumerator];
for (NSXMLNode *child in childEnum) {
if ([[child name] isEqualToString:@"enclosure"])
[deltas addObject:[(NSXMLElement *)child attributesAsDictionary]];
}
dict[@"deltas"] = deltas;
}
else if (name != nil)
{
// add all other values as strings
NSString *theValue = [[node stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (theValue != nil) {
dict[name] = theValue;
}
}
}
NSString *errString;
SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString];
if (anItem)
{
[appcastItems addObject:anItem];
}
else
{
SULog(@"Sparkle Updater: Failed to parse appcast item: %@.\nAppcast dictionary was: %@", errString, dict);
}
[nodesDict removeAllObjects];
[dict removeAllObjects];
}
}
if ([appcastItems count])
{
NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO];
[appcastItems sortUsingDescriptors:@[sort]];
self.items = appcastItems;
}
if (failed)
{
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastParseError userInfo:@{ NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while parsing the update feed.", nil) }]];
}
else if ([self.delegate respondsToSelector:@selector(appcastDidFinishLoading:)])
{
[self.delegate appcastDidFinishLoading:self];
} else {
SULog(SULogLevelError, @"Temp data download is null in SUAppcast");
NSDictionary *userInfo = [NSDictionary
dictionaryWithObject: SULocalizedString(@"An error occurred while downloading the update feed.", nil)
forKey: NSLocalizedDescriptionKey];
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain
code:SUDownloadError
userInfo:userInfo]];
}
}
- (void)download:(NSURLDownload *)__unused aDownload didFailWithError:(NSError *)error
- (void)downloaderDidFailWithError:(NSError *)error
{
if (self.downloadFilename)
{
[[NSFileManager defaultManager] removeItemAtPath:self.downloadFilename error:nil];
}
self.downloadFilename = nil;
SULog(SULogLevelError, @"Encountered download feed error: %@", error);
[self reportError:error];
}
- (NSURLRequest *)download:(NSURLDownload *)__unused aDownload willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)__unused redirectResponse
- (NSDictionary *)attributesOfNode:(NSXMLElement *)node
{
return request;
NSEnumerator *attributeEnum = [[node attributes] objectEnumerator];
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
for (NSXMLNode *attribute in attributeEnum) {
NSString *attrName = [self sparkleNamespacedNameOfNode:attribute];
if (!attrName) {
continue;
}
NSString *stringValue = [attribute stringValue];
if (stringValue) {
[dictionary setObject:stringValue forKey:attrName];
}
}
return dictionary;
}
-(NSString *)sparkleNamespacedNameOfNode:(NSXMLNode *)node {
// XML namespace prefix is semantically meaningless, so compare namespace URI
// NS URI isn't used to fetch anything, and must match exactly, so we look for http:// not https://
if ([[node URI] isEqualToString:@"http://www.andymatuschak.org/xml-namespaces/sparkle"]) {
NSString *localName = [node localName];
assert(localName);
return [@"sparkle:" stringByAppendingString:localName];
} else {
return [node name]; // Backwards compatibility
}
}
-(NSArray *)parseAppcastItemsFromXMLFile:(NSURL *)appcastURL error:(NSError *__autoreleasing*)errorp {
NSData *data = [NSData dataWithContentsOfURL:appcastURL];
return [self parseAppcastItemsFromXMLData:data error:errorp];
}
-(NSArray *)parseAppcastItemsFromXMLData:(NSData *)appcastData error:(NSError *__autoreleasing*)errorp {
if (errorp) {
*errorp = nil;
}
if (!appcastData) {
return nil;
}
NSUInteger options = NSXMLNodeLoadExternalEntitiesNever; // Prevent inclusion from file://
NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:appcastData options:options error:errorp];
if (nil == document) {
return nil;
}
NSArray *xmlItems = [document nodesForXPath:@"/rss/channel/item" error:errorp];
if (nil == xmlItems) {
return nil;
}
NSMutableArray *appcastItems = [NSMutableArray array];
NSEnumerator *nodeEnum = [xmlItems objectEnumerator];
NSXMLNode *node;
while((node = [nodeEnum nextObject])) {
NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
// First, we'll "index" all the first-level children of this appcast item so we can pick them out by language later.
if ([[node children] count]) {
node = [node childAtIndex:0];
while (nil != node) {
NSString *name = [self sparkleNamespacedNameOfNode:node];
if (name) {
NSMutableArray *nodes = [nodesDict objectForKey:name];
if (nodes == nil) {
nodes = [NSMutableArray array];
[nodesDict setObject:nodes forKey:name];
}
[nodes addObject:node];
}
node = [node nextSibling];
}
}
for (NSString *name in nodesDict) {
node = [self bestNodeInNodes:[nodesDict objectForKey:name]];
if ([name isEqualToString:SURSSElementEnclosure]) {
// enclosure is flattened as a separate dictionary for some reason
NSDictionary *encDict = [self attributesOfNode:(NSXMLElement *)node];
[dict setObject:encDict forKey:name];
}
else if ([name isEqualToString:SURSSElementPubDate]) {
// We don't want to parse and create a NSDate instance -
// that's a risk we can avoid. We don't use the date anywhere other
// than it being accessible from SUAppcastItem
NSString *dateString = node.stringValue;
if (dateString) {
[dict setObject:dateString forKey:name];
}
}
else if ([name isEqualToString:SUAppcastElementDeltas]) {
NSMutableArray *deltas = [NSMutableArray array];
NSEnumerator *childEnum = [[node children] objectEnumerator];
for (NSXMLNode *child in childEnum) {
if ([[child name] isEqualToString:SURSSElementEnclosure]) {
[deltas addObject:[self attributesOfNode:(NSXMLElement *)child]];
}
}
[dict setObject:deltas forKey:name];
}
else if ([name isEqualToString:SUAppcastElementTags]) {
NSMutableArray *tags = [NSMutableArray array];
NSEnumerator *childEnum = [[node children] objectEnumerator];
for (NSXMLNode *child in childEnum) {
NSString *childName = child.name;
if (childName) {
[tags addObject:childName];
}
}
[dict setObject:tags forKey:name];
}
else if (name != nil) {
// add all other values as strings
NSString *theValue = [[node stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (theValue != nil) {
[dict setObject:theValue forKey:name];
}
}
}
NSString *errString;
SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString];
if (anItem) {
[appcastItems addObject:anItem];
}
else {
SULog(SULogLevelError, @"Sparkle Updater: Failed to parse appcast item: %@.\nAppcast dictionary was: %@", errString, dict);
if (errorp) *errorp = [NSError errorWithDomain:SUSparkleErrorDomain
code:SUAppcastParseError
userInfo:@{NSLocalizedDescriptionKey: errString}];
return nil;
}
}
self.items = appcastItems;
return appcastItems;
}
- (void)reportError:(NSError *)error
{
if ([self.delegate respondsToSelector:@selector(appcast:failedToLoadWithError:)])
{
[self.delegate appcast:self failedToLoadWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastError userInfo:@{NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred in retrieving update information. Please try again later.", nil), NSLocalizedFailureReasonErrorKey: [error localizedDescription]}]];
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{
NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred in retrieving update information. Please try again later.", nil),
NSLocalizedFailureReasonErrorKey: [error localizedDescription],
NSUnderlyingErrorKey: error,
}];
NSURL *failingUrl = [error.userInfo objectForKey:NSURLErrorFailingURLErrorKey];
if (failingUrl) {
[userInfo setObject:failingUrl forKey:NSURLErrorFailingURLErrorKey];
}
self.completionBlock([NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastError userInfo:userInfo]);
self.completionBlock = nil;
}
- (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes
{
// We use this method to pick out the localized version of a node when one's available.
if ([nodes count] == 1)
return nodes[0];
return [nodes objectAtIndex:0];
else if ([nodes count] == 0)
return nil;
@@ -250,12 +330,24 @@
lang = [[node attributeForName:@"xml:lang"] stringValue];
[languages addObject:(lang ? lang : @"")];
}
lang = [NSBundle preferredLocalizationsFromArray:languages][0];
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
if (i == NSNotFound) {
i = 0;
}
return nodes[i];
return [nodes objectAtIndex:i];
}
- (SUAppcast *)copyWithoutDeltaUpdates {
SUAppcast *other = [SUAppcast new];
NSMutableArray *nonDeltaItems = [NSMutableArray new];
for(SUAppcastItem *item in self.items) {
if (![item isDeltaUpdate]) [nonDeltaItems addObject:item];
}
other.items = nonDeltaItems;
return other;
}
@end
Loaded 100 of 434 files, more files were not shown because too many files have changed in this diff. Show more