mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Merge branch 'sandboxing' of github.com:blackpixel/Sparkle into sandboxing
Conflicts: Sparkle.xcodeproj/project.pbxproj Sparkle.xcodeproj/xcshareddata/xcschemes/Sparkle (Release).xcscheme
This commit is contained in:
commit
fcc5a0bf93
20 files changed
+126
-117
No files matched your search
@@ -2,8 +2,4 @@
|
||||
#include "ConfigCommonRelease.xcconfig"
|
||||
#include "ConfigFramework.xcconfig"
|
||||
|
||||
STRIP_INSTALLED_PRODUCT = YES
|
||||
DEPLOYMENT_POSTPROCESSING = YES
|
||||
STRIPFLAGS = -u -r
|
||||
STRIP_STYLE = non-global
|
||||
SEPARATE_STRIP = YES
|
||||
|
||||
@@ -100,6 +100,9 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updater:didFinishLoadingAppcast:)])
|
||||
[[updater delegate] updater:updater didFinishLoadingAppcast:ac];
|
||||
|
||||
NSDictionary *userInfo = (ac != nil) ? @{SUUpdaterAppcastNotificationKey : ac} : nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFinishLoadingAppCastNotification object:updater userInfo:userInfo];
|
||||
|
||||
SUAppcastItem *item = nil;
|
||||
|
||||
@@ -145,6 +148,8 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
|
||||
[[updater delegate] updater:updater didFindValidUpdate:updateItem];
|
||||
NSDictionary *userInfo = (updateItem != nil) ? @{SUUpdaterAppcastItemNotificationKey : updateItem} : nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFinishLoadingAppCastNotification object:updater userInfo:userInfo];
|
||||
[self downloadUpdate];
|
||||
}
|
||||
|
||||
@@ -152,6 +157,8 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
|
||||
[[updater delegate] updaterDidNotFindUpdate:updater];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:updater];
|
||||
|
||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUNoUpdateError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:SULocalizedString(@"You already have the newest version of %@.", nil), [host name]] forKey:NSLocalizedDescriptionKey]]];
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ NSString *temporaryFilename(NSString *base)
|
||||
NSString *template = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.XXXXXXXXXX", base]];
|
||||
char buffer[MAXPATHLEN];
|
||||
strcpy(buffer, [template fileSystemRepresentation]);
|
||||
return [NSString stringWithUTF8String:mktemp(buffer)];
|
||||
return [NSString stringWithUTF8String:mkstemp(buffer)];
|
||||
}
|
||||
|
||||
static void _hashOfBuffer(unsigned char *hash, const char* buffer, size_t bufferLength)
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
OSErr err3 = Gestalt(gestaltSystemVersionBugFix, &bugfix);
|
||||
if (!err1 && !err2 && !err3)
|
||||
{
|
||||
verStr = [NSString stringWithFormat:@"%ld.%ld.%ld", (long)major, (long)minor, (long)bugfix];
|
||||
verStr = [NSString stringWithFormat:@"%ld.%ld.%ld", (long) major, (long) minor, (long) bugfix];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
+3
-2
@@ -51,7 +51,7 @@
|
||||
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
FILE *fp = NULL, *cmdFP = NULL;
|
||||
char *oldDestinationString = NULL;
|
||||
char *oldDestinationString = NULL;
|
||||
|
||||
SULog(@"Extracting %@ using '%@'",archivePath,command);
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#else
|
||||
NSNumber *fs = [[[NSFileManager defaultManager] attributesOfItemAtPath:archivePath error:nil] objectForKey:NSFileSize];
|
||||
#endif
|
||||
|
||||
if (fs == nil) goto reportError;
|
||||
|
||||
// Thank you, Allan Odgaard!
|
||||
@@ -68,7 +69,7 @@
|
||||
fp = fopen([archivePath fileSystemRepresentation], "r");
|
||||
if (!fp) goto reportError;
|
||||
|
||||
oldDestinationString = getenv("DESTINATION");
|
||||
oldDestinationString = getenv("DESTINATION");
|
||||
setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1);
|
||||
cmdFP = popen([command fileSystemRepresentation], "w");
|
||||
size_t written;
|
||||
|
||||
@@ -465,7 +465,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
{
|
||||
err = FSPathMakeRef((UInt8 *)[[tmpPath stringByDeletingLastPathComponent] fileSystemRepresentation], &tmpDirRef, NULL);
|
||||
if (err != noErr)
|
||||
err = FSPathMakeRef((UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &tmpDirRef, NULL);
|
||||
FSPathMakeRef((UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &tmpDirRef, NULL);
|
||||
}
|
||||
|
||||
err = FSPathMakeRef((UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &dstDirRef, NULL);
|
||||
@@ -505,7 +505,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];
|
||||
[manager moveItemAtPath:tmpPath toPath:dst error:error];
|
||||
if (error != NULL)
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] forKey:NSLocalizedDescriptionKey]];
|
||||
return NO;
|
||||
@@ -534,7 +534,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
// new home in case it's moved across filesystems: if that
|
||||
// happens, the move is actually a copy, and it may result
|
||||
// in the application being quarantined.
|
||||
if ([NSThread isMultiThreaded])
|
||||
if ([NSThread isMultiThreaded] == YES && [NSThread isMainThread] == NO)
|
||||
[self performSelectorOnMainThread:@selector(releaseFromQuarantine:) withObject:dst waitUntilDone:YES];
|
||||
else
|
||||
[self releaseFromQuarantine:dst];
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
|
||||
[[updater delegate] updater:updater didFindValidUpdate:updateItem];
|
||||
NSDictionary *userInfo = (updateItem != nil) ? @{SUUpdaterAppcastItemNotificationKey : updateItem} : nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFindValidUpdateNotification object:updater userInfo:userInfo];
|
||||
[self abortUpdate];
|
||||
}
|
||||
|
||||
@@ -24,6 +26,8 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
|
||||
[[updater delegate] updaterDidNotFindUpdate:updater];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:updater];
|
||||
|
||||
[self abortUpdate];
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
|
||||
[[updater delegate] updaterDidNotFindUpdate:updater];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:updater];
|
||||
|
||||
[self abortUpdate]; // Don't tell the user that no update was found; this was a scheduled update.
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
{
|
||||
if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
|
||||
[[updater delegate] updaterDidNotFindUpdate:updater];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidNotFindUpdateNotification object:updater];
|
||||
|
||||
NSAlert *alert = [NSAlert alertWithMessageText:SULocalizedString(@"You're up-to-date!", nil) defaultButton:SULocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [host name], [host displayVersion]];
|
||||
[self showModalAlert:alert];
|
||||
|
||||
+14
@@ -75,6 +75,20 @@
|
||||
|
||||
@end
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// SUUpdater Notifications for events that might be interesting to more than just the delegate
|
||||
// The updater will be the notification object
|
||||
// -----------------------------------------------------------------------------
|
||||
extern NSString *const SUUpdaterDidFinishLoadingAppCastNotification;
|
||||
extern NSString *const SUUpdaterDidFindValidUpdateNotification;
|
||||
extern NSString *const SUUpdaterDidNotFindUpdateNotification;
|
||||
extern NSString *const SUUpdaterWillInstallUpdateNotification;
|
||||
extern NSString *const SUUpdaterWillRelaunchApplicationNotification;
|
||||
|
||||
// Key for the SUAppcastItem object in the SUUpdaterDidFindValidUpdateNotification & SUUpdaterWillInstallUpdateNotification userInfos
|
||||
extern NSString *const SUUpdaterAppcastItemNotificationKey;
|
||||
// Key for the SUAppcast object in the SUUpdaterDidFinishLoadingAppCastNotification userInfo
|
||||
extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// SUUpdater Delegate:
|
||||
|
||||
+8
-1
@@ -20,6 +20,13 @@
|
||||
#import "SUCodeSigningVerifier.h"
|
||||
#include <SystemConfiguration/SystemConfiguration.h>
|
||||
|
||||
NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification";
|
||||
NSString *const SUUpdaterDidFindValidUpdateNotification = @"SUUpdaterDidFindValidUpdateNotification";
|
||||
NSString *const SUUpdaterDidNotFindUpdateNotification = @"SUUpdaterDidNotFindUpdateNotification";
|
||||
NSString *const SUUpdaterWillInstallUpdateNotification = @"SUUpdaterWillInstallUpdateNotification";
|
||||
NSString *const SUUpdaterWillRelaunchApplicationNotification = @"SUUpdaterWillRelaunchApplicationNotification";
|
||||
NSString *const SUUpdaterAppcastItemNotificationKey = @"SUUpdaterAppcastItemNotificationKey";
|
||||
NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotificationKey";
|
||||
|
||||
@interface SUUpdater (Private)
|
||||
- (id)initForBundle:(NSBundle *)bundle;
|
||||
@@ -462,7 +469,7 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
|
||||
- (BOOL)sendsSystemProfile
|
||||
{
|
||||
return [host boolForUserDefaultsKey:SUSendProfileInfoKey];
|
||||
return [host boolForKey:SUSendProfileInfoKey];
|
||||
}
|
||||
|
||||
- (NSURL *)parameterizedFeedURL
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
xpc_connection_t connection = xpc_connection_create("com.andymatuschak.Sparkle.SandboxService", NULL);
|
||||
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
|
||||
xpc_dictionary_apply(event, ^bool(const char *key, xpc_object_t value) {
|
||||
NSLog(@"XPC %s: %s", key, xpc_string_get_string_ptr(value));
|
||||
NSLog(@"Sparkle Copy XPC %s: %s", key, xpc_string_get_string_ptr(value));
|
||||
return true;
|
||||
});
|
||||
});
|
||||
@@ -41,7 +41,7 @@
|
||||
xpc_connection_t connection = xpc_connection_create("com.andymatuschak.Sparkle.SandboxService", NULL);
|
||||
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
|
||||
xpc_dictionary_apply(event, ^bool(const char *key, xpc_object_t value) {
|
||||
NSLog(@"XPC %s: %s", key, xpc_string_get_string_ptr(value));
|
||||
NSLog(@"Sparkle Launch XPC %s: %s", key, xpc_string_get_string_ptr(value));
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
Binary file not shown.
@@ -300,7 +300,6 @@
|
||||
6102FE490E07803800F85D09 /* SUDiskImageUnarchiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUDiskImageUnarchiver.m; sourceTree = "<group>"; };
|
||||
6102FE590E08C7EC00F85D09 /* SUUnarchiver_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUnarchiver_Private.h; sourceTree = "<group>"; };
|
||||
6102FE5A0E08C7EC00F85D09 /* SUUnarchiver_Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUnarchiver_Private.m; sourceTree = "<group>"; };
|
||||
61072EB20DF2640C008FE88B /* ConfigFrameworkReleaseGCSupport.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkReleaseGCSupport.xcconfig; sourceTree = "<group>"; };
|
||||
610EC1BF0CF3914D00AE239E /* NTSynchronousTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NTSynchronousTask.m; sourceTree = "<group>"; };
|
||||
610EC1C00CF3914D00AE239E /* NTSynchronousTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NTSynchronousTask.h; sourceTree = "<group>"; };
|
||||
611142E810FB1BE5009810AA /* bspatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bspatch.h; sourceTree = "<group>"; };
|
||||
@@ -828,7 +827,6 @@
|
||||
FA1941D10D94A70100DD942E /* ConfigFramework.xcconfig */,
|
||||
FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */,
|
||||
FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */,
|
||||
61072EB20DF2640C008FE88B /* ConfigFrameworkReleaseGCSupport.xcconfig */,
|
||||
FA1941CD0D94A70100DD942E /* ConfigTestApp.xcconfig */,
|
||||
FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */,
|
||||
FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */,
|
||||
@@ -1523,7 +1521,6 @@
|
||||
baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
INSTALL_PATH = "@rpath";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1533,7 +1530,6 @@
|
||||
baseConfigurationReference = FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
INSTALL_PATH = "@rpath";
|
||||
};
|
||||
@@ -1600,27 +1596,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
55C14BBD136EEF1500649790 /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = finish_installation.pch;
|
||||
INFOPLIST_FILE = "finish_installation-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
"-framework",
|
||||
AppKit,
|
||||
);
|
||||
PRODUCT_NAME = finish_installation;
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
5D06E8D20FD68C7D005AE3F6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */;
|
||||
@@ -1635,46 +1610,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
5D06E8D40FD68C7D005AE3F6 /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
61072EAD0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
61072EAE0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 61072EB20DF2640C008FE88B /* ConfigFrameworkReleaseGCSupport.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
INSTALL_PATH = "@rpath";
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
61072EAF0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 615409A8103BA09100125AF1 /* ConfigTestAppReleaseGCSupport.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
61072EB10DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA302AFD109D13190060F891 /* ConfigUnitTestReleaseGCSupport.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
612279DB0DB5470300AB99EA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */;
|
||||
@@ -1730,17 +1665,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8B887B6D1517F3AC000BB292 /* Release (GC dual-mode; 10.5+) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 8B887B721517F447000BB292 /* ConfigServiceRelease.xcconfig */;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
INFOPLIST_FILE = SandboxService.plist;
|
||||
VALID_ARCHS = x86_64;
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5+)";
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -1749,7 +1673,6 @@
|
||||
buildConfigurations = (
|
||||
1DEB91AE08733DA50010E9CD /* Debug */,
|
||||
1DEB91AF08733DA50010E9CD /* Release */,
|
||||
61072EAE0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1759,7 +1682,6 @@
|
||||
buildConfigurations = (
|
||||
1DEB91B208733DA50010E9CD /* Debug */,
|
||||
1DEB91B308733DA50010E9CD /* Release */,
|
||||
61072EAD0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1769,7 +1691,6 @@
|
||||
buildConfigurations = (
|
||||
55C14BBB136EEF1500649790 /* Debug */,
|
||||
55C14BBC136EEF1500649790 /* Release */,
|
||||
55C14BBD136EEF1500649790 /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1779,7 +1700,6 @@
|
||||
buildConfigurations = (
|
||||
5D06E8D20FD68C7D005AE3F6 /* Debug */,
|
||||
5D06E8D30FD68C7D005AE3F6 /* Release */,
|
||||
5D06E8D40FD68C7D005AE3F6 /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1789,7 +1709,6 @@
|
||||
buildConfigurations = (
|
||||
612279DB0DB5470300AB99EA /* Debug */,
|
||||
612279DC0DB5470300AB99EA /* Release */,
|
||||
61072EB10DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1799,7 +1718,6 @@
|
||||
buildConfigurations = (
|
||||
61B5F90609C4CEE300B25A18 /* Debug */,
|
||||
61B5F90709C4CEE300B25A18 /* Release */,
|
||||
61072EAF0DF263BD008FE88B /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -1809,7 +1727,6 @@
|
||||
buildConfigurations = (
|
||||
8B887B6B1517F3AC000BB292 /* Debug */,
|
||||
8B887B6C1517F3AC000BB292 /* Release */,
|
||||
8B887B6D1517F3AC000BB292 /* Release (GC dual-mode; 10.5+) */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Sparkle.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0500"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
|
||||
BuildableName = "Sparkle.framework"
|
||||
BlueprintName = "Sparkle"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "612279D80DB5470200AB99EA"
|
||||
BuildableName = "Sparkle Unit Tests.octest"
|
||||
BlueprintName = "Sparkle Unit Tests"
|
||||
ReferencedContainer = "container:Sparkle.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
+1
-1
@@ -79,7 +79,7 @@
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "container:Sparkle.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -119,7 +119,9 @@
|
||||
appPath = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:executablepath length:strlen(executablepath)];
|
||||
else
|
||||
appPath = [host installationPath];
|
||||
[[NSWorkspace sharedWorkspace] openFile: appPath];
|
||||
|
||||
NSRunningApplication *relaunchedApplication = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:appPath] options:NSWorkspaceLaunchDefault configuration:nil error:NULL];
|
||||
[relaunchedApplication activateWithOptions:NSApplicationActivateIgnoringOtherApps];
|
||||
}
|
||||
|
||||
if (folderpath)
|
||||
@@ -146,7 +148,7 @@
|
||||
|
||||
// Perhaps a poor assumption but: if we're not relaunching, we assume we shouldn't be showing any UI either. Because non-relaunching installations are kicked off without any user interaction, we shouldn't be interrupting them.
|
||||
if (shouldRelaunch) {
|
||||
SUStatusController* statusCtl = [[SUStatusController alloc] initWithHost: host]; // We quit anyway after we've installed, so leak this for now.
|
||||
SUStatusController* statusCtl = [[[SUStatusController alloc] initWithHost: host] autorelease]; // We quit anyway after we've installed, so leak this for now.
|
||||
[statusCtl setButtonTitle: SULocalizedString(@"Cancel Update",@"") target: nil action: Nil isDefault: NO];
|
||||
[statusCtl beginActionWithTitle: SULocalizedString(@"Installing update...",@"")
|
||||
maxProgressValue: 0 statusText: @""];
|
||||
@@ -184,6 +186,7 @@ int main (int argc, const char * argv[])
|
||||
|
||||
//ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
//TransformProcessType( &psn, kProcessTransformToForegroundApplication );
|
||||
[[NSApplication sharedApplication] setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps: YES];
|
||||
|
||||
#if 0 // Cmdline tool
|
||||
|
||||
+4
-2
@@ -60,8 +60,10 @@ static void peer_event_handler(xpc_connection_t peer, xpc_object_t event)
|
||||
[arguments addObject:
|
||||
[NSString stringWithUTF8String:xpc_array_get_string(array, i)]];
|
||||
}
|
||||
|
||||
[NSTask launchedTaskWithLaunchPath: relaunchToolPath arguments:arguments];
|
||||
|
||||
NSError *launchError = nil;
|
||||
NSRunningApplication *runningApplication = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:relaunchToolPath] options:NSWorkspaceLaunchNewInstance configuration:@{NSWorkspaceLaunchConfigurationArguments:arguments} error:&launchError];
|
||||
[runningApplication activateWithOptions:NSApplicationActivateIgnoringOtherApps];
|
||||
|
||||
// send response to indicate ok
|
||||
xpc_object_t reply = xpc_dictionary_create_reply(event);
|
||||
|
||||
Reference in new issue
Block a user