Permalink
Browse files

Adding Sparkle.framework

  • Loading branch information...
1 parent 29f0e84 commit b676ae584c7431a622ada47a6e172e1acd6c686f @sdeken committed Feb 23, 2009
Showing with 2,368 additions and 0 deletions.
  1. +1 −0 Sparkle.framework/Headers
  2. +1 −0 Sparkle.framework/Resources
  3. +1 −0 Sparkle.framework/Sparkle
  4. +33 −0 Sparkle.framework/Versions/A/Headers/SUAppcast.h
  5. +47 −0 Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
  6. +118 −0 Sparkle.framework/Versions/A/Headers/SUUpdater.h
  7. +27 −0 Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
  8. +21 −0 Sparkle.framework/Versions/A/Headers/Sparkle.h
  9. +24 −0 Sparkle.framework/Versions/A/Resources/Info.plist
  10. +7 −0 Sparkle.framework/Versions/A/Resources/License.txt
  11. +174 −0 Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
  12. +56 −0 Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib
  13. +20 −0 Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib
  14. BIN Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
  15. +50 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  16. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib
  17. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  18. +67 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib
  19. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib
  20. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
  21. +59 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  22. +20 −0 Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib
  23. BIN Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  24. BIN Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
  25. +50 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  26. +20 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib
  27. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  28. +67 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib
  29. +20 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib
  30. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
  31. +59 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  32. +21 −0 Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib
  33. BIN Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  34. BIN Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
  35. +50 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  36. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib
  37. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  38. +67 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib
  39. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib
  40. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
  41. +59 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  42. +20 −0 Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib
  43. BIN Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  44. BIN Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
  45. +50 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  46. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib
  47. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  48. +67 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib
  49. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib
  50. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
  51. +59 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  52. +16 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib
  53. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  54. BIN Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
  55. +1 −0 Sparkle.framework/Versions/A/Resources/fr.lproj/fr.lproj
  56. +1 −0 Sparkle.framework/Versions/A/Resources/fr_CA.lproj
  57. +50 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  58. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib
  59. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  60. +67 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib
  61. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib
  62. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
  63. +59 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  64. +20 −0 Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib
  65. BIN Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  66. BIN Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
  67. +50 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  68. +18 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib
  69. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  70. +67 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib
  71. +16 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib
  72. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
  73. +59 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  74. +16 −0 Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib
  75. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  76. BIN Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
  77. BIN Sparkle.framework/Versions/A/Resources/relaunch
  78. +50 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  79. +20 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib
  80. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  81. +67 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib
  82. +20 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib
  83. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
  84. +59 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  85. +18 −0 Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib
  86. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  87. BIN Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings
  88. +50 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib
  89. +20 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib
  90. BIN Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
  91. +39 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib
  92. +18 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib
  93. BIN Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib
  94. +59 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/classes.nib
  95. +20 −0 Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/info.nib
  96. BIN Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
  97. BIN Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings
  98. BIN Sparkle.framework/Versions/A/Sparkle
  99. +1 −0 Sparkle.framework/Versions/Current
@@ -0,0 +1,33 @@
+//
+// 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
@@ -0,0 +1,47 @@
+//
+// 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 *itemDescription;
+
+ 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 *)itemDescription;
+- (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
@@ -0,0 +1,118 @@
+//
+// SUUpdater.h
+// Sparkle
+//
+// Created by Andy Matuschak on 1/4/06.
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUUPDATER_H
+#define SUUPDATER_H
+
+#import <Sparkle/SUVersionComparisonProtocol.h>
+
+@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
+@interface SUUpdater : NSObject {
+ NSTimer *checkTimer;
+ SUUpdateDriver *driver;
+
+ SUHost *host;
+ IBOutlet id delegate;
+}
+
++ (SUUpdater *)sharedUpdater;
++ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
+- (NSBundle *)hostBundle;
+
+- (void)setDelegate:(id)delegate;
+- delegate;
+
+- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
+- (BOOL)automaticallyChecksForUpdates;
+
+- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
+- (NSTimeInterval)updateCheckInterval;
+
+- (void)setFeedURL:(NSURL *)feedURL;
+- (NSURL *)feedURL;
+
+- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
+- (BOOL)sendsSystemProfile;
+
+- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
+- (BOOL)automaticallyDownloadsUpdates;
+
+// This IBAction is meant for a main menu item. Hook up any menu item to this action,
+// and Sparkle will check for updates and report back its findings verbosely.
+- (IBAction)checkForUpdates:sender;
+
+// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
+// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
+// update is found, it will be downloaded and prepped for installation.
+- (void)checkForUpdatesInBackground;
+
+// Date of last update check. Returns null if no check has been performed.
+- (NSDate*)lastUpdateCheckDate;
+
+// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
+// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
+- (void)checkForUpdateInformation;
+
+// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
+- (void)resetUpdateCycle;
+
+- (BOOL)updateInProgress;
+@end
+
+@interface NSObject (SUUpdaterDelegateInformalProtocol)
+// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
+- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
+
+// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
+- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
+
+// Implement this if you want to do some special handling with the appcast once it finishes loading.
+- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(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 forUpdater:(SUUpdater *)bundle;
+
+// Sent when a valid update is found by the update driver.
+- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
+
+// Sent when a valid update is not found.
+- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
+
+// Sent immediately before installing the specified update.
+- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
+
+// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
+- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
+
+// Called immediately before relaunching.
+- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
+
+// This method allows you to provide a custom version comparator.
+// If you don't implement this method or return nil, the standard version comparator will be used.
+- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
+
+// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
+- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
+
+@end
+
+// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
+#ifdef DEBUG
+#define SU_MIN_CHECK_INTERVAL 60
+#else
+#define SU_MIN_CHECK_INTERVAL 60*60
+#endif
+
+#ifdef DEBUG
+#define SU_DEFAULT_CHECK_INTERVAL 60
+#else
+#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
+#endif
+
+#endif
@@ -0,0 +1,27 @@
+//
+// SUVersionComparisonProtocol.h
+// Sparkle
+//
+// Created by Andy Matuschak on 12/21/07.
+// Copyright 2007 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SUVERSIONCOMPARISONPROTOCOL_H
+#define SUVERSIONCOMPARISONPROTOCOL_H
+
+/*!
+ @protocol
+ @abstract Implement this protocol to provide version comparison facilities for Sparkle.
+*/
+@protocol SUVersionComparison
+
+/*!
+ @method
+ @abstract An abstract method to compare two version strings.
+ @discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
+*/
+- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
+
+@end
+
+#endif
@@ -0,0 +1,21 @@
+//
+// Sparkle.h
+// Sparkle
+//
+// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
+// Copyright 2006 Andy Matuschak. All rights reserved.
+//
+
+#ifndef SPARKLE_H
+#define SPARKLE_H
+
+// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
+// there are name-space collisions) so we can list all of them to start with:
+
+#import <Sparkle/SUUpdater.h>
+
+#import <Sparkle/SUAppcast.h>
+#import <Sparkle/SUAppcastItem.h>
+#import <Sparkle/SUVersionComparisonProtocol.h>
+
+#endif
@@ -0,0 +1,24 @@
+<?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>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>Sparkle</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.andymatuschak.Sparkle</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Sparkle</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.5 Beta 6</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>313</string>
+</dict>
+</plist>
@@ -0,0 +1,7 @@
+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.
Oops, something went wrong.

0 comments on commit b676ae5

Please sign in to comment.