Fixed warnings for missing newlines at the end of the file.

Replaced use of SystemVersion.plist with Gestalt()
This commit is contained in:
andym committed 2007-12-30 05:48:11 +00:00
1 parent 8664db0192
commit 87f28934fe
26 files changed
+51 -36

No files matched your search

+1 -1
View File
@@ -45,4 +45,4 @@
- (BOOL)isRunningFromDiskImage;
@end
#endif
#endif
+1 -1
View File
@@ -13,4 +13,4 @@
- (BOOL)copyPath:(NSString *)src overPath:(NSString *)dst withAuthentication:(BOOL)useAuthentication;
@end
#endif
#endif
+1 -1
View File
@@ -14,4 +14,4 @@
- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature withPublicDSAKey:(NSString *)pkeyString;
@end
#endif
#endif
+1 -1
View File
@@ -63,4 +63,4 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA
@end
#endif
#endif
+1 -1
View File
@@ -38,4 +38,4 @@ extern NSString* NSWorkspace_RBserverURL;
@end
#endif
#endif
+1 -1
View File
@@ -26,4 +26,4 @@
@end
#endif
#endif
+1 -1
View File
@@ -101,4 +101,4 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA
@end
#endif
#endif
+1 -1
View File
@@ -29,4 +29,4 @@
- (NSString *)userAgentForAppcast:(SUAppcast *)appcast;
@end
#endif
#endif
+1 -1
View File
@@ -62,4 +62,4 @@
@end
#endif
#endif
+1 -1
View File
@@ -42,4 +42,4 @@ extern NSString *SUEnableAutomaticChecksKey;
#endif
#endif
#endif
+1 -1
View File
@@ -21,4 +21,4 @@ NSString *SUExpectsDSASignatureKey = @"SUExpectsDSASignature";
NSString *SUPublicDSAKeyKey = @"SUPublicDSAKey";
NSString *SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate";
NSString *SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
NSString *SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
NSString *SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
+1 -1
View File
@@ -33,4 +33,4 @@
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
@end
#endif
#endif
+1 -1
View File
@@ -155,4 +155,4 @@ typedef enum {
}
@end
@end
+1 -1
View File
@@ -27,4 +27,4 @@
@end
#endif
#endif
+8 -6
View File
@@ -16,7 +16,7 @@
@implementation SUStatusChecker
+ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)inDelegate;
+ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)inDelegate
{
SUStatusChecker *statusChecker = [[self alloc] initForDelegate:inDelegate];
@@ -25,12 +25,14 @@
- (id)initForDelegate:(id<SUStatusCheckerDelegate>)inDelegate
{
[super init];
scDelegate = [inDelegate retain];
[self checkForUpdatesAndNotify:NO];
self = [super init];
if (self)
{
scDelegate = [inDelegate retain];
[self checkForUpdatesAndNotify:NO];
}
return self;
}
+1 -1
View File
@@ -37,4 +37,4 @@
@end
#endif
#endif
+1 -1
View File
@@ -13,4 +13,4 @@
+ (NSURL *)profiledURLForAppcastURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hostBundle;
@end
#endif
#endif
+2 -1
View File
@@ -3,7 +3,8 @@
// Sparkle
//
// Created by Andy Matuschak on 12/22/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
// Copyright 2007 Andy Matuschak. All rights reserved.
// Adapted from Sparkle+, by Tom Harrington.
//
#import "Sparkle.h"
+1 -1
View File
@@ -24,4 +24,4 @@
- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
@end
#endif
#endif
+1 -1
View File
@@ -41,4 +41,4 @@ typedef enum
- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice;
@end
#endif
#endif
+1 -1
View File
@@ -67,4 +67,4 @@
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
#endif
#endif
#endif
+5 -2
View File
@@ -47,8 +47,11 @@
- init
{
self = [super init];
[self setHostBundle:[NSBundle mainBundle]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidFinishLaunching:) name:NSApplicationDidFinishLaunchingNotification object:NSApp];
if (self)
{
[self setHostBundle:[NSBundle mainBundle]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidFinishLaunching:) name:NSApplicationDidFinishLaunchingNotification object:NSApp];
}
return self;
}
+1 -1
View File
@@ -38,4 +38,4 @@
- (void)setBool:(BOOL)value forKey:(NSString *)defaultName;
@end
#endif
#endif
+1 -1
View File
@@ -24,4 +24,4 @@
@end
#endif
#endif
+14 -5
View File
@@ -15,16 +15,26 @@
#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", [NSBundle bundleForClass:[self class]], comment)
#import <CoreServices/CoreServices.h>
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import "SUConstants.h"
#endif
// Apple recommends using SystemVersion.plist instead of Gestalt() here, don't ask me why.
// This code *should* use NSSearchPathForDirectoriesInDomains(NSCoreServiceDirectory, NSSystemDomainMask, YES)
// but that returns /Library/CoreServices for some reason
// This returns a version string of the form X.Y.Z
#define SUSystemVersionString() [[NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"] objectForKey:@"ProductVersion"]
inline NSString* SUSystemVersionString(void)
{
long major, minor, bugfix;
OSErr err1 = Gestalt (gestaltSystemVersionMajor, &major);
OSErr err2 = Gestalt (gestaltSystemVersionMinor, &minor);
OSErr err3 = Gestalt (gestaltSystemVersionBugFix, &bugfix);
NSString* verStr = nil;
if (!err1 && !err2 && !err3)
{
verStr = [NSString stringWithFormat:@"%ld.%ld.%ld", major, minor, bugfix];
}
return verStr;
}
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
@@ -55,4 +65,3 @@
#import "SUVersionComparisonProtocol.h"
#endif
+1 -1
View File
@@ -66,4 +66,4 @@ int main (int argc, const char * argv[])
[pool release];
return EXIT_SUCCESS;
}
}