Compare commits

...
1618 Commits
Author SHA1 Message Date
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
Kornel Lesiński 0b186dc939 Updated changelog 2014-07-26 15:57:09 +01:00
Kornel Lesiński 22dff08b8d Make it clear that bundled DSA key is only for the test app 2014-07-26 15:45:31 +01:00
Kornel Lesiński b9e94d49ae Ensure that updateItem isn't freed during the update 2014-07-26 14:38:30 +01:00
Kornel Lesiński 867a91cbe4 Clarified error message 2014-07-26 02:26:40 +01:00
Kornel Lesiński aadadeef5b Version bump 2014-07-26 02:16:59 +01:00
Kornel Lesiński 7b7e3f6e23 Log detailed signature verification failures 2014-07-26 02:16:59 +01:00
Kornel Lesiński e2e37da3ce nil-safe dictionary 2014-07-26 02:16:59 +01:00
Kornel Lesiński 6d861c5d92 Rely on SULog prefix 2014-07-26 02:16:59 +01:00
Kornel Lesiński 80dee159de Simpler newline 2014-07-26 02:16:59 +01:00
Kornel Lesiński de9ec2a849 Always copy log to NSLog 2014-07-26 02:16:58 +01:00
Kornel Lesiński 7a1f627c79 Close windows before termination, not after 2014-07-26 02:16:58 +01:00
Kornel Lesiński cf7711fb83 Updated readme 2014-07-26 00:41:09 +01:00
Kornel Lesiński c7ec996c23 Add scheme required by xcodebuild 2014-07-26 00:04:53 +01:00
Kornel Lesiński a8c2a98379 Run unit tests in Travis 2014-07-25 23:47:31 +01:00
Kornel Lesiński 7148c0f3e6 Added others to podspec 2014-07-25 13:00:14 +01:00
Kornel 05b5758058 Merge pull request #393 from xhacker/podspec
Add podspec
2014-07-25 12:56:21 +01:00
Xhacker Liu c2f498f157 Add podspec. 2014-07-25 01:52:57 -07:00
Kornel Lesiński e11f8387b2 Added DSA verifier test 2014-07-25 02:19:29 +01:00
Kornel Lesiński d3198961d7 Don't crash using CFPreferences when defaultsDomain is unknown 2014-07-25 01:30:00 +01:00
Kornel Lesiński 3f37fe7674 Xcode upgrade check harassment marker 2014-07-25 01:28:32 +01:00
Kornel Lesiński 245b4e1608 Xcode’s being weird 2014-07-25 00:41:53 +01:00
Jake Petroules 9516d6d667 Merge pull request #387 from MaddTheSane/QuarantineVal
Quarantine removal
2014-07-21 18:06:27 -04:00
C.W. Betts b13b57e800 remove unnecessary return; 2014-07-19 21:46:29 -06:00
Kornel 9480f40522 Merge pull request #378 from grahammiln/travis
Add Travis continuous integration support
2014-07-20 02:55:16 +01:00
C.W. Betts 32d4de464d Don't use new code if specifically targeting OS versions that have the new API. 2014-07-19 15:05:08 -06:00
C.W. Betts 578666e9e6 Minor fix. 2014-07-19 14:44:06 -06:00
C.W. Betts 591d7d0049 Better, forward-compatible way of looking up NSURLQuarantinePropertiesKey, as suggested by @jakepetroules 2014-07-19 14:38:51 -06:00
Jake Petroules 417e018432 Merge pull request #388 from MaddTheSane/XcodeMaintanence
Xcode maintenance.
2014-07-18 16:04:49 -04:00
C.W. Betts fa2a121217 Xcode maintenance:
libxar is no longer weak-linked.
Removing undefined copy copies. Maybe they were icons?
Name the copy frameworks as "Copy Frameworks"
2014-07-18 13:47:26 -06:00
C.W. Betts 5a3fd1e12a Indenting code. 2014-07-18 13:31:54 -06:00
C.W. Betts cb19fe8864 Use some 10.10-specific APIs to remove the quarantine attribute. 2014-07-18 13:28:20 -06:00
C.W. Betts fb206d9f71 Use the system-available quarantine string to get the quarantine metadata attribute. 2014-07-18 13:03:31 -06:00
Jake Petroules 83c93809c4 Merge pull request #379 from sononum/master
avoid attempt to insert nil object into dictionary
2014-07-15 13:44:30 -04:00
Ulrich Zurucker b95f5bc83c avoid attempt to insert nil object into dictionary 2014-07-15 13:14:04 +02:00
grahammiln 35efebf76f Add Travis continuous integration support
Adding configuration file and extending makefile to support
http://travis-ci.org.
2014-07-14 14:50:49 +02: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
Jake Petroules cca13834ca Merge pull request #374 from MaddTheSane/patch-1
Update Autoupdate-Info.plist
2014-07-09 22:48:39 -04:00
MaddTheSane c36aee449d Update Autoupdate-Info.plist 2014-07-09 20:45:54 -06:00
Kornel Lesiński 2d15514466 Updated changelog 2014-07-10 00:28:22 +01:00
Kornel 2471a5f05d Merge pull request #368 from sparkle-project/autolayout
Rely on autolayout
2014-07-09 12:39:41 +01:00
Kornel d61e0d57a9 Merge pull request #373 from 1024jp/japaneseLocalization
Update Japanese localization
2014-07-09 12:38:57 +01:00
1024jp 7dc42eb6ea Update Japanese localization 2014-07-09 00:43:49 +02:00
Kornel 59114fb9dc Merge pull request #372 from MaddTheSane/addGreek
Include the Greek localization.
2014-07-08 17:53:40 +01:00
C.W. Betts 8f73838fa0 Include the Greek localization. 2014-07-08 10:32:01 -06:00
Kornel Lesiński fce6957a66 RSS-y Accept header
Fixes #284
2014-07-07 02:46:57 +01:00
Kornel Lesiński def8cfa1ff Whitespace-only clang-format changes 2014-07-07 02:25:04 +01:00
Kornel Lesiński 99df53ba96 Since it’s awakeFromNib, it won’t hurt to remove the view
#369
2014-07-07 02:05:45 +01:00
Kornel Lesiński 77d16de08a Separate autosave names for states with/without release notes 2014-07-07 02:03:35 +01:00
Kornel e040ccfef1 Merge pull request #336 from pornel/newdsa
New DSA verification code
2014-07-07 01:55:34 +01:00
Kornel Lesiński f2ca019cb0 Rely on autolayout 2014-07-07 01:49:08 +01:00
Kornel Lesiński 336db58e96 Removed UK initials from comments 2014-07-07 00:17:30 +01:00
Kornel Lesiński 6826505d3e Apply clang-format rules 2014-07-05 01:19:42 +01:00
Kornel Lesiński 8e41993ead Rely on precompiled header 2014-07-05 01:05:03 +01:00
Kornel Lesiński 19c3d2ebf3 Removed odd self=nil assignments 2014-07-05 01:05:03 +01:00
Kornel Lesiński c9a631d2e4 Removed unused method 2014-07-05 01:05:02 +01:00
Kornel Lesiński f2cd127729 Removed unnecessary params 2014-07-05 01:04:49 +01:00
Kornel Lesiński b001a3e52e Removed unnecessary initializer 2014-07-05 01:04:49 +01:00
Kornel Lesiński c9bb1bf81c Formatting 2014-07-05 01:04:49 +01:00
Kornel Lesiński d9c287c899 Double-check SecTransformExecute return value 2014-07-03 23:50:23 +01:00
Kornel Lesiński 18d7c5f8cd Fix potential memory leak 2014-07-03 23:50:20 +01:00
Kornel Lesiński 4697623be6 Add contributors to the License.txt file 2014-07-03 23:47:30 +01:00
Zachary Waldowski 4f1cfa0d9c Amend spurious copyright notice 2014-07-03 23:47:30 +01:00
Kornel Lesiński 697a3436e5 Deleted 10.6 code 2014-07-03 23:42:30 +01:00
Zachary Waldowski ae72844847 Make SUDSAVerifier forward-compatible with Lion security 2014-07-03 23:42:30 +01:00
Kornel Lesiński 8385dfd0f4 Quicker restart 2014-07-03 20:59:00 +01:00
Jake Petroules 31ee181ad2 Enable -Wdirect-ivar-access; the codebase is now clean of this warning. 2014-07-02 18:56:47 -04:00
Jake Petroules 0e14c9ca6a Convert remaining ivars to properties to avoid direct ivar access. 2014-07-02 18:55:54 -04:00
Jake Petroules aac2a91833 Avoid direct ivar access for existing properties. 2014-07-02 18:00:39 -04:00
Kornel ce10ccd97e Merge pull request #364 from MaddTheSane/ARC
Migrate the Disk Image and piped unarchiver to ARC.
2014-07-02 12:36:06 +01:00
C.W. Betts 77a58843fe Migrate the Disk Image and piped unarchiver to ARC. 2014-07-01 20:52:50 -06:00
Jake Petroules 3b1f97a298 Move remaining private ivars to properties/implementation. 2014-07-01 22:08:13 -04:00
Jake Petroules 7e4f74af14 Move private ivars to @implementation.
Declaration of ivars in @interface is deprecated in modern runtime.
2014-07-01 22:08:13 -04:00
Jake Petroules 4ac95c9560 Re-enable -Wobjc-interface-ivars warning.
Now that we are ARC and 64-bit...
2014-07-01 22:08:12 -04:00
Jake Petroules 6d7092f10a Remove some ivars in favor of properties. 2014-07-01 22:08:12 -04:00
Kornel c209639c4d Merge pull request #362 from sparkle-project/cfError
Release cfError independently of *error
2014-07-02 02:37:46 +01:00
Kornel 9ec502f5ab Merge pull request #360 from sparkle-project/tbz2
2.5MB → 720KB
2014-07-02 02:10:12 +01:00
Kornel Lesiński 8ae0f10162 Use noErr constant of OSStatus 2014-07-02 02:06:55 +01:00
Kornel Lesiński 6b86508d38 Always release cfError 2014-07-02 02:06:55 +01:00
Kornel Lesiński 841e14e8b8 Retain delegate for duration of the function 2014-07-02 02:06:27 +01:00
Jake Petroules 2bc1de6f1f Add missing __unused attributes. 2014-07-01 20:56:42 -04:00
Jake Petroules 3604e36917 Add missing __autoreleasing attributes. 2014-07-01 20:55:44 -04:00
Jake Petroules 69f349397b Turn off some extremely tough ARC warnings. 2014-07-01 20:55:16 -04:00
Jake Petroules c778dff301 Merge pull request #361 from MaddTheSane/patch-1
Make the setTestFeedURL test run.
2014-07-01 20:47:50 -04:00
MaddTheSane 51a012896f Make the setTestFeedURL test run.
I think the test framework saw `setTestFeedURL` as a setter. This change changes it to `testSetTestFeedURL`, which will run as a test.

And for some odd reason, crashes.
2014-07-01 18:45:34 -06:00
Kornel Lesiński 66962fe8d8 Merge branch 'ARC' of https://github.com/MaddTheSane/Sparkle
* 'ARC' of https://github.com/MaddTheSane/Sparkle:
  Fix a release bug.
  Force Xcode to use spaces on source code files.
  Convert Sparkle to ARC, take three.
2014-07-02 01:31:28 +01:00
Kornel Lesiński b463afee27 Use tarball to reduce distribution size by 70% 2014-07-02 01:24:31 +01:00
Kornel Lesiński 71c7e2f9a2 -f works as || true 2014-07-02 01:13:22 +01:00
Kornel Lesiński 969622840d Added localized string comments 2014-07-02 01:12:48 +01:00
Kornel Lesiński 6910ce4413 Added missing string 2014-07-02 01:12:48 +01:00
Jake Petroules 892c5f1054 Warn if Doxygen is not installed, when building documentation. 2014-07-01 19:47:30 -04:00
Jake Petroules 84cdbbd45b Include Sparkle Test App and BinaryDelta dSYM in binary package. 2014-07-01 19:45:42 -04:00
Jake Petroules d79507b663 Update version numbers. 2014-07-01 19:35:29 -04:00
Kornel Lesiński ab07cda5eb Merged Allow text to expand #346 2014-07-02 00:08:13 +01:00
Kornel f4e0fceeac Merge pull request #349 from sparkle-project/holydeletedcodebatman
Closures instead of temp dictionaries
2014-07-01 23:56:25 +01:00
Kornel Lesiński 9344928872 Updated changelog 2014-07-01 23:33:23 +01:00
Kornel Lesiński 5b123215ed Fixed whitespace in xcodeproj, applied sort-Xcode-project-file.sh 2014-07-01 02:57:37 +01:00
Kornel 2bebf0f2d1 Merge pull request #353 from sparkle-project/clang-format
Clang format
2014-07-01 02:56:19 +01:00
Jake Petroules 4a1eddadf2 Fix corruption of Xcode project caused by last merge. 2014-06-30 21:37:36 -04:00
Kornel 19473aae5e Merge pull request #351 from sparkle-project/doxygen
Documentation
2014-07-01 02:17:53 +01:00
Jake Petroules e0a1bbbac5 Convert normal comments to doc comments in SUUpdater/SUUpdaterDelegate.
Documentation will now show up for these classes in the Xcode sidebar
and in generated Doxygen documentation.
2014-06-30 21:16:29 -04:00
Jake Petroules ebf9a8172a Fix some Doxygen warnings. 2014-06-30 21:16:29 -04:00
Jake Petroules 676b713df0 Add a target to build Sparkle API documentation using Doxygen. 2014-06-30 21:16:28 -04:00
Kornel Lesiński b26bfeba0e Localize "The update is improperly signed."
#294
2014-07-01 02:13:24 +01:00
C.W. Betts 1c5523ed83 Merge branch 'master' into ARC 2014-06-30 19:09:40 -06:00
C.W. Betts 2acc9114e4 Force files modified via Xcode to use spaces. 2014-07-01 02:04:23 +01:00
C.W. Betts b87a89c24d Fix a release bug. 2014-06-30 19:03:26 -06:00
C.W. Betts 5106d7010a Merge branch 'master' into ARC 2014-06-30 18:58:55 -06:00
C.W. Betts 1a968424db Force Xcode to use spaces on source code files. 2014-06-30 18:57:01 -06:00
Kornel Lesiński 344433d468 Change brace style to Linux 2014-07-01 01:47:42 +01:00
C.W. Betts 000c4a9832 Merge branch 'master' into ARC 2014-06-30 18:34:24 -06:00
Kornel Lesiński 4e972c997c Use constant for queue identifier 2014-07-01 00:29:39 +01:00
Kornel Lesiński 55a7ca5b9c Removed unused synchronous installation 2014-07-01 00:27:17 +01:00
Kornel Lesiński bf9ba560f0 Use closure instead of info dict 2014-07-01 00:27:11 +01:00
Jake Petroules 2a2eef97a9 Add .clang-format configuration file for source code formatting. 2014-06-30 17:23:41 -04:00
Jake Petroules 0e68e5e590 Use asset catalogs and add more Retina-compatible icon sizes to ICNS. 2014-06-30 17:23:18 -04:00
Jake Petroules dedae6e626 Make Sparkle README icon 96x96 to display properly on Retina. 2014-06-30 17:22:25 -04:00
Jake Petroules b96a37f922 Silence warnings that only seem to be appearing due to a compiler bug. 2014-06-29 23:23:50 -04:00
Jake Petroules f3ed1fafe3 Use new operatingSystemVersion API when available. 2014-06-29 23:17:32 -04:00
Jake Petroules 3f829bd49c Clean up Xcode configuration.
Make use of inheritance by applying ConfigCommon to the root node and
move all UI-applied settings into xcconfig for easier management.
2014-06-29 23:02:35 -04:00
Jake Petroules 72d8e4e5a6 Add Xcode and Makefile targets to build a Sparkle release package.
Use `make release` to build Sparkle and create a Sparkle-VERSION.zip,
ready for upload.
2014-06-29 22:38:36 -04:00
Jake Petroules 5d0fa33725 Fix output encoding in localizable strings Makefile target. 2014-06-29 21:35:26 -04:00
Jake Petroules 6c9f27106f Make the repository significantly more organized.
Now everything is not pretty much all in one directory.
2014-06-29 21:27:33 -04:00
Kornel Lesiński b9b24be4bb Allow text to expand 2014-06-30 01:11:19 +01:00
Kornel Lesiński 1dd1fe44e1 Use single line mode on textfield that AutoLayout can’t wrap 2014-06-30 01:10:53 +01:00
Kornel Lesiński a7f5217f3d Added window autosave identifier
Fixes #52
2014-06-30 00:06:57 +01:00
Jake Petroules eb0411fb51 Restore original Sparkle icon.
This reverts: 984aac852f,
93ebf843c2,
8d2054e62a,
1325d3fe40,
2579f2c3a3,
and partially reverts 6ca5c3a337.

This icon belongs to a third party and should never have been merged.
2014-06-29 18:21:30 -04:00
Kornel e2674a7549 Merge pull request #344 from MaddTheSane/staticFix
Fix a bug pointed out by the Static Analyzer.
2014-06-29 22:50:50 +01:00
C.W. Betts b000517983 Fix a bug pointed out by the Static Analyzer. 2014-06-29 15:27:32 -06:00
Kornel 268c2c9bab Merge pull request #337 from pornel/autolayout
Switched SUUpdateAlert.xib to AutoLayout
2014-06-29 21:40:46 +01:00
Kornel Lesiński f464382475 Copied align to other XIBs 2014-06-29 21:38:31 +01:00
C.W. Betts 7a3890c9c0 Remove the left alignment on the description text. 2014-06-29 21:30:47 +01:00
Kornel Lesiński 73ecd41dae Switched SUUpdateAlert.xib to AutoLayout 2014-06-29 21:30:47 +01:00
Kornel 20fc16a7d5 Merge pull request #340 from sparkle-project/publicidentifiers
Keep old namespace and framework's bundle ID for backwards compatibility
2014-06-29 21:18:06 +01:00
Kornel Lesiński 6159e77565 Keep old namespace and framework's bundle ID for backwards compatibility
Partial revert of f916f2e723
2014-06-29 20:35:50 +01:00
Jake Petroules 20a8ffd955 Prefer real constants to preprocessor defines. 2014-06-29 03:01:43 -04:00
Jake Petroules 444809da92 Force feedURL/setFeedURL to be called on the main thread.
This is better than relying solely on documentation.
2014-06-29 02:54:45 -04:00
Jake Petroules 8c805970fb Don't crash if defaultName/defaultsDomain is nil. 2014-06-29 02:03:49 -04:00
Jake Petroules 70046f6e07 Quiet Clang static analyzer. 2014-06-29 01:19:03 -04:00
Jake Petroules 964587274c Add old release notes to change log. 2014-06-29 00:58:28 -04:00
Jake Petroules 44d544cf5a Link to Foundation and AppKit instead of Cocoa.
No need to pull in a CoreData dependency.
2014-06-29 00:33:17 -04:00
Jake Petroules 91f5d0125c Perform some Objective-C modernizations. 2014-06-29 00:25:35 -04:00
Jake Petroules cf4ab0d8e6 Remove trailing whitespace in source code files. 2014-06-29 00:08:52 -04:00
Jake Petroules 39db8e1dc6 Replace references to Mac OS X with OS X as the OS is now called. 2014-06-29 00:08:52 -04:00
Jake Petroules 04c8a23f2d Line wrap LICENSE in a sane manner, update. 2014-06-29 00:08:52 -04:00
Jake Petroules fa4daa0569 Update .gitignore; contents.xcworkspacedata need not be ignored. 2014-06-28 23:35:56 -04:00
Jake Petroules 8cd2241fed Silence useless warnings in test product. 2014-06-28 23:29:36 -04:00
Jake Petroules 1334414d2e Rename finish_installation to Autoupdate for consistency. 2014-06-28 23:29:36 -04:00
Jake Petroules 2049c95770 Add an aggregate target to easily build everything. 2014-06-28 23:11:16 -04:00
Jake Petroules d537efcf9b Remove unused file. 2014-06-28 23:01:34 -04:00
Jake Petroules f916f2e723 Replace references to andymatuschak.org with sparkle-project.org. 2014-06-28 22:58:12 -04:00
Jake Petroules 4ca9ba1ce3 Enable as many warnings as possible.
The codebase now compiles cleanly with -Wall -Weverything, minus a few.
2014-06-28 22:47:22 -04:00
Jake Petroules df6dc14ace Silence all warnings in bsdiff/bspatch.
Warnings should not be enabled for third party code.
2014-06-28 22:46:55 -04:00
Jake Petroules f8b0f2c5b7 Fix warnings. 2014-06-28 22:40:44 -04:00
Jake Petroules 8c94f4bb2d Explicitly mark unused parameters. 2014-06-28 22:40:17 -04:00
Jake Petroules 8ec5f0ca3c Avoid variable-length arrays in C. 2014-06-28 21:17:37 -04:00
Jake Petroules 2f16e3f526 Fix warning about explicitly synthesizing properties. 2014-06-28 21:15:11 -04:00
Jake Petroules a80eeedaeb Add missing header to fix warnings.
Otherwise, SUHost is only forward declared in this context.
2014-06-28 21:14:45 -04:00
Jake Petroules 08bc0d574e Fix use of potentially uninitialized variables. 2014-06-28 21:13:31 -04:00
Jake Petroules c015f5e968 Don’t attempt to return from a void method. 2014-06-28 21:12:54 -04:00
Jake Petroules 76d5480313 Add missing parameter types. 2014-06-28 21:12:21 -04:00
Jake Petroules 135bcb483e Let the compiler know that SULog is a format function.
This allows it to warn properly on malformed format strings.
2014-06-28 21:11:43 -04:00
Jake Petroules e2854d3a29 Add explicit casts for type conversions.
The +0 and >>0 in SUDSAVerifier are present for readability;
the compiler is more than capable of optimizing them into nothing.
2014-06-28 21:10:53 -04:00
Jake Petroules ef5a0a997d Make string constants static as they are not used outside the translation unit. 2014-06-28 21:08:49 -04:00
Jake Petroules 74158c6da9 Add missing extern declaration. 2014-06-28 21:08:08 -04:00
Jake Petroules e5d0015185 Don’t compare floating point values with == 2014-06-28 21:07:23 -04:00
Jake Petroules d390a58f72 BOOL is a signed char; make sure it’s only ever YES or NO, not in [2, 255]. 2014-06-28 21:04:57 -04:00
Jake Petroules 435f89c11f Replace id with specific types where appropriate. 2014-06-28 21:02:33 -04:00
Jake Petroules 9984eb9ba3 Remove unused exception parameters. 2014-06-28 21:00:14 -04:00
Jake Petroules 89f5c6eb4b Add __attribute__((noreturn)) to hint for compiler optimizations.
exit() logically guarantees the method will never return;
this attribute allows the compiler to optimize for this case.
2014-06-28 20:58:14 -04:00
Jake Petroules 9c787a08aa Remove trailing semicolons. 2014-06-28 20:55:48 -04:00
Jake Petroules 88bc70cb9a Silence sign conversion warnings in third party code. 2014-06-28 20:37:38 -04:00
Jake Petroules 7262555d72 Silence CSSM warnings in SUDSAVerifier. 2014-06-28 20:35:58 -04:00
Jake Petroules 1ce94b8e2f Xcode project: set organization name and class prefix. 2014-06-28 19:48:30 -04:00
Jake Petroules a62180b3ac Fix memory leak. 2014-06-28 19:42:59 -04:00
Jason Lee e7b7094372 zh-CN translate "Learn More" button 2014-06-28 23:44:23 +01:00
Kornel Lesiński e17d55146d Fixed potential CFRelease of NULL, code style fixes 2014-06-28 23:38:27 +01:00
Sam Deane 98e5959461 If the downloaded update fails the code signing check, log out some more detailed information to help with diagnosing the problem. 2014-06-28 23:26:12 +01:00
Kornel 06a897ed03 Merge pull request #39 from pornel/Xcode5xibs
Migrate xibs to Xcode 5
2014-06-28 23:19:41 +01:00
Kornel 2348532907 Merge pull request #335 from pornel/master
Finish moving all informal protocols to formal protocols.
2014-06-28 21:40:58 +01:00
Kornel Lesiński 98cde3310d Updated README 2014-06-28 21:27:44 +01:00
C.W. Betts 66b734322d Merge branch 'master' into ARC 2014-06-28 13:22:54 -06:00
C.W. Betts bb990ad172 Finish moving all informal protocols to formal protocols.
Fix improperly-named protocols.
2014-06-28 13:19:27 -06:00
C.W. Betts d33cc1efd6 Migrate the SUUpdateAlert xibs to Xcode 5. 2014-06-28 11:26:16 -06:00
C.W. Betts 1eedc27e5f Convert the xibs to Xcode 5.1 format.
The SUUpdateAlert wasn’t migrated in this commit because of the autolayout branch.
2014-06-28 11:24:26 -06:00
Kornel Lesiński 133a701d24 Remove option to install unverified updates 2014-06-25 02:04:41 +01:00
C.W. Betts 2459733d26 Remove unused autorelease pool class usage.
Do we even still use the BinaryDelta tool?
2014-06-22 19:07:43 -06:00
Kornel Lesiński 0585a22f07 Reflect version requirement in sample appcast 2014-06-22 19:41:36 +01:00
Kornel Lesiński 07a6893e1f Release 1.7 2014-06-22 19:05:01 +01:00
C.W. Betts 93e339f32e Convert Sparkle to ARC, take three. 2014-06-20 13:26:39 -06:00
C.W. Betts 4b119a1eed Use more Blocks/libdispatch code. 2014-06-20 11:27:09 -06:00
C.W. Betts c2c94bdb1f Replace NSAutoreleasePool classes with Autorelease Pool blocks.
They’re faster, even if they’re used outside of ARC.
Use dispatch functions to spin off new threads.
Update the Binary Delta tool's class to be better.
2014-06-20 10:51:03 -06:00
C.W. Betts d14e89ef53 We don’t need the NSAppKitVersionNumber10_[456] defined.
First, we don’t use them. Second, they should be defined since we’re targeting 10.7 and later, with at least the 10.9 SDK.
2014-06-19 19:09:41 -06:00
C.W. Betts 7bd4e56cd5 We don’t need to declare ivars in the interface block if they are only accessed via accessors.
This is only true because we’re targeting x86_64 on OS X. The same is true for all iOS architectures, but not i386 on OS X.
Use CFBridgingRelease in a few places: it acts just like [(id)CFMakeCollectable(obj) autorelease] on non-ARC code, but is a bit cleaner.
2014-06-19 15:32:20 -06:00
C.W. Betts 8577ed8953 Many changes:
Getting rid of unneeded parentheses.
Remove more pre-10.7-only code.
Add comments.
More property declarations.
Make SUUpdatePermissionPromptDelegateInformalProtocol a protocol with the name SUUpdatePermissionPromptDelegateProtocol.
2014-06-19 15:02:04 -06:00
C.W. Betts 7b8fd7c097 Remove pre-10.7 code. 2014-06-19 13:06:55 -06:00
C.W. Betts cb15481e88 Restore setAutomaticallyDownloadsUpdates: to the SUUpdater header as a property. 2014-06-19 12:55:47 -06:00
C.W. Betts efa8447b1f Fix an over-release bug. 2014-06-18 13:55:52 -06:00
C.W. Betts e140353ed5 Refer to frameworks/libraries via their SDK versions, as opposed to the system ones.
Rename “Apple Frameworks and Libraries” to just “Frameworks” so newly added frameworks are added there.
2014-06-18 10:37:30 -06:00
Kornel Lesiński d6316b6d9c Modern if syntax ;)
astyle -t -o -O -c -xM -z2 -U -j -H *.[mhc]
2014-06-17 20:48:00 +01:00
Kornel Lesiński b0c9c31dc1 Modern syntax 2014-06-17 20:48:00 +01:00
Zachary Waldowski 9d03d79ca7 Replace use of antiquated ProcessInformationCopyDictionary. 2014-06-17 00:54:52 +01:00
Zachary Waldowski 519dccf64b Replace deprecated Gestalt. 2014-06-17 00:54:08 +01:00
Zachary Waldowski 1392f5155a Replace deprecated GetProcessForPID. 2014-06-17 00:53:57 +01:00
Zachary Waldowski 76ce31f2f6 Replace use of -performSelector:withObject: 2014-06-17 00:53:21 +01:00
Kornel Lesiński f46d7b5c1e Version bump 2014-06-17 00:47:56 +01:00
Kornel Lesiński d94c316583 Dropping 10.6 2014-06-17 00:47:56 +01:00
Kornel Lesiński c97a0462ae xctest 2014-06-17 00:47:14 +01:00
C.W. Betts a62db7348d Fix the XCTest build project.
The extension was set to octest; it should have been xctest.
2014-06-15 20:21:07 -06:00
Kornel Lesiński bd77daac35 XCTest 2014-06-13 01:39:53 +01:00
Andrew Madsen b41165e2e2 Added tests for comparisons of X.Y.Z.Build# style version numbers. 2014-06-13 01:35:57 +01:00
Andrew Madsen 49c622b36b Removed redefinition of DEBUG from SUUpdater.h, which broke our use of #ifdef DEBUG in multiple places in our code. Grr... 2014-06-13 01:35:57 +01:00
Michael Gorbach 2d33235886 Get rid of Sparkle’s custom binary stripping settings, since they were causing trouble with repeated compilations generating errors. Instead, we can rely on NNW’s Copy Phase for the Sparkle framework to strip symbols as needed. 2014-06-13 01:35:57 +01:00
Kornel Lesiński 2aa4899efd Tested Xcode 6b 2014-06-13 01:35:57 +01:00
Kornel a0f368823b Merge pull request #30 from dyremeen/master
Added localization for nb
2014-06-11 11:14:50 +01:00
Dyre Meen afec652729 Added localization for nb 2014-06-11 11:21:37 +02:00
Kornel 0ae81e3c05 Merge pull request #25 from GabrielUlici/master
Updated the Romanian Translation and added some mac models to the SUModelTranslation.plist
2014-06-02 00:51:00 +01:00
Gabe 90d319cb02 updated a string in ro.lproj/SUUpdateAlert.xib and arranged the layout
of it.lproj/SUUpdateAlert.xib
2014-06-01 23:53:41 +02:00
Gabe 4ffb2d2361 updated iMacs, MacBooks and MacBooks Air 2014-06-01 15:01:40 +02:00
Gabe e8508a4a66 Romanian Translation Updated 2014-05-27 22:12:27 +02:00
Kornel Lesiński a5b92c2008 Rename scripts 2014-05-21 23:13:29 +01:00
Kornel Lesiński d7185de470 Add error handling to sign_update 2014-05-21 23:13:29 +01:00
Kornel Lesiński 0c1eca9f82 Dehipsterify sign_update 2014-05-21 23:13:00 +01:00
Kornel Lesiński 88de072950 Show priv key in Finder 2014-05-21 22:22:05 +01:00
Kornel Lesiński 5efef76004 Abort on any error 2014-05-21 22:22:05 +01:00
Kornel Lesiński 95eb6456e3 Don’t use temp file 2014-05-21 22:22:04 +01:00
Kornel Lesiński 4cbffd02e3 Increase key size
Fixes #23
2014-05-21 22:21:49 +01:00
Kornel Lesiński 47a4978e6a Secure keys’ permissions 2014-05-21 22:18:23 +01:00
Kornel Lesiński 0400bc4d66 Less hipster generate_keys 2014-05-21 22:18:03 +01:00
Kornel Lesiński e1ef953067 Removed unused notifications
Fixes #18
2014-04-27 19:04:40 +01:00
Kornel Lesiński bfa28948f0 BinaryDelta using fileSystemRepresentation instead of UTF8Strings for paths 2014-04-27 18:44:05 +01:00
Kornel Lesiński 409b35c20f Changelog 2014-04-25 23:22:59 +01:00
porneL aa92d572dd Removed MIME hack 2014-04-25 23:22:59 +01:00
Antonin Hildebrand f1d3e4dd7f fix warnings
Conflicts:
	SUAppcastItem.h
	SUUpdater.h
2014-04-25 16:48:59 +01:00
Kornel 8a45304d55 Merge pull request #16 from tamasprezi/master
Fixed typo that caused crashes in BinaryDelta
2014-04-22 15:08:38 +01:00
Tamas Lustyik f56a6025a0 Fixed typo that caused crashes in BinaryDelta 2014-04-22 15:32:44 +02:00
Kornel Lesiński 805447d748 Removed archive password prompt 2014-04-12 15:18:57 +01:00
Rudy Richter cdfd506cc0 turn on generation of debug symbols since they’re needed in order to generate a dSYM 2014-04-12 15:14:46 +01:00
Antonin Hildebrand 90098dae5a define correct dependencies on locale scripts 2014-04-12 15:14:46 +01:00
C.W. Betts 3148182f1b Remove pre-10.6-specific code. 2014-04-08 18:36:56 -06:00
MaddTheSane 31172f61f9 Remove duplicate interface definitions. 2014-04-07 23:34:42 -06:00
C.W. Betts d35a68f5be We are explicitly targeting Mac OS X 10.6 and later:
We don’t need to check to see if some code signing functions are available: they should be available already.
TODO: check to see when xar was added.
2014-04-07 23:11:15 -06:00
C.W. Betts 6745346f1d Include C headers, import Objective C headers. 2014-04-07 23:08:19 -06:00
Kornel 1ab5de851f Merge pull request #12 from vincedev/master
Make SUStandardVersionComparator.h accessible
2014-04-04 21:50:39 +01:00
Vincent CARLIER 358933f965 SUStandardVersionComparator.h is included in Sparkle.h 2014-04-04 20:55:55 +02:00
Vincent CARLIER a60255c95c SUStandardVersionComparator.h is make public 2014-04-04 20:55:12 +02:00
Kornel 2c54ec012d Merge pull request #9 from armadsen/master
(Re)fixes bug where URLs are naively double escaped.
2014-03-13 20:07:07 +00:00
Andrew Madsen b671c6bef6 (Re)fixes bug where URLs are naively double escaped. See https://github.com/andymatuschak/Sparkle/commit/00b67269d69f311ce4dcc39437f1d8ac1825b383 for original fix. 2014-03-13 11:42:19 -06:00
C.W. Betts 6f24f56f0d Move SUStatusController to Objective C 2 getters and setters. 2014-03-02 14:53:21 -07:00
Kornel Lesiński 59f9e0ee1b Sorted Xcode config 2014-03-01 14:19:27 +00:00
Kornel Lesiński ac7fd917d3 Removed Elgato-specific code 2014-02-17 23:07:13 +00:00
Kornel Lesiński 53f0f4f9ee Deleted redundant strings files 2014-02-17 22:58:07 +00:00
Kornel Lesiński 55c57abd2f Deleted untranslated strings files 2014-02-17 03:58:12 +00:00
Kornel Lesiński 006e71fa89 Removed junk comment from strings files 2014-02-17 03:57:43 +00:00
Kornel c6d47ed68d Merge pull request #3 from MaddTheSane/master
Fix a bug
2014-02-12 09:53:15 +00:00
MaddTheSane fd906d9589 The checkTimer Invar should have been retained. 2014-02-11 23:42:52 -07:00
Kornel 3e6431f94d Merge pull request #2 from MaddTheSane/master
More Objective C @properties
2014-02-10 14:55:44 +00:00
C.W. Betts 4a015ada8f Remove redundant semicolon. 2014-02-09 15:58:13 -07:00
C.W. Betts 2c1b3783e4 Use for… in… Objective C enumeration where possible. 2014-02-09 14:52:32 -07:00
C.W. Betts 808bde2699 Use dot notation in NTSynchronousTask.
Change the getter for the done ivar to isDone.
2014-02-09 14:46:26 -07:00
C.W. Betts fde6b4775e Move the NTSynchronousTask class to Objective C properties. 2014-02-09 14:40:11 -07:00
C.W. Betts 92bafa92bf Make SUAppcastDelegate a formal protocol.
Synthesize more Objective C getters and setters using Objective C properties.
2014-02-09 14:25:02 -07:00
Kornel Lesiński 7e2d4b019e Fixed unit test bundle identifier 2014-02-08 22:11:47 +00:00
C.W. Betts 10b8872afb Removed an unused variable. 2014-02-02 21:15:16 -07:00
MaddTheSane d4d984f42c Merge pull request #1 from pornel/master
Merge
2014-02-02 20:13:23 -08:00
C.W. Betts bd98b33e25 Use more modern Objective C syntax. 2014-02-02 15:56:05 -07:00
C.W. Betts 79f447d537 Use Objective-C properties for the SUAppcastItem class. 2014-02-02 15:44:20 -07:00
Kornel Lesiński a4759c871e Removed 10.4 code 2014-02-02 22:18:34 +00:00
Kornel Lesiński a3b9a74fe1 Disable plug-ins in release notes WebView 2014-02-02 21:25:45 +00:00
Kornel Lesiński faba759574 Avoid setting useless private font family name in the WebView 2014-02-02 21:25:41 +00:00
C.W. Betts 91800e3036 Quiet protocol warnings. 2014-02-02 14:22:55 -07:00
C.W. Betts d7dbbe4bb9 Implementing formal protocols for most Sparkle delegates. 2014-02-02 14:15:28 -07:00
Kornel Lesiński 2579f2c3a3 Holy megabyte icon, Batman! 2014-02-02 19:41:24 +00:00
Kornel Lesiński 01e9bd82be Use preprocessor config instead of cflags
Newer terminology for relaunch.
Fail if finish_install tool name not defined.
2014-02-02 17:30:49 +00:00
Kornel Lesiński d34d2853f6 Configurable name for finish_installation.app 2014-02-01 17:27:27 +00:00
Kornel Lesiński fd1ffce3e2 Version bump 2014-02-01 17:27:17 +00:00
Kornel Lesiński 6ae7b68659 Trimmed config further 2014-02-01 13:32:12 +00:00
Kornel Lesiński 54dc6d0071 Converted old NIBs to XIB 2014-02-01 12:41:36 +00:00
Kornel Lesiński a773ac5856 Enabled all translations 2014-02-01 12:24:40 +00:00
Kornel Lesiński 686c87242c Removed code for 10.4 2014-02-01 11:58:25 +00:00
Kornel Lesiński f2eaaeb4a3 Fixed XIB layout issue
Changed XIBs to support at least 10.6
2014-02-01 10:45:05 +00:00
Kornel Lesiński 5676acaebc Removed duplicate/irrelevant config 2014-02-01 10:45:05 +00:00
Kornel Lesiński 0055adcc52 Merge update zh_CN #259
* pull/259/head:
  update zh_CN

Conflicts:
	zh_CN.lproj/SUAutomaticUpdateAlert.strings
2014-02-01 02:26:09 +00:00
Kornel Lesiński ad518eb209 Merge pt-BR L10n polishing #274
* pull/274/head:
  pt-BR localization polishing

Conflicts:
	pt_BR.lproj/Sparkle.strings
2014-02-01 02:19:41 +00:00
Kornel Lesiński 20100c283f Merge remote-tracking branch 'pull/277/head'
* pull/277/head:
  Updated the Romanian translation

Conflicts:
	Sparkle.xcodeproj/project.pbxproj
2014-02-01 02:17:47 +00:00
Kornel Lesiński fc88f94d5d Merge remote-tracking branch 'pull/287/head'
* pull/287/head:
  Select Korean and Slovak for Sparkle.strings localization
2014-02-01 02:15:50 +00:00
Kornel Lesiński 222ab3edd9 Merge remote-tracking branch 'pull/290/head'
* pull/290/head:
  finish_installation.app and pkg files will not removed when we use *.pkg installer and restart system in the installer.
2014-02-01 02:15:22 +00:00
Kornel Lesiński 4b831a1394 Merge remote-tracking branch 'pull/292/head'
* pull/292/head:
  add a return type to the -init methods to satisfy a warning for missing-method-return-type
2014-02-01 02:13:53 +00:00
Kornel Lesiński bdc45d7e47 Prevent catastrophic data loss when finish_installation.app is not present for any reason #295
* pull/295/head:
  Quiet a warning caused by using a non-constant template format string.
  Take care not to attempt copying the finish_installation.app unless we have actually succeeded in locating it. In the strange scenario that the finish_installation.app was not present in the Sparkle bundle, the target path was evaluated as being the host app's Application Support folder itself, and Sparkle would proceed to completely wipe out the host's Application Support folder as it tried to copy the non-existent

Conflicts:
	SUUIBasedUpdateDriver.m
2014-02-01 02:13:03 +00:00
Kornel Lesiński 6ca5c3a337 Updated README 2014-02-01 01:10:08 +00:00
porneL 4ab8fd1010 Added NSURLDownloadDelegate declarations 2014-02-01 00:50:45 +00:00
Kornel Lesiński 3f40f444db Warnings-- 2014-02-01 00:50:45 +00:00
Kornel Lesiński f1d5103a07 10.6 deployment target 2014-02-01 00:50:45 +00:00
Kornel Lesiński 890f1fb393 Fixed format argument 2014-02-01 00:31:43 +00:00
Kornel Lesiński d7993257fe Merge remote-tracking branch 'origin/quiet-automatic-update'
* origin/quiet-automatic-update:
  Allow manual checks when an install on quit update is pending
  Allow the delegate to trigger a silent install and relaunch
  Support silent relaunches
  Increment the sudden termination counter if installing on quit
  Set up install on quit for critical automatic updates too
  Updating Sparkle.strings for the new, more strongly worded strings that are displayed for a 'critical update'
  Prompts the user to update after a week (rather than a day) if he doesn't quit the app.
  Adding <sparkle:tags> appcast item element, <sparkle:criticalUpdate /> tag
  Fixed a no-autorelease-pool leak.
  We have this check box that says "Automatically download and install updates in the future." But we only download them automatically. We still ask permission again before installing them.

Conflicts:
	SUBasicUpdateDriver.m
	en.lproj/Sparkle.strings
	finish_installation.m
2014-02-01 00:31:23 +00:00
Kornel Lesiński c99378c170 Xcode 5.1 config check 2014-01-31 23:31:46 +00:00
Kornel Lesiński 00d8b64b41 Ignore DerivedData 2014-01-31 23:31:45 +00:00
Kornel Lesiński 6a79789d32 Convert all strings files to UTF-8 (UTF-16 must die) 2014-01-31 23:31:45 +00:00
Kornel Lesiński ec8f46af91 Merge branch 'vslavik'
* vslavik:
  Disable -Werror in release builds.
  Another Werror to remove
  Need to turn this -Werror off too
  Build only active ARCH (at Xcode5 suggestion)
  Clang errors when format strings expected but aren’t provided
  Setting Deployment Target 10.7 globally
  Removing unneeded GC configurations
  Removing GC target
  remove SDK

Conflicts:
	Configurations/ConfigFrameworkReleaseGCSupport.xcconfig
	SUUIBasedUpdateDriver.m
	Sparkle.xcodeproj/project.pbxproj
2014-01-31 23:26:08 +00:00
Brian Webster 2ae8248c35 Removed redundant method declaration 2014-01-31 23:20:56 +00:00
Brian Webster d9d3ff2a8e Fixed pt_BR strings file encoding 2014-01-31 23:20:56 +00:00
Nate Weaver b420ad65be Wrap AuthorizationExecuteWithPrivilegesAndWait in pragmas to ignore deprecated functions.
I feel dirty.
2014-01-31 23:20:56 +00:00
Jorge Leandro Perez 5504d6896f Fixes static analyzer warnings 2014-01-31 23:20:47 +00:00
Jorge Leandro Perez d888705fd8 Enables Skip Install flag 2014-01-31 23:20:32 +00:00
Doug Russell 8d1109b59f Disable turkish localization because xcode believes it is corrupted 2014-01-31 23:19:11 +00:00
Kornel Lesiński 25aca9f56f Merge branch 'blackpixel'
* blackpixel:
  Fixed issue with icon
  New icon
  Updated icon.
  Switched the icon to be representative of the app. We'll want to find a better way of doing this once we have multiple apps pointed at this repo.
  fixed a 'content rectangle not entirely onscreen' warning
  updated sends system profile to use info.plist if user defaults key isn't present
  Support for notifications on some updater events
  Fix warnings
  fixed the Debug App Store configuration.. it was misnamed and causing a build error.
  fixing up the xcode configs to match ours for simpler building

Conflicts:
	Sparkle.xcodeproj/project.pbxproj
	Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme
	th.lproj/Sparkle.strings
2014-01-31 23:18:25 +00:00
Kornel Lesiński e75a9b0591 Merge branch 'earthlingsoft'
* earthlingsoft:
  Set development region to English
  Fixed Bug #428216: "Update alert does not use a proper emdash"
2014-01-31 23:16:38 +00:00
Kornel Lesiński 5dfc6ab3b2 Merge branch 'MrNoodle'
* MrNoodle:
  - Was using non-nil terminated c-string resulting in a nil string being returned which caused an erroneous condition check.
2014-01-31 23:16:22 +00:00
Kornel Lesiński 76cca58776 Merge branch 'uliwitness'
* uliwitness:
  Revert "Switch off secure updates for now"
  Shut up all of Xcode's complaints.
  Don't look at error variables if result says success.
  Less warnings.
  Shut up some warnings & make build with newer Xcode.
  Less unsafety with format strings.
  Switch off secure updates for now
  Quick hack to make this build again. Should probably just move to Sparkle mainline, now that they're halfway current.
  Satisfy some overly picky compilers.
  Make this build on 10.7. Might break building on earlier OSes.
  Removed the pt_PT localization from Uli's branch, since it was largely untranslated, and used the one from master instead.
  Fixed layout of localization XIBs
2014-01-31 21:46:49 +00:00
Kornel Lesiński 7141818b31 Revert "Switch off secure updates for now"
This reverts commit 6a48420e07.
2014-01-31 21:46:11 +00:00
Vaclav Slavik 52bee98867 Disable -Werror in release builds. 2013-11-14 17:36:57 +01:00
Paul Kim b262c2b581 - Was using non-nil terminated c-string resulting in a nil string being returned which caused an erroneous condition check. 2013-10-29 11:14:03 -04:00
Daniel Jalkut 192c3b4c2d Quiet a warning caused by using a non-constant template format string. 2013-09-26 15:59:44 -04:00
Daniel Jalkut cfe375b5f3 Take care not to attempt copying the finish_installation.app unless we have actually succeeded in locating it. In the strange scenario that the finish_installation.app was not present in the Sparkle bundle, the target path was evaluated as being the host app's Application Support folder itself, and Sparkle would proceed to completely wipe out the host's Application Support folder as it tried to copy the non-existent 2013-09-26 15:58:57 -04:00
Matt Thomas 271970697e Another Werror to remove 2013-09-21 12:29:02 +02:00
Matt Thomas 1539c0c077 Need to turn this -Werror off too 2013-09-21 12:29:02 +02:00
Matt Thomas aa25194536 Build only active ARCH (at Xcode5 suggestion) 2013-09-21 12:29:02 +02:00
Matt Thomas 6ab4163957 Clang errors when format strings expected
but aren’t provided
2013-09-21 12:29:02 +02:00
Matt Thomas dfa27acde2 Setting Deployment Target 10.7 globally
(we don}t really care about PPC support, etc)
2013-09-21 12:29:02 +02:00
Matt Thomas 50c3df3a6f Removing unneeded GC configurations 2013-09-21 12:29:02 +02:00
Matt Thomas 31a49c83b5 Removing GC target 2013-09-21 12:29:02 +02:00
Matt Thomas a57eb736cb remove SDK
This will default to the current one (SDKROOT = macosx)
2013-09-21 12:29:02 +02:00
Andy Kim 52b2d75d63 Merge branch 'master' of git://github.com/andymatuschak/Sparkle 2013-09-17 18:20:42 +09:00
Andy Kim 9ea81e21b9 Set development region to English 2013-09-17 18:12:35 +09:00
Dan Schimpf eda214a3ec add a return type to the -init methods to satisfy a warning for missing-method-return-type 2013-08-30 14:51:55 -07:00
Andy Matuschak d2b7fd6236 Adding left-behind SUPasswordPrompt.xib from 048ce10 2013-08-11 09:05:36 -07:00
Takayama Fumihiko 77ce7c19e9 finish_installation.app and pkg files will not removed when
we use *.pkg installer and restart system in the installer.

In this case, "Application Support" directory is corrupted
by unnecessary pkg files.
We need to scan files under "Application Support" directory
and examine whether pkg file or not.

It is quite annoying.

Therefore, this patch changes location of
finish_installation.app and pkg files to
"~/Library/Application Support/APPNAME/.Sparkle".
Then, we can remove finish_installation.app and pkg files
certainly.
2013-08-11 16:54:38 +09:00
Andy Matuschak 048ce10ed5 Updated Danish localization courtesy Daniel Østergaard Nielsen. 2013-08-07 16:12:03 -07:00
Shon Frazier b23d4a9641 Select Korean and Slovak for Sparkle.strings localization 2013-07-26 11:06:07 -04:00
Gabe 843bbe7ece Updated the Romanian translation 2013-06-11 02:56:05 +02:00
BR Lingo a7dbe4184c pt-BR localization polishing 2013-05-23 19:23:23 -03:00
61 3287299f53 update zh_CN 2013-03-25 16:53:11 +08:00
Uli Kusterer 1b71d3ebd1 Shut up all of Xcode's complaints. 2013-03-16 16:59:02 +01:00
Uli Kusterer ef8edef094 Don't look at error variables if result says success. 2013-03-16 16:58:37 +01:00
Uli Kusterer c793adf2ed Less warnings. 2013-02-09 20:22:25 +01:00
Uli Kusterer 5cf229ba41 Shut up some warnings & make build with newer Xcode. 2013-02-09 20:19:38 +01:00
Uli Kusterer 4789ebdec5 Less unsafety with format strings. 2013-02-09 20:19:09 +01:00
Michael Ehrmann 0ed83cf9f2 Fixing issue with update as non admin user where the quarantine flag did not get correctly removed from new application 2013-02-04 08:18:49 -08:00
Michael Ehrmann c37fc01bb1 Release notes referenced by URL in updates item description field can be delivered via https:// 2013-02-04 08:18:48 -08:00
Andy Matuschak 7fae28135e Merge pull request #229 from mugginsoft/master
Hush method return type warnings when importing SUUpdater.h
2013-02-04 08:13:00 -08:00
Andy Matuschak 82c722ba37 Merge pull request #240 from ryanmaxwell/master
Correct build warnings for 3 issues - detailed in each commit
2013-02-04 08:08:40 -08:00
Ryan Maxwell aba5567a15 Fix stuffing unsigned int into int variable, causing build warning 2013-01-30 11:30:58 +13:00
Rick Fillion 1325d3fe40 Fixed issue with icon 2013-01-14 13:30:40 -05:00
Rick Fillion 8d2054e62a New icon 2013-01-14 10:03:40 -05:00
Ryan Maxwell d593a04dda Update Project file/Scheme to recommended Xcode settings 2013-01-12 14:45:10 +13:00
Ryan Maxwell 8fa758f8aa Fix "corrupted" turkish strings file 2013-01-12 14:42:50 +13:00
Ryan Maxwell 2a0d8afe4e update .gitignore 2012-12-08 14:28:08 +13:00
Andy Matuschak 3e3a11bd0f Merge remote-tracking branch 'blackpixel/warnings-pull-request'
Conflicts:
	th.lproj/Sparkle.strings
2012-12-06 18:47:02 -08:00
Doug Russell 41b2f054f8 Fixed warnings in xibs, switched to lldb and fixed occasional copy phase error from incorrect text encoding 2012-12-06 13:40:55 -08:00
Rick Fillion 93ebf843c2 Updated icon. 2012-12-05 12:57:27 -05:00
Rick Fillion 984aac852f Switched the icon to be representative of the app. We'll want to find a better way of doing this once we have multiple apps pointed at this repo. 2012-12-04 13:24:52 -05:00
Jonathan Mitchell 69c9c70d21 Add explicit method return types in header to supress warnings when including framework in projects with more exacting warnings such as -Wextra. 2012-11-27 10:20:02 +00:00
Simone Manganelli 478c7fd8cd fixed a 'content rectangle not entirely onscreen' warning 2012-11-26 13:35:42 -08:00
Andy Matuschak 243fdf8f7f Fall back on DSA-only installation checks for .pkg installations 2012-11-20 14:56:35 -08:00
Andy Matuschak 337002f421 Merge branch 'CodeSigning' 2012-11-19 17:37:53 -08:00
Andy Matuschak a7ba6a7421 Merge pull request #210 from kainjow/master
Disable row selection in system profile table
2012-11-15 23:06:33 -08:00
Andy Matuschak 7b3928db9b Fixes #222: Long version ids (12 digits based on reverse date) cause update to work no longer 2012-11-15 22:49:55 -08:00
Andy Matuschak b86770c39f Fixed unit tests for 10.8 2012-11-15 22:49:43 -08:00
Andy Matuschak f6622104bf Fixes #221: char *oldDestinationString 2012-11-15 22:40:39 -08:00
Andy Matuschak 860739fce2 Merge remote-tracking branch 'ryanmaxwell/master' 2012-11-15 22:28:47 -08:00
Jamie Pinkham 08065bc05b updated sends system profile to use info.plist if user defaults key isn't present 2012-11-15 11:46:54 -05:00
Andy Matuschak 38eb63a7a2 Updates to Turkish localization courtesy Emir Sarı 2012-11-13 09:22:51 -08:00
Ryan Maxwell f7daf04204 Update remaining english straight single ' quotes to curly ’ quotes 2012-11-10 20:10:46 +13:00
Ryan Maxwell 2350c59cc8 Update strings files to standardize ellipsis character (…) instead of three dots (…)
Also change don't to curly quote don’t in dialog.
2012-11-10 19:46:44 +13:00
Doug Russell 4eebdb82c4 Support for notifications on some updater events 2012-10-18 14:39:59 -07:00
Doug Russell 066d634ef6 Fix warnings 2012-10-18 12:20:08 -07:00
Jamie Pinkham 9e2e489109 fixed the Debug App Store configuration.. it was misnamed and causing a build error. 2012-10-18 11:07:42 -04:00
Jamie Pinkham f9c428ee06 fixing up the xcode configs to match ours for simpler building 2012-10-17 13:08:24 -04:00
Andy Matuschak 16cdd6bf64 Adding Arabic localization, courtesy Muhammad Azmi Al-Hashemi 2012-09-12 22:56:07 -07:00
Kevin Wojniak e657bcf03a Disable row selection in the system profile table by implementing the table delegate and turning off "Avoid Empty Selection", "Preserve Selection" and "Select Inserted Objects" on the array controller in the nib. 2012-09-05 10:16:33 -07:00
Andy Matuschak d138f64bd6 Fixes #198: Problem with 10.5
Implicitly linking the Obj-C runtime with the 10.7 SDK is causing us to
inadvertently reference libblocks symbols, which don't exist prior to
10.6.
2012-08-16 20:03:45 -07:00
Andy Matuschak 3c37f775fb Merge branch 'master' into CodeSigning 2012-08-15 18:14:37 -07:00
Andy Matuschak 7a283bfaeb Fixes #133: Sparkle deleting/replacing the wrong executable when it unpacks
-[SUHost installationPath] can return different values before and after
the installation is performed, because it may attempt to normalize the
installation path--but only if the normalized version of the path isn't
already present. Which it would be after the installation had completed.

Now we only compute the installation path once for the whole installation
process.
2012-08-15 18:01:35 -07:00
Andy Matuschak c1510a5bea Adding Thai localizations to the project. 2012-07-26 19:00:21 -07:00
Chotiwat Chawannakul 7a20432b1b Add Thai localization 2012-07-27 00:25:35 +07:00
Andy Matuschak 3d8be2d2da Fixed potential crasher in code signing in the case that the host application is not code signed. 2012-07-24 09:13:47 -07:00
Andy Matuschak a59e8ff958 Added kSecCSCheckAllArchitectures to the flags for code signing validation so that inactive architecture binaries are checked as well in the update. 2012-07-24 09:08:42 -07:00
Andy Matuschak 26077f47af Update to the Brazilian Portuguese localization from Victor Figueriedo 2012-07-23 17:03:59 -07:00
Andy Matuschak 118f3c5141 Merge pull request #183 from sinbad/fix-10.6-arg-list-too-long
Use NSFileManager interface for DMG unarchive only for 10.7+.
2012-07-05 18:27:47 -07:00
Andy Matuschak 22b65a3095 Making sure to initialize all Security types 2012-07-05 18:13:28 -07:00
Andy Matuschak 05c51a1c05 Merge branch 'EncryptedDiskImages' 2012-07-05 18:09:42 -07:00
Andy Matuschak 21f95465da Fixes #48: Adopt standard code signing in favor of DSA signing
Thanks to Mattt Thompson (@mattt) for tag-team-ing this with me.

With this change, if your app deploys only to 10.6+, then you can
dispense altogether with the DSA signatures on future updates to your
application: just make sure the "to" version satisfies the "from"
version's Apple code signing requirements. Most of you are probably
already doing that, and if you're not, you should be anyway.

Specifically, Sparkle validates the designated requirement of the "from"
version against the "to" version. By default, as of this writing, that
means that the bundle identifiers must be the same, and that the leaf
certificate of the signature is the same. So if you keep code signing
your app with the same cert, Sparkle will Just Work without any
additional DSA signature nonsense for you to deal with.

Traditional Sparkle DSA signatures will still be honored.

This support has only been extended to updates to the main app bundle.
If you're updating some other bundle, you will have to use DSA signatures
to secure your updates in the future.

***IMPORTANT: previously, Sparkle considered an update "safe" if both the
appcast and update were distributed over https. That is nowhere near as
strong a verification measure as code signing or the old-school DSA
signatures, so with this change, support for unsigned, https-distributed
updates has been removed. If you're targeting 10.6+, start code-signing
your apps if you haven't already, and everything will be fine. If you're
targeting earlier OS Xs, you'll need to start adding DSA signatures to
your appcasts. When you link this changed version of Sparkle into your
app, it will warn you on launch if you are not code signed and do not
have a DSA public key specified in your Info.plist.
2012-07-05 10:04:17 -07:00
Andy Matuschak ab74bdca79 Removed Japanese localization of password prompt from the Xcode project 2012-07-03 18:52:08 -07:00
Andy Matuschak 69d471aefb Allow the user to try reentering his password if authentication fails. 2012-07-03 18:51:21 -07:00
Andy Matuschak d620dc0b52 Removing Japanese localization of the password prompt, since I changed the design 2012-07-03 18:43:22 -07:00
Andy Matuschak d3f975816e Delegated password prompting to the update driver.
The SUDiskImageUnarchiver shouldn't know about UI, and besides,
it's important that update drivers which should not display UI (like
the automatically-installing and probing drivers) should not display
password prompts.
2012-07-03 18:37:50 -07:00
Steve Streeting 91ac9178f1 Use NSFileManager interface for DMG unarchive only for 10.7+. On 10.6, [NSFileManager copyItemAtPath:toPath:error:] can fail with "Argument list too long" if the app bundle contains too many files.
The switch to NSFileManager was only required for 10.7 anyway, 10.6 always worked fine.
2012-06-28 13:28:30 +01:00
Andy Matuschak ae52d2743e Removed changes to the project.pbxproj that were unrelated to the password prompt 2012-06-26 18:45:41 -07:00
Andy Matuschak a4082a0e54 Redesigned password prompt UI 2012-06-26 18:44:55 -07:00
Andy Matuschak 9c8e825289 Removed methods from SUPasswordPrompt.h that didn't need to be exposed there 2012-06-26 18:43:52 -07:00
Stefan Hoffmann 9662452c09 Fixes #44: maximumSystemVersion key 2012-05-28 23:02:14 +02:00
Rudy Richter 0a3051349a remove the ASW tags since we're submitting this as a pull request to andy 2012-05-23 17:11:31 -04:00
Andy Matuschak 1c258cb690 Updating Danish localization courtesy Daniel Østergaard Nielsen 2012-05-23 09:47:43 -07:00
Rudy Richter 4ba453f337 support for encrypted disk images 2012-05-22 10:59:20 -04:00
Andy Matuschak 6960045e2b Fixes #175: Bug: update alert text collides with automatic download checkbox 2012-05-09 09:19:20 -07:00
Andy Matuschak 803925f2cf Fixes #174: Bug: sparkle:shortVersionString ignored for non-enclosure items 2012-05-09 08:49:55 -07:00
Andy Matuschak 97c71ef700 Fixes #170: An environment variable set by Sparkle 2012-05-07 19:39:31 -07:00
Andy Matuschak 595c6ce491 Merge branch 'master' into quiet-automatic-update 2012-04-28 20:38:42 -07:00
Andy Matuschak 6b7752792d Fixing some new Clang warnings from Xcode 4.4 2012-04-28 20:38:18 -07:00
Andy Matuschak b7dc2438a7 Fixes #169: Security Issue in Parsing XML using NSXMLDocument
External entities are no longer parsed in appcasts: pre-10.7, we use the
"tidy" option for XML document parsing, which happens to behave this way,
and in 10.7+ we use a new explicit option for this behavior.
2012-04-28 20:32:35 -07:00
Andy Matuschak 12904a5af6 Merge pull request #160 from mattstevens/manual-check-fix
Fix manual update checks when an automatic update is pending
2012-03-02 21:08:09 -08:00
Matt Stevens 7fc9e32ce7 Allow manual checks when an install on quit update is pending 2012-03-01 22:41:49 -07:00
Andy Matuschak 9aa3015929 Merge pull request #159 from ivira/master
Ukrainian localization
2012-03-01 18:41:46 -08:00
Vera Tkachenko 09f0c43e7c Minor fix of Ukrainian localization 2012-03-01 01:02:21 +02:00
Vera Tkachenko a570191859 Minor improvements of Russian localization: proofing and truncated button labels. 2012-02-29 23:50:21 +02:00
Vera Tkachenko d7dea30de6 Added Ukrainian localization 2012-02-29 23:07:04 +02:00
Andy Matuschak 409e7e22bf Merge remote-tracking branch 'mattstevens/delegate-auto-update' into quiet-automatic-update 2012-02-29 09:45:08 -08:00
Andy Matuschak ed456740b0 Merge branch 'master' into quiet-automatic-update 2012-02-29 09:45:01 -08:00
Andy Matuschak 8a25500eca Merge pull request #23 from tzikis/master
Greek Translation
2012-02-29 09:42:23 -08:00
Matt Stevens cdfcd1469e Allow the delegate to trigger a silent install and relaunch 2012-02-28 19:53:52 -07:00
Andy Matuschak 4c54349c23 Merge branch 'master' into quiet-automatic-update 2012-02-24 08:57:23 -08:00
Andy Matuschak 4d00e8c569 Fixes #157: Delayed relaunch not working 2012-02-24 08:55:22 -08:00
Andy Matuschak 02088e0da6 Merge pull request #156 from christianz/master
Corrected some minor spelling errors in the Norwegian Sparkle.strings
2012-02-22 08:22:55 -08:00
Christian Zachariasen f341d0c3a9 Corrected minor spelling errors 2012-02-22 12:35:42 +01:00
Matt Stevens 833081ffa9 Support silent relaunches 2012-02-16 00:42:40 -07:00
Andy Matuschak faed494d4e Merge branch 'quiet-automatic-update' of github.com:andymatuschak/Sparkle into quiet-automatic-update 2012-02-15 22:38:23 -08:00
Andy Matuschak dbebe4b3b2 Merge branch 'master' into quiet-automatic-update 2012-02-15 22:38:01 -08:00
Andy Matuschak e27828d248 Merge pull request #144 from mattstevens/custom-defaults-domain
Support a custom user defaults domain
2012-02-14 09:52:34 -08:00
Andy Matuschak 44cf0d0e51 Merge pull request #145 from mattstevens/install-on-quit-cleanup
Clean up after install on quit updates
2012-02-14 09:48:12 -08:00
Andy Matuschak 320b3aa62a Merge pull request #148 from mattstevens/silent-update-fixes
Silent update fixes
2012-02-14 09:45:01 -08:00
Matt Stevens 1d8adc8fac Increment the sudden termination counter if installing on quit 2012-02-12 21:15:57 -07:00
Matt Stevens bc458a6ab5 Set up install on quit for critical automatic updates too
Fixes the SUInstallLaterChoice for critical update prompts.
2012-02-12 21:15:57 -07:00
Matt Stevens 6be55685c8 Clean up after install on quit updates 2012-02-12 20:02:46 -07:00
Matt Stevens 29b7321094 Support a custom user defaults domain
This is useful for situations like a background app that updates a
parent preference pane but wants to maintain defaults in the background
app's domain.
2012-02-11 15:31:12 -07:00
Andy Matuschak 449b00ed3e Merge pull request #139 from mattstevens/pathToRelaunch
Host bundle is changed by pathToRelaunchForUpdater:
2012-02-08 22:37:19 -08:00
Andy Matuschak 4c2573702e Merge pull request #142 from mzch/master
Improved Japanese translations (fixes #141)
2012-02-08 22:14:25 -08:00
Koichi MATSUMOTO 88d4b348d9 Improved Japanese translations
Improved some strange translations in Japanese
2012-02-08 15:37:30 +09:00
Matt Stevens bf07a9435b Pass both host and executable paths to finish_installation
This fixes pathToRelaunchForUpdater by supporting an executable path
other than the host bundle path.
2012-02-06 22:16:25 -07:00
Andy Matuschak 799b2a381f Merge pull request #136 from ksuther/master
Xcode warning cleanup
2012-02-01 11:02:56 -08:00
Kent Sutherland 8b4cf14e53 Explicitly set the file encoding of Romanian Sparkle.strings to stop Xcode warning. 2012-02-01 13:29:25 -05:00
Kent Sutherland 515511d5e9 Adjusted initial window position of SUUpdateAlert for Romanian/Slovenian so Xcode doesn't show warnings. 2012-02-01 13:27:46 -05:00
Andy Matuschak aca8cc6fbf Renamed GC build configuration for clarity per #135 2012-01-27 08:46:46 -08:00
Andy Matuschak 1bc3834345 Fixing feature that normalizes installed app names and disabling it by default. Fixes #133. 2012-01-17 22:39:49 -08:00
Andy Matuschak 73e96cdcab Updating project for 4.2.1; changing SDK to 10.7 2012-01-17 21:51:43 -08:00
Andy Matuschak 760e32c5bd Added Slovenian localization courtesy Mojca Miklavec 2012-01-11 09:21:24 -08:00
Andy Matuschak cf1b167954 Merge branch 'master' of github.com:andymatuschak/Sparkle 2012-01-05 18:44:48 -08:00
Andy Matuschak 5ef6c64568 Fixes #129: Still need the OpenSSL license? 2012-01-05 18:44:26 -08:00
Andy Matuschak 7e05e97c95 Merge pull request #126 from dmdeller/patch-1
OpenSSL path should be globally replaced, right?
2011-12-19 11:41:27 -08:00
David Deller 5cd98c5508 OpenSSL path should be globally replaced, right?
With MacPorts OpenSSL installed, this version produces different results, which makes me nervous.
2011-12-18 11:40:58 -05:00
Andy Matuschak e6deed9c56 Merge branch 'master' into quiet-automatic-update 2011-11-18 19:17:37 -08:00
Andy Matuschak 290f64f552 Fixes #121: finish_installation deployment target is 10.6, not 10.5 2011-11-18 19:17:11 -08:00
Andy Matuschak 59caa1f300 Re-added Romanian resources with relative paths to the project. 2011-11-18 19:14:24 -08:00
Andy Matuschak 882b5c9b8a Minor layout adjustments to the Romanian localization 2011-11-18 19:11:49 -08:00
Gabriel Ulici 7ba0c583af Translated the string and xib files 2011-11-18 13:31:36 +01:00
Gabriel Ulici b275cab13f Added Romanian Localization 2011-11-18 13:30:08 +01:00
Uli Kusterer 6a48420e07 Switch off secure updates for now 2011-11-12 15:03:46 +01:00
Uli Kusterer 59f9236009 Merge remote-tracking branch 'andymatuschak/master'
Conflicts:
	pt_PT.lproj/SUAutomaticUpdateAlert.xib
2011-11-12 13:39:34 +01:00
Andy Matuschak f20c121745 No longer linking to libcrypto 2011-11-11 17:59:39 -08:00
Andy Matuschak 25040affc2 Fixes #111: Sparkle won't build due to -Werror with -Wformat=2 and missing newlines 2011-11-11 17:57:40 -08:00
Andy Matuschak 82e6250250 Merge pull request #118 from smiranda/master
Improvements to the European Portuguese localization (pt_PT)
2011-11-10 09:13:52 -08:00
Sérgio Miranda 9f2d53a3a2 Improvements to the European Portuguese localization (pt_PT) 2011-11-10 14:24:35 +00:00
Andy Matuschak ec4ebbdcfb Merging darkshadow2's changes for libcrypto -> CDSA 2011-11-09 21:34:27 -08:00
Andy Matuschak 716bb30e7c Merge branch 'master' into quiet-automatic-update 2011-11-09 21:23:18 -08:00
Andy Matuschak aeeae26d1c Critical security patch--re-enabling signature and downgrade checking.
When merging Uli Kusterer's branch, we left enabled a preprocessor flag that would disable DSA checking and downgrade prevention. That should not have been merged into master. My apologies to the community for not noticing this sooner.
2011-11-09 21:22:38 -08:00
Andy Matuschak 095d223e70 Fixes #116: Update error: Can't make a temporary directory 2011-11-09 20:53:18 -08:00
Andy Matuschak 55eed9efd8 Fixes #113: Need to check isReadableFileAtPath: when copying out DMG contents 2011-11-02 10:27:32 -07:00
Andy Matuschak d092ae9295 Resolved merge 2011-10-27 22:04:01 -07:00
Andy Matuschak 5457476e4a Fixes #109: Error extracting dmg archives 2011-10-27 21:59:45 -07:00
Andy Matuschak 5dce90eafa Merge pull request #28 from wildchocolate/master
Fixed leaks with NSFileManager
2011-10-20 08:05:26 -07:00
Brittany Tarvin 268ea201da Fixed leaks with NSFileManager 2011-10-20 09:52:02 -05:00
Brittany Tarvin 613b759077 Fixed issues that led to crashes on Mac OS X 10.7 Lion.
These fixes remove the use of the File Manager API that was causing crashes on Lion. This should resolve issue #827357. We are now using NSFileManager instead of the older File Manager API, but only on 10.6 and later. These changes should work for those targeting 10.4, but will allow users running 10.7 to still update without crashing.
2011-10-17 14:30:00 -05:00
Uli Kusterer 02e090c291 Quick hack to make this build again. Should probably just move to Sparkle mainline, now that they're halfway current. 2011-10-15 12:02:18 +02:00
Uli Kusterer f6a2e76685 Merge branch 'master' of git://github.com/andymatuschak/Sparkle
Conflicts:
	Sparkle.xcodeproj/project.pbxproj
	pt.lproj/SUAutomaticUpdateAlert.xib
	pt_PT.lproj/SUAutomaticUpdateAlert.xib
	tr.lproj/SUAutomaticUpdateAlert.xib
2011-10-11 10:19:30 +02:00
Andy Matuschak 8f5b9f03ac Updating Sparkle.strings for the new, more strongly worded strings that are displayed for a 'critical update' 2011-10-10 22:49:49 -07:00
Andy Matuschak bb682da743 Prompts the user to update after a week (rather than a day) if he doesn't quit the app. 2011-10-10 22:44:17 -07:00
Andy Matuschak bf38b0c9fd Adding <sparkle:tags> appcast item element, <sparkle:criticalUpdate /> tag
You would use this like:
<item>
    <title>My great update</title>
    ...
    <sparkle:tags>
        <sparkle:criticalUpdate />
    </sparkle:tags>
</item>

The behavior of this tag presently is: rather than waiting for the user to quit the app (or for some large amount of time to pass), the user will be prompted to install the update (with a stronger message) immediately upon its receipt. This behavior could be improved for the manual update case as well.

We can also use this new mechanism to create special behavior for e.g. paid updates.
2011-10-10 22:40:27 -07:00
Andy Matuschak e64516c089 Fixed a no-autorelease-pool leak. 2011-10-10 22:40:24 -07:00
Andy Matuschak fc725cce01 Background updates would never get scheduled when the net's down. 2011-10-10 10:29:52 -07:00
Andy Matuschak 95398cd26f Fixed a no-autorelease-pool leak. 2011-10-10 09:28:56 -07:00
Andy Matuschak b515c15f9b We have this check box that says "Automatically download and install updates in the future." But we only download them automatically. We still ask permission again before installing them.
With this patch, we make good on the description of that box: updates are automatically installed when the app is quit. No user intervention involved whatsoever if they checked that box.

If the user doesn't quit the app for a day after the update is downloaded, we'll show the dialog we've always used for automatically downloaded updates (Install Now / Install on Quit / Skip This Update).
2011-10-04 20:48:28 -07:00
Andy Matuschak 01e8cf90c6 finish_installation doesn't show any UI if it's not relaunching, since those installations were not kicked off by user action. 2011-10-04 20:48:09 -07:00
Andy Matuschak 7152bd0ffa Merge branch 'master' of github.com:andymatuschak/Sparkle 2011-10-03 22:55:57 -07:00
Andy Matuschak 05861e5340 Merging "ulimerge," which contains a great number of changes and contributions from Uli Kusterer, Elgato, and other contributors.
Highlights:
- appcast entries with a "new version" but without a download (paid updates, update notification for users of dropped HW)
- installation now happens in a tool, rather than in the app being replaced
- Sparkle-related logs now separated into a separate file ~/Library/Logs/SparkleUpdateLog.log for easier QA/triage
- tons of small bug fixes
- more details at https://github.com/andymatuschak/Sparkle/pull/18
2011-10-03 22:45:50 -07:00
Andy Matuschak aa853a0f0f Increased the time required before finish_installation shows a dock icon from 1.2 seconds to 5 seconds 2011-09-30 09:52:32 -07:00
Andy Matuschak a47151c638 Moved the finish_installation plist into its Xcode group 2011-09-30 09:52:32 -07:00
Andy Matuschak 06642bba20 Fix to reachability patch in 9cc1905f87 for file:// URLs, which were crashing 2011-09-30 09:42:30 -07:00
Andy Matuschak f04a460d63 Removing the SDKROOT from ConfigBinaryDelta.xcconfig so it'll use ConfigCommon's (10.6) 2011-09-30 09:29:06 -07:00
Andy Matuschak 7d4ce0daeb Actually put the archs back; that didn't get caught in the last commit. 2011-09-29 18:32:56 -07:00
Andy Matuschak a2bcd53eaa Put the deployment targets and architectures back from 950e3894b35dd8bcfc1d4d692ebc0aafdeda8e44; kept the SDK root. 2011-09-29 18:29:19 -07:00
Andy Matuschak 5a47fb64c3 Merge remote branch 'ksuther/ulimerge' into ulimerge 2011-09-29 10:29:15 -07:00
Andy Matuschak c96aa2eda8 The finish_installation tool will not relaunch the host app if it's using the "Install on Quit" functionality. 2011-09-28 18:11:43 -07:00
Vasileios Georgitzikis e30a342813 Updated Greek translation 2011-08-28 14:59:05 +03:00
Kent Sutherland 320672c1f9 Disabled skip install on finish_installation so it isn't archived by Xcode 4. 2011-08-15 12:47:27 -04:00
Uli Kusterer 0bd27c0cb7 Satisfy some overly picky compilers. 2011-08-08 04:34:45 +02:00
Kent Sutherland 436107f20e Fixed preprocessor error if DEBUG isn't defined. 2011-08-01 13:14:02 -04:00
Uli Kusterer abda56d047 Make this build on 10.7. Might break building on earlier OSes. 2011-07-31 20:04:35 +02:00
Kent Sutherland 950e3894b3 Compile for i386/x86_64 on 10.6 only. 2011-07-25 16:44:32 -04:00
Kent Sutherland 2300f2bcb0 Set the level of the update check status window to NSFloatingWindowLevel if the host application is background-only. 2011-07-25 16:44:32 -04:00
Kent Sutherland a6d776ca04 Add SUVersionDisplayProtocol to public headers of framework. 2011-07-25 16:44:32 -04:00
Kent Sutherland 76e79d6f92 Set the base configuration of finish_install to the old relaunch configuration. 2011-07-25 16:44:32 -04:00
Kent Sutherland 9cc1905f87 Use SCNetworkReachabilityCreateWithName rather than SCNetworkCheckReachabilityByName, which is deprecated. 2011-07-25 16:44:31 -04:00
Michael Nickerson 78e24a6fe6 Changed from using OpenSSL to Apple's CDSA to verify DSA signatures. 2011-07-05 20:31:36 -04:00
Andy Matuschak f1a353840a Merge pull request #19 from dmgctrl/pr_gitignore
Added gitignore to strip out Xcode cruft.
2011-06-30 19:10:29 -07:00
Jason Allum 0f34252f4a Added gitignore to strip out Xcode cruft. 2011-06-30 09:17:01 -04:00
Andy Matuschak 000a24c63b Using /usr/bin/openssl in the signing scripts instead of /usr/bin/env openssl.
Fixes bug 793221.
2011-06-13 18:47:17 -07:00
Andy Matuschak 32d4f249d4 Added a new Info.plist key: SUPromptUserOnFirstLaunch. Set this to YES to disable Sparkle's usual behavior of waiting 'till the second launch of an app to prompt for update permission.
This is useful for apps which don't, under normal operations, get quit. Like a menu extra.
2011-05-26 18:52:24 -07:00
Andy Matuschak 96272fce7d Removed the pt_PT localization from Uli's branch, since it was largely untranslated, and used the one from master instead. 2011-05-10 17:28:45 +02:00
Andy Matuschak dc925712dc Fixed layout of localization XIBs 2011-05-10 17:24:27 +02:00
Andy Matuschak e71915b4fb Revert "Removing dead -[SUUpdateAlert showsReleaseNotesText] method"
It wasn't so dead after all. Curse you, bindings!
2011-05-10 08:02:33 -07:00
Andy Matuschak 31b9ba8dde Fixed localization warnings. 2011-05-09 22:57:50 -07:00
Andy Matuschak 83708695af Added a canonical scheme and got the unit tests going again. 2011-05-09 22:56:09 -07:00
Andy Matuschak bb363db7f8 Fixed some project warnings. 2011-05-09 22:40:38 -07:00
Andy Matuschak ba6c3b6854 Cleaned up SUUpdater.h 2011-05-09 22:32:45 -07:00
Andy Matuschak 200da2b1be Removing BuildSparkleFinishInstallTool.command -- I don't think it belongs in master. 2011-05-09 22:25:19 -07:00
Andy Matuschak db652744ef Removing dead -[SUUpdateAlert showsReleaseNotesText] method 2011-05-09 22:22:58 -07:00
Andy Matuschak 9f3d4fb524 Nuking ThreadSafePreferences 2011-05-09 22:22:12 -07:00
Andy Matuschak 86b6502342 Fixing a merge error which put finish_installation in /tmp rather than in ~/Library/App Support 2011-05-09 22:18:17 -07:00
Andy Matuschak fa671073fa Changing download destination from ~/Desktop to ~/Library/App Support/HOST_NAME 2011-05-09 22:08:09 -07:00
Andy Matuschak 4f1e5a72a0 Added back master's Turkish localization 2011-05-09 21:39:28 -07:00
Andy Matuschak bca574119b Removed the pt_PT localization from Uli's branch, since it was largely untranslated, and used the one from master instead. 2011-05-09 21:36:46 -07:00
Andy Matuschak acb8f5f076 Fixed layout of localization XIBs 2011-05-09 21:07:51 -07:00
Uli Kusterer 16ff5c6683 Added Sparkle icon to finish_installation application. 2011-05-03 11:30:10 +02:00
Uli Kusterer 67d53c04b7 Get rid of deprecation warnings on 10.6/Xcode 4 while still allowing to build for 10.4 compatibility (I hear Patrick needs that). 2011-05-03 11:05:37 +02:00
Uli Kusterer 910f78b569 Add strings file to the finish_installation tool. Apparently also remove a leftover NIB, though I don't remember actually doing that. 2011-05-02 17:40:52 +02:00
Uli Kusterer fdaf26e95d Added two new Mac Pro models. 2011-05-02 17:30:07 +02:00
Uli Kusterer a8854375f5 Manually merge project file (recreating the finish_installation application target) and make things build and run again. 2011-05-02 17:29:53 +02:00
Uli Kusterer 9937e5a17b Merge andymatuschak/Sparkle. 2011-05-02 15:52:15 +02:00
Uli Kusterer 67b0860a9f Add a dummy line to make sure that the binary is linked against WebKit when Sparkle is used. The SUUpdateAlert.xib file contains a WebView and if we don't link against WebKit, we will get a runtime crash when decoding the NIB. It is better to get a link error. 2011-05-02 12:48:43 +02:00
Uli Kusterer 5b90432f7e Make sure the update alert is *really* not resizable. 2011-05-02 12:46:52 +02:00
Uli Kusterer 7cd8974b7e Make Sparkle more robust when the permissions of ~/Library/Application Support/EyeTV are screwed up. We now authenticate if needed, when we copy the finish_installation tool. 2011-05-02 12:46:37 +02:00
Uli Kusterer 9c042a5767 The buttons in the update alert now auto-resize. Since we change the button width when we show "Learn More..." for no-download updates (e.g. paid updates or updates that may no longer run on the user's Mac), this simplifies localization a lot.
The requisite NIB changes have been checked in previously with the newest localizations.
2011-05-02 12:42:13 +02:00
Uli Kusterer 3db00fa137 All XIBs, all the time. 2011-05-02 12:31:21 +02:00
Uli Kusterer f6710e2379 Sparkle now warns the delegate before and after it brings up a modal panel. One can e.g. use this to unfloat floating windows that would otherwise cover the alerts. 2011-05-02 12:29:30 +02:00
Uli Kusterer 990dee6a8d Newest Elgato localizations. 2011-05-02 12:25:37 +02:00
Uli Kusterer 7bfec0f3c0 Added two MacBook Air models. 2011-05-02 09:50:05 +02:00
Andy Matuschak 3ea1a9eee4 Merge branch 'master' of https://github.com/lapcat/Sparkle into lapcat-master 2011-04-07 17:37:12 -07:00
Andy Matuschak f6e292fad3 Added Turkish localization courtesy Tasin Is. 2011-04-07 17:09:37 -07:00
Jeff Johnson 1cce7890d8 Delete stray LIBRARY_SEARCH_PATHS build setting. 2011-03-25 21:26:19 -05:00
Jeff Johnson 61340cab17 Delete redundant Sparkle in test app linked libraries. For some strange reason, there were two. 2011-03-25 21:08:07 -05:00
Jeff Johnson 4a95dbeddc Link against Cocoa rather than AppKit and Foundation. 2011-03-25 21:08:07 -05:00
Jeff Johnson 45178111b3 Don't include SUStandardVersionComparator.m in test app or unit test targets, because it's already in the framework target. 2011-03-25 21:08:07 -05:00
Jeff Johnson eef0f5f0dc Delete reudundant GCC_DEBUGGING_SYMBOLS build setting, because it's already specified in the xcconfig. 2011-03-25 21:08:07 -05:00
Jeff Johnson 1e1025f17d Delete redundant -Wundeclared-selector, because it is already specified in the xcconfig. 2011-03-25 19:01:20 -05:00
Jeff Johnson 69407123ba Let Xcode add developmentRegion to the project. 2011-03-25 18:58:11 -05:00
Andy Matuschak 096d43a7a6 Updated Slovak localization; thanks to Rudolf Gavlas 2011-03-01 18:55:58 -08:00
Andy Matuschak 00b67269d6 Bug #681912: Sparkle naively double-escapes enclosure URLs 2010-11-26 12:07:32 -08:00
Andy Kim 5fe0a7cb59 Merge branch 'master' of git://github.com/andymatuschak/Sparkle 2010-11-25 02:22:37 -08:00
Adam Wróbel 7baf50506b Call EVP_MD_CTX_init and EVP_MD_CTX_cleanup.
According to openssl documentation EVP_Verify should be accompanied by
calls to EVP_MD_CTX_init and _cleanup to avoid memory leaks. Not sure, but
adding for conformity's sake.
2010-10-15 01:27:14 +08:00
Adam Wróbel 40616b864a Generate keys that actually work with openssl.
According to FIPS 186-2 standard DSA keys should be >= 512 and <= 1024 bits.
Using a 2048 bit key on my system yields an openssl error in Sparkle's
SUDSAVerifier and causes the update to be rejected.

The error says (can be read only after hacking on Sparkle's code):
error:0A071066:dsa routines:DSA_do_verify:bad q value
2010-10-15 01:27:12 +08:00
Andy Matuschak 561bbbe294 Because of the way Sparkle forces SUUpdaters to be per-bundle singletons, it was possible for an SUUpdater to be dealloced before registerAsObserver was called, which in turn made an exception get thrown on unregisterAsObserver. 2010-09-13 10:28:18 -07:00
Andy Matuschak fba7231261 We used to not register SUUpdater as an observer of the shared user defaults controller if we were running as a bundle. The performance win is minimal, and if I stop doing that, we won't accidentally try to unregister as an observer and bother developers who break on [NSException raise]. 2010-09-10 17:16:31 -07:00
aidansteele b3ac18f173 Forgot to close dangling file descriptor in previous commit. 2010-08-24 22:58:56 +08:00
aidansteele e2a59fccb2 Fixed delta updates bug wherein updates fail on empty file.
mmap()ing empty files caused EINVAL to be returned and _hashOfFile
would return an incorrect result. This has been rectified.
2010-08-24 22:58:55 +08:00
Andy Matuschak a8f26b16c2 Merge branch 'master' of git@github.com:andymatuschak/Sparkle 2010-07-30 21:08:56 -07:00
Andy Matuschak b7a3999da8 [Bug 611564] [NEW] sparkle fails to build with clang due to -Werror.\n\nAlso, switching to Clang because hoorah. 2010-07-30 21:08:11 -07:00
Andy Matuschak a5c8e0b1e2 No longer hardcoding the Installer tool's relative executable path for Tiger. 2010-07-27 18:35:04 -07:00
Lukhnos D. Liu 2768e60ce1 Properly escapes the GET parameters in the appcast string with profile. 2010-07-23 13:08:39 +08:00
Andy Matuschak 9075d4a037 Fixing 603197: Package Installs Crash on 10.4 2010-07-08 22:37:28 -07:00
Andy Matuschak da35ef695b Fixing #601842: Chromium crashes when 'Install and Relaunch' is clicked 2010-07-05 12:18:22 -07:00
Andy Matuschak 394319e1fc Merge branch 'master' of git@github.com:andymatuschak/Sparkle 2010-06-20 17:20:29 -07:00
Daniel Jalkut 0c6e6fdd84 Plug leak in SUAppcastItem caused by neglecting to release minimumSystemVersion. 2010-06-20 17:20:04 -07:00
Vaclav Slavik 39bb82bd9a Don't compress in bsdiff.
bsdiff-produced patch is included in xar archive, where it's compressed
with bzip2 a second time. Leaving the bsdiff output uncompressed makes
it possible to compress it better in xar (e.g. using LZMA2 or gzip,
either of which performs better on some files).

Changes header signature of bsdiff patch file to BSDIFN40 to clearly
mark the format as different.

Backward compatibility is preserved, bspatch can read both BSDIFF40 and
BSDIFN40 formats.
2010-06-21 01:43:46 +08:00
Andy Matuschak 25d7faea7b Updates to the Czech localization. 2010-06-09 13:16:39 -07:00
Andy Matuschak a0c2de60d3 Merge branch 'master' of git@github.com:andymatuschak/Sparkle 2010-06-08 20:48:52 -07:00
Andy Matuschak e8299fd116 Fixing 578060: minor Spanish localization fix 2010-06-08 20:47:20 -07:00
Vaclav Slavik 4548228238 Fix 10.4 compatiblity broken by delta updates.
Delta updates code uses libxar, which is only available in 10.5+, and
Sparkle framework fails to load on 10.4 because of it. Instead of having
hard dependency on libxar, Sparkle now links with it weakly and checks
for its availability at runtime.  This required bumping Xcode project
compatibility to 3.2 to get weak linking support.

With this change, delta updates are still not supported on 10.4, but
Sparkle runs there again and just ignores the deltas. This should be
good enough given 10.4's age and shrinking user base.
2010-06-07 02:19:51 +08:00
Andy Matuschak fe1372c962 Fixing 572066: some fixes to the Japanese localization. 2010-05-04 13:42:27 -07:00
Andy Matuschak a6fcfa61b5 Fixing ridiculous error in the last commit caused by non-initialization of a variable. See bug #571486. Sorry about that, all. 2010-04-28 16:37:04 -07:00
Andy Matuschak c34e9b3c34 Added an extra null check to SUAppcast downloadDidFinish because NSXMLDocument and NSFileManager throw exceptions on nil arguments. See bug 456514. 2010-04-28 00:45:45 -07:00
Andy Matuschak ea81eeec57 Fixing bug 570023; two minor localization changes. 2010-04-26 01:14:47 -07:00
Andy Matuschak 19ae8506ab Removing extraneous -L and -F flags that were causing warnings. 2010-04-09 13:28:00 -07:00
Andy Matuschak 803676d56a Landing delta-updates. 2010-03-27 17:06:51 -07:00
Andy Matuschak 5975703b13 Fixed some silly compiler warnings. 2010-03-27 17:03:07 -07:00
Andy Matuschak ecd2ce227b Fixing 527923: a minor Spanish localization layout bug. 2010-02-27 16:39:17 -08:00
Andy Matuschak 3f502b6151 Fixing bug #527318, some minor Spanish layout issues. 2010-02-25 00:47:39 -08:00
Andy Matuschak fb43787317 Fixing bug #527318, some minor Spanish layout issues. 2010-02-25 00:46:57 -08:00
Uli Kusterer f81bfd9f1c Move ThreadSafePreferences.h dummy compatibility header to a different spot in Groups & Files. 2010-02-21 18:29:56 +01:00
Uli Kusterer 24ebb7b379 SUUpdateAlert.xib: Shut up warnings about offscreen windows and clipped content. 2010-02-21 18:29:23 +01:00
Uli Kusterer 2460f2fcf7 SUUpdateAlert.nib: Made sure all installButton outlets are hooked up. Converted from NIB to XIB. 2010-02-21 18:25:01 +01:00
Uli Kusterer 401e696590 Restore support for enclosure-less appcast items. If they have a sparke:version tag at the same level as the enclosure would be (as opposed to as an attribute on the enclosure), and no enclosure, but a "link" tag, the link tag's contents will be used as the URL for a "More Info" button to replace the "install" button.
Use this for paid updates, where you want to redirect users to your store page instead of installing an update they don't have a license key for.
2010-02-21 18:09:39 +01:00
Uli Kusterer 29035199f3 That checkbox was way too narrow. 2010-02-21 15:12:29 +01:00
Uli Kusterer b4210d8f61 Use symbolic constants, that's what they're for ;-) 2010-02-21 14:06:49 +01:00
Andy Matuschak c120af6b1f Fixed the "You're up-to-date!" string in the German localization to use hyphens. 2010-02-10 12:46:05 -08:00
max 96ea09e44f Fixed a crash causes by a additional autorelease. 2010-01-27 18:43:11 +01:00
Andy Matuschak f5a1b1c27d Fixing #511784: Subclass of SUBasicUpdateDriver can't find relauncher 2010-01-24 11:00:35 -08:00
Andy Matuschak 5cdfffa521 Fixing #511784: Subclass of SUBasicUpdateDriver can't find relauncher 2010-01-24 10:58:43 -08:00
Andy Matuschak a5245accf4 Fixed a few local-vs-ivar variable ambiguities. 2010-01-11 10:19:12 -08:00
Andy Matuschak 9bc63ccf7e Merge commit 'bdash/delta-updates'
This is a big one, guys. Haven't tested the new features in the merged branch yet.
2010-01-11 00:49:28 -08:00
Andy Matuschak 2e3ed79753 Fixing #502212: clang static analyzer identifies 2 leaks in Sparkle code 2010-01-11 00:28:49 -08:00
Andy Matuschak da3b5c2570 Updated Russian localization courtesy Alexandr. 2010-01-06 17:45:06 -08:00
Sean McBride 756b37d4a5 code review of CFRelease usage, minor changes 2010-01-04 20:47:55 -05:00
Sean McBride 36b7d434ad fixed extra ref count, half of bug #502212 2010-01-04 20:09:42 -05:00
Sean McBride b21b308203 all but a few places use the typical [[[foo alloc] init] autorelease] pattern, removed 3 explicit releases and use autorelease instead. There are now only 2 exceptions to this pattern left. One is probably justified, the other looks like a leak. 2010-01-01 00:53:30 -05:00
Sean McBride dab8a36a13 renamed all methods that start with underscore, since that's reserved by Apple. Similiar for global variable that started with double underscore 2009-12-31 23:38:25 -05:00
Sean McBride 152e6f9572 SUHost's technique for getting a generic bundle icon did not work, fixed 2009-12-30 00:34:19 -05:00
Sean McBride f8fbf370bc enabled GCC_WARN_UNDECLARED_SELECTOR warning now that all such warnings are fixed 2009-12-30 00:06:27 -05:00
Sean McBride 61291c77d7 Merge branch 'master' of git://github.com/andymatuschak/Sparkle 2009-12-30 00:00:20 -05:00
Sean McBride b90df8b254 fixed warning by moving private methods higher in the source file 2009-12-29 23:58:27 -05:00
Sean McBride 4dbc0dd47f removed define that was moved to pch 2009-12-29 23:56:28 -05:00
Sean McBride 9d3db1b103 fixed warning 2009-12-29 23:56:08 -05:00
Sean McBride b8c8b9e605 conditionally define NSAppKitVersionNumber constants in pch, properly conditionalise Obj-C code 2009-12-29 23:55:31 -05:00
Sean McBride d7260665d6 fixed warning by moving private methods higher in the source file 2009-12-29 23:50:31 -05:00
Andy Matuschak b96c95066c Update driver now correctly marks itself as "finished" before terminating.
This is important for apps which checked this value during an app delegate's applicationShouldTerminate:.

Thanks to Nick Zitzmann for the patch.
2009-12-27 22:49:04 -06:00
Uli Kusterer 3d352c6fcd Merge branch 'master' of github.com:uliwitness/Sparkle 2009-12-23 11:50:05 +01:00
Uli Kusterer 874572f7bb More strings changes from Elgato. 2009-12-23 11:47:24 +01:00
Uli Kusterer 8f0d7d0805 Strings changes from Elgato. 2009-12-23 11:47:07 +01:00
Uli Kusterer 65f8d2629a Actually use the build configurations. 2009-12-23 11:44:51 +01:00
Uli Kusterer c0ca2249a5 Revert Patrick's version number change.
- It made bracketed build numbers look like components of the version, which gave wrong results
- Added a test for one such broken build-numbered version number

TODO: Tests currently fail for Patrick's version numbers. Will have to write a smarter parser, or split this into two version comparator classes.
2009-12-23 11:43:58 +01:00
Uli Kusterer efe903bc73 More detailed error handling and logging.
- Take failure of stat into account
- Use correct format for printing uids
- SULog actual failure points.
- Cope with nonexistent destinations
2009-12-23 11:41:31 +01:00
Andy Matuschak fd20e0725b Added two stupid spaces. 2009-12-21 15:02:36 -06:00
Andy Matuschak 6c8f094bbe Merge commit 'seanm/master' 2009-12-20 18:20:37 -06:00
Uli Kusterer 50b76d59f7 Add missing include. 2009-12-15 16:51:01 +01:00
Uli Kusterer 4f76b42bb5 If we install under a normalized name, make sure we take owner/group from the target directory, not from a nonexistent destination application we haven't installed yet. 2009-12-15 16:50:43 +01:00
Uli Kusterer d593ab38ad Fix configuration for finish_installation.app target:
Otherwise it won't build correctly on 10.4 and gives us "unsupported required load command" errors instead of starting up.
2009-12-15 16:49:35 +01:00
Uli Kusterer a17f974357 Merge branch 'master' of github.com:uliwitness/Sparkle 2009-12-15 16:31:19 +01:00
Andy Matuschak 40dee9958b Added Portuguese translation courtesy Sérgio Miranda. Thanks! 2009-12-14 22:35:56 -06:00
Uli Kusterer 575bdda768 Make sure that, even on 10.4, we delete our temp folder. Also, we no longer use the stop-gap measure of trashing the temp folder, we really delete it after successful installation. 2009-12-14 22:36:34 +01:00
Uli Kusterer 9b116929ad Slightly more user-suitable error message. 2009-12-14 22:34:49 +01:00
Uli Kusterer 2e8fa61a5a More more correct way of creating an NSString from a C-string path. 2009-12-14 22:34:25 +01:00
Uli Kusterer cd93eb9098 Method for removing a file with optional authorization. 2009-12-14 22:33:00 +01:00
Uli Kusterer 4c765d86ee More correct way of turning a C-string path into an NSString. 2009-12-14 22:32:32 +01:00
Uli Kusterer fa8aaced55 Make sure we also delete the temp dir when the user clicks "cancel" during the download. 2009-12-14 22:30:56 +01:00
Uli Kusterer 1b02ab5f7f Make sure we delete the temp directory. 2009-12-14 22:28:47 +01:00
Uli Kusterer 0e609cc528 Make sure we delete the temp directory. 2009-12-14 22:28:14 +01:00
Uli Kusterer 5ec4c74b0b Fix typo in LONG_INSTALLATION_TIME constant. 2009-12-14 22:24:48 +01:00
Uli Kusterer 4d7006950a Make sure mdimport is run synchronously, not asynchronously. 2009-12-14 22:22:23 +01:00
Uli Kusterer e49a69895a Fix authorized file moving code:
- We now correctly handle the case where the containing directory doesn't allow us adding files without authorization (e.g. /Applications).
- We do the quarantine release *before* the copy.
2009-12-14 22:21:27 +01:00
Uli Kusterer 27f2b9c219 Move 10.4 SDK setting into xcconfig file. 2009-12-14 22:18:15 +01:00
Patrick Stein db820fbb0f updated the installer program to show an icon when the installation takes more than 1.2 seconds,
long installations have a program in the Dock
short installations just look like the program is restarting
some variable renaming to no longer have camelCasePath for char *
2009-12-12 13:52:42 +01:00
Patrick Stein ad4e9c74e0 changed back 10.4 settings cause it broke the updater on 10.4 2009-12-11 19:44:22 +01:00
Uli Kusterer 4797446f7c Be paranoid and wait for the mdimport to finish before we launch the app. Might make spurious "no executable" errors a bit less likely. 2009-12-11 15:17:59 +01:00
Uli Kusterer 0ffcde4fbb Make sure we delete the temporary folder when the user cancels the download. Also make sure we delete it on 10.4, which seems to have a bug in removeFileAtPath: that won't delete nested empty folders. As a quick fix, I just trash the folder in that case. We already put the old version in the trash anyway, and this saves me from having to write, test and debug a recursive removal function. 2009-12-11 15:13:30 +01:00
Patrick Stein f555e1143f Merge remote branch 'uliwitness/master' 2009-12-11 14:54:32 +01:00
Uli Kusterer bc3fd4542b Remove 10.4 SDK setting. Causes more problems than it helps. 2009-12-11 14:46:30 +01:00
Patrick Stein d3fac14586 Merge remote branch 'uliwitness/master' 2009-12-11 13:31:39 +01:00
Patrick Stein d0425a140a Updating an application now longer shows the installation application n the Dock (LSUIElement) , Removed TransformProcessType call as it will force the installer application to show in the Dock. 2009-12-11 13:28:10 +01:00
Uli Kusterer 64ec0c317e Tests for version numbers with build numbers. 2009-12-11 13:10:29 +01:00
Patrick Stein 5f694f82af Intermediate Update directory name contains the version number of the downloaded version 2009-12-11 12:53:52 +01:00
Uli Kusterer 590122f25a Merge remote branch 'andymatuschak/master' 2009-12-11 12:51:33 +01:00
Patrick Stein 9b670b9ea7 removed cmdline installation tool and copied installation app to Sparkle framework. 2009-12-11 12:24:41 +01:00
Patrick Stein 65e836cba1 fixed Version Comparision , added more testcases 2009-12-11 12:12:23 +01:00
Patrick Stein c634f61f2a commented unused boxView code. 2009-12-11 11:56:18 +01:00
Patrick Stein 776e78c459 added Prefix header to finish_installation_tool
added SystemConfiguration.framework to Sparkle
added SUWindowController.m to finish_installation_tool
added SUStatusController.m to finish_installation_tool

now compiles Sparkle. Now going to fix the testbuild
2009-12-11 11:51:15 +01:00
Andy Matuschak a03235851c Removing GNU-style ?: operators. Thanks for the report, Uli. 2009-12-10 15:52:47 -08:00
Uli Kusterer d2f843f92c Danish localization updates. 2009-12-08 19:09:11 +01:00
Uli Kusterer e9c69673ad Set floating window level on the update alert again, but only for bg-only apps. Don't want to annoy users by having an always-visible panel. 2009-12-08 19:03:20 +01:00
Uli Kusterer a453afa29a Delegate can now control how version numbers are formatted/displayed to the user, so we can e.g. exclude build numbers or whatever makes sense for a particular application. 2009-12-08 19:02:10 +01:00
Uli Kusterer cee669c276 Shutting up warnings due to missing includes and fix indentation on one line. 2009-12-08 18:58:59 +01:00
Uli Kusterer 2e0c1b0086 One more SULog() replacing an NSLog(). 2009-12-08 00:44:01 +01:00
Uli Kusterer 7686c86792 Adjust the width of the status window so all localizations fit. 2009-12-08 00:43:08 +01:00
Uli Kusterer 2e0f0211d1 We now really put the old app in the trash (and any file we have to move out of the way to install a new app when we reset an edited name), even on non-admin user accounts. +++ TODO: Work around double authorization. 2009-12-08 00:37:39 +01:00
Uli Kusterer 4f8d745305 Changed a few NSLogs() to SULogs(). 2009-12-08 00:36:07 +01:00
Uli Kusterer 9788c6849e We should now correctly replace renamed apps, trashing the custom-named one, installing a new one with a default name, and also moving out of the way any existing copy with the default name. 2009-12-08 00:29:55 +01:00
Uli Kusterer 48dfbac37a Don't insist on having a file to replace. When we normalize the name, we may not have one. 2009-12-08 00:20:29 +01:00
Uli Kusterer e4eccce811 Updated localizations. 2009-12-08 00:17:50 +01:00
Uli Kusterer 097c2fea42 Build for more than just current architecture. We only build 32-bit because otherwise we'll get errors against 10.4 SDK (where 64-bit AppKit is not yet supported). 2009-12-07 23:52:43 +01:00
Uli Kusterer 5a5b171a68 Commented preprocessor switches. Added a named switch for normalizing an app name (it was just a #if 1 before). 2009-12-04 09:35:20 +01:00
Uli Kusterer 343d6866c4 - finish_installation is now a real bundled app, so it can be localized.
- It contains its own copy of Sparkle.strings and SUUpdateStatus.nib so it can show its progress prettier
- We call TransformProcessType() before our first call to [NSApplication sharedApplication], so we can be launched as a command line tool and get a proper window server connection, and so our progress bars animate.
- We still support the old "relaunch"-style mode of operation, just by not passing the folder to install. This is useful for other relaunch occasions, like setting one's own dock icon flag.

- To do: Make sample app use the new finish_installation.
2009-12-04 09:20:21 +01:00
Uli Kusterer 2ad144c739 Partial Elgato string merges. 2009-12-04 09:13:25 +01:00
Uli Kusterer 983ad61d78 Maybe that makes the progress bar animate? No, it doesn't. 2009-12-04 09:12:42 +01:00
Uli Kusterer 27e87143e1 target is an ObjC object, so nil, not NULL. 2009-12-04 09:11:50 +01:00
Uli Kusterer d0b802e09b Added preprocessor defines to SUConstants.h for turning on/off DSA and downgrades. We let users downgrade using our URL scheme, and we warn them beforehand, so the downgrade possible attack paranoia gets in the way. 2009-12-04 09:11:11 +01:00
Uli Kusterer 8c67631efb Use installPath, not bundlePath here. 2009-12-04 09:06:55 +01:00
Uli Kusterer 18df114b70 Bring window to front when progress panel changes to "Install and restart", it's essentially a new alert coming up. 2009-12-04 08:52:42 +01:00
Uli Kusterer c51bf739cf Shut up undeclared selector warning. 2009-12-04 08:51:13 +01:00
Uli Kusterer 43a0a7db4f Merge of changes from SVN repository:
- Changed NTSynchronousTask to also give the status return value and direct stderror output to the outputData.
- Changed includes so this builds as part of an app, too, not just as a framework
- Made sure SUAppcast's dealloc releases some leaked ivars.
- Added infoURL, extracted from link, that can point to a "more Info" page for download-less URLs
- Added support for version attribute on item so we can support update notifications that don't include an enclosure (e.g. paid upgrades, or upgrades that would require a system update)
- Added/improved a few description methods to ease debugging.
- Added SULog so one can ask for a special log with additional information when there are update issues.
- Added mayUpdateAndRestart for apps that absolutely, positively can't restart right now (e.g. cuz they're burning a CD and would produce a coaster).
- Added updaterWillRelaunchApplication delegate method, analogous to the notification. Useful to have app delegate quit helper apps during installation.
- Made SUBasicUpdateDriver's abortUpdate implicitly retain/autorelease the update driver, because the notification center otherwise releases it and it goes away, causing crashes in superclass's abortUpdate.
- Merge of SUKeepDownloadOnFailedInstallKey and SUFixedHTMLDisplaySizeKey.
- Avoid a few warnings about missing prototypes
- Be paranoid, hdiutil can verify the download again, so let it. Better for internal apps where we turn off DSA checks, too.
- SUHost has an -installationPath now, independent from the bundlePath, so one can normalize the app name from "MyApp 1.1b4" back to "MyApp" Users assume the file name contains the correct version number when there is one in it. Saves support a few round-trips each time.
- Be better at threading: Try calling non-thread-safe methods on main thread only, and don't assume delegates know when they need to be thread-safe, call them on main thread where possible.
- Added a method to put the old copy of the app in the trash. 1.5git changed in this spot, so I didn't actually merge the code that uses it back in yet.
- Fix version comparison so it doesn't get confused by bracketed build numbers in version strings
- Make sure cancel button is disabled during extraction, otherwise user would crash.
- Don't put auto-update window at floating window level. It's huge and can't be switched to background! If you're an NSBGOnly where you need that, turn it on only in that case, but don't generally do such nonsense.
- Hide release notes view if there aren't any.
- Test whether we are on dial-up before checking for updates in background. It's not nice to cause (possibly expensive) dial-up periodically.
- Temporarily comment out DSA complaints for easier testing.
- Don't store (possibly already invalidated) one-shot NSTimers in an ivar. It's bad style. Retain it instead.
- Decompress some monster expressions with nested method calls in ternary operators and nested in method calls again.
- Don't use implicit "id" for params or return types.
- finish_installation now puts up a progress window, so user knows update is still not finished.
- Use ThreadSafePreferences (included dummy version that uses regular prefs for projects that don't use ThreadSafePreferences).

- Todo later: Change finish_installation to be prettier.
2009-12-04 08:40:46 +01:00
Uli Kusterer bbcfe7edf4 - More WIP creating finish_installation that waits
for quit, updates and relaunches the app, so
updates don't happen while app is still running.
NSBundle gets royally confused and points to the
old path (loading new NIBs into the old app in the
worst case) when you move a running app.
- Temp folder is now user's desktop, as
NSTemporaryDirectory() doesn't stay the same
between two separate apps, and may be emptied on quit.
- Relaunch gets created in App Support now, for
same reasons as above.
- Less dependency on prefix headers, that only leads
to lazy, un-reusable code.
2009-12-04 07:46:07 +01:00
Uli Kusterer a11578a863 WIP turning the relaunch tool into a finish_installation tool. 2009-12-04 07:40:28 +01:00
Andy Matuschak b546304d5d Updated Danish localization courtesy David Munch. 2009-11-28 12:37:27 -08:00
Sean McBride d7774c0dc0 performed a code review, specifically:
- changed some #include to #import
- fixed some NULL -> nil Cocoa coding conventions
- added new compiler warnings and fixed some warnings they generated
- check for nil from NSTemporaryDirectory
- added missing files to unit test and test app targets
- added xcconfig files for unit test target
- added @private to some ivars
- changes some variables from signed to unsigned as appropriate
- changed from base 2 to base 10 measurements of file size, consistent with both the actual meaning of metric prefixes and Apple's new policy as of 10.6
- reduced some unneeded copy-paste of code
- fixed failure to check for null from malloc and unneeded check against null before calling free
- OSErr was incorrectly used instead of OSStatus
- added some consts & statics to global strings
- fixed some issues discovered by static analysis
- fixed some 64bit issues, mostly related to casting and the use of slightly incorrect types/sizes
- some dealloc methods were using accessors, changed to access ivars directly, as per Apple guidelines
- removed old NS_DURING, NS_HANDLER, NS_ENDHANDLER macros
- fixed a bug where immutable data was being mutated
- removed all instance of "== YES" as they are dangerous
- removed some redundant nil checks
- fixed some leaks
- conditionally replaced deprecated method usage
- cleanup CF/NSMakeCollectable usage
- fixed bug in GC where memory could be collected too early due to lack of strong references when using UTF8String
- prevent passing null to CFRelease
2009-10-31 21:07:00 -04:00
Andy Matuschak bd80144c7b Fixing #456514: Appcast download crashes on 10.5 if download fails 2009-10-20 13:55:03 -07:00
Andy Kim 315cbaab1b Merge branch 'master' of git://github.com/andymatuschak/Sparkle
Conflicts:
	en.lproj/Sparkle.strings
2009-09-29 18:33:44 -07:00
Andy Matuschak af37928283 Fixed a Spanish localization issue in the update permissions prompt; fixed release-mode compatibility for Leopard. 2009-09-20 00:15:06 -04:00
Andy Matuschak 6a3df43017 Fixed Bug #428216: "Update alert does not use a proper emdash" 2009-09-20 00:05:23 -04:00
Andy Matuschak c747ffc35b Fixed Bug #428216: "Update alert does not use a proper emdash" 2009-09-19 16:55:16 -04:00
Joachim Bengtsson 7bfbe83d87 When failing to parse a feed item, tell the developer *what* the error is. No need for a full-fledged NSError because these errors only go to the console, not displayed to the user (who doesn't care). 2009-09-06 17:54:02 -07:00
Joy Zhao a871569867 Bug #423014: "Translation errors in Spanish and Italian" 2009-09-03 23:42:46 -07:00
Grant Erickson 65b071eb86 If no suitable packages or bundles are found to be installed, Sparkle will install the first package it finds in the distribution archive. 2009-09-03 23:29:50 -07:00
Christiaan Hofman 0e99d4fa80 Bug #402074: ".pkg installations should support asynchronous installation" 2009-09-03 23:20:03 -07:00
Andy Matuschak 8f00c3c274 Fixing Bug #422201: ""Checking for updates..." needs to be added to spanish (es.lproj) strings"
The Spanish localizer actually sent these over, but I forgot to add 'em in!
2009-09-01 20:36:46 -07:00
Stuart Morgan 4fad53007f Change availability checks so that they build on 10.4 2009-09-01 20:10:16 -07:00
Andy Matuschak e7435964a2 Fixing Bug #421608: "Update fails if more than one .app exists in the archive" 2009-08-30 20:24:28 -07:00
Ernesto Gomez Cereijo 8ea15468b4 Updated the Spanish localization. 2009-08-28 09:17:35 -07:00
Andy Matuschak 9025bef687 Fixed moving to trash on Tiger. 2009-08-27 22:04:51 -07:00
Fraser Speirs ffc44bb089 Added a space in the description of the SUNoFeedURL exception becuase it led me to believe that the value of SUFeedURLKey was actually @"SUFeedURLKey" and not @"SUFeedURL". 2009-08-27 11:29:15 +01:00
Andy Matuschak 6c968489eb Bug #381138: "Translator erros on check updates dialog"
A bunch of small localization tweaks courtesy Joy Zhao.
2009-08-27 00:54:21 -07:00
Andy Matuschak 2fc1b66a79 Fixing:
Bug #389869: "Sparkle runs thread-unsafe code on secondary threads"
Bug #312995: "Canceling authentication request causes crash on next update"
Bug #388793: "Need to notify SUUpdateDriverFinishedNotification on main thread"

The unfortunate side-effect of this fix is that all the file-handling code is now CoreServices-based, since NSFileManager is not thread-safe. This is disgusting and will be stricken from all records when installation is performed by relaunch in Next Major, as it should have been in the first place.
2009-08-27 00:43:32 -07:00
Andy Matuschak bd99d0451d Fixing Bug #274872: "Activate host app on automatic update when when host runs in background" 2009-08-27 00:04:53 -07:00
Andy Matuschak d62e47cd2e Fixing Bug #416798: "Sparkle should warn developers if the app has no public key and the appcast isn't https://" 2009-08-27 00:02:10 -07:00
Mark Rowe ab23fedd0c Merge branch 'master' into delta-updates 2009-08-23 15:18:46 -07:00
Simone Manganelli 43a603c1cc if the user chooses to not restart the host app after installing the new version, the Sparkle update status window goes away and stops annoying the user by staying on screen; originally by simX, http://github.com/rentzsch/clicktoflash/commit/c768f07087c769f12f7645e78dd42802da46048b 2009-08-23 14:19:57 -07:00
Simone Manganelli 9b5b541c82 Fix for Sparkle crasher in scheduleNextUpdateCheck. Originally by lapcat, http://github.com/rentzsch/clicktoflash/commit/f7ca07b3e6e6e13de8133d8e237f284f2ccdc066 2009-08-23 14:16:02 -07:00
Andy Matuschak 119bac527f Merge branch 'bdash/leak-fixes' 2009-08-23 09:52:55 -07:00
Andy Matuschak e9bc6a2915 Merge branch 'leak-fixes' of git://github.com/bdash/sparkle into bdash/leak-fixes 2009-08-23 09:52:40 -07:00
Andy Matuschak 2979338f8a Merge branch 'master' of git://github.com/bdash/sparkle into bdash/custom-user-agent-string 2009-08-23 09:46:39 -07:00
Andy Matuschak 830f633a6e Added new IB3 files for the changed localizations in the last revision.
Updated the German localization, courtesy Christoph Schmitz.
2009-08-21 19:07:37 -07:00
Mark Rowe 0d51d12e43 Merge branch 'master' into leak-fix 2009-08-21 15:28:30 -07:00
Mark Rowe 2d47989616 Remove bogus call to retain that results in a leak of an NSMethodSignature. 2009-08-21 15:26:55 -07:00
Mark Rowe f259b5e825 Return an autoreleased object as callers expect rather than leaking the dictionary. 2009-08-21 15:25:06 -07:00
Mark Rowe 3800b33c1a Merge branch 'master' into custom-user-agent-string 2009-08-21 14:47:51 -07:00
Mark Rowe dfe0eff095 Provide the ability to set a custom user agent string on all HTTP requests that Sparkle initiates. 2009-08-21 14:46:39 -07:00
Mark Rowe 8cdec40a03 Merge branch 'master' into delta-updates 2009-08-21 14:40:05 -07:00
Mark Rowe 6169234300 Rework the BinaryDelta tool to use NSOperationQueue in order to be slightly more portable.
There's slightly less concurrency as a result as all archiving operations are now performed
serially on the main thread.  Since these make up a small percentage of the overall runtime,
the increased portability makes this a reasonable tradeoff.
2009-08-21 14:40:00 -07:00
Mark Rowe 3ff2d82ecf Fix warnings and binary compatibility issues that crop up when building the BinaryDelta tool against different SDKs. 2009-08-21 14:40:00 -07:00
Mark Rowe 3ef4c09f71 Link against a static build of libxar as libxar.dylib didn't ship on Tiger. 2009-08-21 14:40:00 -07:00
Mark Rowe 79bd7ac090 Add an unarchiver for the delta format so that Sparkle can successfully install the delta updates. 2009-08-21 14:40:00 -07:00
Mark Rowe 6e648f14f4 Add support for parsing an extended <sparkle:deltas> element in the appcast that describes
the delta updates that are available for a given version.

The appcast would look a little something like the following:

<enclosure url="http://you.com/app/Your Great App 2.0.zip" sparkle:version="2.0" length="1623481" type="application/octet-stream" sparkle:dsaSignature="BAFJW4B6B1K1JyW30nbkBwainOzrN6EQuAh" />
<sparkle:deltas>
    <enclosure url="http://you.com/app/Your Great App 1.5 to 2.0.delta" sparkle:version="2.0" sparkle:deltaFrom="1.5" length="642381" type="application/octet-stream" sparkle:dsaSignature="MCa1JyW30nbkBwaC0CFBfeinOzrN6EQuAh=" />
    <enclosure url="http://you.com/app/Your Great App 1.4 to 2.0.delta" sparkle:version="2.0" sparkle:deltaFrom="1.4" length="928231" type="application/octet-stream" sparkle:dsaSignature="B6B1K1JyW30nbkBDBfeinOAszrN6Ea1JyW3" />
</sparkle:deltas>
2009-08-21 14:40:00 -07:00
Mark Rowe c3d8254324 Add a command-line tool that can generate and apply a binary delta between two versions of an application.
The delta file is a custom format created from the xar container format.  It describes the necessary
modifications to transform the contents of the old directory in to the contents of the new.  Binary
diffs are used to compress the differences between large files such as Mach-O binaries.  The binary
diffs are generated by bsdiff and applied via bspatch, both from bsdiff 4.3, the source of which is
included and used under a BSD-style license.
2009-08-21 14:39:54 -07:00
Andy Matuschak 15095640eb Fixing Bug #400536: @"The update is improperly signed." does not localized 2009-08-20 23:53:14 -07:00
Andy Matuschak 6070419761 Bug #377834: "MoreInfoView summary appears empty in SUUpdatePermissionPrompt in non-English locales" 2009-08-20 23:48:28 -07:00
Andy Matuschak db2f48ad09 Oops: *actually* finished doing the architecture configuration update. 2009-08-20 23:42:16 -07:00
Andy Matuschak cfe5206252 Fixing Bug #396495: "Wrong method name"
Just a convention mismatch in a private method.
2009-08-20 23:32:51 -07:00
Andy Matuschak 975f679148 Removing deprecated warning flag. 2009-08-20 23:29:39 -07:00
Andy Matuschak b571a3d58d Fixing Bug #398921: Sparkle should detect read/write errors on archive extraction
Thanks to Jim Turner for the patch.
2009-08-20 23:28:26 -07:00
Andy Matuschak 5090d4b3a0 Giving the "seconds" field a little more space. 2009-08-20 23:25:04 -07:00
Andy Matuschak 799b00211d Fixing Bug #338324: "Unsigned updates delivered over https fail"
Silly boolean logic error.
2009-08-20 23:24:13 -07:00
Andy Matuschak afe8afc41f Fixing Bug #393388: Leaking NSFileManager errors 2009-08-20 23:18:15 -07:00
Andy Matuschak 090e7c0ecb Fixing Bug #304674: "Debug linking can break on default Xcode projects"
Sparkle now builds for all architectures in debug mode.
2009-08-20 23:14:52 -07:00
Andy Matuschak e557b78394 Updated the CFBundleVersion script to use the Sparkle git hash instead of the Bzr revno. 2009-08-20 23:12:51 -07:00
Andy Matuschak c53f961690 Fixing Bug #272346: "Sparkle Test App needs to use the new preferences bindings" 2009-08-20 23:02:55 -07:00
Andy Matuschak 9e6b51fac9 Fixing Bug #415707: "Crash on hitting Esc in an update alert in garbage-collected Sparkle" 2009-08-20 22:50:34 -07:00
Andy Matuschak a6f98158a7 Removed a warning caused by the last commit. 2009-08-20 22:49:15 -07:00
Andy Matuschak ca040bdf9a Fixing #394787: "SUUnarchiver passes NSNumber to method requiring long" 2009-08-20 21:22:24 -07:00
Andy Matuschak f95cf6454d A little cleanup on bricooke's patch. 2009-08-20 20:58:53 -07:00
Brian Cooke 827c6adc03 when about to show the user what will be anonymously sent, make sure the delegate is told that systemprofile info will be sent so it knows to put its custom additions in there. 2009-08-20 10:00:41 -06:00
Andy Matuschak 59d9ece06b Fixes bug #337331: "Status progress still doesn't animate"
In general, the progress indicator bindings for animate and isDeterminate are totally unreliable. Giving up on them.
2009-08-19 23:29:21 -07:00
Andy Matuschak 1dd1b09e5f Fixing #341643: "wrong version number in automatic update alert"
Thanks to Jim Turner for the patch.
2009-08-18 22:20:46 -07:00
Andy Matuschak 58296ecaf7 Added a Czech localization courtesy the Czech X Team. 2009-08-18 21:58:50 -07:00
Andy Matuschak 3b0674320f Made the test app use garbage collection when built in the GC build configuration. 2009-08-18 19:53:45 -07:00
Andy Matuschak a8b2b4f962 Removed an extraneous space from an Italian string. 2009-08-16 02:27:37 -07:00
Clint Shryock 6fc32b6800 added readme file.
Pulled information from http://sparkle.andymatuschak.org/
2009-08-13 21:09:53 -05:00
Andy Matuschak 1e20d43c2a Added brazilian portuguese localization courtesy Paulo Neto. 2009-08-11 23:37:33 -07:00
Andy Matuschak 52814bcbd0 Removed .bzrignore 2009-08-11 00:06:29 -07:00
Andy Matuschak 74fccaaab5 Added the new Polish and Japanese localizations to the project. Oops. 2009-07-31 22:46:32 -07:00
Andy Matuschak 6813a06455 Added Japanese translation courtesy Koichi Matsumoto. 2009-07-30 19:35:45 -07:00
Andy Matuschak e423cfee35 Going back to GCC for compilation. 2009-07-11 00:56:43 -07:00
Andy Matuschak 7316a00e9c Removed SL-deprecated NSFileManager methods. Left the old ones around #if'd for 10.4 support; I look forward to removing them. :)
Thanks for the patch, August.
2009-06-20 18:41:40 -05:00
August Joki 54299d766a added #ifdef's for Tiger support 2009-06-14 21:37:45 -07:00
August Joki f2a7b4b349 Fixed deprecated APIs to use replacements. 2009-06-14 19:30:46 -07:00
Andy Matuschak 150718ad6f Fixing the behavior of one of the build scripts when run multiple times; thanks for the patch, Stuart. 2009-05-22 00:02:43 -07:00
Stuart Morgan 0904ec151c Fix fr_CA linking so that it works correctly when run multiple times. 2009-05-21 21:02:35 -07:00
Andy Matuschak dff6e0832c Merging in a fix to a bug which caused the user agent string not to be null-terminated. 2009-05-19 11:44:02 -07:00
Andy Matuschak e983c03232 Added missing "Cancel Update" string. 2009-05-19 11:35:52 -07:00
Jeremiah Boyle d1c54608f7 [cleanedAgent bytes] is not null-terminated so stringWithCString produces a bad NSString. use initWithData instead. 2009-05-09 17:31:35 -04:00
Andy Matuschak 24b6c88935 Added Icelandic localization courtesy Steingrímur Árnason. 2009-05-08 09:26:46 -07:00
Andy Matuschak 6397e56c06 Updated Sparkle's license to include external licenses. 2009-04-28 20:27:24 -07:00
Andy Matuschak 9785111857 Merging in fix for 10.4 SDK 2009-04-05 14:42:09 -07:00
Stuart Morgan 522ffb08f0 Add a conditional definition of NSAppKitVersionNumber10_4 to allow building against the 10.4 SDK. 2009-04-04 21:48:21 -07:00
Andy Matuschak 22129e3ec7 Fixes #353896: SUWindowController should #import SUHost 2009-04-02 10:41:24 -07:00
Andy Matuschak 4431864770 Added Danish, Chinese Traditional, and Chinese Simplified translations to the project. 2009-04-01 20:51:21 -07:00
Andy Matuschak 23a57f7876 Fixed a bug that might occur in debug configurations with weird working paths. Thanks to Uli Kusterer for catching it. 2009-03-30 15:40:12 -07:00
Andy Matuschak 05b75aa44c Fixes Bug #321761: Update crashes below NSTask if /usr/bin/mdimport does not exist or is not executable 2009-02-11 14:54:55 -08:00
Andy Matuschak e35a1ca231 Added Polish localization courtesy Grzegorz Wilk.
Fixed a string in the Spanish localization.
2009-02-10 10:21:40 -08:00
Andy Matuschak 1cc6c2b9ca Updated Spanish localization courtesy Alexsander Akers. 2009-02-10 10:16:22 -08:00
Andy Matuschak 8c092c7453 Fixing 316105: "Icon defaults to app icon, also for non-app bundles"
Thanks to Hofman.
2009-01-12 14:31:52 -08:00
Andy Matuschak 6631fce15f Undoing accidental change to a build configuration. Oops! 2009-01-10 00:14:05 -08:00
Andy Matuschak 7071142aad Improving Sparkle's robustness against apps without a CFBundleVersion. 2009-01-09 18:57:29 -08:00
Andy Matuschak 34586bca5a Finishing fixing #279454 (up to date -> up-to-date) 2009-01-08 10:49:41 -08:00
Andy Matuschak 516638a6d7 Fixing Bug #314456 "SUPackageInstaller exec of 'open' on 10.4"
Thanks to Peter Speck for the patch. This could use some testing!
2009-01-06 14:32:10 -08:00
Peter Speck d4c39a2ad9 Fallback to Installer.app on 10.4 2009-01-06 23:09:32 +01:00
Andy Matuschak d6288c175e Fixing Bug #301614: "SUUpdater initForBundle: should be public" 2009-01-05 23:12:48 -08:00
Andy Matuschak 08b785083a Fixing Bug #300053: "Disable signature requirement when appcast and update archive URLs are local" 2009-01-05 23:11:26 -08:00
Andy Matuschak a7818f0f64 Fixing Bug #279454: "Spelling error in update framework"
"up to date" -> "up-to-date"
2009-01-05 23:06:20 -08:00
Andy Matuschak 52642aa11a Fixing Bug #275463: "SUScheduledUpdateDriver doesn't call updaterDidNotFindUpdate"
Thanks to Peter Speck for the patch!
2009-01-05 22:58:55 -08:00
Andy Matuschak 27c886f6b9 Updated French localization; thanks to Ronald Leroux. 2009-01-05 15:12:48 -08:00
Andy Matuschak 85eb5a7496 Fixing #314047: "Wrong version check in SUHost code"
Thanks to Hofman for the patch and the catch.
2009-01-05 09:42:35 -08:00
Andy Matuschak 91c242ac04 Fixes Bug #312381: "Bundles can't ask for permission to update; developers have to hard-code YES for SUEnableAutomaticChecks"
Thanks to Hofman for the patch! Now the update cycle will be started once the SUUpdater instance is instantiated; bundles no longer need to expressly start the update cycle.
2009-01-01 13:37:08 -08:00
Andy Matuschak 8ff6c147f2 Fixing 301644: Limit WebView Contextual Menu
Thanks to David Dauer for the patch.
2008-12-27 23:14:55 -06:00
Andy Matuschak 8b4bb5a078 Fixing #302886: Standard web preferences are polluted
Thanks to Martoche for the patch.
2008-12-27 23:07:36 -06:00
Andy Matuschak 9d260f9b0e Bug #275309: Crash in NSURLConnection
This one's a little experimental. Credits to Hofman for the patch. This changes the appcast fetching over to NSURLDownload from NSURLConnection. Test, please!
2008-12-23 22:11:17 -06:00
Andy Matuschak 59cd48f3de Added Danish localization courtesy Mogens Thyregod
Added Chinese Traditional localization courtesy Jack M. H. Lin
Added Chinese Simplified localization courtesy JT Lee
2008-12-18 23:22:59 -06:00
Andy Matuschak b11db20742 Added Slovak localization courtesy Rudolf Gavlas. 2008-12-18 12:28:09 -06:00
Andy Matuschak f186aa6896 Fixed some deprecated method use which caused warnings with new versions of the iPhone SDK. 2008-12-16 00:08:33 -06:00
Andy Matuschak 2bedf000a8 Added Korean localization courtesy 동성... 2008-12-10 20:02:42 -08:00
Peter Speck 3d6f4544f1 SUScheduledUpdateDriver doesn't call updaterDidNotFindUpdate 2008-09-28 16:39:05 +02:00
Andy Matuschak 13deac9b58 Fixes 271378
Sparkle is now willing to install a bundle in the archive with the same bundle identifier as the running app as a fallback strategy.

Thanks to Jim Turner for the patch.
2008-09-19 18:24:52 -07:00
Andy Matuschak 21c60ef7ce Fixes 272211
Sparkle is now installing .pkgs by launching Installer.app with open instead of NSWorkspace; the latter resulted in strange window ordering. Thanks to Peter Speck for the patch.
2008-09-19 18:16:10 -07:00
Andy Matuschak 83adbb2979 Fixes 270585
Now symlinking fr_CA.lproj correctly.
2008-09-19 14:28:05 -07:00
Peter Speck c614b679e1 Install.app launches in semi-background from PrefsPanel 2008-09-19 19:48:10 +02:00
Peter Speck 10bcc69c80 fix fr_CA.lproj symlink 2008-09-15 18:33:36 +02:00
Andy Matuschak 9eb4368d6f Updated sample appcast to be appropriate for DSA signatures being required. 2008-09-13 22:54:16 -05:00
Andy Matuschak 783fd4b475 Merging in new Dutch localization changes. 2008-09-13 22:53:53 -05:00
Andy Matuschak 00efab8ad2 generate_key.rb => generate_keys.rb 2008-09-11 22:08:32 -05:00
Andy Matuschak d73b3745bf Fixes 268756
When determining LSUIElement status, Sparkle now asks the process manager instead of checking Info.plist; this'll support apps that change their LSUIElement status at runtime.
2008-09-11 11:33:18 -05:00
Andy Matuschak ccd44c0cb2 Fixes 268723
Now forcing a DSA signature check if the client provides a public key with the app.
2008-09-10 17:48:57 -05:00
Andy Matuschak 9a0acca849 More security tidbits!
This patch prevents malicious downgrades, which are still possible with DSA validation: suppose there's some (signed) version with a security hole. A malicious attacker could serve an appcast with that version's URL and DSA signature, but a higher version number, forcing the user to "upgrade" to the version with the security hole.

While I was at it, I fixed a bug that should have completely stopped .pkg installation from working since 1.5b1. Why didn't I hear anything about that? Does anyone actually use .pkgs? It still needs testing to be sure it works.
2008-09-10 11:47:58 -05:00
Andy Matuschak 95f9658a7e Fixes 244692
Fixing a GC leak that would occur on non-64-bit machines.
2008-09-10 10:47:22 -05:00
Andy Matuschak 0fa24ce313 Restored the old default font size for release notes, now that we're doing webview preferences a different way. 2008-09-10 10:45:58 -05:00
Andy Matuschak 28ad466aa8 Fixes 268471
-- Removed obsolete configuration settings regarding 10.3 support.
-- Stopped a configuration file from getting added to the Resources folder.
2008-09-10 10:39:31 -05:00
Andy Matuschak 7e9fc0f20b Changed the security policy once more:
The user is defined as "safe" and exempt from DSA signatures if he downloaded both the appcast and the update over SSL.
2008-09-10 10:37:47 -05:00
Andy Matuschak 7f5689835b Fixed a small security hole: release notes specified with a file:// URL would be able to read files on your file system through Javascript (basically a cross-site scripting attack). file:// URLs are therefore no longer supported for release notes. 2008-09-09 23:39:00 -05:00
Andy Matuschak 478e0a53d0 Fixed a potential security vulnerability in which the download is transmitted over SSL but is from a malicious server. Now the download has to be transmitted over SSL *and* the download's host has to be the same as the appcast's. 2008-09-09 23:34:20 -05:00
Andy Matuschak 588cad8d91 Killed off SUExpectsDSASignatureKey. 2008-09-06 19:07:54 -05:00
Andy Matuschak 1d3ab8d6bb Alright, guys. No more Mr. Nice Sparklepants. Sparkle now requires either DSA-signed updates or SSL transport. If you want to put your users at risk, you're going to have to comment out some code and recompile.
I included some scripts to help you along, though. IANASG (I Am Not a Security Guy), though, so if you know your shit, feel free to do it on your own as before.
2008-09-06 18:59:50 -05:00
Andy Matuschak e086aa1660 Munged localizations so that unicode characters like em-dashes and ellipses are now in the values of the localization strings, not the keys; putting them in the latter made Sparkle unbuildable on Tiger. Thanks to Stuart Morgan for the patch. 2008-09-06 12:34:03 -05:00
Stuart Morgan 188a15a948 Fix a key in sv.lproj 2008-09-04 20:22:45 -07:00
Andy Matuschak 874660f52e Added a warning log message for bundles which don't have a CFBundleIdentifier key. 2008-09-04 10:51:46 -05:00
Stuart Morgan 29bd46d68d Don't use unicode in NSString literals 2008-09-04 07:57:17 -07:00
Andy Matuschak cb80e0ef51 No longer polluting the standard WebView preferences. Thanks to Christiaan Hofman for the patch. 2008-09-04 09:53:53 -05:00
Andy Matuschak ccef53a3d3 Fixes 259704
Fixed a memory leak in the update permission prompt.
2008-09-04 09:44:35 -05:00
Andy Matuschak d201803259 More fixes for 258060
Fixes a bug which could cause a crash when the update item is chosen by the delegate from the appcast. Thanks, Christiaan Hofman.
2008-09-03 22:34:25 -05:00
Andy Matuschak 74b206dc77 Fixes 259455
Fixes release notes stored raw in the <description> key. Thanks to Peter Speck for the patch.
2008-08-19 21:57:23 -07:00
Andy Matuschak 42cda2d2e0 Fixes 259062
Added a SUUpdater key for lastUpdateCheckDate. Thanks to Peter Speck for the patch!
2008-08-19 21:44:39 -07:00
Andy Matuschak c386b704b5 Partial fix for 245277: basic descriptions for some Sparkle classes. Thanks to Christiaan Hofman for the patch. 2008-08-19 21:24:26 -07:00
Andy Matuschak 84be00b29f Fixes 258991
The selector for the updaterWillRelaunchApplication delegate call had a typo in it, so it wasn't getting called. Oof.
2008-08-19 21:13:15 -07:00
Andy Matuschak d064b589ae Fixed the total failure of the SUProbingUpdateDriver to notify its delegate when an update is found. Sorry about that, guys! Wow. 2008-08-19 21:09:31 -07:00
Peter Speck 90edd12e43 No update-release notes displayed for when using <description> instead of <sparkle:releaseNotesLink> 2008-08-19 17:50:28 +02:00
Peter Speck c71bf3ccbe Provide getter for SULastCheckTimeKey 2008-08-18 15:11:05 +02:00
Andy Matuschak 724b4de07e Renamed SUAppcastItem's "description" key to "itemDescription" so as not to conflict with the standard Cocoa description method. 2008-08-17 15:23:50 -07:00
Andy Matuschak 444b0a928d Fixed a stupid mistake that prevented my fix for parameterized URLs from actually functioning. 2008-08-17 14:15:57 -07:00
Andy Matuschak ec8fcbc02f If an update's display version is the same as the host's display version, the internal version number will be presented in parentheticals. 2008-08-17 13:51:55 -07:00
Andy Matuschak 68e2cd67d1 Fixes 258492
Sparkle can now handle appending parameters to URLs which already have parameters (like http://foo.org/baz?bat=4)
2008-08-17 13:42:47 -07:00
Andy Matuschak c21e1aba35 Fixes 258529 and 257967
Added backwards compatibility support for Sparkle 1.1's behavior of disabling automatic updates when the check interval was 0.

Sparkle will now properly reset the update cycle when setAutomaticallyChecksForUpdates or setUpdateCheckInterval is called for non-.app bundles.
2008-08-17 13:25:49 -07:00
Andy Matuschak ec7f38d157 Fixes 258547
SUUpdater now implements two new keys: "automaticallyDownloadsUpdates" and "sendsSystemProfile".

Here's the current state of the setting keys, as documented by Christiaan Hofman:

* UserDefaults through SUUpdater accessors with default value in Info.plist:

SUFeedURL
SUScheduledCheckInterval
SUEnableAutomaticChecks
SUSendProfileInfo
SUAutomaticallyUpdate

* Info.plist only (app settings):

SUShowReleaseNotes
SUPublicDSAKey
SUPublicDSAKeyFile
SUExpectsDSASignature
SUEnableSystemProfiling

* UserDefaults only (private persistent state):

SUHasLaunchedBefore
SUSkippedVersion
SULastCheckTime
SULastProfileSubmitDate

This revision also corrects a compilation error from r285.
2008-08-17 13:06:33 -07:00
Andy Matuschak 5b38483981 Fixes 245723
Refactoring some code through new simplified "objectForKey" and "boolForKey" methods on SUHost which abstract the behavior of a user defaults preference defaulting to an info.plist setting. Thanks to Christiaan Hofman for the patch.
2008-08-17 12:35:41 -07:00
Andy Matuschak 46312a2d15 Fixes 258060
Fixed a couple memory leaks. Thanks to Christiaan Hofman for the patch.
2008-08-17 12:15:01 -07:00
Andy Matuschak 8a240f7c46 Fixes 258708
Returning the update alert's web view's default text size to 11. I swear I've done this like twice already!
2008-08-17 11:24:36 -07:00
Maarten Van Coile 17ca061cda Update Dutch to 1.5b5 2008-08-15 19:30:29 +02:00
569 changed files with 37920 additions and 7629 deletions

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
*.pbxuser
.DS_Store
*.perspective*
.svn
+45
View File
@@ -0,0 +1,45 @@
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackParameters: true
BreakBeforeBinaryOperators: true
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
#DerivePointerAlignment: false
DisableFormat: false
#ForEachMacros: foreach,Q_FOREACH
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
#PointerAlignment: Right
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
Standard: Cpp03
TabWidth: 4
UseTab: Never
+43
View File
@@ -0,0 +1,43 @@
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.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
Network Trash Folder
Temporary Items
.apdisk
+5
View File
@@ -0,0 +1,5 @@
language: objective-c
osx_image: xcode8
before_install:
- brew update
script: make ci
+455
View File
@@ -0,0 +1,455 @@
# 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 macOS 10.10 (C.W. Betts)
* Updated Japanese localization (1024jp)
* Added Greek localization
# 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)
* Restored original Sparkle icon. (Jake Petroules)
* Switched SUUpdateAlert.xib to AutoLayout (Kornel Lesiński)
* Replace references to andymatuschak.org with sparkle-project.org. (Jake Petroules)
* Several code cleanups, modernizations, fixed warnings and improved code formatting (Jake Petroules)
* Make the repository significantly more organized. (Jake Petroules)
* Xcode project: set organization name and class prefix. (Jake Petroules)
* Link to Foundation and AppKit instead of Cocoa. (Jake Petroules)
* Use new operatingSystemVersion API when available. (Jake Petroules)
* Add .clang-format configuration file for source code formatting. (Jake Petroules)
* Add a target to build Sparkle API documentation using Doxygen. (Jake Petroules)
# 1.7.0
* 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)
* Use more Blocks/libdispatch code. (C.W. Betts)
* Cleaned up and improved security of `generate_keys`/`sign_update` scripts
# 1.6.1
* Removed archive password prompt (Kornel Lesiński)
* (Re)fixes bug where URLs are naively double escaped (Andrew Madsen)
* Fixed typo that caused crashes in BinaryDelta (Tamas Lustyik)
* SUStandardVersionComparator.h is public (Vincent CARLIER)
* Remove pre-10.6-specific code. (C.W. Betts)
* Objective C 2 getters and setters. (C.W. Betts)
* Define correct dependencies on locale scripts (Antonin Hildebrand)
# 1.6.0
* Cleaned up and deleted redundant strings files (Kornel Lesiński)
* Modern Objective C syntax, properties where possible. (C.W. Betts)
* Make SUAppcastDelegate a formal protocol. (C.W. Betts)
* Fixed default font in release notes WebView (Kornel Lesiński)
* Configurable name for finish_installation.app (Kornel Lesiński)
* Removed code for 10.4 (Kornel Lesiński)
* Convert all strings files to UTF-8 (UTF-16 must die) (Kornel Lesiński)
* Removing GC target (Matt Thomas)
* finish_installation.app and pkg files will not removed when we use *.pkg installer and restart system in the installer (Takayama Fumihiko)
* Select Korean and Slovak for Sparkle.strings localization (Shon Frazier)
* Updated the Romanian translation (Gabe)
* pt-BR localization polishing (BR Lingo)
* update zh_CN (61)
* Shut up some warnings & make build with newer Xcode (Uli Kusterer)
* Less unsafety with format strings (Uli Kusterer)
* New icon (Rick Fillion)
* fixed a 'content rectangle not entirely onscreen' warning (Simone Manganelli)
* updated sends system profile to use info.plist if user defaults key isn't present (Jamie Pinkham)
* Support for notifications on some updater events (Doug Russell)
* Allow the delegate to trigger a silent install and relaunch (Matt Stevens)
* Support silent relaunches (Matt Stevens)
* Increment the sudden termination counter if installing on quit (Matt Stevens)
* Prompts the user to update after a week (rather than a day) if he doesn't quit the app (Andy Matuschak)
* Adding <sparkle:tags> appcast item element, <sparkle:criticalUpdate /> tag (Andy Matuschak)
* We have this check box that says "Automatically download and install updates in the future." But we only download them automatically. We still ask permission again before installing them. (Andy Matuschak)
# 1.5.0-beta6
* Important Changes
* Sparkle now requires DSA signatures on your updates. Check the documentation for more information on how to set that up if you don't already sign your updates. You can bypass this requirement if you deliver both your appcast and your updates over SSL.
* Sparkle will no longer display release notes located at file:// URLs, since Javascript on such a page would be able to read files on your file system.
* For security reasons, Sparkle will refuse to install updates which appear to "downgrade" the app.
* SUUpdater now implements new keys: "automaticallyDownloadsUpdates", "lastUpdateCheckDate", and "sendsSystemProfile."
* Fixed a bug that could prevent SUProbingUpdateDriver from working.
* Fixed a bug that prevented the updaterWillRelaunchApplication: delegate method from getting called.
* Fixed displaying release notes transmitted "loose" in the <description> key.
* Fixed Sparkle compilation on 10.4 systems.
* Fixed a bug that could cause window confusion if an app changed its LSUIElement at runtime.
* Added support for Sparkle 1.1's behavior of disabling updates when the check interval is 0.
* Sparkle can now handle appending parameters to URLs which already have parameters.
* If an update's sparkle:shortVersionString is the same as the host's CFBundleShortVersionString, the sparkle:version and CFBundleVersion will be presented in parentheticals.
# 1.5.0-beta5
* Important Changes!
* Made every Sparkle class private except for SUUpdater, SUAppcast, SUAppcastItem, and the SUVersionComparisonProtocol.
* There is now a single SUUpdater singleton for every host bundle; instead of -[SUUpdater setHostBundle], you can use +[SUUpdater updaterForBundle].
* Redefined the (entire) delegate protocol accordingly.
* Renamed -[SUUpdater updatePreferencesChanged] to -[SUUpdater resetUpdateCycle]. This provides better semantics for non-apps, which need to start the update cycle manually.
* -[SUUpdater checkForUpdatesWithDriver] is private. If you were using SUProbingUpdateDriver, you can now use -[SUUpdater checkForUpdateInformation] for a similar effect.
* All the user defaults keys are now private; instead, SUUpdater is KVC-compliant for automaticallyChecksForUpdates, updateCheckInterval, and feedURL.
* Reduced the size of the English-only framework by 25%.
* System profiling information is now only submitted to the server once per week; this will help normalize your statistics across users with different interval preferences.
* The feedParamatersForUpdater: delegate method now requires "displayKey" and "displayVersion" keys so that it can inform the user what's being sent.
* Added a delegate method called pathToRelaunchForUpdater: which can be used for plugins to provide the path which should be used when relaunching the client after installing an update.
* Added support for xml:lang to pick localized nodes in appcasts (for release notes, etc).
* Fixed a bug which would cause the "checking for updates" window to not disappear in certain extraordinary error conditions.
* Fixed a DSA signature checking bug for .tar.gz archives.
* Sparkle now refuses to update on any read-only volume, not just dmgs.
* Sparkle will clean up the host app's name and version before sending it as the user agent string; some non-ASCII characters were causing problems.
* Added an Italian localization courtesy Michele Longhi.
* Added a Swedish localization courtesy Daniel Bergman.
* Fixes to the French localization courtesy Ronald Leroux and Yann Ricqueberg.
* Fixes to the German localization courtesy Sven-S. Porst.
* Fixes to the Russian localization courtesy Alexander Bykov and Anton Sotkov.
* Fixed a number of issues related to archive format detection: I reverted back to extensions from UTIs.
* Focus behavior fixes for LSUIElement apps.
* The status window progress bar now animates even when indeterminate.
* Major refactorings to improve functionality for non-app bundles.
# 1.5.0-beta4
* Fixed a critical bug which prevented non-.dmgs from unarchiving properly.
* Added reporting of 64-bit capability to the profiling system.
# 1.5.0-beta3
* Added a new delegate method to SUUpdater.h to allow delegates to specify custom version comparators.
* Added a German localization, courtesy the Camino localizer team: Dominik Tobschall, Tobias Stohr, and Friedemann Bochow.
* Bug fixes:
* Fixed a serious bug which could cause a server to be DDoS'd (or the host app to crash!) if an appcast fails to be parsed.
* Fixed .tbz extraction if the archive was made with Stuffit.
* Fixed support for .tar.bz2 and .tar.gz; Sparkle has to assume the archive is a tar when it sees "bz2" and "gz"; don't use those without tarring.
* Fixed a typo which caused the shouldPromptForPermissionToCheckForUpdatesToHostBundle: method to not work in 1.5b2.
* Fixed .zip extraction on Tiger (Apple changed the UTI between releases)
* Fixed a crasher on Tiger.
* Fixed display of the default app icon when the host app doesn't have an icon.
* Sparkle now displays a sensible progress string and uses an indeterminate progress bar when the server doesn't report a file size.
* Fixed some memory leaks.
# 1.5.0-beta2
* Compatibility Issues:
* Most of the delegate method selectors have changed to scale better. See SUUpdater.h for changes; you'll likely have to make changes if you implement any delegate methods.
* If you're using .tar.gz or .tar.bz2 archives, name them ".tbz" or ".tgz" instead; Sparkle now uses UTIs for archive detection, and it's not smart about double extensions.
* I'm no longer supporting 10.3. This may or may not work on Panther—probably not.
* Sparkle's no longer built for ppc64 by default. If you want to ship that, feel free to build your own, but this saves a few hundred k.
* Enhancements:
* Sparkle now detects if the preferences for automatic update checks or the time interval change mid-cycle.
* If your product is a non-.app, you need to clue Sparkle in on the change by calling [[SUUpdater sharedUpdater] updatePreferencesChanged].
* Added a cancel to the "checking for updates..." dialog.
* Sparkle now cleans up all its litter in /tmp.
* Made SUUpdater's delegate an IBOutlet so you can hook it up in IB.
* Bug fixes:
* Sparkle no longer crashes on non-GC hosts when the user cancels an update's downloads.
* Sparkle no longer gets stuck in an inconsistent state or crashes when it can't parse the appcast on scheduled updates.
* Added the sharedUpdater method to SUUpdater, as it should have been.
* Fixed a bug where the "checking for updates..." window wouldn't go away if an error occurs while checking for updates.
* Made the dual-mode build configuration actually use the .xcconfig which builds it with GC support. (oops!)
* Fixed relaunching for prefpanes.
* Sparkle no longer fails to install updates on Snow Leopard (though there's still an issue with trashing the old version of the app, but it seems to be a 10.6 bug)
* Sparkle now handles redirects correctly under Tiger.
* Fixed the installation path for non-.app bundles.
* Fixed a bug which could crash Sparkle under non-English locales.
* Fixed a weird race condition which could cause the relaunch tool to never notice that its target relaunched.
* Fixed a bug where if the host app is inactive when an update occurs, the update alert sometimes doesn't become key.
* Minor textual fixes.
* Localizations:
* Dutch: Maarten Van Coile
* French: Yann Ricquebourg
* Spanish: Ernesto Gomez Cereijo
# 1.5.0-beta1
* The most important things to know:
* The 10.3 support is untested at best; sketchy at worst. Test with it thoroughly before you use it.
* Sparkle now asks for permission to update on second launch; don't be surprised at that. You can change that behavior with a delegate method; read SUUpdater.h for more info.
* We no longer distinguish between "check on startup" and "scheduled updates"; everything is scheduled, with the default being every day.
* The test application is using the new profiling features, but that's only for demonstration: these are off by default. More on this later.
* There are no localizations yet.
* New features:
* Sparkle now supports .pkgs. Just name the .pkg the name of the app and put in the update archive.
* Sparkle now sends optional demographic profiling information; set SUEnableSystemProfiling to YES in your Info.plist and check out the GET data sent to your webserver when fetching the appcast. More on this in the documentation. The test application has this on so you can see the behavior.
* Sparkle now supports updating non-.apps. Just call -setHostBundle: on the global SUUpdater to let it know what you're trying to update.
* Sparkle now supports garbage collection in the host app. Use "Sparkle-with-GC.framework" for that, but be aware it's 10.5-only.
* Sparkle is now 64-bit compatible, compiling both ppc64 and x86_64.
* Sparkle now supports a sparkle:minimumSystemVersion key you can set on appcast items. It does what you think it does.
* Sparkle now checks to see if the host app is running from a disk image and refuses to update if it is. (10.4+ only)
* Added support for entities in enclosure paths.
* The file size output is now formatted prettily.
* Sparkle now gives visual indication that it's checking for updates when the update's user initiated. ie: it pops up a status controller saying "checking for updates..."
* Added support for an SUPublicDSAKeyFile, so people don't have to copy/paste their entire key into their Info.plist. Set this key in your Info.plist to the filename of the key in your Resources directory.
* Added an actually maintainable codebase.
* Changes:
* Sparkle version comparison is now dramatically less stupid and verified by a bunch of unit tests. If something doesn't work the way you think it should, add a test to SUVersionComparisonTest.m
* Added a minimum to the check interval so that developers don't accidentally release their apps into the wild with 60-second test check intervals and have DOS-attack-like results. It's an hour now for release mode; feel free to change it.
* The relaunching process now uses a separate helper app, which is a much more robust method.
* Changed CFBundleShortVersionString behavior: Sparkle no longer uses Apple's about box style of displaying ShortVersionString (CFBundleVersion) when the latter is available.
* No more MD5 checking. Use DSA: it's actually secure.
* The abomination that was SUStatusChecker is dead. Use SUProbingUpdateDriver instead.
* Bugfixes:
* Fixed a huge bug with fully-automatic updating: before, if the user chose to relaunch later, the app would be running from the trash for a while. Now the buttons are "install and relaunch" or "install later."
* Sparkle forces Spotlight to reindex the updated app so that it won't keep pointing to the one in the trash.
* Sparkle trims whitespace from around DSA signatures; this could cause crashes before.
* Fixed a bug where the user choosing to skip a version would inhibit future automatic updates until the next launch.
* Fixed a bug that could occur when the app has a localized CFBundleName.
* .dmgs now work on Leopard.
* The status controller's button now sizes appropriately to the localization.
* Sparkle now works correctly with LSUIElement apps: it focuses them before displaying the update alert.
* Sparkle now deletes failed partial downloads.
* The update alert no longer floats above everything in the app.
* Fixed varied and sundry memory leaks.
* A ton of other things that I've forgotten or were too small to mention!
# 1.1
* Optimized framework size: now only 1.4mb with all localizations and 384kb with only English (an English-only version is in the Extras folder).
* Added a new SUStatusChecker class for programmatically determining if a new version is available (see the docs); thanks, Evan Schoenberg!
* Added support for apps using SIGCHLD; thanks, Augie Fackler!
* Added a zh_CN update from JT Lee
* Added a Polish update from Piotr Chylinski
* Fixed DMG support for images with /Applications symlinks.
* Fixed a really stupid interval-checking bug that could cause repeated hits to the appcast.
* Fixed a bug where the check interval would be inconsistent if a value of 0 was stored in the user defaults.
# 1.0
* Additions:
* Added real version comparison courtesy Kevin Ballard: Sparkle now knows that 0.89 < 1.0a3 < 1.0.
* Added many localizations courtesy David Kocher's localization team.
* Added a much better installation mechanism courtesy Allan Odgaard.
* Added a user agent string to the RSS fetch request.
* Added support for CFBundleShortVersionString in addition to CFBundleVersion, and support for a sparkle:shortVersionString attribute on the enclosure.
* Added support for CFBundleDisplayName if available.
* Changes:
* Automatic updating is now allowed by default, but only if DSA signing is on.
* Pressing Escape or closing the update alert now reminds the user later.
* Now when there's a stored check interval, Sparkle doesn't check immediately on startup the first time the app is launched because the user hasn't consented to it yet.
* The update alert now remembers its size and floats.
* Bug Fixes:
* Fixed installation of DMGs with multiple files enclosed.
* Fixed a nasty memory leak.
* Fixed a bug wherein having no value for allowing automatic updates would display a checkbox for the updates but would not honor it.
* Fixed a bug in zip extraction that occurred in Panther.
* Fixed release notes caching.
* Fixed a bug wherein Sparkle refused to authenticate the installation if the user had cancelled authentication previously in that session.
* Fixed a weird bug that would cause a second help menu to appear on first launch.
* Fixed a bug that could occur when changing the scheduled check interval.
* Fixed a bug wherein the host app could crash if the user clicked Remind Me Later before the release notes finished loading.
* Fixed a bug wherein the behavior was undefined if the user manually initiated a check when an automatic one was already taking place.
* Fixed wrapping on the description field in the update alert.
# 1.0-beta3
* Fixed a nasty crasher that occurred often when the user was not connected to the internet.
# 1.0-beta2
* Major Improvements:
* Fully automatic updating! (see the Documentation: this is beta and off by default)
* Added support for DSA signatures (see the Documentation).
* Added support for MD5 sum verification.
* Added Security.framework-based authentication for installing to privileged directories.
* Huge refactoring of the codebase: there's now a Sparkle Xcode project, Sparkle is now a framework, and everything is modular / abstracted. And no more code-generated interface.
* Minor Improvements:
* A SUUpdaterWillRestartNotification is sent out before restarting now.
* Added key equivalents to alert panel buttons.
* Error handling is much prettier now: technical messages are not presented to the user anymore.
* There's now a test app for developers to see what Sparkle's like before using it.
* Wrote new, pretty, extremely thorough documentation.
* Bug Fixes:
* Relaunch behavior is much improved and shouldn't fail in huge apps anymore.
* Fixed a bug wherein a failing tar command could crash the host app.
* Sparkle now looks at InfoPlist.strings in addition to Info.plist.
* Fixed some stupid typos.
# 1.0-beta1
* Major New Features:
* Sparkle now supports scheduled periodic updates—read the Readme for information on how to use it.
* Sparkle now supports WebKit-based release notes (for CSS and full HTML), which it displays in the main update alert, not a separate panel. The Readme has much more information. Sparkle will, of course, fall back on NSTextView if the host app does not include WebKit.
* Minor New Features:
* Added support for .zip update archives.
* Added support for .dmg update archives.
* Implemented Remind Me Later to replace simple update cancellation.
* Implemented Skip This Version functionality.
* Added support for multiple feeds via the user defaults SUFeedURL key taking precedent over the one in Info.plist.
* Added support for Sparkle's custom XML namespace, which is optional but may prove useful. See the Readme for more information.
* Bug Fixes:
* Sparkle will no longer enter an inconsistent state if the user tries to update again while one is already in progress.
* Sparkle now uses CFBundleName to determine the application's name instead of the app's filename.
* Sparkle no longer crashes if the user cancels during extraction.
* Lots of code refactoring.
# 0.1
* Initial Release
+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/
@@ -0,0 +1 @@
// BinaryDelta tool only
@@ -0,0 +1,2 @@
#include "ConfigBinaryDelta.xcconfig"
@@ -0,0 +1 @@
#include "ConfigBinaryDelta.xcconfig"
+82 -28
View File
@@ -1,39 +1,93 @@
// Common
PREBINDING = NO
ZERO_LINK = NO
CURRENT_PROJECT_VERSION = 1.5
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
MACOSX_DEPLOYMENT_TARGET[arch=ppc] = 10.3
MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5
MACOSX_DEPLOYMENT_TARGET[arch=i386] = 10.4
MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5
GCC_C_LANGUAGE_STANDARD = c99
GCC_ENABLE_OBJC_EXCEPTIONS = YES
GCC_DEBUGGING_SYMBOLS = full
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 = 15
SPARKLE_VERSION_PATCH = 1
SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION)
ALWAYS_SEARCH_USER_PATHS = NO
ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_PRECOMPILE_PREFIX_HEADER = YES
GCC_PREFIX_HEADER = $(SDKROOT)/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h
GCC_FAST_OBJC_DISPATCH = YES
GCC_FAST_OBJC_DISPATCH[arch=ppc] = NO // requires 10.4
GCC_PREFIX_HEADER = Sparkle/Sparkle.pch
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_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)\"
CLANG_ENABLE_OBJC_ARC = YES
GCC_ENABLE_PASCAL_STRINGS = NO
GCC_NO_COMMON_BLOCKS = YES;
COMBINE_HIDPI_IMAGES = NO;
// Enable warnings
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
GCC_WARN_SHADOW = YES
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
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
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_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_ALLOW_INCOMPLETE_PROTOCOL = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_PEDANTIC = YES
GCC_WARN_SHADOW = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
WARNING_CFLAGS = -Wall
// 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-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import $(WARNING_CFLAGS_EXTRA)
@@ -0,0 +1,4 @@
#include "ConfigCommonDebug.xcconfig"
GCC_GENERATE_TEST_COVERAGE_FILES = YES
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
+7 -3
View File
@@ -1,8 +1,12 @@
#include "ConfigCommon.xcconfig"
// Debug only
GCC_OPTIMIZATION_LEVEL = 0
SWIFT_OPTIMIZATION_LEVEL = -Onone
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
SPARKLE_EXTRA_DEBUG = -DDEBUG -fstack-protector -D_FORTIFY_SOURCE=2
OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG)
ARCHS = $(NATIVE_ARCH_ACTUAL)
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON) DEBUG=1
ONLY_ACTIVE_ARCH = YES
COPY_PHASE_STRIP = NO
+6 -3
View File
@@ -1,9 +1,12 @@
#include "ConfigCommon.xcconfig"
// Release only
GCC_OPTIMIZATION_LEVEL = s
SWIFT_OPTIMIZATION_LEVEL = -Ofast
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_GENERATE_DEBUGGING_SYMBOLS = NO
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS_COMMON)
DEAD_CODE_STRIPPING = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = NO
GCC_WARN_UNINITIALIZED_AUTOS = YES
ARCHS = ppc i386 x86_64
+5
View File
@@ -0,0 +1,5 @@
// Fileop tool only
PRODUCT_NAME = $(SPARKLE_FILEOP_TOOL_NAME)
SKIP_INSTALL = YES
CLANG_ENABLE_MODULES = NO
+9 -7
View File
@@ -1,11 +1,13 @@
// Framework only
INSTALL_PATH = @loader_path/../Frameworks
DYLIB_COMPATIBILITY_VERSION = 1.5
DYLIB_CURRENT_VERSION = 1.5
PRODUCT_NAME = Sparkle
DYLIB_INSTALL_NAME_BASE = @rpath
DYLIB_COMPATIBILITY_VERSION = 1.6
DYLIB_CURRENT_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)
WRAPPER_EXTENSION = framework
OTHER_LDFLAGS = -lcrypto
FRAMEWORK_VERSION = A
INFOPLIST_FILE = Info.plist
GCC_PREFIX_HEADER = Sparkle.pch
INFOPLIST_FILE = Sparkle/Sparkle-Info.plist
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BUILDING_SPARKLE=1
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
SKIP_INSTALL = YES
DEFINES_MODULE = YES
PRODUCT_BUNDLE_IDENTIFIER = ${SPARKLE_BUNDLE_IDENTIFIER}
+2 -3
View File
@@ -1,5 +1,4 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonDebug.xcconfig"
#include "ConfigFramework.xcconfig"
OTHER_CFLAGS = -fsingle-precision-constant -DDEBUG
// Unit tests need access to non-public classes
GCC_SYMBOLS_PRIVATE_EXTERN = NO
@@ -1,9 +1,2 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonRelease.xcconfig"
#include "ConfigFramework.xcconfig"
STRIP_INSTALLED_PRODUCT = YES
DEPLOYMENT_POSTPROCESSING = YES
STRIPFLAGS = -u -r
STRIP_STYLE = non-global
SEPARATE_STRIP = YES
@@ -1,3 +0,0 @@
#include "ConfigFrameworkRelease.xcconfig"
GCC_ENABLE_OBJC_GC = supported
+6 -1
View File
@@ -1,3 +1,8 @@
// Relaunch Tool only
PRODUCT_NAME = relaunch
INFOPLIST_FILE = Sparkle/Autoupdate/Autoupdate-Info.plist
PRODUCT_NAME = $(SPARKLE_RELAUNCH_TOOL_NAME)
SKIP_INSTALL = YES
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CLANG_ENABLE_MODULES = NO
OTHER_LDFLAGS = -Wl,-U,_NSURLQuarantinePropertiesKey
@@ -1,5 +1 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonDebug.xcconfig"
#include "ConfigRelaunch.xcconfig"
OTHER_CFLAGS = -fsingle-precision-constant -DDEBUG
@@ -1,3 +1 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonRelease.xcconfig"
#include "ConfigRelaunch.xcconfig"
+1
View File
@@ -0,0 +1 @@
SWIFT_VERSION = 3.0
+1
View File
@@ -0,0 +1 @@
SWIFT_OPTIMIZATION_LEVEL = -Onone
@@ -0,0 +1 @@
SWIFT_OPTIMIZATION_LEVEL = -Ofast
+4 -2
View File
@@ -1,5 +1,7 @@
// Test Application only
INFOPLIST_FILE = Test Application/Test Application-Info.plist
PRODUCT_NAME = Sparkle Test App
INFOPLIST_FILE = TestApplication/TestApplication-Info.plist
WRAPPER_EXTENSION = app
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.SparkleTestApp
@@ -1,5 +1,2 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonDebug.xcconfig"
#include "ConfigTestApp.xcconfig"
OTHER_CFLAGS = -fsingle-precision-constant -DDEBUG
@@ -1,3 +1 @@
#include "ConfigCommon.xcconfig"
#include "ConfigCommonRelease.xcconfig"
#include "ConfigTestApp.xcconfig"
+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"
+14
View File
@@ -0,0 +1,14 @@
// Unit Test only
#include "ConfigSwift.xcconfig"
INFOPLIST_FILE = Tests/SparkleTests-Info.plist
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
@@ -0,0 +1,2 @@
#include "ConfigUnitTest.xcconfig"
#include "ConfigSwiftDebug.xcconfig"
@@ -0,0 +1,2 @@
#include "ConfigUnitTest.xcconfig"
#include "ConfigSwiftRelease.xcconfig"
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
if [ "$ACTION" = "" ] ; then
# Sanity check that the Podspec version matches the Sparkle version
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
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
rm -f "Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2"
mkdir -p "$CONFIGURATION_BUILD_DIR/staging"
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/Sparkle Test App.app" "$CONFIGURATION_BUILD_DIR/staging"
cp -R "$CONFIGURATION_BUILD_DIR/Sparkle.framework" "$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/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
find . \! -type d | rev | sort | rev | tar cjvf "../Sparkle-$CURRENT_PROJECT_VERSION.tar.bz2" --files-from=-
rm -rf "$CONFIGURATION_BUILD_DIR/staging"
fi
+34
View File
@@ -0,0 +1,34 @@
#!/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"
PlistBuddy -c "Set :CFBundleShortVersionString '$version'" \
"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
+1
View File
@@ -0,0 +1 @@
html
+20
View File
@@ -0,0 +1,20 @@
PROJECT_NAME = Sparkle
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
INPUT = Sparkle
OUTPUT_DIRECTORY = Documentation
GENERATE_HTML = YES
GENERATE_LATEX = NO
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST = YES
GENERATE_TODOLIST = YES
ALPHABETICAL_INDEX = YES
QT_AUTOBRIEF = YES
WARN_IF_UNDOCUMENTED = NO
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
if [ "$ACTION" = "" ] ; then
if which -s doxygen ; then
doxygen Documentation/Doxyfile
else
echo "warning: Doxygen not found in PATH"
fi
elif [ "$ACTION" = "clean" ] ; then
rm -rf "$SRCROOT/Documentation/html"
fi
+60
View File
@@ -0,0 +1,60 @@
Copyright (c) 2006-2013 Andy Matuschak.
Copyright (c) 2009-2013 Elgato Systems GmbH.
Copyright (c) 2011-2014 Kornel Lesiński.
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
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
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/>:
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.
Redistribution and use in source and binary forms, with or without
modification, are permitted providing that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-7
View File
@@ -1,7 +0,0 @@
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+39 -4
View File
@@ -1,7 +1,42 @@
.PHONY: all localizable-strings
.PHONY: all localizable-strings release build test ci
ifndef BUILDDIR
BUILDDIR := $(shell mktemp -d "$(TMPDIR)/Sparkle.XXXXXX")
endif
localizable-strings:
rm en.lproj/Sparkle.strings || TRUE
genstrings -o en.lproj -s SULocalizedString *.m *.h
mv en.lproj/Localizable.strings en.lproj/Sparkle.strings
rm -f Sparkle/en.lproj/Sparkle.strings
genstrings -o Sparkle/en.lproj -s SULocalizedString Sparkle/*.m Sparkle/*.h
iconv -f UTF-16 -t UTF-8 < Sparkle/en.lproj/Localizable.strings > Sparkle/en.lproj/Sparkle.strings
rm Sparkle/en.lproj/Localizable.strings
release:
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 -scheme Distribution -configuration Debug 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..11} ; 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)
-29
View File
@@ -1,29 +0,0 @@
//
// NTSynchronousTask.h
// CocoatechCore
//
// Created by Steve Gehrman on 9/29/05.
// Copyright 2005 Steve Gehrman. All rights reserved.
//
#ifndef NTSYNCHRONOUSTASK_H
#define NTSYNCHRONOUSTASK_H
@interface NTSynchronousTask : NSObject
{
NSTask *mv_task;
NSPipe *mv_outputPipe;
NSPipe *mv_inputPipe;
NSData* mv_output;
BOOL mv_done;
int mv_result;
}
// pass nil for directory if not needed
// returns the result
+ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
@end
#endif
-262
View File
@@ -1,262 +0,0 @@
//
// NTSynchronousTask.m
// CocoatechCore
//
// Created by Steve Gehrman on 9/29/05.
// Copyright 2005 Steve Gehrman. All rights reserved.
//
#import "Sparkle.h"
#import "NTSynchronousTask.h"
@interface NTSynchronousTask (Private)
- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
- (NSTask *)task;
- (void)setTask:(NSTask *)theTask;
- (NSPipe *)outputPipe;
- (void)setOutputPipe:(NSPipe *)theOutputPipe;
- (NSPipe *)inputPipe;
- (void)setInputPipe:(NSPipe *)theInputPipe;
- (NSData *)output;
- (void)setOutput:(NSData *)theOutput;
- (BOOL)done;
- (void)setDone:(BOOL)flag;
- (int)result;
- (void)setResult:(int)theResult;
@end
@implementation NTSynchronousTask
- (id)init;
{
self = [super init];
if (self)
{
[self setTask:[[[NSTask alloc] init] autorelease]];
[self setOutputPipe:[[[NSPipe alloc] init] autorelease]];
[self setInputPipe:[[[NSPipe alloc] init] autorelease]];
[[self task] setStandardInput:[self inputPipe]];
[[self task] setStandardOutput:[self outputPipe]];
}
return self;
}
//----------------------------------------------------------
// dealloc
//----------------------------------------------------------
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self setTask:nil];
[self setOutputPipe:nil];
[self setInputPipe:nil];
[self setOutput:nil];
[super dealloc];
}
+ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
{
// we need this wacky pool here, otherwise we run out of pipes, the pipes are internally autoreleased
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSData* result=nil;
NS_DURING
{
NTSynchronousTask* task = [[NTSynchronousTask alloc] init];
[task run:toolPath directory:currentDirectory withArgs:args input:input];
if ([task result] == 0)
result = [[task output] retain];
[task release];
}
NS_HANDLER;
NS_ENDHANDLER;
[pool drain];
// retained above
[result autorelease];
return result;
}
@end
@implementation NTSynchronousTask (Private)
- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input;
{
BOOL success = NO;
if (currentDirectory)
[[self task] setCurrentDirectoryPath: currentDirectory];
[[self task] setLaunchPath:toolPath];
[[self task] setArguments:args];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(taskOutputAvailable:)
name:NSFileHandleReadToEndOfFileCompletionNotification
object:[[self outputPipe] fileHandleForReading]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(taskDidTerminate:)
name:NSTaskDidTerminateNotification
object:[self task]];
[[[self outputPipe] fileHandleForReading] readToEndOfFileInBackgroundAndNotifyForModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, nil]];
NS_DURING
[[self task] launch];
success = YES;
NS_HANDLER
;
NS_ENDHANDLER
if (success)
{
if (input)
{
// feed the running task our input
[[[self inputPipe] fileHandleForWriting] writeData:input];
[[[self inputPipe] fileHandleForWriting] closeFile];
}
// loop until we are done receiving the data
if (![self done])
{
double resolution = 1;
BOOL isRunning;
NSDate* next;
do {
next = [NSDate dateWithTimeIntervalSinceNow:resolution];
isRunning = [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
beforeDate:next];
} while (isRunning && ![self done]);
}
}
}
//----------------------------------------------------------
// task
//----------------------------------------------------------
- (NSTask *)task
{
return mv_task;
}
- (void)setTask:(NSTask *)theTask
{
if (mv_task != theTask) {
[mv_task release];
mv_task = [theTask retain];
}
}
//----------------------------------------------------------
// outputPipe
//----------------------------------------------------------
- (NSPipe *)outputPipe
{
return mv_outputPipe;
}
- (void)setOutputPipe:(NSPipe *)theOutputPipe
{
if (mv_outputPipe != theOutputPipe) {
[mv_outputPipe release];
mv_outputPipe = [theOutputPipe retain];
}
}
//----------------------------------------------------------
// inputPipe
//----------------------------------------------------------
- (NSPipe *)inputPipe
{
return mv_inputPipe;
}
- (void)setInputPipe:(NSPipe *)theInputPipe
{
if (mv_inputPipe != theInputPipe) {
[mv_inputPipe release];
mv_inputPipe = [theInputPipe retain];
}
}
//----------------------------------------------------------
// output
//----------------------------------------------------------
- (NSData *)output
{
return mv_output;
}
- (void)setOutput:(NSData *)theOutput
{
if (mv_output != theOutput) {
[mv_output release];
mv_output = [theOutput retain];
}
}
//----------------------------------------------------------
// done
//----------------------------------------------------------
- (BOOL)done
{
return mv_done;
}
- (void)setDone:(BOOL)flag
{
mv_done = flag;
}
//----------------------------------------------------------
// result
//----------------------------------------------------------
- (int)result
{
return mv_result;
}
- (void)setResult:(int)theResult
{
mv_result = theResult;
}
@end
@implementation NTSynchronousTask (Notifications)
- (void)taskOutputAvailable:(NSNotification*)note
{
[self setOutput:[[note userInfo] objectForKey:NSFileHandleNotificationDataItem]];
[self setDone:YES];
}
- (void)taskDidTerminate:(NSNotification*)note
{
[self setResult:[[self task] terminationStatus]];
}
@end
+57
View File
@@ -0,0 +1,57 @@
# Sparkle [![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>
An easy-to-use software update framework for Cocoa developers.
<img src="Resources/Screenshot.png" width="732" alt="Sparkle shows familiar update window with release notes">
## Changes since 1.5b
* Up-to-date with 10.11 SDK and Xcode 7. Supports macOS 10.7+.
* Important security fixes.
* Cleaned up and modernized code, using ARC and Autolayout.
* 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.
* Upgraded and more reliable binary delta and code signing verification.
## Features
* Seamless integration—there's no mention of Sparkle; your icons and app name are used.
* 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 RSS-based 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.
* Deep delegate support to make Sparkle work exactly as you need.
* Optionally sends system information to the server when checking for updates.
* 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.
## Requirements
* Runtime: macOS 10.7 or greater
* Build: Xcode 5 and 10.8 SDK or greater
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
## API
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.
@@ -0,0 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16@2x.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32@2x.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128@2x.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256@2x.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

+314
View File
@@ -0,0 +1,314 @@
<?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>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17 inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<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>
<string>iMac (Core 2 Duo, 20 or 24 inch, Early or Mid 2009 )</string>
<key>iMac10,1</key>
<string>iMac (Core 2 Duo, 21.5 or 27 inch, Late 2009 )</string>
<key>iMac11,1</key>
<string>iMac (Core i5 or i7, 27 inch Late 2009)</string>
<key>iMac11,2</key>
<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>
<string>iMac (Core i3 or i5 or i7, 21.5 inch Mid 2010 or Late 2011)</string>
<key>iMac12,2</key>
<string>iMac (Core i5 or i7, 27 inch Mid 2011)</string>
<key>iMac13,1</key>
<string>iMac (Core i3 or i5 or i7, 21.5 inch Late 2012 or Early 2013)</string>
<key>iMac13,2</key>
<string>iMac (Core i5 or i7, 27 inch Late 2012)</string>
<key>iMac14,1</key>
<string>iMac (Core i5, 21.5 inch Late 2013)</string>
<key>iMac14,2</key>
<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>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBook5,1</key>
<string>MacBook (Core 2 Duo, Late 2008, Unibody)</string>
<key>MacBook5,2</key>
<string>MacBook (Core 2 Duo, Early 2009, White)</string>
<key>MacBook6,1</key>
<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>
<string>MacBook Air (Core 2 Duo, 13 inch, Mid 2009)</string>
<key>MacBookAir3,1</key>
<string>MacBook Air (Core 2 Duo, 11 inch, Late 2010)</string>
<key>MacBookAir3,2</key>
<string>MacBook Air (Core 2 Duo, 13 inch, Late 2010)</string>
<key>MacBookAir4,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2011)</string>
<key>MacBookAir4,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2011)</string>
<key>MacBookAir5,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2012)</string>
<key>MacBookAir5,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2012)</string>
<key>MacBookAir6,1</key>
<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>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<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>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core &quot;Harpertown&quot;)</string>
<key>MacPro4,1</key>
<string>Mac Pro (March 2009)</string>
<key>MacPro5,1</key>
<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>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<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>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<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>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<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>
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<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>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
<title>Version 2.0 (2 bugs fixed; 3 new features)</title>
<sparkle:releaseNotesLink>
http://you.com/app/2.0.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
<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>
<item>
<title>Version 1.5 (8 bugs fixed; 2 new features)</title>
<sparkle:releaseNotesLink>
http://you.com/app/1.5.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 01 Jan 2006 12:20:11 +0000</pubDate>
<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>
<!-- Now here's an example of a version with a weird internal version number (like an SVN revision) but a human-readable external one. -->
<item>
<title>Version 1.4 (5 bugs fixed; 2 new features)</title>
<sparkle:releaseNotesLink>
http://you.com/app/1.4.html
</sparkle:releaseNotesLink>
<pubDate>Wed, 25 Dec 2005 12:20:11 +0000</pubDate>
<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>
</channel>
</rss>
Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.
-33
View File
@@ -1,33 +0,0 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class SUAppcastItem;
@interface SUAppcast : NSObject {
NSArray *items;
NSString *userAgentString;
id delegate;
NSMutableData *incrementalData;
}
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
- (void)setUserAgentString:(NSString *)userAgentString;
- (NSArray *)items;
@end
@interface NSObject (SUAppcastDelegate)
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
#endif
-224
View File
@@ -1,224 +0,0 @@
//
// SUAppcast.m
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUAppcast.h"
@interface SUAppcast (Private)
- (void)reportError:(NSError *)error;
- (NSXMLNode *)bestNodeInNodes:(NSArray *)nodes;
@end
@implementation SUAppcast
- (void)dealloc
{
[items release];
[super dealloc];
}
- (NSArray *)items
{
return items;
}
- (void)fetchAppcastFromURL:(NSURL *)url
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0];
if (userAgentString)
[request setValue:userAgentString forHTTPHeaderField:@"User-Agent"];
incrementalData = [[NSMutableData alloc] init];
NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];
CFRetain(connection);
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[incrementalData appendData:data];
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
CFRelease(connection);
NSError *error = nil;
NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:incrementalData options:0 error:&error];
BOOL failed = NO;
NSArray *xmlItems = nil;
NSMutableArray *appcastItems = [NSMutableArray array];
if (nil == document)
{
failed = YES;
}
else
{
xmlItems = [document nodesForXPath:@"/rss/channel/item" error:&error];
if (nil == xmlItems)
{
failed = YES;
}
}
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 objectForKey:name];
if (nodes == nil)
{
nodes = [NSMutableArray array];
[nodesDict setObject:nodes forKey:name];
}
[nodes addObject:node];
}
node = [node nextSibling];
}
}
NSEnumerator *nameEnum = [nodesDict keyEnumerator];
NSString *name;
while ((name = [nameEnum nextObject]))
{
node = [self bestNodeInNodes:[nodesDict objectForKey:name]];
if ([name isEqualToString:@"enclosure"])
{
// enclosure is flattened as a separate dictionary for some reason
NSEnumerator *attributeEnum = [[(NSXMLElement *)node attributes] objectEnumerator];
NSXMLNode *attribute;
NSMutableDictionary *encDict = [NSMutableDictionary dictionary];
while ((attribute = [attributeEnum nextObject]))
[encDict setObject:[attribute stringValue] forKey:[attribute name]];
[dict setObject:encDict forKey:@"enclosure"];
}
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 setObject:date forKey:name];
}
else if (name != nil)
{
// add all other values as strings
[dict setObject:[[node stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] forKey:name];
}
}
SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict];
if (anItem)
{
[appcastItems addObject:anItem];
[anItem release];
}
else
{
NSLog(@"Sparkle Updater: Failed to parse appcast item with appcast dictionary %@!", dict);
}
[nodesDict removeAllObjects];
[dict removeAllObjects];
}
}
[document release];
if ([appcastItems count])
{
NSSortDescriptor *sort = [[[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO] autorelease];
[appcastItems sortUsingDescriptors:[NSArray arrayWithObject:sort]];
items = [appcastItems copy];
}
if (failed)
{
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastParseError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred while parsing the update feed.", nil), NSLocalizedDescriptionKey, nil]]];
}
else if ([delegate respondsToSelector:@selector(appcastDidFinishLoading:)])
{
[delegate appcastDidFinishLoading:self];
}
}
- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError *)error
{
CFRelease(connection);
[self reportError:error];
}
- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
{
return request;
}
- (void)reportError:(NSError *)error
{
if ([delegate respondsToSelector:@selector(appcast:failedToLoadWithError:)])
{
[delegate appcast:self failedToLoadWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred in retrieving update information. Please try again later.", nil), NSLocalizedDescriptionKey, [error localizedDescription], NSLocalizedFailureReasonErrorKey, 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 objectAtIndex:0];
else if ([nodes count] == 0)
return nil;
NSEnumerator *nodeEnum = [nodes objectEnumerator];
NSXMLElement *node;
NSMutableArray *languages = [NSMutableArray array];
NSString *lang;
NSInteger i;
while ((node = [nodeEnum nextObject]))
{
lang = [[node attributeForName:@"xml:lang"] stringValue];
[languages addObject:(lang ?: @"")];
}
lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0];
i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")];
if (i == NSNotFound)
i = 0;
return [nodes objectAtIndex:i];
}
- (void)setUserAgentString:(NSString *)uas
{
if (uas != userAgentString)
{
[userAgentString release];
userAgentString = [uas copy];
}
}
- (void)setDelegate:del
{
delegate = del;
}
@end
-47
View File
@@ -1,47 +0,0 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
@interface SUAppcastItem : NSObject {
NSString *title;
NSDate *date;
NSString *description;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *minimumSystemVersion;
NSURL *fileURL;
NSString *versionString;
NSString *displayVersionString;
NSDictionary *propertiesDictionary;
}
// Initializes with data from a dictionary provided by the RSS class.
- initWithDictionary:(NSDictionary *)dict;
- (NSString *)title;
- (NSString *)versionString;
- (NSString *)displayVersionString;
- (NSDate *)date;
- (NSString *)description;
- (NSURL *)releaseNotesURL;
- (NSURL *)fileURL;
- (NSString *)DSASignature;
- (NSString *)minimumSystemVersion;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
- (NSDictionary *)propertiesDictionary;
@end
#endif
-184
View File
@@ -1,184 +0,0 @@
//
// SUAppcastItem.m
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUAppcastItem.h"
@implementation SUAppcastItem
// Attack of accessors!
- (NSString *)title { return [[title retain] autorelease]; }
- (void)setTitle:(NSString *)aTitle
{
if (title == aTitle) return;
[title release];
title = [aTitle copy];
}
- (NSDate *)date { return [[date retain] autorelease]; }
- (void)setDate:(NSDate *)aDate
{
if (date == aDate) return;
[date release];
date = [aDate copy];
}
- (NSString *)description { return [[description retain] autorelease]; }
- (void)setDescription:(NSString *)aDescription
{
if (description == aDescription) return;
[description release];
description = [aDescription copy];
}
- (NSURL *)releaseNotesURL { return [[releaseNotesURL retain] autorelease]; }
- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL
{
if (releaseNotesURL == aReleaseNotesURL) return;
[releaseNotesURL release];
releaseNotesURL = [aReleaseNotesURL copy];
}
- (NSString *)DSASignature { return [[DSASignature retain] autorelease]; }
- (void)setDSASignature:(NSString *)aDSASignature
{
if (DSASignature == aDSASignature) return;
[DSASignature release];
DSASignature = [aDSASignature copy];
}
- (NSURL *)fileURL { return [[fileURL retain] autorelease]; }
- (void)setFileURL:(NSURL *)aFileURL
{
if (fileURL == aFileURL) return;
[fileURL release];
fileURL = [aFileURL copy];
}
- (NSString *)versionString { return [[versionString retain] autorelease]; }
- (void)setVersionString:(NSString *)s
{
if (versionString == s) return;
[versionString release];
versionString = [s copy];
}
- (NSString *)displayVersionString { return [[displayVersionString retain] autorelease]; }
- (void)setDisplayVersionString:(NSString *)s
{
if (displayVersionString == s) return;
[displayVersionString release];
displayVersionString = [s copy];
}
- (NSString *)minimumSystemVersion { return [[minimumSystemVersion retain] autorelease]; }
- (void)setMinimumSystemVersion:(NSString *)systemVersionString
{
if (minimumSystemVersion == systemVersionString) return;
[minimumSystemVersion release];
minimumSystemVersion = [systemVersionString copy];
}
- initWithDictionary:(NSDictionary *)dict
{
self = [super init];
if (self)
{
id enclosure = [dict objectForKey:@"enclosure"];
// Try to find a version string.
// Finding the new version number from the RSS feed is a little bit hacky. There are two ways:
// 1. A "sparkle:version" attribute on the enclosure tag, an extension from the RSS spec.
// 2. If there isn't a version attribute, Sparkle will parse the path in the enclosure, expecting
// that it will look like this: http://something.com/YourApp_0.5.zip. It'll read whatever's between the last
// underscore and the last period as the version number. So name your packages like this: APPNAME_VERSION.extension.
// The big caveat with this is that you can't have underscores in your version strings, as that'll confuse Sparkle.
// Feel free to change the separator string to a hyphen or something more suited to your needs if you like.
NSString *newVersion = [enclosure objectForKey:@"sparkle:version"];
if (newVersion == nil) // no sparkle:version attribute
{
// Separate the url by underscores and take the last component, as that'll be closest to the end,
// then we remove the extension. Hopefully, this will be the version.
NSArray *fileComponents = [[enclosure objectForKey:@"url"] componentsSeparatedByString:@"_"];
if ([fileComponents count] > 1)
newVersion = [[fileComponents lastObject] stringByDeletingPathExtension];
}
if (enclosure == nil || [enclosure objectForKey:@"url"] == nil || newVersion == nil)
{
[self release];
self = nil;
}
else
{
propertiesDictionary = [[NSMutableDictionary alloc] initWithDictionary:dict];
[self setTitle:[dict objectForKey:@"title"]];
[self setDate:[dict objectForKey:@"pubDate"]];
[self setDescription:[dict objectForKey:@"description"]];
[self setFileURL:[NSURL URLWithString:[[enclosure objectForKey:@"url"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[self setDSASignature:[enclosure objectForKey:@"sparkle:dsaSignature"]];
[self setVersionString:newVersion];
[self setMinimumSystemVersion:[dict objectForKey:@"sparkle:minimumSystemVersion"]];
NSString *shortVersionString = [enclosure objectForKey:@"sparkle:shortVersionString"];
if (shortVersionString)
[self setDisplayVersionString:shortVersionString];
else
[self setDisplayVersionString:[self versionString]];
// Find the appropriate release notes URL.
if ([dict objectForKey:@"sparkle:releaseNotesLink"])
[self setReleaseNotesURL:[NSURL URLWithString:[dict objectForKey:@"sparkle:releaseNotesLink"]]];
else if ([[self description] hasPrefix:@"http://"]) // if the description starts with http://, use that.
[self setReleaseNotesURL:[NSURL URLWithString:[self description]]];
else
[self setReleaseNotesURL:nil];
}
}
return self;
}
- (void)dealloc
{
[self setTitle:nil];
[self setDate:nil];
[self setDescription:nil];
[self setReleaseNotesURL:nil];
[self setDSASignature:nil];
[self setFileURL:nil];
[self setVersionString:nil];
[self setDisplayVersionString:nil];
[propertiesDictionary release];
[super dealloc];
}
- (NSDictionary *)propertiesDictionary
{
return propertiesDictionary;
}
@end
-39
View File
@@ -1,39 +0,0 @@
//
// SUAutomaticUpdateAlert.h
// Sparkle
//
// Created by Andy Matuschak on 3/18/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAUTOMATICUPDATEALERT_H
#define SUAUTOMATICUPDATEALERT_H
#import "SUWindowController.h"
typedef enum
{
SUInstallNowChoice,
SUInstallLaterChoice,
SUDoNotInstallChoice
} SUAutomaticInstallationChoice;
@class SUAppcastItem, SUHost;
@interface SUAutomaticUpdateAlert : SUWindowController {
SUAppcastItem *updateItem;
id delegate;
SUHost *host;
}
- (id)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)hostBundle delegate:delegate;
- (IBAction)installNow:sender;
- (IBAction)installLater:sender;
- (IBAction)doNotInstall:sender;
@end
@interface NSObject (SUAutomaticUpdateAlertDelegateProtocol)
- (void)automaticUpdateAlert:(SUAutomaticUpdateAlert *)aua finishedWithChoice:(SUAutomaticInstallationChoice)choice;
@end
#endif
-70
View File
@@ -1,70 +0,0 @@
//
// SUAutomaticUpdateAlert.m
// Sparkle
//
// Created by Andy Matuschak on 3/18/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "SUAutomaticUpdateAlert.h"
#import "SUHost.h"
@implementation SUAutomaticUpdateAlert
- (id)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:del;
{
self = [super initWithHost:aHost windowNibName:@"SUAutomaticUpdateAlert"];
if (self)
{
updateItem = [item retain];
delegate = del;
host = [aHost retain];
[self setShouldCascadeWindows:NO];
[[self window] center];
}
return self;
}
- (void)dealloc
{
[host release];
[updateItem release];
[super dealloc];
}
- (IBAction)installNow:sender
{
[self close];
[delegate automaticUpdateAlert:self finishedWithChoice:SUInstallNowChoice];
}
- (IBAction)installLater:sender
{
[self close];
[delegate automaticUpdateAlert:self finishedWithChoice:SUInstallLaterChoice];
}
- (IBAction)doNotInstall:sender
{
[self close];
[delegate automaticUpdateAlert:self finishedWithChoice:SUDoNotInstallChoice];
}
- (NSImage *)applicationIcon
{
return [host icon];
}
- (NSString *)titleText
{
return [NSString stringWithFormat:SULocalizedString(@"A new version of %@ is ready to install!", nil), [host name]];
}
- (NSString *)descriptionText
{
return [NSString stringWithFormat:SULocalizedString(@"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?", nil), [host name], [host displayVersion]];
}
@end
-79
View File
@@ -1,79 +0,0 @@
//
// SUAutomaticUpdateDriver.m
// Sparkle
//
// Created by Andy Matuschak on 5/6/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUAutomaticUpdateDriver.h"
#import "SUAutomaticUpdateAlert.h"
#import "SUHost.h"
@implementation SUAutomaticUpdateDriver
- (void)unarchiverDidFinish:(SUUnarchiver *)ua
{
alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:updateItem host:host delegate:self];
if ([NSApp isActive])
[[alert window] makeKeyAndOrderFront:self];
else
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp];
}
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
[[alert window] makeKeyAndOrderFront:self];
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSApplicationDidBecomeActiveNotification" object:NSApp];
}
- (void)automaticUpdateAlert:(SUAutomaticUpdateAlert *)aua finishedWithChoice:(SUAutomaticInstallationChoice)choice;
{
switch (choice)
{
case SUInstallNowChoice:
[self installUpdate];
break;
case SUInstallLaterChoice:
postponingInstallation = YES;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
break;
case SUDoNotInstallChoice:
[host setObject:[updateItem versionString] forUserDefaultsKey:SUSkippedVersionKey];
[self abortUpdate];
break;
}
}
- (BOOL)shouldInstallSynchronously { return postponingInstallation; }
- (void)installUpdate
{
showErrors = YES;
[super installUpdate];
}
- (void)applicationWillTerminate:(NSNotification *)note
{
[self installUpdate];
}
- (void)installerFinishedForHost:(SUHost *)aHost
{
if (aHost != host) { return; }
if (!postponingInstallation)
[self relaunchHostApp];
}
- (void)abortUpdateWithError:(NSError *)error
{
if (showErrors)
[super abortUpdateWithError:error];
else
[self abortUpdate];
}
@end
-311
View File
@@ -1,311 +0,0 @@
//
// SUBasicUpdateDriver.m
// Sparkle
//
// Created by Andy Matuschak on 4/23/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUBasicUpdateDriver.h"
#import "SUHost.h"
#import "SUDSAVerifier.h"
#import "SUInstaller.h"
#import "SUStandardVersionComparator.h"
#import "SUUnarchiver.h"
@implementation SUBasicUpdateDriver
- (void)checkForUpdatesAtURL:(NSURL *)appcastURL host:(SUHost *)aHost
{
[super checkForUpdatesAtURL:appcastURL host:aHost];
if ([aHost isRunningOnReadOnlyVolume])
{
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURunningFromDiskImageError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:SULocalizedString(@"%1$@ can't be updated when it's running from a read-only volume like a disk image or an optical drive. Move %1$@ to your Applications folder, relaunch it from there, and try again.", nil), [aHost name]] forKey:NSLocalizedDescriptionKey]]];
return;
}
SUAppcast *appcast = [[SUAppcast alloc] init];
CFRetain(appcast); // We'll manage the appcast's memory ourselves so we don't have to make it an IV to support GC.
[appcast release];
[appcast setDelegate:self];
NSString *userAgent = [NSString stringWithFormat: @"%@/%@ Sparkle/%@", [aHost name], [aHost displayVersion], ([SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil)];
NSData * cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
userAgent = [NSString stringWithCString:[cleanedAgent bytes] length:[cleanedAgent length]];
[appcast setUserAgentString:userAgent];
[appcast fetchAppcastFromURL:appcastURL];
[host setObject:[NSDate date] forUserDefaultsKey:SULastCheckTimeKey];
}
- (id <SUVersionComparison>)_versionComparator
{
id <SUVersionComparison> comparator = nil;
// Give the delegate a chance to provide a custom version comparator
if ([[updater delegate] respondsToSelector:@selector(versionComparatorForUpdater:)])
comparator = [[updater delegate] versionComparatorForUpdater:updater];
// If we don't get a comparator from the delegate, use the default comparator
if (!comparator)
comparator = [SUStandardVersionComparator defaultComparator];
return comparator;
}
- (BOOL)isItemNewer:(SUAppcastItem *)ui
{
return [[self _versionComparator] compareVersion:[host version] toVersion:[ui versionString]] == NSOrderedAscending;
}
- (BOOL)hostSupportsItem:(SUAppcastItem *)ui
{
if ([ui minimumSystemVersion] == nil || [[ui minimumSystemVersion] isEqualToString:@""]) { return YES; }
return [[SUStandardVersionComparator defaultComparator] compareVersion:[ui minimumSystemVersion] toVersion:[SUHost systemVersionString]] != NSOrderedDescending;
}
- (BOOL)itemContainsSkippedVersion:(SUAppcastItem *)ui
{
NSString *skippedVersion = [host objectForUserDefaultsKey:SUSkippedVersionKey];
if (skippedVersion == nil) { return NO; }
return [[self _versionComparator] compareVersion:[ui versionString] toVersion:skippedVersion] != NSOrderedDescending;
}
- (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui
{
return [self hostSupportsItem:ui] && [self isItemNewer:ui] && ![self itemContainsSkippedVersion:ui];
}
- (void)appcastDidFinishLoading:(SUAppcast *)ac
{
if ([[updater delegate] respondsToSelector:@selector(updater:didFinishLoadingAppcast:)])
[[updater delegate] updater:updater didFinishLoadingAppcast:ac];
// Now we have to find the best valid update in the appcast.
if ([[updater delegate] respondsToSelector:@selector(bestValidUpdateInAppcast:forUpdater:)]) // Does the delegate want to handle it?
{
updateItem = [[updater delegate] bestValidUpdateInAppcast:ac forUpdater:updater];
}
else // If not, we'll take care of it ourselves.
{
// Find the first update we can actually use.
NSEnumerator *updateEnumerator = [[ac items] objectEnumerator];
do {
updateItem = [updateEnumerator nextObject];
} while (updateItem && ![self hostSupportsItem:updateItem]);
[updateItem retain];
}
CFRelease(ac); // Remember that we're explicitly managing the memory of the appcast.
if (updateItem == nil) { [self didNotFindUpdate]; return; }
if ([self itemContainsValidUpdate:updateItem])
[self didFindValidUpdate];
else
[self didNotFindUpdate];
}
- (void)appcast:(SUAppcast *)ac failedToLoadWithError:(NSError *)error
{
CFRelease(ac); // Remember that we're explicitly managing the memory of the appcast.
[self abortUpdateWithError:error];
}
- (void)didFindValidUpdate
{
if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
[[updater delegate] updater:updater didFindValidUpdate:updateItem];
[self downloadUpdate];
}
- (void)didNotFindUpdate
{
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
[[updater delegate] updaterDidNotFindUpdate:updater];
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUNoUpdateError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:SULocalizedString(@"You already have the newest version of %@.", nil), [host name]] forKey:NSLocalizedDescriptionKey]]];
}
- (void)downloadUpdate
{
download = [[NSURLDownload alloc] initWithRequest:[NSURLRequest requestWithURL:[updateItem fileURL]] delegate:self];
}
- (void)download:(NSURLDownload *)d decideDestinationWithSuggestedFilename:(NSString *)name
{
// If name ends in .txt, the server probably has a stupid MIME configuration. We'll give the developer the benefit of the doubt and chop that off.
if ([[name pathExtension] isEqualToString:@"txt"])
name = [name stringByDeletingPathExtension];
// We create a temporary directory in /tmp and stick the file there.
// Not using a GUID here because hdiutil for some reason chokes on GUIDs. Too long? I really have no idea.
NSString *prefix = [NSString stringWithFormat:@"%@ %@ Update", [host name], [host version]];
NSString *tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:prefix];
int cnt=1;
while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999999)
tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d", prefix, cnt++]];
BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir attributes:nil];
if (!success)
{
// Okay, something's really broken with /tmp
[download cancel];
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Can't make a temporary directory for the update download at %@.",tempDir] forKey:NSLocalizedDescriptionKey]]];
}
downloadPath = [[tempDir stringByAppendingPathComponent:name] retain];
[download setDestination:downloadPath allowOverwrite:YES];
}
- (void)downloadDidFinish:(NSURLDownload *)d
{
[self extractUpdate];
}
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error
{
// Get rid of what we've downloaded so far, if anything.
if (downloadPath != nil)
[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[downloadPath stringByDeletingLastPathComponent] destination:@"" files:[NSArray arrayWithObject:[downloadPath lastPathComponent]] tag:NULL];
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred while downloading the update. Please try again later.", nil), NSLocalizedDescriptionKey, [error localizedDescription], NSLocalizedFailureReasonErrorKey, nil]]];
}
- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
{
// We don't want the download system to extract our gzips.
// 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 ([encodingType rangeOfString:@"gzip"].location == NSNotFound);
}
- (void)extractUpdate
{
// DSA verification, if activated by the developer
if ([[host objectForInfoDictionaryKey:SUExpectsDSASignatureKey] boolValue])
{
if (![SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:[updateItem DSASignature] withPublicDSAKey:[host publicDSAKey]])
{
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSignatureError userInfo:[NSDictionary dictionaryWithObject:@"The update is improperly signed." forKey:NSLocalizedDescriptionKey]]];
return;
}
}
SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:downloadPath];
if (!unarchiver)
{
NSLog(@"Sparkle Error: No valid unarchiver for %@!", downloadPath);
[self unarchiverDidFail:nil];
return;
}
CFRetain(unarchiver); // Manage this memory manually so we don't have to make it an IV.
[unarchiver setDelegate:self];
[unarchiver start];
}
- (void)unarchiverDidFinish:(SUUnarchiver *)ua
{
if (ua) { CFRelease(ua); }
[self installUpdate];
}
- (void)unarchiverDidFail:(SUUnarchiver *)ua
{
if (ua) { CFRelease(ua); }
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:[NSDictionary dictionaryWithObject:SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil) forKey:NSLocalizedDescriptionKey]]];
}
- (BOOL)shouldInstallSynchronously { return NO; }
- (void)installUpdate
{
if ([[updater delegate] respondsToSelector:@selector(updater:willInstallUpdate:)])
[[updater delegate] updater:updater willInstallUpdate:updateItem];
// Copy the relauncher into a temporary directory so we can get to it after the new version's installed.
NSString *relaunchPathToCopy = [[NSBundle bundleForClass:[self class]] pathForResource:@"relaunch" ofType:@""];
NSString *targetPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[relaunchPathToCopy lastPathComponent]];
// Only the paranoid survive: if there's already a stray copy of relaunch there, we would have problems
[[NSFileManager defaultManager] removeFileAtPath:targetPath handler:nil];
if ([[NSFileManager defaultManager] copyPath:relaunchPathToCopy toPath:targetPath handler:nil])
relaunchPath = [targetPath retain];
[SUInstaller installFromUpdateFolder:[downloadPath stringByDeletingLastPathComponent] overHost:host delegate:self synchronously:[self shouldInstallSynchronously]];
}
- (void)installerFinishedForHost:(SUHost *)aHost
{
if (aHost != host) { return; }
[self relaunchHostApp];
}
- (void)relaunchHostApp
{
// Give the host app an opportunity to postpone the relaunch.
static BOOL postponedOnce = NO;
if (!postponedOnce && [[updater delegate] respondsToSelector:@selector(updater:shouldPostponeRelaunchForUpdate:untilInvoking:)])
{
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[[[self class] instanceMethodSignatureForSelector:@selector(relaunchHostApp)] retain]];
[invocation setSelector:@selector(relaunchHostApp)];
[invocation setTarget:self];
postponedOnce = YES;
if ([[updater delegate] updater:updater shouldPostponeRelaunchForUpdate:updateItem untilInvoking:invocation])
return;
}
[self cleanUp]; // Clean up the download and extracted files.
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterWillRestartNotification object:self];
if ([[updater delegate] respondsToSelector:@selector(updaterWillRelaunchApplication)])
[[updater delegate] updaterWillRelaunchApplication:updater];
if(!relaunchPath || ![[NSFileManager defaultManager] fileExistsAtPath:relaunchPath])
{
// Note that we explicitly use the host app's name here, since updating plugin for Mail relaunches Mail, not just the plugin.
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:SULocalizedString(@"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@.", nil), [host name]], NSLocalizedDescriptionKey, [NSString stringWithFormat:@"Couldn't find the relauncher (expected to find it at %@)", relaunchPath], NSLocalizedFailureReasonErrorKey, nil]]];
// We intentionally don't abandon the update here so that the host won't initiate another.
return;
}
NSString *pathToRelaunch = [host bundlePath];
if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)])
pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater];
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
[NSApp terminate:self];
}
- (void)cleanUp
{
[[NSFileManager defaultManager] removeFileAtPath:[downloadPath stringByDeletingLastPathComponent] handler:nil];
}
- (void)installerForHost:(SUHost *)aHost failedWithError:(NSError *)error
{
if (aHost != host) { return; }
[[NSFileManager defaultManager] removeFileAtPath:relaunchPath handler:NULL]; // Clean up the copied relauncher.
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred while installing the update. Please try again later.", nil), NSLocalizedDescriptionKey, [error localizedDescription], NSLocalizedFailureReasonErrorKey, nil]]];
}
- (void)abortUpdate
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super abortUpdate];
}
- (void)abortUpdateWithError:(NSError *)error
{
if ([error code] != SUNoUpdateError) // Let's not bother logging this.
NSLog(@"Sparkle Error: %@", [error localizedDescription]);
if ([error localizedFailureReason])
NSLog(@"Sparkle Error (continued): %@", [error localizedFailureReason]);
if (download)
[download cancel];
[self abortUpdate];
}
- (void)dealloc
{
[host release];
[download release];
[downloadPath release];
[relaunchPath release];
[super dealloc];
}
@end
-73
View File
@@ -1,73 +0,0 @@
//
// SUConstants.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUCONSTANTS_H
#define SUCONSTANTS_H
extern NSString *SUUpdaterWillRestartNotification;
extern NSString *SUTechnicalErrorInformationKey;
extern NSString *SUFeedURLKey;
extern NSString *SUHasLaunchedBeforeKey;
extern NSString *SUShowReleaseNotesKey;
extern NSString *SUSkippedVersionKey;
extern NSString *SUScheduledCheckIntervalKey;
extern NSString *SULastCheckTimeKey;
extern NSString *SUExpectsDSASignatureKey;
extern NSString *SUPublicDSAKeyKey;
extern NSString *SUPublicDSAKeyFileKey;
extern NSString *SUAutomaticallyUpdateKey;
extern NSString *SUAllowsAutomaticUpdatesKey;
extern NSString *SUEnableAutomaticChecksKey;
extern NSString *SUEnableAutomaticChecksKeyOld;
extern NSString *SUEnableSystemProfilingKey;
extern NSString *SUSendProfileInfoKey;
extern NSString *SULastProfileSubmitDateKey;
extern NSString *SUSparkleErrorDomain;
// Appcast phase errors.
extern OSStatus SUAppcastParseError;
extern OSStatus SUNoUpdateError;
extern OSStatus SUAppcastError;
extern OSStatus SURunningFromDiskImageError;
// Downlaod phase errors.
extern OSStatus SUTemporaryDirectoryError;
// Extraction phase errors.
extern OSStatus SUUnarchivingError;
extern OSStatus SUSignatureError;
// Installation phase errors.
extern OSStatus SUFileCopyFailure;
extern OSStatus SUAuthenticationFailure;
extern OSStatus SUMissingUpdateError;
extern OSStatus SUMissingInstallerToolError;
extern OSStatus SURelaunchError;
extern OSStatus SUInstallationError;
// NSInteger is a type that was added to Leopard.
// Here is some glue to ensure that NSInteger will work with pre-10.5 SDKs:
#ifndef NSINTEGER_DEFINED
#ifdef NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
#define NSIntegerMax LONG_MAX
#define NSIntegerMin LONG_MIN
#define NSUIntegerMax ULONG_MAX
#define NSINTEGER_DEFINED 1
#endif
#endif
-48
View File
@@ -1,48 +0,0 @@
//
// SUConstants.m
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUConstants.h"
NSString *SUUpdaterWillRestartNotification = @"SUUpdaterWillRestartNotificationName";
NSString *SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation";
NSString *SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore";
NSString *SUFeedURLKey = @"SUFeedURL";
NSString *SUShowReleaseNotesKey = @"SUShowReleaseNotes";
NSString *SUSkippedVersionKey = @"SUSkippedVersion";
NSString *SUScheduledCheckIntervalKey = @"SUScheduledCheckInterval";
NSString *SULastCheckTimeKey = @"SULastCheckTime";
NSString *SUExpectsDSASignatureKey = @"SUExpectsDSASignature";
NSString *SUPublicDSAKeyKey = @"SUPublicDSAKey";
NSString *SUPublicDSAKeyFileKey = @"SUPublicDSAKeyFile";
NSString *SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate";
NSString *SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
NSString *SUEnableSystemProfilingKey = @"SUEnableSystemProfiling";
NSString *SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
NSString *SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup";
NSString *SUSendProfileInfoKey = @"SUSendProfileInfo";
NSString *SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate";
NSString *SUSparkleErrorDomain = @"SUSparkleErrorDomain";
OSStatus SUAppcastParseError = 1000;
OSStatus SUNoUpdateError = 1001;
OSStatus SUAppcastError = 1002;
OSStatus SURunningFromDiskImageError = 1003;
OSStatus SUTemporaryDirectoryError = 2000;
OSStatus SUUnarchivingError = 3000;
OSStatus SUSignatureError = 3001;
OSStatus SUFileCopyFailure = 4000;
OSStatus SUAuthenticationFailure = 4001;
OSStatus SUMissingUpdateError = 4002;
OSStatus SUMissingInstallerToolError = 4003;
OSStatus SURelaunchError = 4004;
OSStatus SUInstallationError = 4005;
-17
View File
@@ -1,17 +0,0 @@
//
// SUDSAVerifier.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUDSAVERIFIER_H
#define SUDSAVERIFIER_H
// For the paranoid folks!
@interface SUDSAVerifier : NSObject {}
+ (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString;
@end
#endif
-150
View File
@@ -1,150 +0,0 @@
//
// SUDSAVerifier.m
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
// DSA stuff adapted from code provided by Allan Odgaard. Thanks, Allan!
#import "SUDSAVerifier.h"
#import <stdio.h>
#import <openssl/evp.h>
#import <openssl/bio.h>
#import <openssl/pem.h>
#import <openssl/rsa.h>
#import <openssl/sha.h>
long b64decode(unsigned char* str)
{
unsigned char *cur, *start;
int d, dlast, phase;
unsigned char c;
static int table[256] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 00-0F */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 10-1F */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, /* 20-2F */
52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, /* 30-3F */
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, /* 40-4F */
15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, /* 50-5F */
-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, /* 60-6F */
41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1, /* 70-7F */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 80-8F */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* 90-9F */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* A0-AF */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* B0-BF */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* C0-CF */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* D0-DF */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* E0-EF */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 /* F0-FF */
};
d = dlast = phase = 0;
start = str;
for (cur = str; *cur != '\0'; ++cur )
{
if(*cur == '\n' || *cur == '\r'){phase = dlast = 0; continue;}
d = table[(int)*cur];
if(d != -1)
{
switch(phase)
{
case 0:
++phase;
break;
case 1:
c = ((dlast << 2) | ((d & 0x30) >> 4));
*str++ = c;
++phase;
break;
case 2:
c = (((dlast & 0xf) << 4) | ((d & 0x3c) >> 2));
*str++ = c;
++phase;
break;
case 3:
c = (((dlast & 0x03 ) << 6) | d);
*str++ = c;
phase = 0;
break;
}
dlast = d;
}
}
*str = '\0';
return str - start;
}
EVP_PKEY* load_dsa_key(char *key)
{
EVP_PKEY* pkey = NULL;
BIO *bio;
if((bio = BIO_new_mem_buf(key, (int)strlen(key))))
{
DSA* dsa_key = 0;
if(PEM_read_bio_DSA_PUBKEY(bio, &dsa_key, NULL, NULL))
{
if((pkey = EVP_PKEY_new()))
{
if(EVP_PKEY_assign_DSA(pkey, dsa_key) != 1)
{
DSA_free(dsa_key);
EVP_PKEY_free(pkey);
pkey = NULL;
}
}
}
BIO_free(bio);
}
return pkey;
}
@implementation SUDSAVerifier
+ (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString
{
BOOL result = NO;
if (!encodedSignature) { return NO; }
if (!pkeyString) { return NO; }
// Remove whitespace around each line of the key.
NSMutableArray *pkeyTrimmedLines = [NSMutableArray array];
NSEnumerator *pkeyLinesEnumerator = [[pkeyString componentsSeparatedByString:@"\n"] objectEnumerator];
NSString *pkeyLine;
while ((pkeyLine = [pkeyLinesEnumerator nextObject]) != nil)
{
[pkeyTrimmedLines addObject:[pkeyLine stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
}
pkeyString = [pkeyTrimmedLines componentsJoinedByString:@"\n"]; // Put them back together.
EVP_PKEY* pkey = NULL;
pkey = load_dsa_key((char *)[pkeyString UTF8String]);
if (!pkey) { return NO; }
// Now, the signature is in base64; we have to decode it into a binary stream.
unsigned char *signature = (unsigned char *)[encodedSignature UTF8String];
long length = b64decode(signature); // Decode the signature in-place and get the new length of the signature string.
// We've got the signature, now get the file data.
NSData *pathData = [NSData dataWithContentsOfFile:path];
if (!pathData) { return NO; }
// Hash the file with SHA-1.
unsigned char md[SHA_DIGEST_LENGTH];
SHA1([pathData bytes], [pathData length], md);
// Actually verify the signature on the file.
EVP_MD_CTX ctx;
if(EVP_VerifyInit(&ctx, EVP_dss1()) == 1) // We're using DSA keys.
{
EVP_VerifyUpdate(&ctx, md, SHA_DIGEST_LENGTH);
result = (EVP_VerifyFinal(&ctx, signature, (unsigned int)length, pkey) == 1);
}
EVP_PKEY_free(pkey);
return result;
}
@end
-82
View File
@@ -1,82 +0,0 @@
//
// SUDiskImageUnarchiver.m
// Sparkle
//
// Created by Andy Matuschak on 6/16/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUDiskImageUnarchiver.h"
#import "SUUnarchiver_Private.h"
#import "NTSynchronousTask.h"
@implementation SUDiskImageUnarchiver
+ (BOOL)_canUnarchivePath:(NSString *)path
{
return [[path pathExtension] isEqualToString:@"dmg"];
}
- (void)start
{
[NSThread detachNewThreadSelector:@selector(_extractDMG) toTarget:self withObject:nil];
}
- (void)_extractDMG
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
BOOL mountedSuccessfully = NO;
// get a unique mount point path
NSString *mountPoint = [@"/Volumes" stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]];
if ([[NSFileManager defaultManager] fileExistsAtPath:mountPoint]) goto reportError;
// create mount point folder
[[NSFileManager defaultManager] createDirectoryAtPath:mountPoint attributes:nil];
if (![[NSFileManager defaultManager] fileExistsAtPath:mountPoint]) goto reportError;
NSArray* arguments = [NSArray arrayWithObjects:@"attach", archivePath, @"-mountpoint", mountPoint, @"-noverify", @"-nobrowse", @"-noautoopen", nil];
// set up a pipe and push "yes" (y works too), this will accept any license agreement crap
// not every .dmg needs this, but this will make sure it works with everyone
NSData* yesData = [[[NSData alloc] initWithBytes:"yes\n" length:4] autorelease];
NSData *result = [NTSynchronousTask task:@"/usr/bin/hdiutil" directory:@"/" withArgs:arguments input:yesData];
if (!result) goto reportError;
mountedSuccessfully = YES;
// Now that we've mounted it, we need to copy out its contents.
NSString *targetPath = [[archivePath stringByDeletingLastPathComponent] stringByAppendingPathComponent:[mountPoint lastPathComponent]];
if (![[NSFileManager defaultManager] createDirectoryAtPath:targetPath attributes:nil]) goto reportError;
// We can't just copyPath: from the volume root because that always fails. Seems to be a bug.
id subpathEnumerator = [[[NSFileManager defaultManager] directoryContentsAtPath:mountPoint] objectEnumerator], currentSubpath;
while ((currentSubpath = [subpathEnumerator nextObject]))
{
NSString *currentFullPath = [mountPoint stringByAppendingPathComponent:currentSubpath];
// Don't bother trying (and failing) to copy out files we can't read. That's not going to be the app anyway.
if (![[NSFileManager defaultManager] isReadableFileAtPath:currentFullPath]) continue;
if (![[NSFileManager defaultManager] copyPath:currentFullPath toPath:[targetPath stringByAppendingPathComponent:currentSubpath] handler:nil])
goto reportError;
}
[self performSelectorOnMainThread:@selector(_notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO];
goto finally;
reportError:
[self performSelectorOnMainThread:@selector(_notifyDelegateOfFailure) withObject:nil waitUntilDone:NO];
finally:
if (mountedSuccessfully)
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil" arguments:[NSArray arrayWithObjects:@"detach", mountPoint, @"-force", nil]];
else
[[NSFileManager defaultManager] removeFileAtPath:mountPoint handler:nil];
[pool drain];
}
+ (void)load
{
[self _registerImplementation:self];
}
@end
-35
View File
@@ -1,35 +0,0 @@
//
// SUHost.h
// Sparkle
//
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
@interface SUHost : NSObject
{
NSBundle *bundle;
}
+ (NSString *)systemVersionString;
- (id)initWithBundle:(NSBundle *)aBundle;
- (NSBundle *)bundle;
- (NSString *)bundlePath;
- (NSString *)name;
- (NSString *)version;
- (NSString *)displayVersion;
- (NSImage *)icon;
- (BOOL)isRunningOnReadOnlyVolume;
- (BOOL)isBackgroundApplication;
- (NSString *)publicDSAKey;
- (NSArray *)systemProfile;
- (id)objectForInfoDictionaryKey:(NSString *)key;
- (BOOL)boolForInfoDictionaryKey:(NSString *)key;
- (id)objectForUserDefaultsKey:(NSString *)defaultName;
- (void)setObject:(id)value forUserDefaultsKey:(NSString *)defaultName;
- (BOOL)boolForUserDefaultsKey:(NSString *)defaultName;
- (void)setBool:(BOOL)value forUserDefaultsKey:(NSString *)defaultName;
@end
-207
View File
@@ -1,207 +0,0 @@
//
// SUHost.m
// Sparkle
//
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUHost.h"
#import "SUSystemProfiler.h"
#import <sys/mount.h> // For statfs for isRunningOnReadOnlyVolume
@implementation SUHost
- (id)initWithBundle:(NSBundle *)aBundle
{
if (aBundle == nil) aBundle = [NSBundle mainBundle];
if ((self = [super init]))
{
bundle = [aBundle retain];
}
return self;
}
- (void)dealloc
{
[bundle release];
[super dealloc];
}
- (NSBundle *)bundle
{
return bundle;
}
- (NSString *)bundlePath
{
return [bundle bundlePath];
}
- (NSString *)name
{
NSString *name = [bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
if (name) return name;
name = [self objectForInfoDictionaryKey:@"CFBundleName"];
if (name) return name;
return [[[NSFileManager defaultManager] displayNameAtPath:[bundle bundlePath]] stringByDeletingPathExtension];
}
- (NSString *)version
{
return [bundle objectForInfoDictionaryKey:@"CFBundleVersion"];
}
- (NSString *)displayVersion
{
NSString *shortVersionString = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
if (shortVersionString)
return shortVersionString;
else
return [self version]; // Fall back on the normal version string.
}
- (NSImage *)icon
{
// Cache the application icon.
NSString *iconPath = [bundle pathForResource:[bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType:@"icns"];
// According to the OS X docs, "CFBundleIconFile - This key identifies the file containing
// the icon for the bundle. The filename you specify does not need to include the .icns
// extension, although it may."
//
// However, if it *does* include the '.icns' the above method fails (tested on OS X 10.3.9) so we'll also try:
if (!iconPath)
iconPath = [bundle pathForResource:[bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType: nil];
NSImage *icon = [[[NSImage alloc] initWithContentsOfFile:iconPath] autorelease];
// Use a default icon if none is defined.
if (!icon) { icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericApplicationIcon)]; }
return icon;
}
- (BOOL)isRunningOnReadOnlyVolume
{
struct statfs statfs_info;
statfs([[bundle bundlePath] fileSystemRepresentation], &statfs_info);
return (statfs_info.f_flags & MNT_RDONLY);
}
- (BOOL)isBackgroundApplication
{
return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSUIElement"] doubleValue];
}
- (NSString *)publicDSAKey
{
// Maybe the key is just a string in the Info.plist.
NSString *key = [bundle objectForInfoDictionaryKey:SUPublicDSAKeyKey];
if (key) { return key; }
// More likely, we've got a reference to a Resources file by filename:
NSString *keyFilename = [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
if (!keyFilename) { return nil; }
return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil]];
}
- (NSArray *)systemProfile
{
return [[SUSystemProfiler sharedSystemProfiler] systemProfileArrayForHost:self];
}
- (id)objectForInfoDictionaryKey:(NSString *)key
{
return [bundle objectForInfoDictionaryKey:key];
}
- (BOOL)boolForInfoDictionaryKey:(NSString *)key
{
return [[self objectForInfoDictionaryKey:key] boolValue];
}
- (id)objectForUserDefaultsKey:(NSString *)defaultName
{
// Under Tiger, CFPreferencesCopyAppValue doesn't get values from NSRegistratioDomain, so anything
// passed into -[NSUserDefaults registerDefaults:] is ignored. The following line falls
// back to using NSUserDefaults, but only if the host bundle is the main bundle.
if (bundle == [NSBundle mainBundle])
return [[NSUserDefaults standardUserDefaults] objectForKey:defaultName];
CFPropertyListRef obj = CFPreferencesCopyAppValue((CFStringRef)defaultName, (CFStringRef)[bundle bundleIdentifier]);
#if MAC_OS_X_VERSION_MIN_REQUIRED > 1050
return [NSMakeCollectable(obj) autorelease];
#else
return [(id)obj autorelease];
#endif
}
- (void)setObject:(id)value forUserDefaultsKey:(NSString *)defaultName;
{
// If we're using a .app, we'll use the standard user defaults mechanism; otherwise, we have to get CF-y.
if (bundle == [NSBundle mainBundle])
{
[[NSUserDefaults standardUserDefaults] setObject:value forKey:defaultName];
}
else
{
CFPreferencesSetValue((CFStringRef)defaultName, value, (CFStringRef)[bundle bundleIdentifier], kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFPreferencesSynchronize((CFStringRef)[bundle bundleIdentifier], kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
}
}
- (BOOL)boolForUserDefaultsKey:(NSString *)defaultName
{
if (bundle == [NSBundle mainBundle])
return [[NSUserDefaults standardUserDefaults] boolForKey:defaultName];
BOOL value;
CFPropertyListRef plr = CFPreferencesCopyAppValue((CFStringRef)defaultName, (CFStringRef)[bundle bundleIdentifier]);
if (plr == NULL)
value = NO;
else
{
value = (BOOL)CFBooleanGetValue((CFBooleanRef)plr);
CFRelease(plr);
}
return value;
}
- (void)setBool:(BOOL)value forUserDefaultsKey:(NSString *)defaultName
{
// If we're using a .app, we'll use the standard user defaults mechanism; otherwise, we have to get CF-y.
if (bundle == [NSBundle mainBundle])
{
[[NSUserDefaults standardUserDefaults] setBool:value forKey:defaultName];
}
else
{
CFPreferencesSetValue((CFStringRef)defaultName, (CFBooleanRef)[NSNumber numberWithBool:value], (CFStringRef)[bundle bundleIdentifier], kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFPreferencesSynchronize((CFStringRef)[bundle bundleIdentifier], kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
}
}
+ (NSString *)systemVersionString
{
// This returns a version string of the form X.Y.Z
// There may be a better way to deal with the problem that gestaltSystemVersionMajor
// et al. are not defined in 10.3, but this is probably good enough.
NSString* verStr = nil;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
SInt32 major, minor, bugfix;
OSErr err1 = Gestalt(gestaltSystemVersionMajor, &major);
OSErr err2 = Gestalt(gestaltSystemVersionMinor, &minor);
OSErr err3 = Gestalt(gestaltSystemVersionBugFix, &bugfix);
if (!err1 && !err2 && !err3)
{
verStr = [NSString stringWithFormat:@"%d.%d.%d", major, minor, bugfix];
}
else
#endif
{
NSString *versionPlistPath = @"/System/Library/CoreServices/SystemVersion.plist";
verStr = [[[NSDictionary dictionaryWithContentsOfFile:versionPlistPath] objectForKey:@"ProductVersion"] retain];
}
return verStr;
}
@end
-25
View File
@@ -1,25 +0,0 @@
//
// SUInstaller.h
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#ifndef SUINSTALLER_H
#define SUINSTALLER_H
#import <Cocoa/Cocoa.h>
@class SUHost;
@interface SUInstaller : NSObject { }
+ (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously;
+ (void)_finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate;
@end
@interface NSObject (SUInstallerDelegateInformalProtocol)
- (void)installerFinishedForHost:(SUHost *)host;
- (void)installerForHost:(SUHost *)host failedWithError:(NSError *)error;
@end
#endif
-106
View File
@@ -1,106 +0,0 @@
//
// SUInstaller.m
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUInstaller.h"
#import "SUPlainInstaller.h"
#import "SUPackageInstaller.h"
NSString *SUInstallerPathKey = @"SUInstallerPath";
NSString *SUInstallerHostKey = @"SUInstallerHost";
NSString *SUInstallerDelegateKey = @"SUInstallerDelegate";
@implementation SUInstaller
+ (BOOL)_isAliasFolderAtPath:(NSString *)path
{
FSRef fileRef;
OSStatus err = noErr;
Boolean aliasFileFlag, folderFlag;
NSURL *fileURL = [NSURL fileURLWithPath:path];
if (FALSE == CFURLGetFSRef((CFURLRef)fileURL, &fileRef))
err = coreFoundationUnknownErr;
if (noErr == err)
err = FSIsAliasFile(&fileRef, &aliasFileFlag, &folderFlag);
if (noErr == err)
return (BOOL)(aliasFileFlag && folderFlag);
else
return NO;
}
+ (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously
{
// Search subdirectories for the application
NSString *currentFile, *newAppDownloadPath = nil, *bundleFileName = [[host bundlePath] lastPathComponent], *alternateBundleFileName = [[host name] stringByAppendingPathExtension:[[host bundlePath] pathExtension]];
BOOL isPackage = NO;
NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:updateFolder];
while ((currentFile = [dirEnum nextObject]))
{
NSString *currentPath = [updateFolder stringByAppendingPathComponent:currentFile];
if ([[currentFile lastPathComponent] isEqualToString:bundleFileName] ||
[[currentFile lastPathComponent] isEqualToString:alternateBundleFileName]) // We found one!
{
isPackage = NO;
newAppDownloadPath = currentPath;
break;
}
else if (([[currentFile pathExtension] isEqualToString:@"pkg"] || [[currentFile pathExtension] isEqualToString:@"mpkg"]) &&
[[[currentFile lastPathComponent] stringByDeletingPathExtension] isEqualToString:[bundleFileName stringByDeletingPathExtension]])
{
isPackage = YES;
newAppDownloadPath = currentPath;
break;
}
// Some DMGs have symlinks into /Applications! That's no good! And there's no point in looking in bundles.
if ([self _isAliasFolderAtPath:currentPath] ||
[[currentFile pathExtension] isEqualToString:[[host bundlePath] pathExtension]] ||
[[currentFile pathExtension] isEqualToString:@"pkg"] ||
[[currentFile pathExtension] isEqualToString:@"mpkg"])
{
[dirEnum skipDescendents];
}
}
if (newAppDownloadPath == nil)
{
[self _finishInstallationWithResult:NO host:host error:[NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingUpdateError userInfo:[NSDictionary dictionaryWithObject:@"Couldn't find an appropriate update in the downloaded package." forKey:NSLocalizedDescriptionKey]] delegate:delegate];
}
else
{
[(isPackage ? [SUPackageInstaller class] : [SUPlainInstaller class]) performInstallationWithPath:newAppDownloadPath host:host delegate:delegate synchronously:synchronously];
}
}
+ (void)_mdimportHost:(SUHost *)host
{
NSTask *mdimport = [[[NSTask alloc] init] autorelease];
[mdimport setLaunchPath:@"/usr/bin/mdimport"];
[mdimport setArguments:[NSArray arrayWithObject:[host bundlePath]]];
[mdimport launch];
}
+ (void)_finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate
{
if (result == YES)
{
[self _mdimportHost:host];
if ([delegate respondsToSelector:@selector(installerFinishedForHost:)])
[delegate installerFinishedForHost:host];
}
else
{
if ([delegate respondsToSelector:@selector(installerForHost:failedWithError:)])
[delegate installerForHost:host failedWithError:error];
}
}
@end
-174
View File
@@ -1,174 +0,0 @@
<?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>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (January 2008)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<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>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<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>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17-inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac8,1</key>
<string>iMac (April 2008)</string>
</dict>
</plist>
-32
View File
@@ -1,32 +0,0 @@
//
// SUPackageInstaller.m
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUPackageInstaller.h"
@implementation SUPackageInstaller
+ (void)installPath:(NSString *)path overHost:(SUHost *)bundle delegate:delegate
{
NSError *error = nil;
BOOL result = YES;
NSString *installerPath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"com.apple.installer"];
installerPath = [installerPath stringByAppendingString:@"/Contents/MacOS/Installer"];
if (![[NSFileManager defaultManager] fileExistsAtPath:installerPath])
{
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingInstallerToolError userInfo:[NSDictionary dictionaryWithObject:@"Couldn't find Apple's installer tool!" forKey:NSLocalizedDescriptionKey]];
result = NO;
}
NSTask *installer = [NSTask launchedTaskWithLaunchPath:installerPath arguments:[NSArray arrayWithObjects:path, nil]];
[installer waitUntilExit];
// Known bug: if the installation fails or is canceled, Sparkle goes ahead and restarts, thinking everything is fine.
[self _finishInstallationWithResult:result host:bundle error:error delegate:delegate];
}
@end
-109
View File
@@ -1,109 +0,0 @@
//
// SUPipedUnarchiver.m
// Sparkle
//
// Created by Andy Matuschak on 6/16/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUPipedUnarchiver.h"
#import "SUUnarchiver_Private.h"
@implementation SUPipedUnarchiver
+ (SEL)_selectorConformingToTypeOfPath:(NSString *)path
{
static NSDictionary *typeSelectorDictionary;
if (!typeSelectorDictionary)
typeSelectorDictionary = [[NSDictionary dictionaryWithObjectsAndKeys:@"_extractZIP", @".zip", @"_extractTAR", @".tar",
@"_extractTGZ", @".tar.gz", @"_extractTGZ", @".tgz",
@"_extractTBZ", @".tar.bz2", @"_extractTBZ", @".tbz", nil] retain];
NSString *lastPathComponent = [path lastPathComponent];
NSEnumerator *typeEnumerator = [typeSelectorDictionary keyEnumerator];
id currentType;
while ((currentType = [typeEnumerator nextObject]))
{
if ([currentType length] > [lastPathComponent length]) continue;
if ([[lastPathComponent substringFromIndex:[lastPathComponent length] - [currentType length]] isEqualToString:currentType])
return NSSelectorFromString([typeSelectorDictionary objectForKey:currentType]);
}
return NULL;
}
- (void)start
{
[NSThread detachNewThreadSelector:[[self class] _selectorConformingToTypeOfPath:archivePath] toTarget:self withObject:nil];
}
+ (BOOL)_canUnarchivePath:(NSString *)path
{
return ([self _selectorConformingToTypeOfPath:path] != nil);
}
// This method abstracts the types that use a command line tool piping data from stdin.
- (void)_extractArchivePipingDataToCommand:(NSString *)command
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
FILE *fp = NULL, *cmdFP = NULL;
// Get the file size.
NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:archivePath traverseLink:NO] objectForKey:NSFileSize];
if (fs == nil) goto reportError;
// Thank you, Allan Odgaard!
// (who wrote the following extraction alg.)
fp = fopen([archivePath fileSystemRepresentation], "r");
if (!fp) goto reportError;
setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1);
cmdFP = popen([command fileSystemRepresentation], "w");
if (!cmdFP) goto reportError;
char buf[32*1024];
long len;
while((len = fread(buf, 1, 32*1024, fp)))
{
fwrite(buf, 1, len, cmdFP);
[self performSelectorOnMainThread:@selector(_notifyDelegateOfExtractedLength:) withObject:[NSNumber numberWithLong:len] waitUntilDone:NO];
}
pclose(cmdFP);
[self performSelectorOnMainThread:@selector(_notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO];
goto finally;
reportError:
[self performSelectorOnMainThread:@selector(_notifyDelegateOfFailure) withObject:nil waitUntilDone:NO];
finally:
if (fp)
fclose(fp);
[pool drain];
}
- (void)_extractTAR
{
return [self _extractArchivePipingDataToCommand:@"tar -xC \"$DESTINATION\""];
}
- (void)_extractTGZ
{
return [self _extractArchivePipingDataToCommand:@"tar -zxC \"$DESTINATION\""];
}
- (void)_extractTBZ
{
return [self _extractArchivePipingDataToCommand:@"tar -jxC \"$DESTINATION\""];
}
- (void)_extractZIP
{
return [self _extractArchivePipingDataToCommand:@"ditto -x -k - \"$DESTINATION\""];
}
+ (void)load
{
[self _registerImplementation:self];
}
@end
-19
View File
@@ -1,19 +0,0 @@
//
// SUPlainInstaller.h
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#ifndef SUPLAININSTALLER_H
#define SUPLAININSTALLER_H
#import "Sparkle.h"
#import "SUInstaller.h"
@interface SUPlainInstaller : SUInstaller { }
+ (void)performInstallationWithPath:(NSString *)path host:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously;
@end
#endif
-43
View File
@@ -1,43 +0,0 @@
//
// SUPlainInstaller.m
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUPlainInstaller.h"
#import "SUPlainInstallerInternals.h"
extern NSString *SUInstallerPathKey;
extern NSString *SUInstallerHostKey;
extern NSString *SUInstallerDelegateKey;
@implementation SUPlainInstaller
+ (void)installPath:(NSString *)path overHost:(SUHost *)bundle delegate:delegate
{
NSError *error;
BOOL result = [self copyPathWithAuthentication:path overPath:[bundle bundlePath] error:&error];
[self _finishInstallationWithResult:result host:bundle error:error delegate:delegate];
}
+ (void)_performInstallationWithInfo:(NSDictionary *)info
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self installPath:[info objectForKey:SUInstallerPathKey] overHost:[info objectForKey:SUInstallerHostKey] delegate:[info objectForKey:SUInstallerDelegateKey]];
[pool drain];
}
+ (void)performInstallationWithPath:(NSString *)path host:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously;
{
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:path, SUInstallerPathKey, host, SUInstallerHostKey, delegate, SUInstallerDelegateKey, nil];
if (synchronously)
[self _performInstallationWithInfo:info];
else
[NSThread detachNewThreadSelector:@selector(_performInstallationWithInfo:) toTarget:self withObject:info];
}
@end
-18
View File
@@ -1,18 +0,0 @@
//
// SUPlainInstallerInternals.m
// Sparkle
//
// Created by Andy Matuschak on 3/9/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUPLAININSTALLERINTERNALS_H
#define SUPLAININSTALLERINTERNALS_H
#import "SUPlainInstaller.h"
@interface SUPlainInstaller (Internals)
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst error:(NSError **)error;
@end
#endif
-339
View File
@@ -1,339 +0,0 @@
//
// SUPlainInstallerInternals.m
// Sparkle
//
// Created by Andy Matuschak on 3/9/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUPlainInstallerInternals.h"
#import <Security/Security.h>
#import <sys/stat.h>
#import <sys/wait.h>
#import <dirent.h>
#import <unistd.h>
@interface SUPlainInstaller (MMExtendedAttributes)
// Removes the directory tree rooted at |root| from the file quarantine.
// The quarantine was introduced on Mac OS X 10.5 and is described at:
//
// http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html
//#apple_ref/doc/uid/TP40001369-DontLinkElementID_2
//
// If |root| is not a directory, then it alone is removed from the quarantine.
// Symbolic links, including |root| if it is a symbolic link, will not be
// traversed.
//
// Ordinarily, the quarantine is managed by calling LSSetItemAttribute
// to set the kLSItemQuarantineProperties attribute to a dictionary specifying
// the quarantine properties to be applied. However, it does not appear to be
// possible to remove an item from the quarantine directly through any public
// Launch Services calls. Instead, this method takes advantage of the fact
// that the quarantine is implemented in part by setting an extended attribute,
// "com.apple.quarantine", on affected files. Removing this attribute is
// sufficient to remove files from the quarantine.
+ (void)releaseFromQuarantine:(NSString*)root;
@end
// Authorization code based on generous contribution from Allan Odgaard. Thanks, Allan!
static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authorization, const char* executablePath, AuthorizationFlags options, const char* const* arguments)
{
sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
BOOL returnValue = YES;
if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, (char* const*)arguments, NULL) == errAuthorizationSuccess)
{
int status;
pid_t pid = wait(&status);
if (pid == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
returnValue = NO;
}
else
returnValue = NO;
signal(SIGCHLD, oldSigChildHandler);
return returnValue;
}
@implementation SUPlainInstaller (Internals)
+ (BOOL)currentUserOwnsPath:(NSString *)oPath
{
const char *path = [oPath fileSystemRepresentation];
uid_t uid = getuid();
bool res = false;
struct stat sb;
if(stat(path, &sb) == 0)
{
if(sb.st_uid == uid)
{
res = true;
if(sb.st_mode & S_IFDIR)
{
DIR* dir = opendir(path);
struct dirent* entry = NULL;
while(res && (entry = readdir(dir)))
{
if(strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
continue;
size_t len = strlen(path) + 1 + entry->d_namlen + 1;
char descend[len];
strlcpy(descend, path, len);
strlcat(descend, "/", len);
strlcat(descend, entry->d_name, len);
NSString* newPath = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:descend length:strlen(descend)];
res = [self currentUserOwnsPath:newPath];
}
closedir(dir);
}
}
}
return res;
}
+ (NSString *)_temporaryCopyNameForPath:(NSString *)path
{
// Let's try to read the version number so the filename will be more meaningful.
NSString *postFix;
NSBundle *bundle;
if ((bundle = [NSBundle bundleWithPath:path]))
{
// We'll clean it up a little for safety.
// The cast is necessary because of a bug in the headers in pre-10.5 SDKs
NSMutableCharacterSet *validCharacters = (id)[NSMutableCharacterSet alphanumericCharacterSet];
[validCharacters formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@".-()"]];
postFix = [[bundle objectForInfoDictionaryKey:@"CFBundleVersion"] stringByTrimmingCharactersInSet:[validCharacters invertedSet]];
}
else
postFix = @"old";
NSString *prefix = [[path stringByDeletingPathExtension] stringByAppendingFormat:@" (%@)", postFix];
NSString *tempDir = [prefix stringByAppendingPathExtension:[path pathExtension]];
// Now let's make sure we get a unique path.
int cnt=2;
while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999999)
tempDir = [NSString stringWithFormat:@"%@ %d.%@", prefix, cnt++, [path pathExtension]];
return tempDir;
}
+ (BOOL)_copyPathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst error:(NSError **)error
{
NSString *tmp = [self _temporaryCopyNameForPath:dst];
const char* srcPath = [src fileSystemRepresentation];
const char* tmpPath = [tmp fileSystemRepresentation];
const char* dstPath = [dst fileSystemRepresentation];
struct stat dstSB;
stat(dstPath, &dstSB);
AuthorizationRef auth = NULL;
OSStatus authStat = errAuthorizationDenied;
while (authStat == errAuthorizationDenied) {
authStat = AuthorizationCreate(NULL,
kAuthorizationEmptyEnvironment,
kAuthorizationFlagDefaults,
&auth);
}
BOOL res = NO;
if (authStat == errAuthorizationSuccess) {
res = YES;
char uidgid[42];
snprintf(uidgid, sizeof(uidgid), "%d:%d",
dstSB.st_uid, dstSB.st_gid);
const char* executables[] = {
"/bin/rm",
"/bin/mv",
"/bin/mv",
"/bin/rm",
NULL, // pause here and do some housekeeping before
// continuing
"/usr/sbin/chown",
NULL // stop here for real
};
// 4 is the maximum number of arguments to any command,
// including the NULL that signals the end of an argument
// list.
const char* const argumentLists[][4] = {
{ "-rf", tmpPath, NULL }, // make room for the temporary file... this is kinda unsafe; should probably do something better.
{ "-f", dstPath, tmpPath, NULL }, // mv
{ "-f", srcPath, dstPath, NULL }, // mv
{ "-rf", tmpPath, NULL }, // rm
{ NULL }, // pause
{ "-R", uidgid, dstPath, NULL }, // chown
{ NULL } // stop
};
// Process the commands up until the first NULL
int commandIndex = 0;
for (; executables[commandIndex] != NULL; ++commandIndex) {
if (res)
res = AuthorizationExecuteWithPrivilegesAndWait(auth, executables[commandIndex], kAuthorizationFlagDefaults, argumentLists[commandIndex]);
}
// If the currently-running application is trusted, the new
// version should be trusted as well. Remove it from the
// quarantine to avoid a delay at launch, and to avoid
// presenting the user with a confusing trust dialog.
//
// This needs to be done after the application is moved to its
// new home with "mv" in case it's moved across filesystems: if
// that happens, "mv" actually performs a copy and may result
// in the application being quarantined. It also needs to be
// done before "chown" changes ownership, because the ownership
// change will almost certainly make it impossible to change
// attributes to release the files from the quarantine.
if (res) {
[self releaseFromQuarantine:dst];
}
// Now move past the NULL we found and continue executing
// commands from the list.
++commandIndex;
for (; executables[commandIndex] != NULL; ++commandIndex) {
if (res)
res = AuthorizationExecuteWithPrivilegesAndWait(auth, executables[commandIndex], kAuthorizationFlagDefaults, argumentLists[commandIndex]);
}
AuthorizationFree(auth, 0);
if (!res)
{
// Something went wrong somewhere along the way, but we're not sure exactly where.
NSString *errorMessage = [NSString stringWithFormat:@"Authenticated file copy from %@ to %@ failed.", src, dst];
if (error != NULL)
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]];
}
}
else
{
if (error != NULL)
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:[NSDictionary dictionaryWithObject:@"Couldn't get permission to authenticate." forKey:NSLocalizedDescriptionKey]];
}
return res;
}
+ (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst error:(NSError **)error
{
if (![[NSFileManager defaultManager] fileExistsAtPath:dst])
{
NSString *errorMessage = [NSString stringWithFormat:@"Couldn't copy %@ over %@ because there is no file at %@.", src, dst, dst];
if (error != NULL)
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]];
return NO;
}
if (![[NSFileManager defaultManager] isWritableFileAtPath:dst] || ![[NSFileManager defaultManager] isWritableFileAtPath:[dst stringByDeletingLastPathComponent]])
return [self _copyPathWithForcedAuthentication:src toPath:dst error:error];
NSString *tmpPath = [self _temporaryCopyNameForPath:dst];
if (![[NSFileManager defaultManager] movePath:dst toPath:tmpPath handler:self])
{
if (error != NULL)
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] forKey:NSLocalizedDescriptionKey]];
return NO;
}
if (![[NSFileManager defaultManager] copyPath:src toPath:dst handler:self])
{
if (error != NULL)
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't copy %@ to %@.", src, dst] forKey:NSLocalizedDescriptionKey]];
return NO;
}
// Trash the old copy of the app.
NSInteger tag = 0;
if (![[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[tmpPath stringByDeletingLastPathComponent] destination:@"" files:[NSArray arrayWithObject:[tmpPath lastPathComponent]] tag:&tag])
NSLog(@"Sparkle error: couldn't move %@ to the trash. This is often a sign of a permissions error.", tmpPath);
// If the currently-running application is trusted, the new
// version should be trusted as well. Remove it from the
// quarantine to avoid a delay at launch, and to avoid
// presenting the user with a confusing trust dialog.
//
// This needs to be done after the application is moved to its
// new home in case it's moved across filesystems: if that
// happens, the move is actually a copy, and it may result
// in the application being quarantined.
[self releaseFromQuarantine:dst];
return YES;
}
@end
#include <dlfcn.h>
#include <errno.h>
#include <sys/xattr.h>
@implementation SUPlainInstaller (MMExtendedAttributes)
+ (int)removeXAttr:(const char*)name
fromFile:(NSString*)file
options:(int)options
{
typedef int (*removexattr_type)(const char*, const char*, int);
// Reference removexattr directly, it's in the SDK.
static removexattr_type removexattr_func = removexattr;
// Make sure that the symbol is present. This checks the deployment
// target instead of the SDK so that it's able to catch dlsym failures
// as well as the null symbol that would result from building with the
// 10.4 SDK and a lower deployment target, and running on 10.3.
if (!removexattr_func) {
errno = ENOSYS;
return -1;
}
const char* path = NULL;
@try {
path = [file fileSystemRepresentation];
}
@catch (id exception) {
// -[NSString fileSystemRepresentation] throws an exception if it's
// unable to convert the string to something suitable. Map that to
// EDOM, "argument out of domain", which sort of conveys that there
// was a conversion failure.
errno = EDOM;
return -1;
}
return removexattr_func(path, name, options);
}
+ (void)releaseFromQuarantine:(NSString*)root
{
const char* quarantineAttribute = "com.apple.quarantine";
const int removeXAttrOptions = XATTR_NOFOLLOW;
[self removeXAttr:quarantineAttribute
fromFile:root
options:removeXAttrOptions];
// Only recurse if it's actually a directory. Don't recurse into a
// root-level symbolic link.
NSDictionary* rootAttributes =
[[NSFileManager defaultManager] fileAttributesAtPath:root traverseLink:NO];
NSString* rootType = [rootAttributes objectForKey:NSFileType];
if (rootType == NSFileTypeDirectory) {
// The NSDirectoryEnumerator will avoid recursing into any contained
// symbolic links, so no further type checks are needed.
NSDirectoryEnumerator* directoryEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:root];
NSString* file = nil;
while ((file = [directoryEnumerator nextObject])) {
[self removeXAttr:quarantineAttribute
fromFile:[root stringByAppendingPathComponent:file]
options:removeXAttrOptions];
}
}
}
@end
-26
View File
@@ -1,26 +0,0 @@
//
// SUProbingUpdateDriver.m
// Sparkle
//
// Created by Andy Matuschak on 5/7/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUProbingUpdateDriver.h"
@implementation SUProbingUpdateDriver
// Stop as soon as we have an answer! The superclasses will already have taken care of notifying the delegate.
- (void)didFindValidUpdate
{
[self abortUpdate];
}
- (void)didNotFindUpdate
{
[self abortUpdate];
}
@end
-33
View File
@@ -1,33 +0,0 @@
//
// SUScheduledUpdateDriver.m
// Sparkle
//
// Created by Andy Matuschak on 5/6/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUScheduledUpdateDriver.h"
#import "Sparkle.h"
@implementation SUScheduledUpdateDriver
- (void)didFindValidUpdate
{
showErrors = YES; // We only start showing errors after we present the UI for the first time.
[super didFindValidUpdate];
}
- (void)didNotFindUpdate
{
[self abortUpdate]; // Don't tell the user that no update was found; this was a scheduled update.
}
- (void)abortUpdateWithError:(NSError *)error
{
if (showErrors)
[super abortUpdateWithError:error];
else
[self abortUpdate];
}
@end
-36
View File
@@ -1,36 +0,0 @@
//
// SUStandardVersionComparator.h
// Sparkle
//
// Created by Andy Matuschak on 12/21/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
//
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
#define SUSTANDARDVERSIONCOMPARATOR_H
#import "SUVersionComparisonProtocol.h"
/*!
@class
@abstract Sparkle's default version comparator.
@discussion This comparator is adapted from MacPAD, by Kevin Ballard. It's "dumb" in that it does essentially string comparison, in components split by character type.
*/
@interface SUStandardVersionComparator : NSObject <SUVersionComparison> { }
/*!
@method
@abstract Returns a singleton instance of the comparator.
*/
+ (SUStandardVersionComparator *)defaultComparator;
/*!
@method
@abstract Compares version strings through textual analysis.
@discussion See the implementation for more details.
*/
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
@end
#endif
-56
View File
@@ -1,56 +0,0 @@
<?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>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>SUWindowController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSWindowController</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSApplication</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
</dict>
<dict>
<key>CLASS</key>
<string>SUStatusController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>actionButton</key>
<string>NSButton</string>
<key>progressBar</key>
<string>NSProgressIndicator</string>
</dict>
<key>SUPERCLASS</key>
<string>SUWindowController</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
-20
View File
@@ -1,20 +0,0 @@
<?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>IBFramework Version</key>
<string>670</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>Sparkle.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>6</integer>
</array>
<key>IBSystem Version</key>
<string>10A96</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
BIN
View File
Binary file not shown.
-42
View File
@@ -1,42 +0,0 @@
//
// SUStatusController.h
// Sparkle
//
// Created by Andy Matuschak on 3/14/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUSTATUSCONTROLLER_H
#define SUSTATUSCONTROLLER_H
#import "SUWindowController.h"
@class SUHost;
@interface SUStatusController : SUWindowController {
double progressValue, maxProgressValue;
NSString *title, *statusText, *buttonTitle;
IBOutlet NSButton *actionButton;
IBOutlet NSProgressIndicator* progressBar;
SUHost *host;
}
- (id)initWithHost:(SUHost *)host;
// Pass 0 for the max progress value to get an indeterminate progress bar.
// Pass nil for the status text to not show it.
- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText;
// If isDefault is YES, the button's key equivalent will be \r.
- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault;
- (void)setButtonEnabled:(BOOL)enabled;
- (double)progressValue;
- (void)setProgressValue:(double)value;
- (double)maxProgressValue;
- (void)setMaxProgressValue:(double)value;
- (void)setStatusText:(NSString *)statusText;
@end
#endif
-127
View File
@@ -1,127 +0,0 @@
//
// SUStatusController.m
// Sparkle
//
// Created by Andy Matuschak on 3/14/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUStatusController.h"
@implementation SUStatusController
- (id)initWithHost:(SUHost *)aHost
{
self = [super initWithHost:aHost windowNibName:@"SUStatus"];
if (self)
{
host = [aHost retain];
[self setShouldCascadeWindows:NO];
}
return self;
}
- (void)dealloc
{
[host release];
[title release];
[statusText release];
[buttonTitle release];
[super dealloc];
}
- (void)awakeFromNib
{
[[self window] center];
[[self window] setFrameAutosaveName:@"SUStatusFrame"];
[progressBar setUsesThreadedAnimation:YES];
}
- (NSString *)windowTitle
{
return [NSString stringWithFormat:SULocalizedString(@"Updating %@", nil), [host name]];
}
- (NSImage *)applicationIcon
{
return [host icon];
}
- (void)beginActionWithTitle:(NSString *)aTitle maxProgressValue:(double)aMaxProgressValue statusText:(NSString *)aStatusText
{
[self willChangeValueForKey:@"title"];
title = [aTitle copy];
[self didChangeValueForKey:@"title"];
[self setMaxProgressValue:aMaxProgressValue];
[self setStatusText:aStatusText];
}
- (void)setButtonTitle:(NSString *)aButtonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault
{
[self willChangeValueForKey:@"buttonTitle"];
if (buttonTitle != aButtonTitle)
{
[buttonTitle release];
buttonTitle = [aButtonTitle copy];
}
[self didChangeValueForKey:@"buttonTitle"];
[self window];
[actionButton sizeToFit];
// Except we're going to add 15 px for padding.
[actionButton setFrameSize:NSMakeSize([actionButton frame].size.width + 15, [actionButton frame].size.height)];
// Now we have to move it over so that it's always 15px from the side of the window.
[actionButton setFrameOrigin:NSMakePoint([[self window] frame].size.width - 15 - [actionButton frame].size.width, [actionButton frame].origin.y)];
// Redisplay superview to clean up artifacts
[[actionButton superview] display];
[actionButton setTarget:target];
[actionButton setAction:action];
[actionButton setKeyEquivalent:isDefault ? @"\r" : @""];
}
- (BOOL)progressBarShouldAnimate
{
return YES;
}
- (void)setButtonEnabled:(BOOL)enabled
{
[actionButton setEnabled:enabled];
}
- (double)progressValue
{
return progressValue;
}
- (void)setProgressValue:(double)value
{
progressValue = value;
}
- (double)maxProgressValue
{
return maxProgressValue;
}
- (void)setMaxProgressValue:(double)value
{
if (value < 0) value = 0;
maxProgressValue = value;
[self setProgressValue:0];
[progressBar startAnimation:self];
}
- (void)setStatusText:(NSString *)aStatusText
{
if (statusText != aStatusText)
{
[statusText release];
statusText = [aStatusText copy];
}
}
@end
-141
View File
@@ -1,141 +0,0 @@
//
// SUSystemProfiler.m
// Sparkle
//
// Created by Andy Matuschak on 12/22/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
// Adapted from Sparkle+, by Tom Harrington.
//
#import "SUSystemProfiler.h"
#import "SUHost.h"
#import <sys/sysctl.h>
@implementation SUSystemProfiler
+ (SUSystemProfiler *)sharedSystemProfiler
{
static SUSystemProfiler *sharedSystemProfiler = nil;
if (!sharedSystemProfiler)
sharedSystemProfiler = [[self alloc] init];
return sharedSystemProfiler;
}
- (NSDictionary *)modelTranslationTable
{
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
return [[[NSDictionary alloc] initWithContentsOfFile:path] autorelease];
}
- (NSMutableArray *)systemProfileArrayForHost:(SUHost *)host
{
NSDictionary *modelTranslation = [self modelTranslationTable];
// Gather profile information and append it to the URL.
NSMutableArray *profileArray = [NSMutableArray array];
NSArray *profileDictKeys = [NSArray arrayWithObjects:@"key", @"displayKey", @"value", @"displayValue", nil];
int error = 0 ;
int value = 0 ;
unsigned long length = sizeof(value) ;
// OS version
NSString *currentSystemVersion = [SUHost systemVersionString];
if (currentSystemVersion != nil)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"osVersion",@"OS Version",currentSystemVersion,currentSystemVersion,nil] forKeys:profileDictKeys]];
// CPU type (decoder info for values found here is in mach/machine.h)
error = sysctlbyname("hw.cputype", &value, &length, NULL, 0);
int cpuType = -1;
if (error == 0) {
cpuType = value;
NSString *visibleCPUType;
switch(value) {
case 7: visibleCPUType=@"Intel"; break;
case 18: visibleCPUType=@"PowerPC"; break;
default: visibleCPUType=@"Unknown"; break;
}
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cputype",@"CPU Type", [NSNumber numberWithInt:value], visibleCPUType,nil] forKeys:profileDictKeys]];
}
error = sysctlbyname("hw.cpu64bit_capable", &value, &length, NULL, 0);
if(error != 0)
error = sysctlbyname("hw.optional.x86_64", &value, &length, NULL, 0); //x86 specific
if(error != 0)
error = sysctlbyname("hw.optional.64bitops", &value, &length, NULL, 0); //PPC specific
BOOL is64bit = NO;
if (error == 0) {
is64bit = value == 1;
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpu64bit", @"CPU is 64-Bit?", [NSNumber numberWithBool:is64bit], is64bit ? @"Yes" : @"No", nil] forKeys:profileDictKeys]];
}
error = sysctlbyname("hw.cpusubtype", &value, &length, NULL, 0);
if (error == 0) {
NSString *visibleCPUSubType;
if (cpuType == 7) {
// Intel
visibleCPUSubType = is64bit ? @"Intel Core 2" : @"Intel Core"; // If anyone knows how to tell a Core Duo from a Core Solo, please email tph@atomicbird.com
} else if (cpuType == 18) {
// PowerPC
switch(value) {
case 9: visibleCPUSubType=@"G3"; break;
case 10: case 11: visibleCPUSubType=@"G4"; break;
case 100: visibleCPUSubType=@"G5"; break;
default: visibleCPUSubType=@"Other"; break;
}
} else {
visibleCPUSubType = @"Other";
}
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpusubtype",@"CPU Subtype", [NSNumber numberWithInt:value], visibleCPUSubType,nil] forKeys:profileDictKeys]];
}
error = sysctlbyname("hw.model", NULL, &length, NULL, 0);
if (error == 0) {
char *cpuModel;
cpuModel = (char *)malloc(sizeof(char) * length);
error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0);
if (error == 0) {
NSString *rawModelName = [NSString stringWithUTF8String:cpuModel];
NSString *visibleModelName = [modelTranslation objectForKey:rawModelName];
if (visibleModelName == nil)
visibleModelName = rawModelName;
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"model",@"Mac Model", rawModelName, visibleModelName, nil] forKeys:profileDictKeys]];
}
if (cpuModel != NULL)
free(cpuModel);
}
// Number of CPUs
error = sysctlbyname("hw.ncpu", &value, &length, NULL, 0);
if (error == 0)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"ncpu",@"Number of CPUs", [NSNumber numberWithInt:value], [NSNumber numberWithInt:value],nil] forKeys:profileDictKeys]];
// User preferred language
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defs objectForKey:@"AppleLanguages"];
if (languages && ([languages count] > 0))
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"lang",@"Preferred Language", [languages objectAtIndex:0], [languages objectAtIndex:0],nil] forKeys:profileDictKeys]];
// Application sending the request
NSString *appName = [host name];
if (appName)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"appName",@"Application Name", appName, appName,nil] forKeys:profileDictKeys]];
NSString *appVersion = [host version];
if (appVersion)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"appVersion",@"Application Version", appVersion, appVersion,nil] forKeys:profileDictKeys]];
// Number of displays?
// CPU speed
OSErr err;
SInt32 gestaltInfo;
err = Gestalt(gestaltProcClkSpeedMHz,&gestaltInfo);
if (err == noErr)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpuFreqMHz",@"CPU Speed (GHz)", [NSNumber numberWithInt:gestaltInfo], [NSNumber numberWithDouble:gestaltInfo/1000.0],nil] forKeys:profileDictKeys]];
// amount of RAM
err = Gestalt(gestaltPhysicalRAMSizeInMegabytes,&gestaltInfo);
if (err == noErr)
[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"ramMB",@"Memory (MB)", [NSNumber numberWithInt:gestaltInfo], [NSNumber numberWithInt:gestaltInfo],nil] forKeys:profileDictKeys]];
return profileArray;
}
@end
-174
View File
@@ -1,174 +0,0 @@
//
// SUUIBasedUpdateDriver.m
// Sparkle
//
// Created by Andy Matuschak on 5/5/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUUIBasedUpdateDriver.h"
#import "SUUpdateAlert.h"
#import "SUHost.h"
#import "SUStatusController.h"
@implementation SUUIBasedUpdateDriver
- (void)didFindValidUpdate
{
updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:updateItem host:host];
[updateAlert setDelegate:self];
if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
[[updater delegate] updater:updater didFindValidUpdate:updateItem];
// If the app is a menubar app or the like, we need to focus it first and alter the
// update prompt to behave like a normal window. Otherwise if the window were hidden
// there may be no way for the application to be activated to make it visible again.
if ([host isBackgroundApplication])
{
[[updateAlert window] setHidesOnDeactivate:NO];
[NSApp activateIgnoringOtherApps:YES];
}
// Only show the update alert if the app is active; otherwise, we'll wait until it is.
if ([NSApp isActive])
[[updateAlert window] makeKeyAndOrderFront:self];
else
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp];
}
- (void)didNotFindUpdate
{
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
[[updater delegate] updaterDidNotFindUpdate:updater];
NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"You're up to date!", nil) defaultButton:SULocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [host name], [host displayVersion]];
[self showModalAlert:alert];
[self abortUpdate];
}
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
[[updateAlert window] makeKeyAndOrderFront:self];
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSApplicationDidBecomeActiveNotification" object:NSApp];
}
- (void)updateAlert:(SUUpdateAlert *)alert finishedWithChoice:(SUUpdateAlertChoice)choice
{
[updateAlert release]; updateAlert = nil;
[host setObject:nil forUserDefaultsKey:SUSkippedVersionKey];
switch (choice)
{
case SUInstallUpdateChoice:
statusController = [[SUStatusController alloc] initWithHost:host];
[statusController beginActionWithTitle:SULocalizedString(@"Downloading update\u2026", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil];
[statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO];
[statusController showWindow:self];
[self downloadUpdate];
break;
case SUSkipThisVersionChoice:
[host setObject:[updateItem versionString] forUserDefaultsKey:SUSkippedVersionKey];
case SURemindMeLaterChoice:
[self abortUpdate];
break;
}
}
- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response
{
[statusController setMaxProgressValue:[response expectedContentLength]];
}
- (NSString *)_humanReadableSizeFromDouble:(double)value
{
if (value < 1024)
return [NSString stringWithFormat:@"%.0lf %@", value, SULocalizedString(@"B", @"the unit for bytes")];
if (value < 1024 * 1024)
return [NSString stringWithFormat:@"%.0lf %@", value / 1024.0, SULocalizedString(@"KB", @"the unit for kilobytes")];
if (value < 1024 * 1024 * 1024)
return [NSString stringWithFormat:@"%.1lf %@", value / 1024.0 / 1024.0, SULocalizedString(@"MB", @"the unit for megabytes")];
return [NSString stringWithFormat:@"%.2lf %@", value / 1024.0 / 1024.0 / 1024.0, SULocalizedString(@"GB", @"the unit for gigabytes")];
}
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length
{
[statusController setProgressValue:[statusController progressValue] + length];
if ([statusController maxProgressValue] > 0)
[statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self _humanReadableSizeFromDouble:[statusController progressValue]], [self _humanReadableSizeFromDouble:[statusController maxProgressValue]]]];
else
[statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ downloaded", nil), [self _humanReadableSizeFromDouble:[statusController progressValue]]]];
}
- (IBAction)cancelDownload:sender
{
if (download)
[download cancel];
[self abortUpdate];
}
- (void)extractUpdate
{
// Now we have to extract the downloaded archive.
[statusController beginActionWithTitle:SULocalizedString(@"Extracting update\u2026", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil];
[statusController setButtonEnabled:NO];
[super extractUpdate];
}
- (void)unarchiver:(SUUnarchiver *)ua extractedLength:(long)length
{
// We do this here instead of in extractUpdate so that we only have a determinate progress bar for archives with progress.
if ([statusController maxProgressValue] == 0)
[statusController setMaxProgressValue:[[[[NSFileManager defaultManager] fileAttributesAtPath:downloadPath traverseLink:NO] objectForKey:NSFileSize] doubleValue]];
[statusController setProgressValue:[statusController progressValue] + length];
}
- (void)unarchiverDidFinish:(SUUnarchiver *)ua
{
[statusController beginActionWithTitle:SULocalizedString(@"Ready to Install", nil) maxProgressValue:1 statusText:nil];
[statusController setProgressValue:1]; // Fill the bar.
[statusController setButtonEnabled:YES];
[statusController setButtonTitle:SULocalizedString(@"Install and Relaunch", nil) target:self action:@selector(installAndRestart:) isDefault:YES];
[NSApp requestUserAttention:NSInformationalRequest];
}
- (void)installAndRestart:sender { [self installUpdate]; }
- (void)installUpdate
{
[statusController beginActionWithTitle:SULocalizedString(@"Installing update\u2026", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil];
[statusController setButtonEnabled:NO];
[super installUpdate];
}
- (void)abortUpdateWithError:(NSError *)error
{
NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"Update Error!", nil) defaultButton:SULocalizedString(@"Cancel Update", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:[error localizedDescription]];
[self showModalAlert:alert];
[super abortUpdateWithError:error];
}
- (void)abortUpdate
{
if (statusController)
{
[statusController close];
[statusController autorelease];
}
[super abortUpdate];
}
- (void)showModalAlert:(NSAlert *)alert
{
// When showing a modal alert we need to ensure that background applications
// are focused to inform the user since there is no dock icon to notify them.
if ([host isBackgroundApplication]) { [NSApp activateIgnoringOtherApps:YES]; }
[alert setIcon:[host icon]];
[alert runModal];
}
@end
-30
View File
@@ -1,30 +0,0 @@
//
// SUUnarchiver.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUUNARCHIVER_H
#define SUUNARCHIVER_H
@interface SUUnarchiver : NSObject {
id delegate;
NSString *archivePath;
}
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path;
- (void)setDelegate:delegate;
- (void)start;
@end
@interface NSObject (SUUnarchiverDelegate)
- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length;
- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
@end
#endif
-40
View File
@@ -1,40 +0,0 @@
//
// SUUnarchiver.m
// Sparkle
//
// Created by Andy Matuschak on 3/16/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import "Sparkle.h"
#import "SUUnarchiver.h"
#import "SUUnarchiver_Private.h"
@implementation SUUnarchiver
extern NSMutableArray *__unarchiverImplementations;
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path
{
NSEnumerator *implementationEnumerator = [[self _unarchiverImplementations] objectEnumerator];
id current;
while ((current = [implementationEnumerator nextObject]))
{
if ([current _canUnarchivePath:path])
return [[[current alloc] _initWithPath:path] autorelease];
}
return nil;
}
- (void)setDelegate:del
{
delegate = del;
}
- (void)start
{
// No-op
}
@end
-26
View File
@@ -1,26 +0,0 @@
//
// SUUnarchiver_Private.h
// Sparkle
//
// Created by Andy Matuschak on 6/17/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#ifndef SUUNARCHIVER_PRIVATE_H
#define SUUNARCHIVER_PRIVATE_H
#import <Cocoa/Cocoa.h>
#import "SUUnarchiver.h"
@interface SUUnarchiver (Private)
+ (void)_registerImplementation:(Class)implementation;
+ (NSArray *)_unarchiverImplementations;
+ (BOOL)_canUnarchivePath:(NSString *)path;
- _initWithPath:(NSString *)path;
- (void)_notifyDelegateOfExtractedLength:(long)length;
- (void)_notifyDelegateOfSuccess;
- (void)_notifyDelegateOfFailure;
@end
#endif
Loaded 100 of 569 files, more files were not shown because too many files have changed in this diff. Show more