diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 3be0cb86..63b4d5c1 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -3,11 +3,7 @@ PREBINDING = NO ZERO_LINK = NO CURRENT_PROJECT_VERSION = 1.5 -SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk -MACOSX_DEPLOYMENT_TARGET[arch=ppc] = 10.4 -MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5 -MACOSX_DEPLOYMENT_TARGET[arch=i386] = 10.4 -MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5 +SDKROOT = macosx10.6 GCC_C_LANGUAGE_STANDARD = c99 GCC_ENABLE_OBJC_EXCEPTIONS = YES GCC_DEBUGGING_SYMBOLS = full @@ -15,7 +11,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES GCC_PREFIX_HEADER = $(SDKROOT)/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h GCC_FAST_OBJC_DISPATCH = YES GCC_ENABLE_PASCAL_STRINGS = NO -ARCHS = ppc i386 x86_64 +ARCHS = $(ARCHS_STANDARD_32_64_BIT) GCC_VERSION = com.apple.compilers.llvm.clang.1_0 // Enable warnings diff --git a/Configurations/ConfigRelaunch.xcconfig b/Configurations/ConfigRelaunch.xcconfig index 2bfef39c..dc86e168 100644 --- a/Configurations/ConfigRelaunch.xcconfig +++ b/Configurations/ConfigRelaunch.xcconfig @@ -1,3 +1,4 @@ // Relaunch Tool only PRODUCT_NAME = finish_installation +SKIP_INSTALL = YES diff --git a/SUStatusController.m b/SUStatusController.m index be5d6756..524884ce 100644 --- a/SUStatusController.m +++ b/SUStatusController.m @@ -41,6 +41,10 @@ - (void)awakeFromNib { + if ([host isBackgroundApplication]) { + [[self window] setLevel:NSFloatingWindowLevel]; + } + [[self window] center]; [[self window] setFrameAutosaveName:@"SUStatusFrame"]; [progressBar setUsesThreadedAnimation:YES]; diff --git a/SUUpdater.h b/SUUpdater.h index b1099f34..ff04620c 100644 --- a/SUUpdater.h +++ b/SUUpdater.h @@ -146,13 +146,13 @@ // ----------------------------------------------------------------------------- // Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds. -#if DEBUG && 0 +#if defined(DEBUG) && DEBUG && 0 #define SU_MIN_CHECK_INTERVAL 60 #else #define SU_MIN_CHECK_INTERVAL 60*60 #endif -#if DEBUG && 0 +#if defined(DEBUG) && DEBUG && 0 #define SU_DEFAULT_CHECK_INTERVAL 60 #else #define SU_DEFAULT_CHECK_INTERVAL 60*60*24 diff --git a/SUUpdater.m b/SUUpdater.m index 908204f7..c7a5a01c 100644 --- a/SUUpdater.m +++ b/SUUpdater.m @@ -17,7 +17,7 @@ #import "SUScheduledUpdateDriver.h" #import "SUConstants.h" #import "SULog.h" -#include // UK 2007-04-27 +#include @interface SUUpdater (Private) @@ -232,7 +232,13 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault // Don't perform automatic checks on unconnected laptops or dial-up connections that aren't online: NSMutableDictionary* theDict = [NSMutableDictionary dictionary]; [self performSelectorOnMainThread: @selector(putFeedURLIntoDictionary:) withObject: theDict waitUntilDone: YES]; // Get feed URL on main thread, it's not safe to call elsewhere. - if( SCNetworkCheckReachabilityByName( [[[theDict objectForKey: @"feedURL"] host] cStringUsingEncoding: NSUTF8StringEncoding], &flags ) ) + + const char *hostname = [[[theDict objectForKey: @"feedURL"] host] cStringUsingEncoding: NSUTF8StringEncoding]; + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, hostname); + Boolean reachabilityResult = SCNetworkReachabilityGetFlags(reachability, &flags); + CFRelease(reachability); + + if( reachabilityResult ) { BOOL reachable = (flags & kSCNetworkFlagsReachable) == kSCNetworkFlagsReachable; BOOL automatic = (flags & kSCNetworkFlagsConnectionAutomatic) == kSCNetworkFlagsConnectionAutomatic; diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 4925810f..01dbc83f 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 525A2790133D6AE900FD8D70 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 525A278F133D6AE900FD8D70 /* Cocoa.framework */; }; 525A27A0133D6B9700FD8D70 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 525A278F133D6AE900FD8D70 /* Cocoa.framework */; }; 550347011370023A00AE7681 /* Sparkle.icns in Resources */ = {isa = PBXBuildFile; fileRef = 550347001370023A00AE7681 /* Sparkle.icns */; }; @@ -181,6 +182,7 @@ /* Begin PBXFileReference section */ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUVersionDisplayProtocol.h; sourceTree = ""; }; 525A278F133D6AE900FD8D70 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 550347001370023A00AE7681 /* Sparkle.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Sparkle.icns; sourceTree = ""; }; 55C14BB7136EEF1500649790 /* finish_installation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = finish_installation.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -580,6 +582,7 @@ 61A2279A0D1CEE7600430CCD /* SUSystemProfiler.h */, 61A2279B0D1CEE7600430CCD /* SUSystemProfiler.m */, 61A2259C0D1C495D00430CCD /* SUVersionComparisonProtocol.h */, + 3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */, 61A225A20D1C4AC000430CCD /* SUStandardVersionComparator.h */, 61A225A30D1C4AC000430CCD /* SUStandardVersionComparator.m */, ); @@ -725,6 +728,7 @@ buildActionMask = 2147483647; files = ( 61B5F8ED09C4CE3C00B25A18 /* SUUpdater.h in Headers */, + 3772FEA913DE0B6B00F79537 /* SUVersionDisplayProtocol.h in Headers */, 61B5FC0D09C4FC8200B25A18 /* SUAppcast.h in Headers */, 61B5FC7009C51F4A00B25A18 /* SUAppcastItem.h in Headers */, 61B5FCDF09C52A9F00B25A18 /* SUUpdateAlert.h in Headers */, @@ -1313,6 +1317,7 @@ }; 55C14BBB136EEF1500649790 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; @@ -1335,6 +1340,7 @@ }; 55C14BBC136EEF1500649790 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; @@ -1357,6 +1363,7 @@ }; 55C14BBD136EEF1500649790 /* Release (GC dual-mode; 10.5-only) */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; GCC_MODEL_TUNING = G5;