diff --git a/Configurations/ConfigFrameworkReleaseGCSupport.xcconfig b/Configurations/ConfigFrameworkReleaseGCSupport.xcconfig index a332aaf9..6183bdc3 100644 --- a/Configurations/ConfigFrameworkReleaseGCSupport.xcconfig +++ b/Configurations/ConfigFrameworkReleaseGCSupport.xcconfig @@ -1,3 +1,2 @@ #include "ConfigFrameworkRelease.xcconfig" -GCC_ENABLE_OBJC_GC = supported \ No newline at end of file diff --git a/Elgato/BuildSparkleFinishInstallTool.command b/Elgato/BuildSparkleFinishInstallTool.command new file mode 100755 index 00000000..f98a4b26 --- /dev/null +++ b/Elgato/BuildSparkleFinishInstallTool.command @@ -0,0 +1,10 @@ +#/bin/bash + +MY_PATH="`dirname $0`" +cd "$MY_PATH/../" + +xcodebuild -project Sparkle.xcodeproj -target finish_installation -configuration Release build + +cd "$MY_PATH/../build/Release/" + +/usr/bin/tar -czf "$MY_PATH/finish_installation.app.tar.gz" "finish_installation.app" \ No newline at end of file diff --git a/Elgato/ThreadSafePreferences.h b/Elgato/ThreadSafePreferences.h new file mode 100755 index 00000000..bf94d23b --- /dev/null +++ b/Elgato/ThreadSafePreferences.h @@ -0,0 +1,25 @@ +// Header that shouldn't be included in anything but the Sparkle finish_installation tool +// because it includes files also used in EyeTV, but doesn't need to be thread safe +// as it's a single-threaded process anyway. + +#ifndef EYETV +#define EYETV 0 +#endif +#ifndef __TOAST__ +#define __TOAST__ 0 +#endif +#ifndef TURBO +#define TURBO 0 +#endif + +#if !EYETV && !__TOAST__ && !TURBO + +#define ThreadSafePreferences_CopyAppValue CFPreferencesCopyAppValue +#define ThreadSafePreferences_SetValue CFPreferencesSetValue +#define ThreadSafePreferences_Synchronize CFPreferencesSynchronize + +#else + +#error This header shouldn't be included here! + +#endif diff --git a/SUBasicUpdateDriver.m b/SUBasicUpdateDriver.m index cb23e877..5cf24b71 100644 --- a/SUBasicUpdateDriver.m +++ b/SUBasicUpdateDriver.m @@ -24,6 +24,16 @@ @interface SUBasicUpdateDriver () ; @end +@interface SUBasicUpdateDriver () + +@end + + +@interface SUBasicUpdateDriver () + +@end + + @implementation SUBasicUpdateDriver - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost diff --git a/SUPlainInstallerInternals.m b/SUPlainInstallerInternals.m index 1eb6b8a8..7cebc993 100644 --- a/SUPlainInstallerInternals.m +++ b/SUPlainInstallerInternals.m @@ -506,7 +506,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza // We better move the old version back to its old location if( hadFileAtDest ) success = [manager moveItemAtPath:tmpPath toPath:dst error:error]; - if (error != NULL) + if (!success && error != NULL) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] forKey:NSLocalizedDescriptionKey]]; return NO; diff --git a/SUUIBasedUpdateDriver.m b/SUUIBasedUpdateDriver.m index dc37e056..4fb5df8a 100644 --- a/SUUIBasedUpdateDriver.m +++ b/SUUIBasedUpdateDriver.m @@ -201,7 +201,7 @@ - (void)abortUpdateWithError:(NSError *)error { - NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"Update Error!", nil) defaultButton:SULocalizedString(@"Cancel Update", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:[error localizedDescription]]; + NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"Update Error!", nil) defaultButton:SULocalizedString(@"Cancel Update", nil) alternateButton:nil otherButton:nil informativeTextWithFormat: @"%@", [error localizedDescription]]; [self showModalAlert:alert]; [super abortUpdateWithError:error]; } diff --git a/SUUpdater.h b/SUUpdater.h index cd795667..a9644388 100644 --- a/SUUpdater.h +++ b/SUUpdater.h @@ -145,6 +145,10 @@ // Constants: // ----------------------------------------------------------------------------- +#ifndef DEBUG +#define DEBUG 0 +#endif + // Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds. #if defined(DEBUG) && DEBUG && 0 #define SU_MIN_CHECK_INTERVAL 60 diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index d5ebe18d..726ad629 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -909,7 +909,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0460; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */; compatibilityVersion = "Xcode 3.2"; @@ -1368,6 +1368,8 @@ baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + OTHER_CFLAGS = "-DDEBUG"; + SDKROOT = macosx; }; name = Debug; }; @@ -1376,18 +1378,23 @@ baseConfigurationReference = FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = Release; }; 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = macosx; }; name = Debug; }; 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = macosx; }; name = Release; }; @@ -1405,6 +1412,7 @@ GCC_PREFIX_HEADER = finish_installation.pch; INFOPLIST_FILE = "finish_installation-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CFLAGS = "-DDEBUG"; OTHER_LDFLAGS = ( "-framework", Foundation, @@ -1412,6 +1420,7 @@ AppKit, ); PRODUCT_NAME = finish_installation; + SDKROOT = macosx; }; name = Debug; }; @@ -1435,6 +1444,7 @@ AppKit, ); PRODUCT_NAME = finish_installation; + SDKROOT = macosx; ZERO_LINK = NO; }; name = Release; @@ -1457,6 +1467,7 @@ AppKit, ); PRODUCT_NAME = finish_installation; + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; @@ -1464,6 +1475,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */; buildSettings = { + SDKROOT = macosx; }; name = Debug; }; @@ -1471,6 +1483,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */; buildSettings = { + SDKROOT = macosx; }; name = Release; }; @@ -1478,12 +1491,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = 5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */; buildSettings = { + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; 61072EAD0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; @@ -1492,6 +1508,7 @@ baseConfigurationReference = 61072EB20DF2640C008FE88B /* ConfigFrameworkReleaseGCSupport.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; @@ -1500,6 +1517,7 @@ baseConfigurationReference = 615409A8103BA09100125AF1 /* ConfigTestAppReleaseGCSupport.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; @@ -1508,6 +1526,7 @@ baseConfigurationReference = FA302AFD109D13190060F891 /* ConfigUnitTestReleaseGCSupport.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = "Release (GC dual-mode; 10.5+)"; }; @@ -1516,6 +1535,7 @@ baseConfigurationReference = FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = Debug; }; @@ -1524,6 +1544,7 @@ baseConfigurationReference = FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = Release; }; @@ -1532,6 +1553,8 @@ baseConfigurationReference = FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + OTHER_CFLAGS = "-DDEBUG"; + SDKROOT = macosx; }; name = Debug; }; @@ -1540,6 +1563,7 @@ baseConfigurationReference = FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; + SDKROOT = macosx; }; name = Release; }; diff --git a/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme b/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme index 9b8b9ad7..4598c73a 100644 --- a/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme +++ b/Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle.xcscheme @@ -1,6 +1,6 @@