Commit Graph
182 Commits
Author SHA1 Message Date
Andy Matuschak 4b74af2de9 Fixes 240385
The relaunch tool sadly now polls for the host app being closed, rather than registering for notifications. But there was some race condition which had problems with the latter.
2008-06-19 22:16:19 -07:00
Andy Matuschak 6f85473bc1 Fixes 239512
Changed the locale to "en_US" from "English", which wasn't actually a locale. This should fix Sparkle for non-English locales.
2008-06-18 23:14:49 -07:00
Andy Matuschak b7898f5ce7 Added an updated French localization, courtesy Yann Ricquebourg. Thanks, Yann! 2008-06-18 23:07:02 -07:00
Andy Matuschak fcf4da886e Fixes 240792, 240793
Merging in Brian Webster's Tiger compatibility fixes.
2008-06-18 23:01:03 -07:00
Andy Matuschak 47b5d5f231 Fixes 241100
Added /sw/bin to the list of directories in the search path for the bzr version numbering script.
2008-06-18 22:56:50 -07:00
Andy Matuschak 93ea93dd38 Fixes 236695
Refactored Sparkle's unarchiving system into SUUnarchiver, a factory for SUPipedUnarchiver and SUDiskImageUnarchiver. I removed that nasty cleanUp call by now copying out the contents of the DMG into the /tmp directory and unmounting. Nice!

This changed a fair amount so please test with your build and let me know if it explodes things. Works in my tests, though.
2008-06-18 22:53:16 -07:00
Brian Webster 7576ba7e38 Added NSURLConnection delegate method to handle redirects correctly under Tiger 2008-06-17 17:48:33 -04:00
Brian Webster 1bd6c13593 Modified objectForKey: so it falls back to NSUserDefaults if CFPreferencesCopyAppValue() doesn't return a value
This catches values that are registered using registerDefaults: on Tiger, which CFPreferencesCopyAppValue() doesn't do
2008-06-17 17:36:30 -04:00
Andy Matuschak 06bda29f7a Sparkle no longer fails the update if it can't trash the old version of the app. This at least lets Sparkle work on Snow Leopard, though it leaves the old version around. 2008-06-16 22:03:09 -07:00
Andy Matuschak 4a26774818 Fixes 240274
Sparkle no longer crashes when the appcast contains an enclosure with no URL (or if there's any other exception in appcast parsing).
2008-06-15 22:23:31 -07:00
Andy Matuschak 269a648d24 Fixes a compile warning; using NSUInteger in place of unsigned. 2008-06-15 17:53:51 -07:00
Andy Matuschak c2745f5944 Fixes #236948:
Sparkle no longer fails to close the "checking for updates" progress window when an appcast fails to load.
2008-06-15 17:52:42 -07:00
Andy Matuschak 17a5bf2b96 Agh, changed the GC settings again. I had made the release configuration before use the gc and the gc configuration use the normal configuration. This should be right. 2008-06-02 14:30:21 -07:00
Andy Matuschak 61d53375e5 Added some version comparison tests for things like 1.0b9 -> 1.0b10 and double-digit nonsense. Things still pass. 2008-06-02 10:45:52 -07:00
Andy Matuschak 6a551229b9 Fixes bug 236694
Basically, because I foolishly don't "[self abortUpdate]" on failure in the UI-based update driver, the SUUpdater instance thought an update was still in progress when it wasn't. This only affected user-initiated updates (SUScheduledUpdateDriver overrides that method), but it still was a serious issue.
2008-06-01 22:54:58 -07:00
Andy Matuschak c59c4e50ca Made the dual-mode build configuration actually use the .xcconfig which will build it with GC support. Doh!
This means the Sparkle-with-GC.framework I distributed doesn't actually have GC support. You'll have to compile it yourself; sorry about that!
2008-06-01 17:17:16 -07:00
Andy Matuschak d855e637cf Merged in the Dutch localization, courtesy Maarten Van Coile. 2008-06-01 16:52:47 -07:00
Andy Matuschak 0150b3be46 Removed a double-space in the permission prompt NIB. 2008-06-01 16:51:18 -07:00
Andy Matuschak 47f42e3810 Changed kB to KB, as it should be. Jonas, I thought you got this! 2008-06-01 16:49:08 -07:00
Maarten Van Coile 156ce34cdc Forgot to add the non-existing nib files 2008-06-02 01:00:29 +02:00
Maarten Van Coile d822487889 Added Dutch translation 2008-06-02 00:45:30 +02:00
Andy Matuschak 046a2d1493 Doh! Fixed a dumb double-release that would cause crashes in non-GC apps when the user cancels an update's download. That's kind of a big mistake. Sorry about that guys. 2008-06-01 11:26:03 -07:00
Andy Matuschak 64755d3c63 Changed the SUUpdateAlert description text to use better notation for its em-dash so that localizations can not have an em-dash if they want. 2008-06-01 10:48:07 -07:00
Andy Matuschak 1552d4eb8b Changed the disk image failure string to "%1$@ can't be updated when it's running from a disk image. Move %1$@ to your Applications folder, relaunch it from there, and try again." to make it more clear. 2008-06-01 10:41:38 -07:00
Andy Matuschak 0f744dd417 Updated en.lproj/Sparkle.strings to have all the new strings in Sparkle 1.5b1. 2008-06-01 10:07:52 -07:00
Andy Matuschak 2dfa8e0982 In an attempt to improve 10.3 support, I've added a new build configuration: Release (GC-support; 10.5-only). Compile with this if your app uses garbage collection. The normal Release configuration will compile 10.3-compatible-y with no GC support. sparkle-1.5b1 2008-05-31 22:53:56 -07:00
Andy Matuschak 1cab1cb203 Fixes bug 228455
Added a sample appcast showing how things work and demonstrating a couple more complicated features. I may fill this out more later.
2008-05-31 00:22:46 -07:00
Andy Matuschak 5c32832eed Fixes bug 228446
Finally adding real delegate support. The following methods are implemented; the comments document them.

If you have suggestions for other methods that would be useful, feel free to suggest them.

// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
- (BOOL)shouldPromptForPermissionToCheckForUpdates;

// Implement this if you want to do some special handling with the appcast once it finishes loading.
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;

// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
// a valid update, if any, in the given appcast.
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast;

// Sent when a valid update is found by the update driver.
- (void)didFindValidUpdate:(SUAppcastItem *)update;

// Sent when the user makes a choice in the update alert dialog (install now / remind me later / skip this version).
- (void)userChoseAction:(SUUpdateAlertChoice)action forUpdate:(SUAppcastItem *)update;

// Sent immediately before installing the specified update.
- (void)updateWillInstall:(SUAppcastItem *)update;

// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
- (BOOL)shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;

// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication;
2008-05-31 00:13:38 -07:00
Andy Matuschak ebb1f01735 Removed the checkInterval IV and factored out its assignment to a checkInterval method in SUUpdater. Now when future updates are scheduled after an initial one exits, they'll use the current interval. 2008-05-30 22:38:33 -07:00
Andy Matuschak 57b5a17a0a Fixed some formatting stuff. 2008-05-30 22:31:47 -07:00
Andy Matuschak 49cfd57682 Fixed a confounding bug that somehow slipped in: when an update check was aborted, I was calling -automaticallyUpdates to determine whether I should reschedule another update check.
This is dumb, because that method denotes whether the user's chosen to automatically update to available new versions.

Now it does the right thing.
2008-05-30 22:27:00 -07:00
Andy Matuschak 43ee59357d Fixes bug 236235.
Sparkle now gies visual indication that it's checking for updates when hte update's user initiated. ie: it pops up a status controller saying "checking for updates..."

What was SUUserInitiatedUpdateDriver is now SUUIBasedUpdateDriver; SUUserInitiatedUpdateDriver now is a subclass of that, along with SUScheduledUpdateDriver. This is a happy little refactoring that let me remove some redundant code.
2008-05-30 22:15:24 -07:00
Andy Matuschak 8b3d15b306 Moved the check for whether the host is running from a disk image to SUBasicUpdateDriver so that all drivers could take advantage of this check. 2008-05-30 21:51:34 -07:00
Andy Matuschak 21b4aeeb3b Fixes bug 228454.
Added support for a SUPublicDSAKeyFile, so people don't have to copy/paste their entire DSA public key into their Info.plist.

Basically: specify a filename in your Info.plist under the key SUPublicDSAKeyFile, and Sparkle will look for a file of that name in the app's resources directory and load its contents to use as the DSA public key.
2008-05-30 21:46:08 -07:00
Andy Matuschak 6f3d124868 Fixing bug 228469:
Now if the developer sets a value for SUEnableAutomaticChecks in Info.plist, we assume that's a good default value to take, and we don't ask the user what he wants to do on startup. If he doesn't specify any preference of his own, we take the Info.plist value to be the canonical one.
2008-05-30 21:34:23 -07:00
Andy Matuschak de7db2d716 Sparkle now works correctly with LSUIElements: it focuses them before displaying the update alert. This fixes bug 228471. 2008-05-30 21:23:56 -07:00
Andy Matuschak fcaf871636 Oops, fixing a problem with revision 133, which added fancy version labeling scripts. Now we add /usr/local/bin to the path as well. We still don't fail gracefully if we can't find bzr because I can't figure out how to do that. Hm... 2008-05-30 21:09:12 -07:00
Andy Matuschak a66d40e035 Changed from CFPreferencesCopyValue to CFPreferencesCopyAppValue (the recommended function) so that Sparkle can now get global preferences. This fixes bug #228457. 2008-05-30 19:43:36 -07:00
Andy Matuschak a418c8093f Fixed a bug where the update alert would report the internal version number of the update instead of the human-readable one (CFBundleShortVersionString, when available). Thanks for pointing that out, Daniel! 2008-05-30 14:14:29 -07:00
Andy Matuschak b07190a7f6 Adding automagic bzr version numbering (ooh so shiny!) 2008-05-29 23:26:32 -07:00
Andy Matuschak 2f953611db Closing two units-related bugs: 231767 and 231598. Units now display in appropriate magnitudes (mb, kb, etc) and also in correct caps.
Thanks to Jonas Witt for the patch!
2008-05-22 22:59:06 -07:00
Jonas Witt 487c8a389d updated the '%@ of %@' string in all localizations
added kB/MB in german (trivial)
added kB in russian
2008-05-18 14:28:28 +02:00
Jonas Witt ce94db5e4e made byte units localizable, updated english strings file 2008-05-18 14:18:49 +02:00
Jonas Witt a0ee0f3f5b added formatted file size output 2008-05-18 13:07:42 +02:00
Andy Matuschak 6d8f5be18c Merging in David Smith's branch to fix bug #230123. We now copy the relaunch tool out of the host before installing the update; that way, we can use the old version's tool. This insures us against future changes in the relaunch method. 2008-05-15 10:58:49 -07:00
David Smith 93de812aeb At Andy's suggestion, don't bother with overly paranoid fallback behavior. If we can't copy to NSTemporaryDirectory(), something is very very wrong and we should bail. This greatly simplifies some things and lets me clean up the copy of relaunch once it's done. :) 2008-05-15 00:49:54 -07:00
David Smith f1198d8167 Actually works now, but leaves one leftover copy of relaunch in NSTemporaryDirectory() 2008-05-14 22:48:19 -07:00
David Smith c722b09ba6 Merge in trunk 2008-05-14 21:42:38 -07:00
Andy Matuschak e208b1ac42 Fixes bug #230451: all the new headers are now public in the Sparkle target. Sorry about that! 2008-05-14 14:38:14 -07:00
Andy Matuschak d06b2f5dad Fixes bug #228449: now the appcast doesn't run the RSS feed fetching in another thread; it just uses NSURLConnection's asynchronous capabilities (which don't leak memory like the synchronous methods) and some delegate methods. 2008-05-14 14:33:00 -07:00