Permalink
Browse files

Fixed up headers to make things easier for those who compile Sparkle …

…in situ -- thanks for the help, Charles D. H. Williams.
  • Loading branch information...
andym
andym committed Dec 24, 2007
1 parent 0fab5fd commit def287d7dc61b5cd85334b2d01ce4957989483d1
@@ -6,6 +6,8 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
+#import "Sparkle.h"
+
@interface NSFileManager (SUAuthenticationAdditions)
- (BOOL)copyPath:(NSString *)src overPath:(NSString *)dst withAuthentication:(BOOL)useAuthentication;
@end
@@ -8,13 +8,13 @@
// This code based on generous contribution from Allan Odgaard. Thanks, Allan!
-#import "sys/stat.h"
-#import <Security/Security.h>
+#import "NSFileManager+Authentication.h"
-#import <unistd.h>
+#import <Security/Security.h>
#import <sys/stat.h>
#import <sys/wait.h>
#import <dirent.h>
+#import <unistd.h>
@implementation NSFileManager (SUAuthenticationAdditions)
View
@@ -6,7 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
+#import "Sparkle.h"
@class RSS, SUAppcastItem;
@interface SUAppcast : NSObject {
View
@@ -7,7 +7,6 @@
//
#import "SUAppcast.h"
-#import "SUAppcastItem.h"
#import "RSS.h"
@implementation SUAppcast
View
@@ -6,8 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
-
+#import "Sparkle.h"
@interface SUAppcastItem : NSObject {
NSString *title;
View
@@ -8,7 +8,6 @@
#import "SUAppcastItem.h"
-
@implementation SUAppcastItem
- initWithDictionary:(NSDictionary *)dict
View
@@ -6,7 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
+#import "Sparkle.h"
@class SUAppcastItem;
@interface SUAutomaticUpdateAlert : NSWindowController {
View
@@ -7,8 +7,6 @@
//
#import "SUAutomaticUpdateAlert.h"
-#import "NSBundle+SUAdditions.h"
-#import "SUAppcastItem.h"
@implementation SUAutomaticUpdateAlert
View
@@ -6,6 +6,8 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
+#import <Cocoa/Cocoa.h>
+
NSString *SUUpdaterWillRestartNotification = @"SUUpdaterWillRestartNotificationName";
NSString *SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore";
@@ -6,8 +6,7 @@
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
-#import "SUVersionComparisonProtocol.h"
+#import "Sparkle.h"
/*!
@class
View
@@ -5,8 +5,7 @@
// Created by Evan Schoenberg on 7/6/06.
//
-#import <Cocoa/Cocoa.h>
-#import <Sparkle/SUUpdater.h>
+#import "SUUpdater.h"
@class SUStatusChecker;
View
@@ -6,8 +6,6 @@
//
#import "SUStatusChecker.h"
-#import "SUAppcast.h"
-#import "SUAppcastItem.h"
@interface SUStatusChecker (Private)
- (id)initForDelegate:(id<SUStatusCheckerDelegate>)inDelegate;
View
@@ -6,7 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
+#import "Sparkle.h"
@interface SUStatusController : NSWindowController {
double progressValue, maxProgressValue;
View
@@ -7,7 +7,6 @@
//
#import "SUStatusController.h"
-#import "NSBundle+SUAdditions.h"
@implementation SUStatusController
View
@@ -6,8 +6,7 @@
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
-
+#import "Sparkle.h"
@interface SUSystemProfiler : NSObject {}
+ (NSURL *)profiledURLForAppcastURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hostBundle;
View
@@ -6,8 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
-
+#import "Sparkle.h"
@interface SUUnarchiver : NSObject {
id delegate;
View
@@ -6,7 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
+#import "Sparkle.h"
typedef enum
{
View
@@ -7,8 +7,6 @@
//
#import "SUUpdateAlert.h"
-#import "SUAppcastItem.h"
-#import "NSBundle+SUAdditions.h"
#import <WebKit/WebKit.h>
@implementation SUUpdateAlert
View
@@ -53,6 +53,9 @@
@end
+#import "Sparkle.h"
+
+
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
#ifdef DEBUG
#define SU_MIN_CHECK_INTERVAL 60
View
@@ -7,21 +7,6 @@
//
#import "SUUpdater.h"
-#import "SUAppcast.h"
-#import "SUAppcastItem.h"
-#import "SUUnarchiver.h"
-#import "NSBundle+SUAdditions.h"
-#import "SUUserDefaults.h"
-#import "SUVersionComparisonProtocol.h"
-#import "SUStandardVersionComparator.h"
-
-#import "SUUpdateAlert.h"
-#import "SUAutomaticUpdateAlert.h"
-#import "SUStatusController.h"
-
-#import "NSFileManager+Authentication.h"
-#import "NSFileManager+Verification.h"
-
#import <stdio.h>
#import <sys/stat.h>
#import <unistd.h>
View
@@ -6,6 +6,24 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
+//
+// Prefix header for all source files of the 'Sparkle' target in the 'Sparkle' project.
+//
+#ifndef SPARKLE_H
+#define SPARKLE_H
+#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", [NSBundle bundleForClass:[self class]], comment)
+
+#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"]
+
#import "SUUpdater.h"
#import "SUConstants.h"
#import "SUAppcast.h"
@@ -16,7 +34,14 @@
#import "SUUnarchiver.h"
#import "SUStatusChecker.h"
#import "SUUserDefaults.h"
+#import "SUVersionComparisonProtocol.h"
+#import "SUStandardVersionComparator.h"
#import "NSFileManager+Authentication.h"
#import "NSFileManager+Verification.h"
-#import "NSBundle+SUAdditions.h"
+#import "NSBundle+SUAdditions.h"
+
+#else
+/* Sparkle.h included more than once */
+#endif
+
@@ -109,7 +109,6 @@
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
- 32DBCF5E0370ADEE00C91783 /* Sparkle_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sparkle_Prefix.pch; sourceTree = "<group>"; };
345AF9E20A5D707200D7DA6F /* SUStatusChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUStatusChecker.h; sourceTree = "<group>"; };
345AF9E30A5D707200D7DA6F /* SUStatusChecker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUStatusChecker.m; sourceTree = "<group>"; };
610D5A740A1670A4004AAD9C /* SUStatus.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = SUStatus.nib; sourceTree = "<group>"; };
@@ -365,7 +364,6 @@
61AAE8240A321A7F00D8810D /* SUAutomaticUpdateAlert.nib */,
61AAE8260A321A7F00D8810D /* SUUpdateAlert.nib */,
61299B3509CB04E000B7442F /* Sparkle.h */,
- 32DBCF5E0370ADEE00C91783 /* Sparkle_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -410,8 +408,8 @@
children = (
611779570D1111C400749C97 /* NSWorkspace_RBAdditions.h */,
611779560D1111C400749C97 /* NSWorkspace_RBAdditions.m */,
- 610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */,
610EC1C00CF3914D00AE239E /* NTSynchronousTask.h */,
+ 610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */,
61B5F8DF09C4CE3C00B25A18 /* NSString+extras.h */,
61B5F8E009C4CE3C00B25A18 /* NSString+extras.m */,
61B5F8E109C4CE3C00B25A18 /* RSS.h */,
@@ -831,8 +829,8 @@
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = Sparkle_Prefix.pch;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
@@ -873,8 +871,8 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = Sparkle_Prefix.pch;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
GCC_REUSE_STRINGS = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = Info.plist;
View
@@ -1,16 +0,0 @@
-//
-// Prefix header for all source files of the 'Sparkle' target in the 'Sparkle' project.
-//
-
-#define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", [NSBundle bundleForClass:[self class]], comment)
-
-#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"]

0 comments on commit def287d

Please sign in to comment.