Commit Graph
27 Commits
Author SHA1 Message Date
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
Uli Kusterer 9937e5a17b Merge andymatuschak/Sparkle. 2011-05-02 15:52:15 +02: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 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
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 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 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 d6acd07d5c Fixes 252733
The status window's progress bar now animates even when indeterminate.
2008-07-29 23:58:57 -07:00
Andy Matuschak c42e3a3f47 Fixed 251010
Fixes from Matt Stevens:
"For background applications (menu bar, completely UI-less, etc) there are a couple of issues with Sparkle notifications:

- When prompts such as the initial prompt to enable update checking are displayed they can be hidden behind other windows since the background app is not in focus. This can cause problems, as these prompts run modally and can stop the application from functioning without the user knowing why.

- If the update notification window is displayed and the user clicks away to another application, the window disappears and there is no way to get it back since there is no other UI to cause the app to activate. In this case the update should probably operate as a standard window since it is effectively operating as the application's UI."
2008-07-22 22:36:09 -07:00
Andy Matuschak 98832c4914 Beginnings of insane SUHost-based refactoring to get rid of NSBundle+Sparkle. More super-unstable refactorings to come... 2008-07-15 23:26:06 -07:00
Andy Matuschak 3d7e8c6c95 Fixes 244214
Made Sparkle display sensible data and use an indeterminate progress bar when the server doesn't report an update's file size.
2008-06-30 20:45:54 -07:00
Andy Matuschak c51abb4318 Fixing 241181
Added a cancel button to the "checking for updates..." dialog.
2008-06-28 18:22:05 -07:00
Andy Matuschak a5dcf946ee Fixed all setters to eliminate the possibility of accidentally releasing the value to be set in the case that [foo setValue:a] is called when [foo value] == a. 2008-06-20 22:31:07 -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
andym 49e3d819bf Major refactoring, yay.
Moved out installation phase to separate classes, separating packages and flat-file installs.
Made the DMG cleanup less horrifying.
All-around prettification.
This may or may not break the world; please let me know.
2008-04-15 15:22:18 +00:00
andym da1e70dac5 Removed extraneous KVC will/didChangeValueForKey calls. Thanks, Christiaan Hofman, for pointing out that I am dumb. 2008-03-08 02:27:38 +00:00
andym fe98a431c6 Fixed #6: status button now sizes to the localization. Thanks to Christiaan Hofman. 2008-03-07 17:31:39 +00:00
andym ef89e4208d Fixed a potential buffer overrun, made sure to assign to self in -init methods, and made some types more specific; patch courtesy Sean McBride. 2008-03-05 14:07:43 +00:00
andym 1462087cc6 Added SUWindowController to reduce duplication of running-in-bundle special-case code. 2008-02-14 15:12:09 +00:00
andym a7148d97ff Numerous minor changes courtesy Sean McBride. Mostly clarifications. 2008-01-14 15:49:13 +00:00
andym 5aa1e18bc5 Improved headers from Charles D. H. Williams. 2007-12-25 01:45:38 +00:00
andym def287d7dc Fixed up headers to make things easier for those who compile Sparkle in situ -- thanks for the help, Charles D. H. Williams. 2007-12-24 07:13:44 +00:00
andym 63011aaefd Beware of falling bricks! Huge refactoring commit #1: cleansing Sparkle of the plague that was SUUtilities. 2007-12-22 06:21:48 +00:00
andym 5d44acb0ac Finally got DMGs working properly on 10.5 through a somewhat less brittle method - ie, no more internetenable. Thanks to Steve Gehrman from CocoaTech.
Also fixed a bug with the host app extension method, the recursive find-the-app-in-the-archive method, and made the extension comparison case insensitive for extraction purposes.
2007-12-02 16:16:11 +00:00
catlan 5e053395f8 #76 Support for Plug-ins 2007-11-09 04:44:32 +00:00
andym 9fa3da535a Holy restructuring, batman! Watch out for falling folders. 2007-07-10 04:55:25 +00:00