diff --git a/mozilla/camino/sparkle/Configurations/ConfigCommon.xcconfig b/mozilla/camino/sparkle/Configurations/ConfigCommon.xcconfig index 92b4f129c95..7c1af2e1ba0 100644 --- a/mozilla/camino/sparkle/Configurations/ConfigCommon.xcconfig +++ b/mozilla/camino/sparkle/Configurations/ConfigCommon.xcconfig @@ -15,7 +15,9 @@ GCC_DEBUGGING_SYMBOLS = full GCC_PRECOMPILE_PREFIX_HEADER = YES GCC_PREFIX_HEADER = $(SDKROOT)/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h GCC_FAST_OBJC_DISPATCH = YES -//GCC_FAST_OBJC_DISPATCH[arch=ppc] = NO // requires 10.4 +GCC_ENABLE_PASCAL_STRINGS = NO +//ARCHS = ppc i386 x86_64 +ARCHS = ppc i386 // Enable warnings GCC_WARN_CHECK_SWITCH_STATEMENTS = YES @@ -37,4 +39,13 @@ GCC_WARN_UNKNOWN_PRAGMAS = YES GCC_WARN_UNUSED_VARIABLE = YES GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES -WARNING_CFLAGS = -Wall +GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES +GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES +GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES +GCC_WARN_UNUSED_FUNCTION = YES +GCC_WARN_UNUSED_LABEL = YES +GCC_WARN_UNUSED_VALUE = YES +GCC_WARN_UNUSED_PARAMETER = YES +GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES +GCC_WARN_UNDECLARED_SELECTOR = YES +WARNING_CFLAGS = -Wall -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wredundant-decls -Winline -Wdisabled-optimization -Wformat=2 -Wlarger-than-32768 -Winvalid-pch diff --git a/mozilla/camino/sparkle/Configurations/ConfigCommonDebug.xcconfig b/mozilla/camino/sparkle/Configurations/ConfigCommonDebug.xcconfig index 718bd9fba14..36003c984b4 100644 --- a/mozilla/camino/sparkle/Configurations/ConfigCommonDebug.xcconfig +++ b/mozilla/camino/sparkle/Configurations/ConfigCommonDebug.xcconfig @@ -3,6 +3,8 @@ GCC_OPTIMIZATION_LEVEL = 0 DEBUG_INFORMATION_FORMAT = dwarf GCC_GENERATE_DEBUGGING_SYMBOLS = YES -SPARKLE_EXTRA_DEBUG = -DDEBUG -fstack-protector -D_FORTIFY_SOURCE=2 +SPARKLE_EXTRA_DEBUG_10_5_ONLY = -fstack-protector -D_FORTIFY_SOURCE=2 +SPARKLE_EXTRA_DEBUG = -DDEBUG OTHER_CFLAGS = $(SPARKLE_EXTRA_DEBUG) -ARCHS = $(NATIVE_ARCH_ACTUAL) + +// Add $(SPARKLE_EXTRA_DEBUG_10_5_ONLY) to SPARKLE_EXTRA_DEBUG if your deployment is 10.5 or greater. \ No newline at end of file diff --git a/mozilla/camino/sparkle/Configurations/ConfigCommonRelease.xcconfig b/mozilla/camino/sparkle/Configurations/ConfigCommonRelease.xcconfig index 16ae8ca910f..13c67733a1b 100644 --- a/mozilla/camino/sparkle/Configurations/ConfigCommonRelease.xcconfig +++ b/mozilla/camino/sparkle/Configurations/ConfigCommonRelease.xcconfig @@ -7,5 +7,3 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = YES DEAD_CODE_STRIPPING = YES GCC_TREAT_WARNINGS_AS_ERRORS = YES GCC_WARN_UNINITIALIZED_AUTOS = YES -//ARCHS = ppc i386 x86_64 -ARCHS = ppc i386 diff --git a/mozilla/camino/sparkle/NTSynchronousTask.h b/mozilla/camino/sparkle/NTSynchronousTask.h index 1cf5c04e2f0..e1e32bee832 100644 --- a/mozilla/camino/sparkle/NTSynchronousTask.h +++ b/mozilla/camino/sparkle/NTSynchronousTask.h @@ -11,6 +11,7 @@ @interface NTSynchronousTask : NSObject { +@private NSTask *mv_task; NSPipe *mv_outputPipe; NSPipe *mv_inputPipe; diff --git a/mozilla/camino/sparkle/NTSynchronousTask.m b/mozilla/camino/sparkle/NTSynchronousTask.m index d506cad5b84..c2e3cecbefb 100644 --- a/mozilla/camino/sparkle/NTSynchronousTask.m +++ b/mozilla/camino/sparkle/NTSynchronousTask.m @@ -9,148 +9,8 @@ #import "Sparkle.h" #import "NTSynchronousTask.h" -@interface NTSynchronousTask (Private) -- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; - -- (NSTask *)task; -- (void)setTask:(NSTask *)theTask; - -- (NSPipe *)outputPipe; -- (void)setOutputPipe:(NSPipe *)theOutputPipe; - -- (NSPipe *)inputPipe; -- (void)setInputPipe:(NSPipe *)theInputPipe; - -- (NSData *)output; -- (void)setOutput:(NSData *)theOutput; - -- (BOOL)done; -- (void)setDone:(BOOL)flag; - -- (int)result; -- (void)setResult:(int)theResult; -@end - @implementation NTSynchronousTask -- (id)init; -{ - self = [super init]; - if (self) - { - [self setTask:[[[NSTask alloc] init] autorelease]]; - [self setOutputPipe:[[[NSPipe alloc] init] autorelease]]; - [self setInputPipe:[[[NSPipe alloc] init] autorelease]]; - - [[self task] setStandardInput:[self inputPipe]]; - [[self task] setStandardOutput:[self outputPipe]]; - } - - return self; -} - -//---------------------------------------------------------- -// dealloc -//---------------------------------------------------------- -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [self setTask:nil]; - [self setOutputPipe:nil]; - [self setInputPipe:nil]; - [self setOutput:nil]; - - [super dealloc]; -} - -+ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; -{ - // we need this wacky pool here, otherwise we run out of pipes, the pipes are internally autoreleased - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSData* result=nil; - - NS_DURING - { - NTSynchronousTask* task = [[NTSynchronousTask alloc] init]; - - [task run:toolPath directory:currentDirectory withArgs:args input:input]; - - if ([task result] == 0) - result = [[task output] retain]; - - [task release]; - } - NS_HANDLER; - NS_ENDHANDLER; - - [pool drain]; - - // retained above - [result autorelease]; - - return result; -} - -@end - -@implementation NTSynchronousTask (Private) - -- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; -{ - BOOL success = NO; - - if (currentDirectory) - [[self task] setCurrentDirectoryPath: currentDirectory]; - - [[self task] setLaunchPath:toolPath]; - [[self task] setArguments:args]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(taskOutputAvailable:) - name:NSFileHandleReadToEndOfFileCompletionNotification - object:[[self outputPipe] fileHandleForReading]]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(taskDidTerminate:) - name:NSTaskDidTerminateNotification - object:[self task]]; - - [[[self outputPipe] fileHandleForReading] readToEndOfFileInBackgroundAndNotifyForModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, nil]]; - - NS_DURING - [[self task] launch]; - success = YES; - NS_HANDLER - ; - NS_ENDHANDLER - - if (success) - { - if (input) - { - // feed the running task our input - [[[self inputPipe] fileHandleForWriting] writeData:input]; - [[[self inputPipe] fileHandleForWriting] closeFile]; - } - - // loop until we are done receiving the data - if (![self done]) - { - double resolution = 1; - BOOL isRunning; - NSDate* next; - - do { - next = [NSDate dateWithTimeIntervalSinceNow:resolution]; - - isRunning = [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode - beforeDate:next]; - } while (isRunning && ![self done]); - } - } -} - //---------------------------------------------------------- // task //---------------------------------------------------------- @@ -241,10 +101,6 @@ mv_result = theResult; } -@end - -@implementation NTSynchronousTask (Notifications) - - (void)taskOutputAvailable:(NSNotification*)note { [self setOutput:[[note userInfo] objectForKey:NSFileHandleNotificationDataItem]]; @@ -257,6 +113,117 @@ [self setResult:[[self task] terminationStatus]]; } +- (id)init; +{ + self = [super init]; + if (self) + { + [self setTask:[[[NSTask alloc] init] autorelease]]; + [self setOutputPipe:[[[NSPipe alloc] init] autorelease]]; + [self setInputPipe:[[[NSPipe alloc] init] autorelease]]; + + [[self task] setStandardInput:[self inputPipe]]; + [[self task] setStandardOutput:[self outputPipe]]; + } + + return self; +} + +//---------------------------------------------------------- +// dealloc +//---------------------------------------------------------- +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [mv_task release]; + [mv_outputPipe release]; + [mv_inputPipe release]; + [mv_output release]; + + [super dealloc]; +} + +- (void)run:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; +{ + BOOL success = NO; + + if (currentDirectory) + [[self task] setCurrentDirectoryPath: currentDirectory]; + + [[self task] setLaunchPath:toolPath]; + [[self task] setArguments:args]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(taskOutputAvailable:) + name:NSFileHandleReadToEndOfFileCompletionNotification + object:[[self outputPipe] fileHandleForReading]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(taskDidTerminate:) + name:NSTaskDidTerminateNotification + object:[self task]]; + + [[[self outputPipe] fileHandleForReading] readToEndOfFileInBackgroundAndNotifyForModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, nil]]; + + @try + { + [[self task] launch]; + success = YES; + } + @catch (NSException *localException) { } + + if (success) + { + if (input) + { + // feed the running task our input + [[[self inputPipe] fileHandleForWriting] writeData:input]; + [[[self inputPipe] fileHandleForWriting] closeFile]; + } + + // loop until we are done receiving the data + if (![self done]) + { + double resolution = 1; + BOOL isRunning; + NSDate* next; + + do { + next = [NSDate dateWithTimeIntervalSinceNow:resolution]; + + isRunning = [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode + beforeDate:next]; + } while (isRunning && ![self done]); + } + } +} + ++ (NSData*)task:(NSString*)toolPath directory:(NSString*)currentDirectory withArgs:(NSArray*)args input:(NSData*)input; +{ + // we need this wacky pool here, otherwise we run out of pipes, the pipes are internally autoreleased + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSData* result=nil; + + @try + { + NTSynchronousTask* task = [[NTSynchronousTask alloc] init]; + + [task run:toolPath directory:currentDirectory withArgs:args input:input]; + + if ([task result] == 0) + result = [[task output] retain]; + + [task release]; + } + @catch (NSException *localException) { } + + [pool drain]; + + // retained above + [result autorelease]; + + return result; +} + @end - - diff --git a/mozilla/camino/sparkle/README b/mozilla/camino/sparkle/README index c473daf2e30..c0c08e4a8de 100644 --- a/mozilla/camino/sparkle/README +++ b/mozilla/camino/sparkle/README @@ -3,9 +3,9 @@ functionality. See http://sparkle.andymatuschak.org/ for more information about Sparkle. The Sparkle framework is shipped inside Camino's bundle, and some glue code is included in Camino itself. -This is a pull of af37928283042f985e6c7c6ce67869de74e39b52 from git://github.com/andymatuschak/Sparkle.git +This is a pull of fe1372c9621a38978f03bc5773342e8716dcc1e3 from git://github.com/andymatuschak/Sparkle.git with the following changes: +- Skipped the delta-updates changes (803676d56a5f9de18e1b and 19ae8506ab1d54287c87), since that code doesn't yet build on 10.4 - Commented out used of [arch=] notation in ConfigCommon.xcconfig to allow building with our toolchain -- Commented out ARCHS in ConfigCommonRelease.xcconfig and replaced it with a version that doesn't include x86_64 +- Commented out ARCHS in ConfigCommon.xcconfig and replaced it with a version that doesn't include x86_64 - Changed GCC_GENERATE_DEBUGGING_SYMBOLS to YES (and set GCC_ENABLE_SYMBOL_SEPARATION to NO) in ConfigCommonRelease.xcconfig so that we get a dSYM bundle. -- Added null-checks to downloadFilename in SUAppcast.m to fix https://bugs.launchpad.net/sparkle/+bug/456514 and bug 560985. diff --git a/mozilla/camino/sparkle/SUAppcast.h b/mozilla/camino/sparkle/SUAppcast.h index a29492c54b5..5a60d2fda83 100644 --- a/mozilla/camino/sparkle/SUAppcast.h +++ b/mozilla/camino/sparkle/SUAppcast.h @@ -10,11 +10,14 @@ #define SUAPPCAST_H @class SUAppcastItem; -@interface SUAppcast : NSObject { +@interface SUAppcast : NSObject +{ +@private NSArray *items; NSString *userAgentString; id delegate; NSString *downloadFilename; + NSURLDownload *download; } - (void)fetchAppcastFromURL:(NSURL *)url; diff --git a/mozilla/camino/sparkle/SUAppcast.m b/mozilla/camino/sparkle/SUAppcast.m index 7539028d801..fc7aceb37eb 100644 --- a/mozilla/camino/sparkle/SUAppcast.m +++ b/mozilla/camino/sparkle/SUAppcast.m @@ -20,6 +20,7 @@ { [items release]; [userAgentString release]; + [download release]; [super dealloc]; } @@ -34,43 +35,50 @@ if (userAgentString) [request setValue:userAgentString forHTTPHeaderField:@"User-Agent"]; - NSURLDownload *download = [[[NSURLDownload alloc] initWithRequest:request delegate:self] autorelease]; - CFRetain(download); + download = [[NSURLDownload alloc] initWithRequest:request delegate:self]; } -- (void)download:(NSURLDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename +- (void)download:(NSURLDownload *)aDownload decideDestinationWithSuggestedFilename:(NSString *)filename { - NSString *destinationFilename = [NSTemporaryDirectory() stringByAppendingPathComponent:filename]; - [download setDestination:destinationFilename allowOverwrite:NO]; + NSString* destinationFilename = NSTemporaryDirectory(); + if (destinationFilename) + { + destinationFilename = [destinationFilename stringByAppendingPathComponent:filename]; + [download setDestination:destinationFilename allowOverwrite:NO]; + } } -- (void)download:(NSURLDownload *)download didCreateDestination:(NSString *)path +- (void)download:(NSURLDownload *)aDownload didCreateDestination:(NSString *)path { [downloadFilename release]; downloadFilename = [path copy]; } -- (void)downloadDidFinish:(NSURLDownload *)download -{ - CFRelease(download); - +- (void)downloadDidFinish:(NSURLDownload *)aDownload +{ NSError *error = nil; - NSXMLDocument *document = nil; - if (downloadFilename) - document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:downloadFilename] options:0 error:&error]; + + NSXMLDocument *document = nil; BOOL failed = NO; NSArray *xmlItems = nil; NSMutableArray *appcastItems = [NSMutableArray array]; + if (downloadFilename) { + document = [[[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:downloadFilename] options:0 error:&error] autorelease]; + #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil]; + [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil]; #else - [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:nil]; #endif - } - [downloadFilename release]; - downloadFilename = nil; + [downloadFilename release]; + downloadFilename = nil; + } + else + { + failed = YES; + } if (nil == document) { @@ -148,11 +156,10 @@ } NSString *errString; - SUAppcastItem *anItem = [[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString]; + SUAppcastItem *anItem = [[[SUAppcastItem alloc] initWithDictionary:dict failureReason:&errString] autorelease]; if (anItem) { [appcastItems addObject:anItem]; - [anItem release]; } else { @@ -162,8 +169,6 @@ [dict removeAllObjects]; } } - - [document release]; if ([appcastItems count]) { @@ -182,15 +187,14 @@ } } -- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error +- (void)download:(NSURLDownload *)aDownload didFailWithError:(NSError *)error { - CFRelease(download); if (downloadFilename) { #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil]; + [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil]; #else - [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:nil]; #endif } [downloadFilename release]; @@ -199,7 +203,7 @@ [self reportError:error]; } -- (NSURLRequest *)download:(NSURLDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse +- (NSURLRequest *)download:(NSURLDownload *)aDownload willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse { return request; } @@ -224,11 +228,11 @@ NSXMLElement *node; NSMutableArray *languages = [NSMutableArray array]; NSString *lang; - NSInteger i; + NSUInteger i; while ((node = [nodeEnum nextObject])) { lang = [[node attributeForName:@"xml:lang"] stringValue]; - [languages addObject:(lang ?: @"")]; + [languages addObject:(lang ? lang : @"")]; } lang = [[NSBundle preferredLocalizationsFromArray:languages] objectAtIndex:0]; i = [languages indexOfObject:([languages containsObject:lang] ? lang : @"")]; diff --git a/mozilla/camino/sparkle/SUAppcastItem.h b/mozilla/camino/sparkle/SUAppcastItem.h index 010c892ae42..f3e017630f1 100644 --- a/mozilla/camino/sparkle/SUAppcastItem.h +++ b/mozilla/camino/sparkle/SUAppcastItem.h @@ -9,7 +9,9 @@ #ifndef SUAPPCASTITEM_H #define SUAPPCASTITEM_H -@interface SUAppcastItem : NSObject { +@interface SUAppcastItem : NSObject +{ +@private NSString *title; NSDate *date; NSString *itemDescription; diff --git a/mozilla/camino/sparkle/SUAppcastItem.m b/mozilla/camino/sparkle/SUAppcastItem.m index f17ce4935db..ba88d2f5822 100644 --- a/mozilla/camino/sparkle/SUAppcastItem.m +++ b/mozilla/camino/sparkle/SUAppcastItem.m @@ -185,14 +185,14 @@ - (void)dealloc { - [self setTitle:nil]; - [self setDate:nil]; - [self setItemDescription:nil]; - [self setReleaseNotesURL:nil]; - [self setDSASignature:nil]; - [self setFileURL:nil]; - [self setVersionString:nil]; - [self setDisplayVersionString:nil]; + [title release]; + [date release]; + [itemDescription release]; + [releaseNotesURL release]; + [DSASignature release]; + [fileURL release]; + [versionString release]; + [displayVersionString release]; [propertiesDictionary release]; [super dealloc]; } diff --git a/mozilla/camino/sparkle/SUAutomaticUpdateDriver.h b/mozilla/camino/sparkle/SUAutomaticUpdateDriver.h index f63c194ed56..266f6b698d6 100644 --- a/mozilla/camino/sparkle/SUAutomaticUpdateDriver.h +++ b/mozilla/camino/sparkle/SUAutomaticUpdateDriver.h @@ -13,7 +13,9 @@ #import "SUBasicUpdateDriver.h" @class SUAutomaticUpdateAlert; -@interface SUAutomaticUpdateDriver : SUBasicUpdateDriver { +@interface SUAutomaticUpdateDriver : SUBasicUpdateDriver +{ +@private BOOL postponingInstallation, showErrors; SUAutomaticUpdateAlert *alert; } diff --git a/mozilla/camino/sparkle/SUBasicUpdateDriver.m b/mozilla/camino/sparkle/SUBasicUpdateDriver.m index 6f109ea9383..2b0978c3cc6 100644 --- a/mozilla/camino/sparkle/SUBasicUpdateDriver.m +++ b/mozilla/camino/sparkle/SUBasicUpdateDriver.m @@ -34,7 +34,7 @@ [appcast fetchAppcastFromURL:URL]; } -- (id )_versionComparator +- (id )versionComparator { id comparator = nil; @@ -51,7 +51,7 @@ - (BOOL)isItemNewer:(SUAppcastItem *)ui { - return [[self _versionComparator] compareVersion:[host version] toVersion:[ui versionString]] == NSOrderedAscending; + return [[self versionComparator] compareVersion:[host version] toVersion:[ui versionString]] == NSOrderedAscending; } - (BOOL)hostSupportsItem:(SUAppcastItem *)ui @@ -64,7 +64,7 @@ { NSString *skippedVersion = [host objectForUserDefaultsKey:SUSkippedVersionKey]; if (skippedVersion == nil) { return NO; } - return [[self _versionComparator] compareVersion:[ui versionString] toVersion:skippedVersion] != NSOrderedDescending; + return [[self versionComparator] compareVersion:[ui versionString] toVersion:skippedVersion] != NSOrderedDescending; } - (BOOL)itemContainsValidUpdate:(SUAppcastItem *)ui @@ -94,7 +94,7 @@ } updateItem = [item retain]; - CFRelease(ac); // Remember that we're explicitly managing the memory of the appcast. + if (ac) { CFRelease(ac); } // Remember that we're explicitly managing the memory of the appcast. if (updateItem == nil) { [self didNotFindUpdate]; return; } if ([self itemContainsValidUpdate:updateItem]) @@ -105,7 +105,7 @@ - (void)appcast:(SUAppcast *)ac failedToLoadWithError:(NSError *)error { - CFRelease(ac); // Remember that we're explicitly managing the memory of the appcast. + if (ac) { CFRelease(ac); } // Remember that we're explicitly managing the memory of the appcast. [self abortUpdateWithError:error]; } @@ -139,27 +139,31 @@ // We create a temporary directory in /tmp and stick the file there. // Not using a GUID here because hdiutil (for DMGs) for some reason chokes on GUIDs. Too long? I really have no idea. NSString *prefix = [NSString stringWithFormat:@"%@ %@ Update", [host name], [host version]]; - NSString *tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:prefix]; - int cnt=1; - while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999) + NSString *tempDir = NSTemporaryDirectory(); + if (tempDir) { - tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %d", prefix, cnt++]]; - } + tempDir = [tempDir stringByAppendingPathComponent:prefix]; + unsigned int cnt = 1; + while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999) + { + tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@ %u", prefix, cnt++]]; + } #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir attributes:nil]; + BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir attributes:nil]; #else - BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir withIntermediateDirectories:YES attributes:nil error:NULL]; + BOOL success = [[NSFileManager defaultManager] createDirectoryAtPath:tempDir withIntermediateDirectories:YES attributes:nil error:nil]; #endif - if (!success) - { - // Okay, something's really broken with /tmp - [download cancel]; - [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Can't make a temporary directory for the update download at %@.",tempDir] forKey:NSLocalizedDescriptionKey]]]; + if (!success) + { + // Okay, something's really broken with /tmp + [download cancel]; + [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUTemporaryDirectoryError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Can't make a temporary directory for the update download at %@.",tempDir] forKey:NSLocalizedDescriptionKey]]]; + } + + downloadPath = [[tempDir stringByAppendingPathComponent:name] retain]; + [download setDestination:downloadPath allowOverwrite:YES]; } - - downloadPath = [[tempDir stringByAppendingPathComponent:name] retain]; - [download setDestination:downloadPath allowOverwrite:YES]; } - (void)downloadDidFinish:(NSURLDownload *)d @@ -226,8 +230,9 @@ { if ([[updater delegate] respondsToSelector:@selector(updater:willInstallUpdate:)]) [[updater delegate] updater:updater willInstallUpdate:updateItem]; + // Copy the relauncher into a temporary directory so we can get to it after the new version's installed. - NSString *relaunchPathToCopy = [[NSBundle bundleForClass:[self class]] pathForResource:@"relaunch" ofType:@""]; + NSString *relaunchPathToCopy = [SPARKLE_BUNDLE pathForResource:@"relaunch" ofType:@""]; NSString *targetPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[relaunchPathToCopy lastPathComponent]]; // Only the paranoid survive: if there's already a stray copy of relaunch there, we would have problems. NSError *error = nil; @@ -235,14 +240,14 @@ [[NSFileManager defaultManager] removeFileAtPath:targetPath handler:nil]; if ([[NSFileManager defaultManager] copyPath:relaunchPathToCopy toPath:targetPath handler:nil]) #else - [[NSFileManager defaultManager] removeItemAtPath:targetPath error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:targetPath error:nil]; if ([[NSFileManager defaultManager] copyItemAtPath:relaunchPathToCopy toPath:targetPath error:&error]) #endif relaunchPath = [targetPath retain]; else [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURelaunchError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil), NSLocalizedDescriptionKey, [NSString stringWithFormat:@"Couldn't copy relauncher (%@) to temporary path (%@)! %@", relaunchPathToCopy, targetPath, (error ? [error localizedDescription] : @"")], NSLocalizedFailureReasonErrorKey, nil]]]; - [SUInstaller installFromUpdateFolder:[downloadPath stringByDeletingLastPathComponent] overHost:host delegate:self synchronously:[self shouldInstallSynchronously] versionComparator:[self _versionComparator]]; + [SUInstaller installFromUpdateFolder:[downloadPath stringByDeletingLastPathComponent] overHost:host delegate:self synchronously:[self shouldInstallSynchronously] versionComparator:[self versionComparator]]; } - (void)installerFinishedForHost:(SUHost *)aHost @@ -283,7 +288,8 @@ if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)]) pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater]; [NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]]; - + + [self setValue:[NSNumber numberWithBool:YES] forKey:@"finished"]; [NSApp terminate:self]; } @@ -292,7 +298,7 @@ #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 [[NSFileManager defaultManager] removeFileAtPath:[downloadPath stringByDeletingLastPathComponent] handler:nil]; #else - [[NSFileManager defaultManager] removeItemAtPath:[downloadPath stringByDeletingLastPathComponent] error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:[downloadPath stringByDeletingLastPathComponent] error:nil]; #endif } diff --git a/mozilla/camino/sparkle/SUConstants.h b/mozilla/camino/sparkle/SUConstants.h index e9d8e9586f5..4a807d3842a 100644 --- a/mozilla/camino/sparkle/SUConstants.h +++ b/mozilla/camino/sparkle/SUConstants.h @@ -11,26 +11,26 @@ #define SUCONSTANTS_H -extern NSString *SUUpdaterWillRestartNotification; -extern NSString *SUTechnicalErrorInformationKey; +extern NSString *const SUUpdaterWillRestartNotification; +extern NSString *const SUTechnicalErrorInformationKey; -extern NSString *SUFeedURLKey; -extern NSString *SUHasLaunchedBeforeKey; -extern NSString *SUShowReleaseNotesKey; -extern NSString *SUSkippedVersionKey; -extern NSString *SUScheduledCheckIntervalKey; -extern NSString *SULastCheckTimeKey; -extern NSString *SUPublicDSAKeyKey; -extern NSString *SUPublicDSAKeyFileKey; -extern NSString *SUAutomaticallyUpdateKey; -extern NSString *SUAllowsAutomaticUpdatesKey; -extern NSString *SUEnableAutomaticChecksKey; -extern NSString *SUEnableAutomaticChecksKeyOld; -extern NSString *SUEnableSystemProfilingKey; -extern NSString *SUSendProfileInfoKey; -extern NSString *SULastProfileSubmitDateKey; +extern NSString *const SUFeedURLKey; +extern NSString *const SUHasLaunchedBeforeKey; +extern NSString *const SUShowReleaseNotesKey; +extern NSString *const SUSkippedVersionKey; +extern NSString *const SUScheduledCheckIntervalKey; +extern NSString *const SULastCheckTimeKey; +extern NSString *const SUPublicDSAKeyKey; +extern NSString *const SUPublicDSAKeyFileKey; +extern NSString *const SUAutomaticallyUpdateKey; +extern NSString *const SUAllowsAutomaticUpdatesKey; +extern NSString *const SUEnableAutomaticChecksKey; +extern NSString *const SUEnableAutomaticChecksKeyOld; +extern NSString *const SUEnableSystemProfilingKey; +extern NSString *const SUSendProfileInfoKey; +extern NSString *const SULastProfileSubmitDateKey; -extern NSString *SUSparkleErrorDomain; +extern NSString *const SUSparkleErrorDomain; // Appcast phase errors. extern OSStatus SUAppcastParseError; extern OSStatus SUNoUpdateError; diff --git a/mozilla/camino/sparkle/SUConstants.m b/mozilla/camino/sparkle/SUConstants.m index ae91584f26f..5f06311fed8 100644 --- a/mozilla/camino/sparkle/SUConstants.m +++ b/mozilla/camino/sparkle/SUConstants.m @@ -9,27 +9,27 @@ #import "Sparkle.h" #import "SUConstants.h" -NSString *SUUpdaterWillRestartNotification = @"SUUpdaterWillRestartNotificationName"; -NSString *SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation"; +NSString *const SUUpdaterWillRestartNotification = @"SUUpdaterWillRestartNotificationName"; +NSString *const SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation"; -NSString *SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore"; -NSString *SUFeedURLKey = @"SUFeedURL"; -NSString *SUShowReleaseNotesKey = @"SUShowReleaseNotes"; -NSString *SUSkippedVersionKey = @"SUSkippedVersion"; -NSString *SUScheduledCheckIntervalKey = @"SUScheduledCheckInterval"; -NSString *SULastCheckTimeKey = @"SULastCheckTime"; -NSString *SUExpectsDSASignatureKey = @"SUExpectsDSASignature"; -NSString *SUPublicDSAKeyKey = @"SUPublicDSAKey"; -NSString *SUPublicDSAKeyFileKey = @"SUPublicDSAKeyFile"; -NSString *SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate"; -NSString *SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates"; -NSString *SUEnableSystemProfilingKey = @"SUEnableSystemProfiling"; -NSString *SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks"; -NSString *SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup"; -NSString *SUSendProfileInfoKey = @"SUSendProfileInfo"; -NSString *SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate"; +NSString *const SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore"; +NSString *const SUFeedURLKey = @"SUFeedURL"; +NSString *const SUShowReleaseNotesKey = @"SUShowReleaseNotes"; +NSString *const SUSkippedVersionKey = @"SUSkippedVersion"; +NSString *const SUScheduledCheckIntervalKey = @"SUScheduledCheckInterval"; +NSString *const SULastCheckTimeKey = @"SULastCheckTime"; +NSString *const SUExpectsDSASignatureKey = @"SUExpectsDSASignature"; +NSString *const SUPublicDSAKeyKey = @"SUPublicDSAKey"; +NSString *const SUPublicDSAKeyFileKey = @"SUPublicDSAKeyFile"; +NSString *const SUAutomaticallyUpdateKey = @"SUAutomaticallyUpdate"; +NSString *const SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates"; +NSString *const SUEnableSystemProfilingKey = @"SUEnableSystemProfiling"; +NSString *const SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks"; +NSString *const SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup"; +NSString *const SUSendProfileInfoKey = @"SUSendProfileInfo"; +NSString *const SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate"; -NSString *SUSparkleErrorDomain = @"SUSparkleErrorDomain"; +NSString *const SUSparkleErrorDomain = @"SUSparkleErrorDomain"; OSStatus SUAppcastParseError = 1000; OSStatus SUNoUpdateError = 1001; OSStatus SUAppcastError = 1002; diff --git a/mozilla/camino/sparkle/SUDSAVerifier.m b/mozilla/camino/sparkle/SUDSAVerifier.m index e9ee03e582b..d827ac7d646 100644 --- a/mozilla/camino/sparkle/SUDSAVerifier.m +++ b/mozilla/camino/sparkle/SUDSAVerifier.m @@ -17,7 +17,7 @@ #import #import -long b64decode(unsigned char* str) +static long b64decode(unsigned char* str) { unsigned char *cur, *start; int d, dlast, phase; @@ -41,12 +41,12 @@ long b64decode(unsigned char* str) -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 /* F0-FF */ }; - d = dlast = phase = 0; + dlast = phase = 0; start = str; for (cur = str; *cur != '\0'; ++cur ) { if(*cur == '\n' || *cur == '\r'){phase = dlast = 0; continue;} - d = table[(int)*cur]; + d = table[(unsigned int)*cur]; if(d != -1) { switch(phase) @@ -77,26 +77,30 @@ long b64decode(unsigned char* str) return str - start; } -EVP_PKEY* load_dsa_key(char *key) +static EVP_PKEY* load_dsa_key(char *key) { EVP_PKEY* pkey = NULL; - BIO *bio; - if((bio = BIO_new_mem_buf(key, (int)strlen(key)))) + size_t keylen = strlen(key); + if (keylen <= INT_MAX) { - DSA* dsa_key = 0; - if(PEM_read_bio_DSA_PUBKEY(bio, &dsa_key, NULL, NULL)) + BIO *bio; + if((bio = BIO_new_mem_buf(key, (int)keylen))) { - if((pkey = EVP_PKEY_new())) + DSA* dsa_key = 0; + if(PEM_read_bio_DSA_PUBKEY(bio, &dsa_key, NULL, NULL)) { - if(EVP_PKEY_assign_DSA(pkey, dsa_key) != 1) + if((pkey = EVP_PKEY_new())) { - DSA_free(dsa_key); - EVP_PKEY_free(pkey); - pkey = NULL; + if(EVP_PKEY_assign_DSA(pkey, dsa_key) != 1) + { + DSA_free(dsa_key); + EVP_PKEY_free(pkey); + pkey = NULL; + } } } + BIO_free(bio); } - BIO_free(bio); } return pkey; } @@ -119,12 +123,15 @@ EVP_PKEY* load_dsa_key(char *key) } pkeyString = [pkeyTrimmedLines componentsJoinedByString:@"\n"]; // Put them back together. + NSMutableData* pkeyData = [[[pkeyString dataUsingEncoding:NSUTF8StringEncoding] mutableCopy] autorelease]; + void *pkeyBytes = [pkeyData mutableBytes]; EVP_PKEY* pkey = NULL; - pkey = load_dsa_key((char *)[pkeyString UTF8String]); + pkey = load_dsa_key(pkeyBytes); if (!pkey) { return NO; } // Now, the signature is in base64; we have to decode it into a binary stream. - unsigned char *signature = (unsigned char *)[encodedSignature UTF8String]; + NSMutableData* signatureData = [[[encodedSignature dataUsingEncoding:NSUTF8StringEncoding] mutableCopy] autorelease]; + void *signature = [signatureData mutableBytes]; long length = b64decode(signature); // Decode the signature in-place and get the new length of the signature string. // We've got the signature, now get the file data. @@ -140,10 +147,17 @@ EVP_PKEY* load_dsa_key(char *key) if(EVP_VerifyInit(&ctx, EVP_dss1()) == 1) // We're using DSA keys. { EVP_VerifyUpdate(&ctx, md, SHA_DIGEST_LENGTH); + if ((length < 0) || (length > 0x7FFFFFFF)) { return NO; } // test before cast below result = (EVP_VerifyFinal(&ctx, signature, (unsigned int)length, pkey) == 1); } EVP_PKEY_free(pkey); + + // Prevent these from being collected earlier than we want (our only reference is an inner pointer). + [pkeyData self]; + [signatureData self]; + [pathData self]; + return result; } diff --git a/mozilla/camino/sparkle/SUDiskImageUnarchiver.m b/mozilla/camino/sparkle/SUDiskImageUnarchiver.m index a7c5f633cd3..2f4706fb9d8 100644 --- a/mozilla/camino/sparkle/SUDiskImageUnarchiver.m +++ b/mozilla/camino/sparkle/SUDiskImageUnarchiver.m @@ -13,17 +13,12 @@ @implementation SUDiskImageUnarchiver -+ (BOOL)_canUnarchivePath:(NSString *)path ++ (BOOL)canUnarchivePath:(NSString *)path { return [[path pathExtension] isEqualToString:@"dmg"]; } -- (void)start -{ - [NSThread detachNewThreadSelector:@selector(_extractDMG) toTarget:self withObject:nil]; -} - -- (void)_extractDMG +- (void)extractDMG { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; BOOL mountedSuccessfully = NO; @@ -35,14 +30,16 @@ do { CFUUIDRef uuid = CFUUIDCreate(NULL); - mountPointName = (NSString *)CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); -#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4 - [NSMakeCollectable((CFStringRef)mountPointName) autorelease]; -#else - [mountPointName autorelease]; -#endif - mountPoint = [@"/Volumes" stringByAppendingPathComponent:mountPointName]; + if (uuid) + { + CFStringRef uuidString = CFUUIDCreateString(NULL, uuid); + if (uuidString) + { + mountPoint = [@"/Volumes" stringByAppendingPathComponent:(NSString*)uuidString]; + CFRelease(uuidString); + } + CFRelease(uuid); + } } while (noErr == FSPathMakeRefWithOptions((UInt8 *)[mountPoint fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &tmpRef, NULL)); @@ -57,7 +54,7 @@ // Now that we've mounted it, we need to copy out its contents. FSRef srcRef, dstRef; - OSErr err; + OSStatus err; err = FSPathMakeRef((UInt8 *)[mountPoint fileSystemRepresentation], &srcRef, NULL); if (err != noErr) goto reportError; err = FSPathMakeRef((UInt8 *)[[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], &dstRef, NULL); @@ -66,11 +63,11 @@ err = FSCopyObjectSync(&srcRef, &dstRef, (CFStringRef)mountPointName, NULL, kFSFileOperationSkipSourcePermissionErrors); if (err != noErr) goto reportError; - [self performSelectorOnMainThread:@selector(_notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO]; goto finally; reportError: - [self performSelectorOnMainThread:@selector(_notifyDelegateOfFailure) withObject:nil waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(notifyDelegateOfFailure) withObject:nil waitUntilDone:NO]; finally: if (mountedSuccessfully) @@ -78,9 +75,14 @@ finally: [pool drain]; } +- (void)start +{ + [NSThread detachNewThreadSelector:@selector(extractDMG) toTarget:self withObject:nil]; +} + + (void)load { - [self _registerImplementation:self]; + [self registerImplementation:self]; } @end diff --git a/mozilla/camino/sparkle/SUHost.h b/mozilla/camino/sparkle/SUHost.h index f8f8203fc42..c43b4041652 100644 --- a/mozilla/camino/sparkle/SUHost.h +++ b/mozilla/camino/sparkle/SUHost.h @@ -9,6 +9,7 @@ @interface SUHost : NSObject { +@private NSBundle *bundle; } diff --git a/mozilla/camino/sparkle/SUHost.m b/mozilla/camino/sparkle/SUHost.m index df1305c8ca0..fb4ce41244e 100644 --- a/mozilla/camino/sparkle/SUHost.m +++ b/mozilla/camino/sparkle/SUHost.m @@ -14,9 +14,9 @@ - (id)initWithBundle:(NSBundle *)aBundle { - if (aBundle == nil) aBundle = [NSBundle mainBundle]; if ((self = [super init])) { + if (aBundle == nil) aBundle = [NSBundle mainBundle]; bundle = [aBundle retain]; if (![bundle bundleIdentifier]) NSLog(@"Sparkle Error: the bundle being updated at %@ has no CFBundleIdentifier! This will cause preference read/write to not work properly.", bundle); @@ -83,7 +83,17 @@ iconPath = [bundle pathForResource:[bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType: nil]; NSImage *icon = [[[NSImage alloc] initWithContentsOfFile:iconPath] autorelease]; // Use a default icon if none is defined. - if (!icon) { icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(bundle == [NSBundle mainBundle] ? kGenericApplicationIcon : UTGetOSTypeFromString(CFSTR("BNDL")))]; } + if (!icon) { + BOOL isMainBundle = (bundle == [NSBundle mainBundle]); + + // Starting with 10.6, iconForFileType: accepts a UTI. + NSString *fileType = nil; + if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_5) + fileType = isMainBundle ? NSFileTypeForHFSTypeCode(kGenericApplicationIcon) : @".bundle"; + else + fileType = isMainBundle ? (NSString*)kUTTypeApplication : (NSString*)kUTTypeBundle; + icon = [[NSWorkspace sharedWorkspace] iconForFileType:fileType]; + } return icon; } @@ -98,8 +108,8 @@ { ProcessSerialNumber PSN; GetCurrentProcess(&PSN); - NSDictionary * processInfo = (NSDictionary *)ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask); - BOOL isElement = [[processInfo objectForKey:@"LSUIElement"] boolValue]; + CFDictionaryRef processInfo = ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask); + BOOL isElement = [[(NSDictionary *)processInfo objectForKey:@"LSUIElement"] boolValue]; if (processInfo) CFRelease(processInfo); return isElement; @@ -114,7 +124,7 @@ // More likely, we've got a reference to a Resources file by filename: NSString *keyFilename = [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey]; if (!keyFilename) { return nil; } - NSError *ignoreErr; + NSError *ignoreErr = nil; return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil] encoding:NSASCIIStringEncoding error: &ignoreErr]; } @@ -135,18 +145,14 @@ - (id)objectForUserDefaultsKey:(NSString *)defaultName { - // Under Tiger, CFPreferencesCopyAppValue doesn't get values from NSRegistratioDomain, so anything + // Under Tiger, CFPreferencesCopyAppValue doesn't get values from NSRegistrationDomain, so anything // passed into -[NSUserDefaults registerDefaults:] is ignored. The following line falls // back to using NSUserDefaults, but only if the host bundle is the main bundle. if (bundle == [NSBundle mainBundle]) return [[NSUserDefaults standardUserDefaults] objectForKey:defaultName]; CFPropertyListRef obj = CFPreferencesCopyAppValue((CFStringRef)defaultName, (CFStringRef)[bundle bundleIdentifier]); -#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4 - return [NSMakeCollectable(obj) autorelease]; -#else - return [(id)obj autorelease]; -#endif + return [(id)CFMakeCollectable(obj) autorelease]; } - (void)setObject:(id)value forUserDefaultsKey:(NSString *)defaultName; @@ -195,7 +201,7 @@ } - (id)objectForKey:(NSString *)key { - return [self objectForUserDefaultsKey:key] ?: [self objectForInfoDictionaryKey:key]; + return [self objectForUserDefaultsKey:key] ? [self objectForUserDefaultsKey:key] : [self objectForInfoDictionaryKey:key]; } - (BOOL)boolForKey:(NSString *)key { diff --git a/mozilla/camino/sparkle/SUInstaller.h b/mozilla/camino/sparkle/SUInstaller.h index 6f12aefd666..9ef2f1e1515 100644 --- a/mozilla/camino/sparkle/SUInstaller.h +++ b/mozilla/camino/sparkle/SUInstaller.h @@ -15,7 +15,7 @@ @class SUHost; @interface SUInstaller : NSObject { } + (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host delegate:delegate synchronously:(BOOL)synchronously versionComparator:(id )comparator; -+ (void)_finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate; ++ (void)finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate; @end @interface NSObject (SUInstallerDelegateInformalProtocol) diff --git a/mozilla/camino/sparkle/SUInstaller.m b/mozilla/camino/sparkle/SUInstaller.m index 870663c4936..4601d8acb26 100644 --- a/mozilla/camino/sparkle/SUInstaller.m +++ b/mozilla/camino/sparkle/SUInstaller.m @@ -13,7 +13,7 @@ @implementation SUInstaller -+ (BOOL)_isAliasFolderAtPath:(NSString *)path ++ (BOOL)isAliasFolderAtPath:(NSString *)path { FSRef fileRef; OSStatus err = noErr; @@ -78,7 +78,7 @@ } // Some DMGs have symlinks into /Applications! That's no good! - if ([self _isAliasFolderAtPath:currentPath]) + if ([self isAliasFolderAtPath:currentPath]) [dirEnum skipDescendents]; } @@ -92,7 +92,7 @@ if (newAppDownloadPath == nil) { - [self _finishInstallationWithResult:NO host:host error:[NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingUpdateError userInfo:[NSDictionary dictionaryWithObject:@"Couldn't find an appropriate update in the downloaded package." forKey:NSLocalizedDescriptionKey]] delegate:delegate]; + [self finishInstallationWithResult:NO host:host error:[NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingUpdateError userInfo:[NSDictionary dictionaryWithObject:@"Couldn't find an appropriate update in the downloaded package." forKey:NSLocalizedDescriptionKey]] delegate:delegate]; } else { @@ -100,7 +100,7 @@ } } -+ (void)_mdimportHost:(SUHost *)host ++ (void)mdimportHost:(SUHost *)host { NSTask *mdimport = [[[NSTask alloc] init] autorelease]; [mdimport setLaunchPath:@"/usr/bin/mdimport"]; @@ -116,11 +116,11 @@ } } -+ (void)_finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate ++ (void)finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate { - if (result == YES) + if (result) { - [self _mdimportHost:host]; + [self mdimportHost:host]; if ([delegate respondsToSelector:@selector(installerFinishedForHost:)]) [delegate installerFinishedForHost:host]; } diff --git a/mozilla/camino/sparkle/SUPackageInstaller.m b/mozilla/camino/sparkle/SUPackageInstaller.m index d1e90d02eaf..df6635ab4a0 100644 --- a/mozilla/camino/sparkle/SUPackageInstaller.m +++ b/mozilla/camino/sparkle/SUPackageInstaller.m @@ -8,10 +8,6 @@ #import "SUPackageInstaller.h" -#ifndef NSAppKitVersionNumber10_4 -#define NSAppKitVersionNumber10_4 824 -#endif - NSString *SUPackageInstallerCommandKey = @"SUPackageInstallerCommand"; NSString *SUPackageInstallerArgumentsKey = @"SUPackageInstallerArguments"; NSString *SUPackageInstallerHostKey = @"SUPackageInstallerHost"; @@ -19,12 +15,12 @@ NSString *SUPackageInstallerDelegateKey = @"SUPackageInstallerDelegate"; @implementation SUPackageInstaller -+ (void)_finishInstallationWithInfo:(NSDictionary *)info ++ (void)finishInstallationWithInfo:(NSDictionary *)info { - [self _finishInstallationWithResult:YES host:[info objectForKey:SUPackageInstallerHostKey] error:nil delegate:[info objectForKey:SUPackageInstallerDelegateKey]]; + [self finishInstallationWithResult:YES host:[info objectForKey:SUPackageInstallerHostKey] error:nil delegate:[info objectForKey:SUPackageInstallerDelegateKey]]; } -+ (void)_performInstallationWithInfo:(NSDictionary *)info ++ (void)performInstallationWithInfo:(NSDictionary *)info { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -32,7 +28,7 @@ NSString *SUPackageInstallerDelegateKey = @"SUPackageInstallerDelegate"; [installer waitUntilExit]; // Known bug: if the installation fails or is canceled, Sparkle goes ahead and restarts, thinking everything is fine. - [self performSelectorOnMainThread:@selector(_finishInstallationWithInfo:) withObject:info waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(finishInstallationWithInfo:) withObject:info waitUntilDone:NO]; [pool drain]; } @@ -58,15 +54,15 @@ NSString *SUPackageInstallerDelegateKey = @"SUPackageInstallerDelegate"; if (![[NSFileManager defaultManager] fileExistsAtPath:command]) { NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingInstallerToolError userInfo:[NSDictionary dictionaryWithObject:@"Couldn't find Apple's installer tool!" forKey:NSLocalizedDescriptionKey]]; - [self _finishInstallationWithResult:NO host:host error:error delegate:delegate]; + [self finishInstallationWithResult:NO host:host error:error delegate:delegate]; } else { NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:command, SUPackageInstallerCommandKey, args, SUPackageInstallerArgumentsKey, host, SUPackageInstallerHostKey, delegate, SUPackageInstallerDelegateKey, nil]; if (synchronously) - [self _performInstallationWithInfo:info]; + [self performInstallationWithInfo:info]; else - [NSThread detachNewThreadSelector:@selector(_performInstallationWithInfo:) toTarget:self withObject:info]; + [NSThread detachNewThreadSelector:@selector(performInstallationWithInfo:) toTarget:self withObject:info]; } } diff --git a/mozilla/camino/sparkle/SUPipedUnarchiver.m b/mozilla/camino/sparkle/SUPipedUnarchiver.m index db7ffc99ab4..27853d89604 100644 --- a/mozilla/camino/sparkle/SUPipedUnarchiver.m +++ b/mozilla/camino/sparkle/SUPipedUnarchiver.m @@ -11,13 +11,13 @@ @implementation SUPipedUnarchiver -+ (SEL)_selectorConformingToTypeOfPath:(NSString *)path ++ (SEL)selectorConformingToTypeOfPath:(NSString *)path { static NSDictionary *typeSelectorDictionary; if (!typeSelectorDictionary) - typeSelectorDictionary = [[NSDictionary dictionaryWithObjectsAndKeys:@"_extractZIP", @".zip", @"_extractTAR", @".tar", - @"_extractTGZ", @".tar.gz", @"_extractTGZ", @".tgz", - @"_extractTBZ", @".tar.bz2", @"_extractTBZ", @".tbz", nil] retain]; + typeSelectorDictionary = [[NSDictionary dictionaryWithObjectsAndKeys:@"extractZIP", @".zip", @"extractTAR", @".tar", + @"extractTGZ", @".tar.gz", @"extractTGZ", @".tgz", + @"extractTBZ", @".tar.bz2", @"extractTBZ", @".tbz", nil] retain]; NSString *lastPathComponent = [path lastPathComponent]; NSEnumerator *typeEnumerator = [typeSelectorDictionary keyEnumerator]; @@ -33,25 +33,25 @@ - (void)start { - [NSThread detachNewThreadSelector:[[self class] _selectorConformingToTypeOfPath:archivePath] toTarget:self withObject:nil]; + [NSThread detachNewThreadSelector:[[self class] selectorConformingToTypeOfPath:archivePath] toTarget:self withObject:nil]; } -+ (BOOL)_canUnarchivePath:(NSString *)path ++ (BOOL)canUnarchivePath:(NSString *)path { - return ([self _selectorConformingToTypeOfPath:path] != nil); + return ([self selectorConformingToTypeOfPath:path] != nil); } // This method abstracts the types that use a command line tool piping data from stdin. -- (void)_extractArchivePipingDataToCommand:(NSString *)command +- (void)extractArchivePipingDataToCommand:(NSString *)command { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; FILE *fp = NULL, *cmdFP = NULL; // Get the file size. #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:archivePath traverseLink:NO] objectForKey:NSFileSize]; + NSNumber *fs = [[[NSFileManager defaultManager] fileAttributesAtPath:archivePath traverseLink:NO] objectForKey:NSFileSize]; #else - NSNumber *fs = [[[NSFileManager defaultManager] attributesOfItemAtPath:archivePath error:NULL] objectForKey:NSFileSize]; + NSNumber *fs = [[[NSFileManager defaultManager] attributesOfItemAtPath:archivePath error:nil] objectForKey:NSFileSize]; #endif if (fs == nil) goto reportError; @@ -62,11 +62,11 @@ setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1); cmdFP = popen([command fileSystemRepresentation], "w"); - long written; + size_t written; if (!cmdFP) goto reportError; char buf[32*1024]; - long len; + size_t len; while((len = fread(buf, 1, 32*1024, fp))) { written = fwrite(buf, 1, len, cmdFP); @@ -76,18 +76,18 @@ goto reportError; } - [self performSelectorOnMainThread:@selector(_notifyDelegateOfExtractedLength:) withObject:[NSNumber numberWithLong:len] waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(notifyDelegateOfExtractedLength:) withObject:[NSNumber numberWithUnsignedLong:len] waitUntilDone:NO]; } pclose(cmdFP); if( ferror( fp ) ) goto reportError; - [self performSelectorOnMainThread:@selector(_notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(notifyDelegateOfSuccess) withObject:nil waitUntilDone:NO]; goto finally; reportError: - [self performSelectorOnMainThread:@selector(_notifyDelegateOfFailure) withObject:nil waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(notifyDelegateOfFailure) withObject:nil waitUntilDone:NO]; finally: if (fp) @@ -95,29 +95,29 @@ finally: [pool drain]; } -- (void)_extractTAR +- (void)extractTAR { - return [self _extractArchivePipingDataToCommand:@"tar -xC \"$DESTINATION\""]; + return [self extractArchivePipingDataToCommand:@"tar -xC \"$DESTINATION\""]; } -- (void)_extractTGZ +- (void)extractTGZ { - return [self _extractArchivePipingDataToCommand:@"tar -zxC \"$DESTINATION\""]; + return [self extractArchivePipingDataToCommand:@"tar -zxC \"$DESTINATION\""]; } -- (void)_extractTBZ +- (void)extractTBZ { - return [self _extractArchivePipingDataToCommand:@"tar -jxC \"$DESTINATION\""]; + return [self extractArchivePipingDataToCommand:@"tar -jxC \"$DESTINATION\""]; } -- (void)_extractZIP +- (void)extractZIP { - return [self _extractArchivePipingDataToCommand:@"ditto -x -k - \"$DESTINATION\""]; + return [self extractArchivePipingDataToCommand:@"ditto -x -k - \"$DESTINATION\""]; } + (void)load { - [self _registerImplementation:self]; + [self registerImplementation:self]; } @end diff --git a/mozilla/camino/sparkle/SUPlainInstaller.m b/mozilla/camino/sparkle/SUPlainInstaller.m index 2586adddd01..ffb0cb6de73 100644 --- a/mozilla/camino/sparkle/SUPlainInstaller.m +++ b/mozilla/camino/sparkle/SUPlainInstaller.m @@ -8,23 +8,24 @@ #import "SUPlainInstaller.h" #import "SUPlainInstallerInternals.h" +#import "SUHost.h" -NSString *SUInstallerPathKey = @"SUInstallerPath"; -NSString *SUInstallerTargetPathKey = @"SUInstallerTargetPath"; -NSString *SUInstallerTempNameKey = @"SUInstallerTempName"; -NSString *SUInstallerHostKey = @"SUInstallerHost"; -NSString *SUInstallerDelegateKey = @"SUInstallerDelegate"; -NSString *SUInstallerResultKey = @"SUInstallerResult"; -NSString *SUInstallerErrorKey = @"SUInstallerError"; +static NSString * const SUInstallerPathKey = @"SUInstallerPath"; +static NSString * const SUInstallerTargetPathKey = @"SUInstallerTargetPath"; +static NSString * const SUInstallerTempNameKey = @"SUInstallerTempName"; +static NSString * const SUInstallerHostKey = @"SUInstallerHost"; +static NSString * const SUInstallerDelegateKey = @"SUInstallerDelegate"; +static NSString * const SUInstallerResultKey = @"SUInstallerResult"; +static NSString * const SUInstallerErrorKey = @"SUInstallerError"; @implementation SUPlainInstaller -+ (void)_finishInstallationWithInfo:(NSDictionary *)info ++ (void)finishInstallationWithInfo:(NSDictionary *)info { - [self _finishInstallationWithResult:[[info objectForKey:SUInstallerResultKey] boolValue] host:[info objectForKey:SUInstallerHostKey] error:[info objectForKey:SUInstallerErrorKey] delegate:[info objectForKey:SUInstallerDelegateKey]]; + [self finishInstallationWithResult:[[info objectForKey:SUInstallerResultKey] boolValue] host:[info objectForKey:SUInstallerHostKey] error:[info objectForKey:SUInstallerErrorKey] delegate:[info objectForKey:SUInstallerDelegateKey]]; } -+ (void)_performInstallationWithInfo:(NSDictionary *)info ++ (void)performInstallationWithInfo:(NSDictionary *)info { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -36,7 +37,7 @@ NSString *SUInstallerErrorKey = @"SUInstallerError"; [mutableInfo setObject:[NSNumber numberWithBool:result] forKey:SUInstallerResultKey]; if (!result && error) [mutableInfo setObject:error forKey:SUInstallerErrorKey]; - [self performSelectorOnMainThread:@selector(_finishInstallationWithInfo:) withObject:mutableInfo waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(finishInstallationWithInfo:) withObject:mutableInfo waitUntilDone:NO]; [pool drain]; } @@ -48,7 +49,7 @@ NSString *SUInstallerErrorKey = @"SUInstallerError"; { NSString * errorMessage = [NSString stringWithFormat:@"Sparkle Updater: Possible attack in progress! Attempting to \"upgrade\" from %@ to %@. Aborting update.", [host version], [[NSBundle bundleWithPath:path] objectForInfoDictionaryKey:@"CFBundleVersion"]]; NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDowngradeError userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]]; - [self _finishInstallationWithResult:NO host:host error:error delegate:delegate]; + [self finishInstallationWithResult:NO host:host error:error delegate:delegate]; return; } @@ -56,9 +57,9 @@ NSString *SUInstallerErrorKey = @"SUInstallerError"; NSString *tempName = [self temporaryNameForPath:targetPath]; NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:path, SUInstallerPathKey, targetPath, SUInstallerTargetPathKey, tempName, SUInstallerTempNameKey, host, SUInstallerHostKey, delegate, SUInstallerDelegateKey, nil]; if (synchronously) - [self _performInstallationWithInfo:info]; + [self performInstallationWithInfo:info]; else - [NSThread detachNewThreadSelector:@selector(_performInstallationWithInfo:) toTarget:self withObject:info]; + [NSThread detachNewThreadSelector:@selector(performInstallationWithInfo:) toTarget:self withObject:info]; } @end diff --git a/mozilla/camino/sparkle/SUPlainInstallerInternals.m b/mozilla/camino/sparkle/SUPlainInstallerInternals.m index 719089b616b..77191262620 100644 --- a/mozilla/camino/sparkle/SUPlainInstallerInternals.m +++ b/mozilla/camino/sparkle/SUPlainInstallerInternals.m @@ -79,13 +79,13 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza NSString *prefix = [[path stringByDeletingPathExtension] stringByAppendingFormat:@" (%@)", postFix]; NSString *tempDir = [prefix stringByAppendingPathExtension:[path pathExtension]]; // Now let's make sure we get a unique path. - int cnt=2; + unsigned int cnt=2; while ([[NSFileManager defaultManager] fileExistsAtPath:tempDir] && cnt <= 999) - tempDir = [NSString stringWithFormat:@"%@ %d.%@", prefix, cnt++, [path pathExtension]]; + tempDir = [NSString stringWithFormat:@"%@ %u.%@", prefix, cnt++, [path pathExtension]]; return [tempDir lastPathComponent]; } -+ (BOOL)_copyPathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst temporaryPath:(NSString *)tmp error:(NSError **)error ++ (BOOL)copyPathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst temporaryPath:(NSString *)tmp error:(NSError **)error { const char* srcPath = [src fileSystemRepresentation]; const char* tmpPath = [tmp fileSystemRepresentation]; @@ -136,7 +136,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza }; // Process the commands up until the first NULL - int commandIndex = 0; + unsigned int commandIndex = 0; for (; executables[commandIndex] != NULL; ++commandIndex) { if (res) res = AuthorizationExecuteWithPrivilegesAndWait(auth, executables[commandIndex], kAuthorizationFlagDefaults, argumentLists[commandIndex]); @@ -173,19 +173,19 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza { // Something went wrong somewhere along the way, but we're not sure exactly where. NSString *errorMessage = [NSString stringWithFormat:@"Authenticated file copy from %@ to %@ failed.", src, dst]; - if (error != NULL) + if (error != nil) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]]; } } else { - if (error != NULL) + if (error != nil) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUAuthenticationFailure userInfo:[NSDictionary dictionaryWithObject:@"Couldn't get permission to authenticate." forKey:NSLocalizedDescriptionKey]]; } return res; } -+ (void)_movePathToTrash:(NSString *)path ++ (void)movePathToTrash:(NSString *)path { NSInteger tag = 0; if (![[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[path stringByDeletingLastPathComponent] destination:@"" files:[NSArray arrayWithObject:[path lastPathComponent]] tag:&tag]) @@ -195,13 +195,13 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza + (BOOL)copyPathWithAuthentication:(NSString *)src overPath:(NSString *)dst temporaryName:(NSString *)tmp error:(NSError **)error { FSRef srcRef, dstRef, targetRef, movedRef; - OSErr err; + OSStatus err; err = FSPathMakeRefWithOptions((UInt8 *)[dst fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &dstRef, NULL); if (err != noErr) { NSString *errorMessage = [NSString stringWithFormat:@"Couldn't copy %@ over %@ because there is no file at %@.", src, dst, dst]; - if (error != NULL) + if (error != nil) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:errorMessage forKey:NSLocalizedDescriptionKey]]; return NO; } @@ -209,14 +209,14 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza NSString *tmpPath = [[dst stringByDeletingLastPathComponent] stringByAppendingPathComponent:tmp]; if (0 != access([dst fileSystemRepresentation], W_OK) || 0 != access([[dst stringByDeletingLastPathComponent] fileSystemRepresentation], W_OK)) - return [self _copyPathWithForcedAuthentication:src toPath:dst temporaryPath:tmpPath error:error]; + return [self copyPathWithForcedAuthentication:src toPath:dst temporaryPath:tmpPath error:error]; err = FSPathMakeRef((UInt8 *)[[dst stringByDeletingLastPathComponent] fileSystemRepresentation], &targetRef, NULL); if (err == noErr) err = FSMoveObjectSync(&dstRef, &targetRef, (CFStringRef)tmp, &movedRef, 0); if (err != noErr) { - if (error != NULL) + if (error != nil) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't move %@ to %@.", dst, tmpPath] forKey:NSLocalizedDescriptionKey]]; return NO; } @@ -227,7 +227,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza { // We better move the old version back to its old location FSMoveObjectSync(&movedRef, &targetRef, (CFStringRef)[dst lastPathComponent], &movedRef, 0); - if (error != NULL) + if (error != nil) *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUFileCopyFailure userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Couldn't copy %@ to %@.", src, dst] forKey:NSLocalizedDescriptionKey]]; return NO; } @@ -235,11 +235,11 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza // Trash the old copy of the app. #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4 if (FSMoveObjectToTrashSync == NULL) - [self performSelectorOnMainThread:@selector(_movePathToTrash:) withObject:tmpPath waitUntilDone:YES]; + [self performSelectorOnMainThread:@selector(movePathToTrash:) withObject:tmpPath waitUntilDone:YES]; else if (noErr != FSMoveObjectToTrashSync(&movedRef, NULL, 0)) NSLog(@"Sparkle error: couldn't move %@ to the trash. This is often a sign of a permissions error.", tmpPath); #else - [self performSelectorOnMainThread:@selector(_movePathToTrash:) withObject:tmpPath waitUntilDone:YES]; + [self performSelectorOnMainThread:@selector(movePathToTrash:) withObject:tmpPath waitUntilDone:YES]; #endif // If the currently-running application is trusted, the new @@ -258,9 +258,9 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza @end -#include -#include -#include +#import +#import +#import @implementation SUPlainInstaller (MMExtendedAttributes) @@ -308,8 +308,11 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza // Only recurse if it's actually a directory. Don't recurse into a // root-level symbolic link. - NSDictionary* rootAttributes = - [[NSFileManager defaultManager] fileAttributesAtPath:root traverseLink:NO]; +#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 + NSDictionary* rootAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:root traverseLink:NO]; +#else + NSDictionary* rootAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:root error:nil]; +#endif NSString* rootType = [rootAttributes objectForKey:NSFileType]; if (rootType == NSFileTypeDirectory) { diff --git a/mozilla/camino/sparkle/SUScheduledUpdateDriver.h b/mozilla/camino/sparkle/SUScheduledUpdateDriver.h index 892a6a7442e..64b8022d63d 100644 --- a/mozilla/camino/sparkle/SUScheduledUpdateDriver.h +++ b/mozilla/camino/sparkle/SUScheduledUpdateDriver.h @@ -12,7 +12,9 @@ #import #import "SUUIBasedUpdateDriver.h" -@interface SUScheduledUpdateDriver : SUUIBasedUpdateDriver { +@interface SUScheduledUpdateDriver : SUUIBasedUpdateDriver +{ +@private BOOL showErrors; } diff --git a/mozilla/camino/sparkle/SUStandardVersionComparator.m b/mozilla/camino/sparkle/SUStandardVersionComparator.m index 03c0c0d7008..19c56cab4e9 100644 --- a/mozilla/camino/sparkle/SUStandardVersionComparator.m +++ b/mozilla/camino/sparkle/SUStandardVersionComparator.m @@ -40,7 +40,8 @@ typedef enum { { NSString *character; NSMutableString *s; - NSInteger i, n, oldType, newType; + NSUInteger i, n; + SUCharacterType oldType, newType; NSMutableArray *parts = [NSMutableArray array]; if ([version length] == 0) { // Nothing to do here @@ -54,9 +55,8 @@ typedef enum { newType = [self typeOfCharacter:character]; if (oldType != newType || oldType == kPeriodType) { // We've reached a new segment - NSString *aPart = [[NSString alloc] initWithString:s]; + NSString *aPart = [[[NSString alloc] initWithString:s] autorelease]; [parts addObject:aPart]; - [aPart release]; [s setString:character]; } else { // Add character to string and continue @@ -76,8 +76,10 @@ typedef enum { NSArray *partsB = [self splitVersionString:versionB]; NSString *partA, *partB; - NSInteger i, n, typeA, typeB, intA, intB; - + NSUInteger i, n; + int intA, intB; + SUCharacterType typeA, typeB; + n = MIN([partsA count], [partsB count]); for (i = 0; i < n; ++i) { partA = [partsA objectAtIndex:i]; diff --git a/mozilla/camino/sparkle/SUStatusController.h b/mozilla/camino/sparkle/SUStatusController.h index c73ea5b8202..5dfd9775dcf 100644 --- a/mozilla/camino/sparkle/SUStatusController.h +++ b/mozilla/camino/sparkle/SUStatusController.h @@ -12,7 +12,9 @@ #import "SUWindowController.h" @class SUHost; -@interface SUStatusController : SUWindowController { +@interface SUStatusController : SUWindowController +{ +@private double progressValue, maxProgressValue; NSString *title, *statusText, *buttonTitle; IBOutlet NSButton *actionButton; diff --git a/mozilla/camino/sparkle/SUStatusController.m b/mozilla/camino/sparkle/SUStatusController.m index 16774c0a364..eea47609f4b 100644 --- a/mozilla/camino/sparkle/SUStatusController.m +++ b/mozilla/camino/sparkle/SUStatusController.m @@ -111,10 +111,10 @@ - (void)setMaxProgressValue:(double)value { - if (value < 0) value = 0; + if (value < 0.0) value = 0.0; maxProgressValue = value; - [self setProgressValue:0]; - [progressBar setIndeterminate:(value == 0)]; + [self setProgressValue:0.0]; + [progressBar setIndeterminate:(value == 0.0)]; [progressBar startAnimation:self]; } diff --git a/mozilla/camino/sparkle/SUSystemProfiler.m b/mozilla/camino/sparkle/SUSystemProfiler.m index 47d5909cedd..0fde4a18002 100644 --- a/mozilla/camino/sparkle/SUSystemProfiler.m +++ b/mozilla/camino/sparkle/SUSystemProfiler.m @@ -34,9 +34,9 @@ // Gather profile information and append it to the URL. NSMutableArray *profileArray = [NSMutableArray array]; NSArray *profileDictKeys = [NSArray arrayWithObjects:@"key", @"displayKey", @"value", @"displayValue", nil]; - int error = 0 ; - int value = 0 ; - unsigned long length = sizeof(value) ; + int error = 0; + int value = 0; + size_t length = sizeof(value); // OS version NSString *currentSystemVersion = [SUHost systemVersionString]; @@ -89,18 +89,18 @@ } error = sysctlbyname("hw.model", NULL, &length, NULL, 0); if (error == 0) { - char *cpuModel; - cpuModel = (char *)malloc(sizeof(char) * length); - error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0); - if (error == 0) { - NSString *rawModelName = [NSString stringWithUTF8String:cpuModel]; - NSString *visibleModelName = [modelTranslation objectForKey:rawModelName]; - if (visibleModelName == nil) - visibleModelName = rawModelName; - [profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"model",@"Mac Model", rawModelName, visibleModelName, nil] forKeys:profileDictKeys]]; - } - if (cpuModel != NULL) + char *cpuModel = (char *)malloc(sizeof(char) * length); + if (cpuModel != NULL) { + error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0); + if (error == 0) { + NSString *rawModelName = [NSString stringWithUTF8String:cpuModel]; + NSString *visibleModelName = [modelTranslation objectForKey:rawModelName]; + if (visibleModelName == nil) + visibleModelName = rawModelName; + [profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"model",@"Mac Model", rawModelName, visibleModelName, nil] forKeys:profileDictKeys]]; + } free(cpuModel); + } } // Number of CPUs @@ -111,7 +111,7 @@ // User preferred language NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; NSArray *languages = [defs objectForKey:@"AppleLanguages"]; - if (languages && ([languages count] > 0)) + if ([languages count] > 0) [profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"lang",@"Preferred Language", [languages objectAtIndex:0], [languages objectAtIndex:0],nil] forKeys:profileDictKeys]]; // Application sending the request @@ -124,9 +124,8 @@ // Number of displays? // CPU speed - OSErr err; SInt32 gestaltInfo; - err = Gestalt(gestaltProcClkSpeedMHz,&gestaltInfo); + OSErr err = Gestalt(gestaltProcClkSpeedMHz,&gestaltInfo); if (err == noErr) [profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpuFreqMHz",@"CPU Speed (GHz)", [NSNumber numberWithInt:gestaltInfo], [NSNumber numberWithDouble:gestaltInfo/1000.0],nil] forKeys:profileDictKeys]]; diff --git a/mozilla/camino/sparkle/SUUIBasedUpdateDriver.m b/mozilla/camino/sparkle/SUUIBasedUpdateDriver.m index 3fe001eddca..79d509ea89c 100644 --- a/mozilla/camino/sparkle/SUUIBasedUpdateDriver.m +++ b/mozilla/camino/sparkle/SUUIBasedUpdateDriver.m @@ -14,6 +14,13 @@ @implementation SUUIBasedUpdateDriver +- (IBAction)cancelDownload:sender +{ + if (download) + [download cancel]; + [self abortUpdate]; +} + - (void)didFindValidUpdate { updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:updateItem host:host]; @@ -61,7 +68,7 @@ { case SUInstallUpdateChoice: statusController = [[SUStatusController alloc] initWithHost:host]; - [statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil]; + [statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; [statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO]; [statusController showWindow:self]; [self downloadUpdate]; @@ -80,70 +87,67 @@ [statusController setMaxProgressValue:[response expectedContentLength]]; } -- (NSString *)_humanReadableSizeFromDouble:(double)value +- (NSString *)humanReadableSizeFromDouble:(double)value { - if (value < 1024) + if (value < 1000) return [NSString stringWithFormat:@"%.0lf %@", value, SULocalizedString(@"B", @"the unit for bytes")]; - if (value < 1024 * 1024) - return [NSString stringWithFormat:@"%.0lf %@", value / 1024.0, SULocalizedString(@"KB", @"the unit for kilobytes")]; + if (value < 1000 * 1000) + return [NSString stringWithFormat:@"%.0lf %@", value / 1000.0, SULocalizedString(@"KB", @"the unit for kilobytes")]; - if (value < 1024 * 1024 * 1024) - return [NSString stringWithFormat:@"%.1lf %@", value / 1024.0 / 1024.0, SULocalizedString(@"MB", @"the unit for megabytes")]; + if (value < 1000 * 1000 * 1000) + return [NSString stringWithFormat:@"%.1lf %@", value / 1000.0 / 1000.0, SULocalizedString(@"MB", @"the unit for megabytes")]; - return [NSString stringWithFormat:@"%.2lf %@", value / 1024.0 / 1024.0 / 1024.0, SULocalizedString(@"GB", @"the unit for gigabytes")]; + return [NSString stringWithFormat:@"%.2lf %@", value / 1000.0 / 1000.0 / 1000.0, SULocalizedString(@"GB", @"the unit for gigabytes")]; } - (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length { - [statusController setProgressValue:[statusController progressValue] + length]; - if ([statusController maxProgressValue] > 0) - [statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self _humanReadableSizeFromDouble:[statusController progressValue]], [self _humanReadableSizeFromDouble:[statusController maxProgressValue]]]]; + [statusController setProgressValue:[statusController progressValue] + (double)length]; + if ([statusController maxProgressValue] > 0.0) + [statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ of %@", nil), [self humanReadableSizeFromDouble:[statusController progressValue]], [self humanReadableSizeFromDouble:[statusController maxProgressValue]]]]; else - [statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ downloaded", nil), [self _humanReadableSizeFromDouble:[statusController progressValue]]]]; -} - -- (IBAction)cancelDownload:sender -{ - if (download) - [download cancel]; - [self abortUpdate]; + [statusController setStatusText:[NSString stringWithFormat:SULocalizedString(@"%@ downloaded", nil), [self humanReadableSizeFromDouble:[statusController progressValue]]]]; } - (void)extractUpdate { // Now we have to extract the downloaded archive. - [statusController beginActionWithTitle:SULocalizedString(@"Extracting update...", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil]; + [statusController beginActionWithTitle:SULocalizedString(@"Extracting update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; [statusController setButtonEnabled:NO]; [super extractUpdate]; } -- (void)unarchiver:(SUUnarchiver *)ua extractedLength:(long)length +- (void)unarchiver:(SUUnarchiver *)ua extractedLength:(unsigned long)length { // We do this here instead of in extractUpdate so that we only have a determinate progress bar for archives with progress. - if ([statusController maxProgressValue] == 0) + if ([statusController maxProgressValue] == 0.0) + { + NSDictionary * attributes; #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [statusController setMaxProgressValue:[[[[NSFileManager defaultManager] fileAttributesAtPath:downloadPath traverseLink:NO] objectForKey:NSFileSize] doubleValue]]; + attributes = [[NSFileManager defaultManager] fileAttributesAtPath:downloadPath traverseLink:NO]; #else - [statusController setMaxProgressValue:[[[[NSFileManager defaultManager] attributesOfItemAtPath:downloadPath error:NULL] objectForKey:NSFileSize] doubleValue]]; + attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:downloadPath error:nil]; #endif - [statusController setProgressValue:[statusController progressValue] + length]; + [statusController setMaxProgressValue:[[attributes objectForKey:NSFileSize] doubleValue]]; + } + [statusController setProgressValue:[statusController progressValue] + (double)length]; } +- (void)installAndRestart:sender { [self installUpdate]; } + - (void)unarchiverDidFinish:(SUUnarchiver *)ua { - [statusController beginActionWithTitle:SULocalizedString(@"Ready to Install", nil) maxProgressValue:1 statusText:nil]; - [statusController setProgressValue:1]; // Fill the bar. + [statusController beginActionWithTitle:SULocalizedString(@"Ready to Install", nil) maxProgressValue:1.0 statusText:nil]; + [statusController setProgressValue:1.0]; // Fill the bar. [statusController setButtonEnabled:YES]; [statusController setButtonTitle:SULocalizedString(@"Install and Relaunch", nil) target:self action:@selector(installAndRestart:) isDefault:YES]; [NSApp requestUserAttention:NSInformationalRequest]; } -- (void)installAndRestart:sender { [self installUpdate]; } - - (void)installUpdate { - [statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"Take care not to overflow the status window.") maxProgressValue:0 statusText:nil]; + [statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; [statusController setButtonEnabled:NO]; [super installUpdate]; diff --git a/mozilla/camino/sparkle/SUUnarchiver.h b/mozilla/camino/sparkle/SUUnarchiver.h index 1b2372107b0..3e388e9210f 100644 --- a/mozilla/camino/sparkle/SUUnarchiver.h +++ b/mozilla/camino/sparkle/SUUnarchiver.h @@ -22,7 +22,7 @@ @end @interface NSObject (SUUnarchiverDelegate) -- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length; +- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(unsigned long)length; - (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver; - (void)unarchiverDidFail:(SUUnarchiver *)unarchiver; @end diff --git a/mozilla/camino/sparkle/SUUnarchiver.m b/mozilla/camino/sparkle/SUUnarchiver.m index 03cfaac0d03..6592ac75496 100644 --- a/mozilla/camino/sparkle/SUUnarchiver.m +++ b/mozilla/camino/sparkle/SUUnarchiver.m @@ -13,16 +13,14 @@ @implementation SUUnarchiver -extern NSMutableArray *__unarchiverImplementations; - + (SUUnarchiver *)unarchiverForPath:(NSString *)path { - NSEnumerator *implementationEnumerator = [[self _unarchiverImplementations] objectEnumerator]; + NSEnumerator *implementationEnumerator = [[self unarchiverImplementations] objectEnumerator]; id current; while ((current = [implementationEnumerator nextObject])) { - if ([current _canUnarchivePath:path]) - return [[[current alloc] _initWithPath:path] autorelease]; + if ([current canUnarchivePath:path]) + return [[[current alloc] initWithPath:path] autorelease]; } return nil; } diff --git a/mozilla/camino/sparkle/SUUnarchiver_Private.h b/mozilla/camino/sparkle/SUUnarchiver_Private.h index 5928b2783ce..f9277803714 100644 --- a/mozilla/camino/sparkle/SUUnarchiver_Private.h +++ b/mozilla/camino/sparkle/SUUnarchiver_Private.h @@ -13,14 +13,14 @@ #import "SUUnarchiver.h" @interface SUUnarchiver (Private) -+ (void)_registerImplementation:(Class)implementation; -+ (NSArray *)_unarchiverImplementations; -+ (BOOL)_canUnarchivePath:(NSString *)path; -- _initWithPath:(NSString *)path; ++ (void)registerImplementation:(Class)implementation; ++ (NSArray *)unarchiverImplementations; ++ (BOOL)canUnarchivePath:(NSString *)path; +- (id)initWithPath:(NSString *)path; -- (void)_notifyDelegateOfExtractedLength:(NSNumber *)length; -- (void)_notifyDelegateOfSuccess; -- (void)_notifyDelegateOfFailure; +- (void)notifyDelegateOfExtractedLength:(NSNumber *)length; +- (void)notifyDelegateOfSuccess; +- (void)notifyDelegateOfFailure; @end #endif diff --git a/mozilla/camino/sparkle/SUUnarchiver_Private.m b/mozilla/camino/sparkle/SUUnarchiver_Private.m index ead77eeb488..ca3d9151034 100644 --- a/mozilla/camino/sparkle/SUUnarchiver_Private.m +++ b/mozilla/camino/sparkle/SUUnarchiver_Private.m @@ -10,7 +10,7 @@ @implementation SUUnarchiver (Private) -- _initWithPath:(NSString *)path +- (id)initWithPath:(NSString *)path { if ((self = [super init])) archivePath = [path copy]; @@ -23,41 +23,41 @@ [super dealloc]; } -+ (BOOL)_canUnarchivePath:(NSString *)path ++ (BOOL)canUnarchivePath:(NSString *)path { return NO; } -- (void)_notifyDelegateOfExtractedLength:(NSNumber *)length +- (void)notifyDelegateOfExtractedLength:(NSNumber *)length { if ([delegate respondsToSelector:@selector(unarchiver:extractedLength:)]) - [delegate unarchiver:self extractedLength:[length longValue]]; + [delegate unarchiver:self extractedLength:[length unsignedLongValue]]; } -- (void)_notifyDelegateOfSuccess +- (void)notifyDelegateOfSuccess { if ([delegate respondsToSelector:@selector(unarchiverDidFinish:)]) [delegate performSelector:@selector(unarchiverDidFinish:) withObject:self]; } -- (void)_notifyDelegateOfFailure +- (void)notifyDelegateOfFailure { if ([delegate respondsToSelector:@selector(unarchiverDidFail:)]) [delegate performSelector:@selector(unarchiverDidFail:) withObject:self]; } -static NSMutableArray *__unarchiverImplementations; +static NSMutableArray *gUnarchiverImplementations; -+ (void)_registerImplementation:(Class)implementation ++ (void)registerImplementation:(Class)implementation { - if (!__unarchiverImplementations) - __unarchiverImplementations = [[NSMutableArray alloc] init]; - [__unarchiverImplementations addObject:implementation]; + if (!gUnarchiverImplementations) + gUnarchiverImplementations = [[NSMutableArray alloc] init]; + [gUnarchiverImplementations addObject:implementation]; } -+ (NSArray *)_unarchiverImplementations ++ (NSArray *)unarchiverImplementations { - return [NSArray arrayWithArray:__unarchiverImplementations]; + return [NSArray arrayWithArray:gUnarchiverImplementations]; } @end diff --git a/mozilla/camino/sparkle/SUUpdateAlert.m b/mozilla/camino/sparkle/SUUpdateAlert.m index 08fa27927aa..607e37ab5a9 100644 --- a/mozilla/camino/sparkle/SUUpdateAlert.m +++ b/mozilla/camino/sparkle/SUUpdateAlert.m @@ -182,7 +182,7 @@ - (void)webView:sender decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:frame decisionListener:listener { - if (webViewFinishedLoading == YES) { + if (webViewFinishedLoading) { [[NSWorkspace sharedWorkspace] openURL:[request URL]]; [listener ignore]; diff --git a/mozilla/camino/sparkle/SUUpdateDriver.h b/mozilla/camino/sparkle/SUUpdateDriver.h index 5d181647040..1a305d11eef 100644 --- a/mozilla/camino/sparkle/SUUpdateDriver.h +++ b/mozilla/camino/sparkle/SUUpdateDriver.h @@ -11,7 +11,7 @@ #import -extern NSString *SUUpdateDriverFinishedNotification; +extern NSString * const SUUpdateDriverFinishedNotification; @class SUHost, SUUpdater; @interface SUUpdateDriver : NSObject diff --git a/mozilla/camino/sparkle/SUUpdateDriver.m b/mozilla/camino/sparkle/SUUpdateDriver.m index a3ccdd3221d..6b8e2bf5654 100644 --- a/mozilla/camino/sparkle/SUUpdateDriver.m +++ b/mozilla/camino/sparkle/SUUpdateDriver.m @@ -8,7 +8,7 @@ #import "SUUpdateDriver.h" -NSString *SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished"; +NSString * const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished"; @implementation SUUpdateDriver - initWithUpdater:(SUUpdater *)anUpdater diff --git a/mozilla/camino/sparkle/SUUpdatePermissionPrompt.m b/mozilla/camino/sparkle/SUUpdatePermissionPrompt.m index a6277a505e5..2da8a146b77 100644 --- a/mozilla/camino/sparkle/SUUpdatePermissionPrompt.m +++ b/mozilla/camino/sparkle/SUUpdatePermissionPrompt.m @@ -39,7 +39,7 @@ // the user would not know why the application was paused. if ([aHost isBackgroundApplication]) { [NSApp activateIgnoringOtherApps:YES]; } - id prompt = [[[self class] alloc] initWithHost:aHost systemProfile:profile delegate:d]; + id prompt = [[[[self class] alloc] initWithHost:aHost systemProfile:profile delegate:d] autorelease]; [NSApp runModalForWindow:[prompt window]]; } @@ -125,7 +125,6 @@ [delegate updatePermissionPromptFinishedWithResult:([sender tag] == 1 ? SUAutomaticallyCheck : SUDoNotAutomaticallyCheck)]; [[self window] close]; [NSApp stopModal]; - [self autorelease]; } @end diff --git a/mozilla/camino/sparkle/SUUpdater.h b/mozilla/camino/sparkle/SUUpdater.h index 0ed3a2d4282..6874871e95f 100644 --- a/mozilla/camino/sparkle/SUUpdater.h +++ b/mozilla/camino/sparkle/SUUpdater.h @@ -12,7 +12,9 @@ #import @class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast; -@interface SUUpdater : NSObject { +@interface SUUpdater : NSObject +{ +@private NSTimer *checkTimer; SUUpdateDriver *driver; diff --git a/mozilla/camino/sparkle/SUUpdater.m b/mozilla/camino/sparkle/SUUpdater.m index 16291250b45..151ac84bdf9 100644 --- a/mozilla/camino/sparkle/SUUpdater.m +++ b/mozilla/camino/sparkle/SUUpdater.m @@ -34,7 +34,7 @@ #pragma mark Initialization static NSMutableDictionary *sharedUpdaters = nil; -static NSString *SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext"; +static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext"; + (SUUpdater *)sharedUpdater { @@ -47,7 +47,7 @@ static NSString *SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObserv if (bundle == nil) bundle = [NSBundle mainBundle]; id updater = [sharedUpdaters objectForKey:[NSValue valueWithNonretainedObject:bundle]]; if (updater == nil) - updater = [[[self class] alloc] initForBundle:bundle]; + updater = [[[[self class] alloc] initForBundle:bundle] autorelease]; return updater; } @@ -313,7 +313,8 @@ static NSString *SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObserv if (customUserAgentString) return customUserAgentString; - NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil]; + NSString *version = [SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"]; + NSString *userAgent = [NSString stringWithFormat:@"%@/%@ Sparkle/%@", [host name], [host displayVersion], version ? version : @"?"]; NSData *cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; return [[[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding] autorelease]; } @@ -350,7 +351,7 @@ static NSString *SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObserv parameters = [parameters arrayByAddingObjectsFromArray:[host systemProfile]]; [host setObject:[NSDate date] forUserDefaultsKey:SULastProfileSubmitDateKey]; } - if (parameters == nil || [parameters count] == 0) { return baseFeedURL; } + if ([parameters count] == 0) { return baseFeedURL; } // Build up the parameterized URL. NSMutableArray *parameterStrings = [NSMutableArray array]; diff --git a/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.h b/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.h index 9d9a3041aba..8df5f89dc53 100644 --- a/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.h +++ b/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.h @@ -12,7 +12,9 @@ #import #import "SUUIBasedUpdateDriver.h" -@interface SUUserInitiatedUpdateDriver : SUUIBasedUpdateDriver { +@interface SUUserInitiatedUpdateDriver : SUUIBasedUpdateDriver +{ +@private SUStatusController *checkingController; BOOL isCanceled; } diff --git a/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.m b/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.m index 92ad3f2e9fe..276b032b13a 100644 --- a/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.m +++ b/mozilla/camino/sparkle/SUUserInitiatedUpdateDriver.m @@ -13,23 +13,6 @@ @implementation SUUserInitiatedUpdateDriver -- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost -{ - checkingController = [[SUStatusController alloc] initWithHost:aHost]; - [[checkingController window] center]; // Force the checking controller to load its window. - [checkingController beginActionWithTitle:SULocalizedString(@"Checking for updates...", nil) maxProgressValue:0 statusText:nil]; - [checkingController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelCheckForUpdates:) isDefault:NO]; - [checkingController showWindow:self]; - [super checkForUpdatesAtURL:URL host:aHost]; - - // For background applications, obtain focus. - // Useful if the update check is requested from another app like System Preferences. - if ([aHost isBackgroundApplication]) - { - [NSApp activateIgnoringOtherApps:YES]; - } -} - - (void)closeCheckingWindow { if (checkingController) @@ -46,6 +29,23 @@ isCanceled = YES; } +- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost +{ + checkingController = [[SUStatusController alloc] initWithHost:aHost]; + [[checkingController window] center]; // Force the checking controller to load its window. + [checkingController beginActionWithTitle:SULocalizedString(@"Checking for updates...", nil) maxProgressValue:0.0 statusText:nil]; + [checkingController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelCheckForUpdates:) isDefault:NO]; + [checkingController showWindow:self]; + [super checkForUpdatesAtURL:URL host:aHost]; + + // For background applications, obtain focus. + // Useful if the update check is requested from another app like System Preferences. + if ([aHost isBackgroundApplication]) + { + [NSApp activateIgnoringOtherApps:YES]; + } +} + - (void)appcastDidFinishLoading:(SUAppcast *)ac { if (isCanceled) diff --git a/mozilla/camino/sparkle/SUWindowController.m b/mozilla/camino/sparkle/SUWindowController.m index c1c5d713ad4..038900ac287 100644 --- a/mozilla/camino/sparkle/SUWindowController.m +++ b/mozilla/camino/sparkle/SUWindowController.m @@ -20,7 +20,8 @@ NSBundle *framework = [NSBundle bundleWithPath:frameworkPath]; path = [framework pathForResource:nibName ofType:@"nib"]; } - return [super initWithWindowNibPath:path owner:self]; + self = [super initWithWindowNibPath:path owner:self]; + return self; } @end diff --git a/mozilla/camino/sparkle/Sparkle.pch b/mozilla/camino/sparkle/Sparkle.pch index c1bca45bdca..9bd4777fd6b 100644 --- a/mozilla/camino/sparkle/Sparkle.pch +++ b/mozilla/camino/sparkle/Sparkle.pch @@ -6,11 +6,25 @@ // Copyright 2008 Andy Matuschak. All rights reserved. // +#ifndef NSAppKitVersionNumber10_4 +#define NSAppKitVersionNumber10_4 824 +#endif + +#ifndef NSAppKitVersionNumber10_5 +#define NSAppKitVersionNumber10_5 949 +#endif + +#ifndef NSAppKitVersionNumber10_6 +#define NSAppKitVersionNumber10_6 1038 +#endif + +#ifdef __OBJC__ + #define SPARKLE_BUNDLE [NSBundle bundleWithIdentifier:@"org.andymatuschak.Sparkle"] #define SULocalizedString(key,comment) NSLocalizedStringFromTableInBundle(key, @"Sparkle", SPARKLE_BUNDLE, comment) #define SUAbstractFail() NSAssert2(nil, @"Can't call %@ on an instance of %@; this is an abstract method!", __PRETTY_FUNCTION__, [self class]); -#ifdef __OBJC__ #import #import "SUConstants.h" + #endif diff --git a/mozilla/camino/sparkle/Sparkle.xcodeproj/project.pbxproj b/mozilla/camino/sparkle/Sparkle.xcodeproj/project.pbxproj index adf6a27033e..28a4eed4fa5 100644 --- a/mozilla/camino/sparkle/Sparkle.xcodeproj/project.pbxproj +++ b/mozilla/camino/sparkle/Sparkle.xcodeproj/project.pbxproj @@ -92,6 +92,8 @@ DAAEFC9B0DA5722F0051E0D0 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; DAAEFD4E0DA572330051E0D0 /* relaunch.m in Sources */ = {isa = PBXBuildFile; fileRef = 613242130CD06CEF00106AA4 /* relaunch.m */; }; DAAEFD510DA572550051E0D0 /* relaunch in Resources */ = {isa = PBXBuildFile; fileRef = DAAEFC960DA571DF0051E0D0 /* relaunch */; }; + FA8342D2104A4B1F001FE2FF /* SUStandardVersionComparator.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A225A30D1C4AC000430CCD /* SUStandardVersionComparator.m */; }; + FA8342DE104A4B54001FE2FF /* SUStandardVersionComparator.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A225A30D1C4AC000430CCD /* SUStandardVersionComparator.m */; }; FAEFA2F70D94AA7500472538 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; FAEFA2F80D94AA7900472538 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; FAEFA3040D94AB3400472538 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; @@ -209,6 +211,10 @@ 615409C6103BBD9F00125AF1 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/SUAutomaticUpdateAlert.nib; sourceTree = ""; }; 615409C7103BBDA600125AF1 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/SUUpdateAlert.nib; sourceTree = ""; }; 615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SUModelTranslation.plist; sourceTree = ""; }; + 6186554210D7484300B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUUpdatePermissionPrompt.nib; sourceTree = ""; }; + 6186554310D7484E00B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Sparkle.strings; sourceTree = ""; }; + 6186554410D7486E00B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUAutomaticUpdateAlert.nib; sourceTree = ""; }; + 6186554510D7488400B1E074 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/SUUpdateAlert.nib; sourceTree = ""; }; 618915700E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUUpdatePermissionPrompt.nib; sourceTree = ""; }; 618915710E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUUpdateAlert.nib; sourceTree = ""; }; 618915720E35937600B5E981 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/SUAutomaticUpdateAlert.nib; sourceTree = ""; }; @@ -305,6 +311,10 @@ FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigRelaunchDebug.xcconfig; sourceTree = ""; }; FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigRelaunchRelease.xcconfig; sourceTree = ""; }; FA1941D50D94A70100DD942E /* ConfigFrameworkRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigFrameworkRelease.xcconfig; sourceTree = ""; }; + FA302AFD109D13190060F891 /* ConfigUnitTestReleaseGCSupport.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigUnitTestReleaseGCSupport.xcconfig; sourceTree = ""; }; + FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigUnitTestRelease.xcconfig; sourceTree = ""; }; + FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigUnitTestDebug.xcconfig; sourceTree = ""; }; + FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ConfigUnitTest.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -576,6 +586,10 @@ FA1941CE0D94A70100DD942E /* ConfigRelaunch.xcconfig */, FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */, FA1941D40D94A70100DD942E /* ConfigRelaunchRelease.xcconfig */, + FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */, + FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */, + FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */, + FA302AFD109D13190060F891 /* ConfigUnitTestReleaseGCSupport.xcconfig */, ); path = Configurations; sourceTree = ""; @@ -746,6 +760,7 @@ zh_CN, fr_ca, pt_BR, + pt_PT, ); mainGroup = 0867D691FE84028FC02AAC07 /* Sparkle */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -862,6 +877,7 @@ buildActionMask = 2147483647; files = ( 61227A160DB548B800AB99EA /* SUVersionComparisonTest.m in Sources */, + FA8342DE104A4B54001FE2FF /* SUStandardVersionComparator.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -870,6 +886,7 @@ buildActionMask = 2147483647; files = ( 61B5F93009C4CFDC00B25A18 /* main.m in Sources */, + FA8342D2104A4B1F001FE2FF /* SUStandardVersionComparator.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -962,6 +979,7 @@ 611A904610240DF700CC659E /* ja */, 61E31A80103299500051D188 /* pt_BR */, 615409C4103BBC4000125AF1 /* cs */, + 6186554310D7484E00B1E074 /* pt_PT */, ); name = Sparkle.strings; sourceTree = ""; @@ -985,6 +1003,7 @@ 611A904810240E0600CC659E /* ja */, 61E31A81103299560051D188 /* pt_BR */, 615409C6103BBD9F00125AF1 /* cs */, + 6186554410D7486E00B1E074 /* pt_PT */, ); name = SUAutomaticUpdateAlert.nib; sourceTree = ""; @@ -1008,6 +1027,7 @@ 611A904910240E0C00CC659E /* ja */, 61E31A821032995F0051D188 /* pt_BR */, 615409C7103BBDA600125AF1 /* cs */, + 6186554510D7488400B1E074 /* pt_PT */, ); name = SUUpdateAlert.nib; sourceTree = ""; @@ -1047,6 +1067,7 @@ 611A904710240DFF00CC659E /* ja */, 61E31A7F103299450051D188 /* pt_BR */, 615409C5103BBC5000125AF1 /* cs */, + 6186554210D7484300B1E074 /* pt_PT */, ); name = SUUpdatePermissionPrompt.nib; sourceTree = ""; @@ -1094,7 +1115,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 61072EB20DF2640C008FE88B /* ConfigFrameworkReleaseGCSupport.xcconfig */; buildSettings = { - INSTALL_PATH = "@loader_path/../Frameworks"; }; name = "Release (GC dual-mode; 10.5-only)"; }; @@ -1114,87 +1134,22 @@ }; 61072EB10DF263BD008FE88B /* Release (GC dual-mode; 10.5-only) */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA302AFD109D13190060F891 /* ConfigUnitTestReleaseGCSupport.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(NATIVE_ARCH)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; - INFOPLIST_FILE = "Tests/Sparkle Unit Tests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; - PRODUCT_NAME = "Sparkle Unit Tests"; - WARNING_CFLAGS = ""; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; }; name = "Release (GC dual-mode; 10.5-only)"; }; 612279DB0DB5470300AB99EA /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; - INFOPLIST_FILE = "Tests/Sparkle Unit Tests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; - PRODUCT_NAME = "Sparkle Unit Tests"; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; }; name = Debug; }; 612279DC0DB5470300AB99EA /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(NATIVE_ARCH)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; - INFOPLIST_FILE = "Tests/Sparkle Unit Tests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; - PRODUCT_NAME = "Sparkle Unit Tests"; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; }; name = Release; }; diff --git a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib deleted file mode 100644 index 09004544ea6..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib +++ /dev/null @@ -1,29 +0,0 @@ -{ - IBClasses = ( - { - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - CLASS = NSObject; - LANGUAGE = ObjC; - }, - { - ACTIONS = { - doNotInstall = id; - installLater = id; - installNow = id; - }; - CLASS = SUAutomaticUpdateAlert; - LANGUAGE = ObjC; - SUPERCLASS = SUWindowController; - }, - { - CLASS = SUWindowController; - LANGUAGE = ObjC; - SUPERCLASS = NSWindowController; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/info.nib b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/info.nib deleted file mode 100644 index da986de652f..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/info.nib +++ /dev/null @@ -1,18 +0,0 @@ - - - - - IBDocumentLocation - 69 10 356 240 0 0 1680 1028 - IBFramework Version - 489.0 - IBLastKnownRelativeProjectPath - ../Sparkle.xcodeproj - IBOldestOS - 5 - IBSystem Version - 9E17 - targetFramework - IBCocoaFramework - - diff --git a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib index 5a2dfc87595..0ef484be4d8 100644 Binary files a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.strings b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.strings index 17a67d9b19f..4f47c3ac290 100644 Binary files a/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.strings and b/mozilla/camino/sparkle/da.lproj/SUAutomaticUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/classes.nib b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/classes.nib deleted file mode 100644 index 018710af886..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/classes.nib +++ /dev/null @@ -1,39 +0,0 @@ -{ - IBClasses = ( - { - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - CLASS = NSApplication; - LANGUAGE = ObjC; - SUPERCLASS = NSResponder; - }, - { - CLASS = NSObject; - LANGUAGE = ObjC; - }, - { - ACTIONS = { - installUpdate = id; - remindMeLater = id; - skipThisVersion = id; - }; - CLASS = SUUpdateAlert; - LANGUAGE = ObjC; - OUTLETS = { - delegate = id; - description = NSTextField; - releaseNotesView = WebView; - }; - SUPERCLASS = SUWindowController; - }, - { - CLASS = SUWindowController; - LANGUAGE = ObjC; - SUPERCLASS = NSWindowController; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/info.nib b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/info.nib deleted file mode 100644 index 7b026327649..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/info.nib +++ /dev/null @@ -1,16 +0,0 @@ - - - - - IBFramework Version - 489.0 - IBLastKnownRelativeProjectPath - ../Sparkle.xcodeproj - IBOldestOS - 5 - IBSystem Version - 9F33 - targetFramework - IBCocoaFramework - - diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/keyedobjects.nib index ad5666d311a..75b515a5d53 100644 Binary files a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/keyedobjects.nib and b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.strings b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.strings index 7d1ca1bd00f..12c2f3d0494 100644 Binary files a/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.strings and b/mozilla/camino/sparkle/da.lproj/SUUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/classes.nib b/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/classes.nib deleted file mode 100644 index 480bb357823..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/classes.nib +++ /dev/null @@ -1,34 +0,0 @@ -{ - IBClasses = ( - { - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - CLASS = NSObject; - LANGUAGE = ObjC; - }, - { - ACTIONS = { - finishPrompt = id; - toggleMoreInfo = id; - }; - CLASS = SUUpdatePermissionPrompt; - LANGUAGE = ObjC; - OUTLETS = { - delegate = id; - descriptionTextField = NSTextField; - moreInfoButton = NSButton; - moreInfoView = NSView; - }; - SUPERCLASS = SUWindowController; - }, - { - CLASS = SUWindowController; - LANGUAGE = ObjC; - SUPERCLASS = NSWindowController; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/data.dependency b/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/data.dependency deleted file mode 100644 index b7381f72e4d..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/data.dependency +++ /dev/null @@ -1,10 +0,0 @@ - - - - - IBPaletteDependency - - Controllers - - - diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/info.nib b/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/info.nib deleted file mode 100644 index 7b026327649..00000000000 --- a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/info.nib +++ /dev/null @@ -1,16 +0,0 @@ - - - - - IBFramework Version - 489.0 - IBLastKnownRelativeProjectPath - ../Sparkle.xcodeproj - IBOldestOS - 5 - IBSystem Version - 9F33 - targetFramework - IBCocoaFramework - - diff --git a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib index 4ef0a8b9be7..608faf4b105 100644 Binary files a/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib and b/mozilla/camino/sparkle/da.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/da.lproj/Sparkle.strings b/mozilla/camino/sparkle/da.lproj/Sparkle.strings index 1a22f6bdca0..f0a44ab8013 100644 Binary files a/mozilla/camino/sparkle/da.lproj/Sparkle.strings and b/mozilla/camino/sparkle/da.lproj/Sparkle.strings differ diff --git a/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/designable.nib b/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/designable.nib index d6ad4b45e71..6ef54393d28 100644 --- a/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/designable.nib +++ b/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/designable.nib @@ -2,16 +2,16 @@ 1050 - 10A432 - 732 - 1038 - 437.00 + 10D573 + 785 + 1038.29 + 460.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 785 - + com.apple.InterfaceBuilder.CocoaPlugin @@ -410,8 +410,8 @@ 272629760 RGFzIGFub255bWlzaWVydGUgU3lzdGVtcHJvZmlsIGhpbGZ0IHVucyBiZWkgd2VpdGVyZW4gRW50d2lj a2x1bmdlbi4gRsO8ciB3ZWl0ZXJlIEZyYWdlbiB6dW0gYW5vbnltaXNpZXJ0ZW4gU3lzdGVtcHJvZmls -IGvDtm5uZW4gU2llIHNpY2ggYW4gdW5zIHdlbmRlbi4KCkZvbGdlbmRlIEluZm9ybWF0aW9uZW4gd8O8 -cmRlbiDDvGJlcnRyYWdlbjo +IGvDtm5uZW4gU2llIHNpY2ggYW4gdW5zIHdlbmRlbi4KCkRpZXNlIEluZm9ycm1hdGlvbmVuIHfDvHJk +ZW4gYW4gdW5zIGdlc2VuZGV0IHdlcmRlbjo @@ -870,9 +870,21 @@ cmRlbiDDvGJlcnRyYWdlbjo com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -884,7 +896,7 @@ cmRlbiDDvGJlcnRyYWdlbjo com.apple.InterfaceBuilder.CocoaPlugin - {{382, 512}, {365, 254}} + {{134, 540}, {365, 254}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -918,6 +930,7 @@ cmRlbiDDvGJlcnRyYWdlbjo FirstResponder + NSObject IBUserSource @@ -937,12 +950,40 @@ cmRlbiDDvGJlcnRyYWdlbjo id id + + + finishPrompt: + id + + + toggleMoreInfo: + id + + id NSTextField NSButton NSView + + + delegate + id + + + descriptionTextField + NSTextField + + + moreInfoButton + NSButton + + + moreInfoView + NSView + + IBUserSource @@ -959,6 +1000,7 @@ cmRlbiDDvGJlcnRyYWdlbjo 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -966,5 +1008,9 @@ cmRlbiDDvGJlcnRyYWdlbjo YES ../Sparkle.xcodeproj 3 + + {128, 128} + {15, 15} + diff --git a/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib index 30eb15f7075..0394a79d8a4 100644 Binary files a/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib and b/mozilla/camino/sparkle/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/de.lproj/Sparkle.strings b/mozilla/camino/sparkle/de.lproj/Sparkle.strings index 7233e484120..e249bd55de5 100644 Binary files a/mozilla/camino/sparkle/de.lproj/Sparkle.strings and b/mozilla/camino/sparkle/de.lproj/Sparkle.strings differ diff --git a/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/designable.nib b/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/designable.nib index ea35995cbbb..4acb766cc8b 100644 --- a/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/designable.nib +++ b/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/designable.nib @@ -2,17 +2,17 @@ 1050 - 10A432 - 732 - 1038 - 437.00 + 10D573 + 785 + 1038.29 + 460.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 785 - + com.apple.InterfaceBuilder.CocoaPlugin @@ -31,7 +31,7 @@ 1 2 - {{83, 491}, {471, 169}} + {{83, 472}, {471, 188}} 1886912512 @@ -49,7 +49,7 @@ 257 - {{232, 16}, {225, 32}} + {{232, 12}, {225, 32}} 1 YES @@ -76,7 +76,7 @@ 257 - {{101, 16}, {131, 32}} + {{101, 12}, {131, 32}} YES @@ -97,7 +97,7 @@ 264 - {{104, 115}, {289, 34}} + {{104, 134}, {289, 34}} YES @@ -133,13 +133,13 @@ 266 - {{104, 59}, {348, 42}} + {{104, 78}, {348, 42}} YES 67239424 272629760 - NO LOCALIZAR + Tk8gTE9DQUxJWkFSCmZvbwpiYXI LucidaGrande 11 @@ -153,7 +153,7 @@ 264 - {{104, 54}, {278, 18}} + {{104, 50}, {278, 18}} YES @@ -188,7 +188,7 @@ NeXT Encapsulated PostScript v1.2 pasteboard type NeXT TIFF v4.0 pasteboard type - {{23, 85}, {64, 64}} + {{23, 104}, {64, 64}} YES @@ -208,7 +208,7 @@ 268 - {{83, 51}, {27, 26}} + {{83, 47}, {27, 26}} YES @@ -226,7 +226,7 @@ - {471, 169} + {471, 188} {{0, 0}, {1920, 1178}} @@ -413,7 +413,7 @@ TGEgaW5mb3JtYWNpw7NuIGRlIHBlcmZpbCBkZSBzaXN0ZW1hIGFuw7NuaW1vIHNlIHVzYSBwYXJhIGF5 dWRhcm5vcyBhIHBsYW5lYXIgZWwgdHJhYmFqbyBkZSBkZXNhcnJvbGxvIGZ1dHVyby4gUG9yIGZhdm9y LCBww7NuZ2FzZSBlbiBjb250YWN0byBjb24gbm9zb3Ryb3Mgc2kgdGllbmUgcHJlZ3VudGFzIHNvYnJl -IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo +IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Vyw61hIGVudmlhZGE6A @@ -913,9 +913,9 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo com.apple.InterfaceBuilder.CocoaPlugin - {{0, 676}, {471, 169}} + {{0, 657}, {471, 188}} com.apple.InterfaceBuilder.CocoaPlugin - {{0, 676}, {471, 169}} + {{0, 657}, {471, 188}} {213, 107} @@ -928,7 +928,7 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo - 174 + 188 @@ -1003,12 +1003,40 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo id id + + + finishPrompt: + id + + + toggleMoreInfo: + id + + id NSTextField NSButton NSView + + + delegate + id + + + descriptionTextField + NSTextField + + + moreInfoButton + NSButton + + + moreInfoView + NSView + + @@ -1613,6 +1641,13 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo showWindow: id + + showWindow: + + showWindow: + id + + IBFrameworkSource AppKit.framework/Headers/NSWindowController.h @@ -1621,6 +1656,7 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -1632,5 +1668,9 @@ IGVzdG8uCgpFc3RhIGVzIGxhIGluZm9ybWFjacOzbiBxdWUgc2Ugbm9zIGVudmlhcsOtYTo YES ../Sparkle.xcodeproj 3 + + {128, 128} + {15, 15} + diff --git a/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib index ba22e5216d2..62f76d909e3 100644 Binary files a/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib and b/mozilla/camino/sparkle/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/es.lproj/Sparkle.strings b/mozilla/camino/sparkle/es.lproj/Sparkle.strings index b6c9ec3f7a6..e3e9571c09c 100644 Binary files a/mozilla/camino/sparkle/es.lproj/Sparkle.strings and b/mozilla/camino/sparkle/es.lproj/Sparkle.strings differ diff --git a/mozilla/camino/sparkle/ja.lproj/Sparkle.strings b/mozilla/camino/sparkle/ja.lproj/Sparkle.strings index 3ced3759c35..e0b1a004cb2 100644 Binary files a/mozilla/camino/sparkle/ja.lproj/Sparkle.strings and b/mozilla/camino/sparkle/ja.lproj/Sparkle.strings differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/designable.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/designable.nib new file mode 100644 index 00000000000..f2d46508dce --- /dev/null +++ b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/designable.nib @@ -0,0 +1,652 @@ + + + + 1050 + 10C540 + 740 + 1038.25 + 458.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 740 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + SUAutomaticUpdateAlert + + + FirstResponder + + + NSApplication + + + 1 + 2 + {{114, 521}, {559, 152}} + 1886912512 + + + NSWindow + + + View + + {1.79769e+308, 1.79769e+308} + {511, 152} + + + 256 + + YES + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{23, 73}, {64, 64}} + + YES + + 130560 + 33554432 + + NSImage + NSApplicationIcon + + 0 + 0 + 0 + NO + + YES + + + + 268 + {{105, 120}, {389, 17}} + + YES + + 67239424 + 272629760 + + + LucidaGrande-Bold + 13 + 2072 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 270 + {{105, 81}, {435, 31}} + + YES + + 67239424 + 272629760 + + + LucidaGrande + 11 + 3100 + + + + + + + + + 257 + {{376, 12}, {167, 32}} + + YES + + 67239424 + 134217728 + Instalar e Reiniciar + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 257 + {{242, 12}, {134, 32}} + + YES + + 67239424 + 134217728 + Instalar ao Sair + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 256 + {{102, 12}, {116, 32}} + + YES + + 67239424 + 134217728 + Não Instalar + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 256 + {{105, 58}, {382, 18}} + + YES + + 67239424 + 131072 + No futuro, transferir e instalar as actualizações automaticamente + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + {559, 152} + + + {{0, 0}, {1280, 778}} + {511, 174} + {1.79769e+308, 1.79769e+308} + + + YES + + + + + YES + + + value: applicationIcon + + + + + + value: applicationIcon + value + applicationIcon + 2 + + + 10 + + + + value: titleText + + + + + + value: titleText + value + titleText + 2 + + + 11 + + + + value: descriptionText + + + + + + value: descriptionText + value + descriptionText + 2 + + + 14 + + + + value: values.SUAutomaticallyUpdate + + + + + + value: values.SUAutomaticallyUpdate + value + values.SUAutomaticallyUpdate + 2 + + + 19 + + + + window + + + + 22 + + + + installNow: + + + + 33 + + + + installLater: + + + + 34 + + + + doNotInstall: + + + + 35 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Window + + + 6 + + + YES + + + + + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 15 + + + YES + + + + + + 16 + + + YES + + + + + + 17 + + + YES + + + + + + 30 + + + YES + + + + + + 18 + + + Shared Defaults + + + 38 + + + + + 39 + + + + + 40 + + + + + 41 + + + + + 42 + + + + + 43 + + + + + 44 + + + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 15.IBPluginDependency + 15.ImportedFromIB2 + 16.IBPluginDependency + 16.ImportedFromIB2 + 17.IBPluginDependency + 17.ImportedFromIB2 + 18.IBPluginDependency + 18.ImportedFromIB2 + 30.IBPluginDependency + 30.ImportedFromIB2 + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 6.IBPluginDependency + 6.ImportedFromIB2 + 7.IBPluginDependency + 7.ImportedFromIB2 + 8.IBPluginDependency + 8.ImportedFromIB2 + 9.IBPluginDependency + 9.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{108, 455}, {559, 152}} + com.apple.InterfaceBuilder.CocoaPlugin + {{108, 455}, {559, 152}} + + + {511, 152} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 44 + + + + YES + + FirstResponder + + IBUserSource + + + + + NSObject + + IBUserSource + + + + + SUAutomaticUpdateAlert + SUWindowController + + YES + + YES + doNotInstall: + installLater: + installNow: + + + YES + id + id + id + + + + IBUserSource + + + + + SUWindowController + NSWindowController + + IBUserSource + + + + + + 0 + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../Sparkle.xcodeproj + 3 + + diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 00000000000..e7b0fc200e4 Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.strings b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.strings new file mode 100755 index 00000000000..dffb9b8831b Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUAutomaticUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUStatus.strings b/mozilla/camino/sparkle/pt_PT.lproj/SUStatus.strings new file mode 100755 index 00000000000..ad32ad70673 Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUStatus.strings differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/designable.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/designable.nib new file mode 100644 index 00000000000..761ba7ce729 --- /dev/null +++ b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/designable.nib @@ -0,0 +1,974 @@ + + + + 1050 + 10C540 + 740 + 1038.25 + 458.00 + + YES + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + 740 + 740 + + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + + YES + + YES + + + YES + + + + YES + + SUUpdateAlert + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{248, 468}, {650, 370}} + -260571136 + Actualização de Software + NSWindow + + View + + {1.79769e+308, 1.79769e+308} + {586, 370} + + + 256 + + YES + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{24, 291}, {64, 64}} + + + YES + + 130560 + 33554432 + + NSImage + NSApplicationIcon + + 0 + 0 + 0 + NO + + YES + + + + 264 + {{106, 338}, {443, 17}} + + + YES + + 67239424 + 272629760 + + + LucidaGrande-Bold + 13 + 2072 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{106, 277}, {443, 17}} + + + YES + + 67239424 + 272629760 + Notas de Lançamento: + + LucidaGrande-Bold + 11 + 3357 + + + + + + + + + 289 + {{299, 12}, {166, 32}} + + + YES + + 67239424 + 134217728 + Lembrar Mais Tarde + + LucidaGrande + 13 + 1044 + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 288 + {{102, 12}, {152, 32}} + + + YES + + 67239424 + 134217728 + Saltar Esta Versão + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 289 + {{465, 12}, {171, 32}} + + + YES + + -2080244224 + 134217728 + Instalar Actualização + + + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple URL pasteboard type + Apple Web Archive pasteboard type + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + WebURLsWithTitlesPboardType + public.png + public.url + public.url-name + + + {{-1, 0}, {521, 197}} + + + + + + + + YES + + YES + WebKitDefaultFixedFontSize + WebKitDefaultFontSize + WebKitMinimumFontSize + + + YES + + + + + + + NO + YES + + + {{1, 1}, {519, 197}} + + + + + {{109, 76}, {521, 199}} + + + {0, 0} + + 67239424 + 0 + + + LucidaGrande + 11 + 16 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 1 + 3 + 0 + NO + + + + 266 + {{106, 302}, {463, 28}} + + + YES + + 67239424 + 4194304 + + + LucidaGrande + 11 + 3100 + + + + + + + + + 256 + {{106, 48}, {442, 18}} + + + YES + + 67239424 + 131072 + No futuro, transferir e instalar as actualizações automaticamente + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + {650, 370} + + + + {{0, 0}, {1280, 778}} + {586, 392} + {1.79769e+308, 1.79769e+308} + + + + YES + + + + + YES + + + value: applicationIcon + + + + + + value: applicationIcon + value + applicationIcon + 2 + + + 9 + + + + value: titleText + + + + + + value: titleText + value + titleText + 2 + + + 11 + + + + releaseNotesView + + + + 32 + + + + skipThisVersion: + + + + 33 + + + + remindMeLater: + + + + 34 + + + + delegate + + + + 50 + + + + window + + + + 69 + + + + hidden: showsReleaseNotes + + + + + + hidden: showsReleaseNotes + hidden + showsReleaseNotes + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 72 + + + + installUpdate: + + + + 77 + + + + value: descriptionText + + + + + + value: descriptionText + value + descriptionText + 2 + + + 103 + + + + description + + + + 105 + + + + value: values.SUAutomaticallyUpdate + + + + + + value: values.SUAutomaticallyUpdate + value + values.SUAutomaticallyUpdate + 2 + + + 135 + + + + hidden: allowsAutomaticUpdates + + + + + + hidden: allowsAutomaticUpdates + hidden + allowsAutomaticUpdates + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 141 + + + + hidden: showsReleaseNotes + + + + + + hidden: showsReleaseNotes + hidden + showsReleaseNotes + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 161 + + + + hidden: showsReleaseNotes + + + + + + hidden: showsReleaseNotes + hidden + showsReleaseNotes + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 164 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Update Alert (release notes) + + + 6 + + + YES + + + + + + + + + + + + + + 7 + + + YES + + + + + + 10 + + + YES + + + + + + 17 + + + YES + + + + + + 22 + + + YES + + + + + + 23 + + + YES + + + + + + 76 + + + YES + + + + + + 89 + + + YES + + + + + + 101 + + + YES + + + + + + 117 + + + YES + + + + + + 93 + + + Shared Defaults + + + 168 + + + + + 169 + + + + + 170 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 174 + + + + + 175 + + + + + 18 + + + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 10.IBPluginDependency + 10.ImportedFromIB2 + 101.IBPluginDependency + 101.ImportedFromIB2 + 117.IBPluginDependency + 117.ImportedFromIB2 + 168.IBPluginDependency + 169.IBPluginDependency + 17.IBPluginDependency + 17.ImportedFromIB2 + 170.IBPluginDependency + 171.IBPluginDependency + 172.IBPluginDependency + 173.IBPluginDependency + 174.IBPluginDependency + 175.IBPluginDependency + 18.IBPluginDependency + 18.ImportedFromIB2 + 22.IBPluginDependency + 22.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 6.IBPluginDependency + 6.ImportedFromIB2 + 7.IBPluginDependency + 7.ImportedFromIB2 + 76.IBPluginDependency + 76.ImportedFromIB2 + 89.IBPluginDependency + 89.ImportedFromIB2 + 93.IBPluginDependency + 93.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.WebKitIBPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{84, 29}, {650, 370}} + com.apple.InterfaceBuilder.CocoaPlugin + {{84, 29}, {650, 370}} + + + {586, 370} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 175 + + + + YES + + FirstResponder + NSObject + + IBUserSource + + + + + NSApplication + NSResponder + + IBUserSource + + + + + NSObject + + IBUserSource + + + + + SUUpdateAlert + SUWindowController + + YES + + YES + installUpdate: + remindMeLater: + skipThisVersion: + + + YES + id + id + id + + + + YES + + YES + delegate + description + releaseNotesView + + + YES + id + NSTextField + WebView + + + + IBUserSource + + + + + SUWindowController + NSWindowController + + IBUserSource + + + + + + 0 + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../Sparkle.xcodeproj + 3 + + diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 00000000000..0920a0dfe2d Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.strings b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.strings new file mode 100755 index 00000000000..27da206aa56 Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/designable.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/designable.nib new file mode 100644 index 00000000000..a5b991b7faa --- /dev/null +++ b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/designable.nib @@ -0,0 +1,1130 @@ + + + + 1050 + 10C540 + 740 + 1038.25 + 458.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 740 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + SUUpdatePermissionPrompt + + + FirstResponder + + + NSApplication + + + 1 + 2 + {{83, 492}, {446, 168}} + 1886912512 + + + NSWindow + + + View + + {1.79769e+308, 1.79769e+308} + {213, 107} + + + 256 + + YES + + + 257 + {{223, 12}, {209, 32}} + + + 1 + YES + + -2080244224 + 134217728 + Procurar Automaticamente + + LucidaGrande + 13 + 1044 + + + 1 + -2038284033 + 1 + + + DQ + 200 + 25 + + + + + 257 + {{101, 12}, {122, 32}} + + + YES + + 67239424 + 134217728 + Não Procurar + + + -2038284033 + 1 + + + Gw + 200 + 25 + + + + + 264 + {{104, 114}, {289, 34}} + + + YES + + 67239424 + 272629760 + Procurar actualizações automaticamente? + + LucidaGrande-Bold + 13 + 2072 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 266 + {{104, 81}, {315, 42}} + + + YES + + 67239424 + 272629760 + DO NOT LOCALIZE + + LucidaGrande + 11 + 3100 + + + + + + + + + 264 + {{104, 53}, {278, 18}} + + + YES + + -2080244224 + 163840 + Incluir perfil de sistema anónimo + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 264 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{23, 84}, {64, 64}} + + + YES + + 130560 + 33554432 + + NSImage + NSApplicationIcon + + 0 + 1 + 0 + YES + + YES + + + + 265 + {{80, 50}, {27, 26}} + + + YES + + 67239424 + 134250496 + + + + -1194573569 + 133 + + + 200 + 25 + + + + {446, 168} + + + + {{0, 0}, {1280, 778}} + {213, 129} + {1.79769e+308, 1.79769e+308} + + + + YES + visibleKey + visibleValue + displayValue + displayKey + + + YES + YES + YES + YES + YES + + + + 266 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 4352 + {353, 113} + + + YES + + + 256 + {{346, 0}, {12, 17}} + + + YES + + 128 + 40 + 1000 + + 75628096 + 2048 + + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + + + + 69336577 + 131072 + Text Cell + + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + + 3 + YES + + + + 219 + 40 + 1000 + + 75628096 + 2048 + + + + + + + 69336577 + 131072 + Text Cell + + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 14 + -759169024 + + + 4 + 15 + 0 + NO + 0 + + + {{1, 1}, {353, 113}} + + + + + + 6 + System + controlBackgroundColor + + + 4 + + + + -2147483392 + {{-22, 1}, {11, 125}} + + + 256 + + _doScroller: + 0.78125 + + + + -2147483392 + {{-100, -100}, {345, 11}} + + + 257 + + _doScroller: + 0.99047619104385376 + + + {{4, 5}, {355, 115}} + + + + 530 + + + + AAAAAAAAAABBgAAAQYAAAA + + + + 266 + {{1, 128}, {358, 70}} + + + YES + + 67239424 + 272629760 + QSBpbmZvcm1hw6fDo28gYW7Ds25pbWEgZG8gcGVyZmlsIGRlIHNpc3RlbWEgw6kgdXNhZGEgcGFyYSBu +byBmdXR1cm8gbm9zIGFqdWRhciBhIHBsYW5lYXIgbyB0cmFiYWxobyBkZSBkZXNlbnZvbHZpbWVudG8u +IFBvciBmYXZvciBjb250YWN0ZS1ub3Mgc2UgdGl2ZXIgYWxndW1hIHF1ZXN0w6NvIGFjZXJjYSBkZXN0 +ZSBhc3N1bnRvLgoKRXN0YSDDqSBhIGluZm9ybWHDp8OjbyBxdWUgc2VyaWEgZW52aWFkYTo + + + + + + + + {362, 205} + + + NSView + NSResponder + + + + YES + SUIncludeProfile + SUSendProfileInfo + + YES + + + + + YES + + + contentArray: systemProfileInformationArray + + + + + + contentArray: systemProfileInformationArray + contentArray + systemProfileInformationArray + 2 + + + 25 + + + + window + + + + 126 + + + + moreInfoView + + + + 127 + + + + value: icon + + + + + + value: icon + value + icon + 2 + + + 130 + + + + toggleMoreInfo: + + + + 131 + + + + moreInfoButton + + + + 132 + + + + descriptionTextField + + + + 133 + + + + hidden: shouldAskAboutProfile + + + + + + hidden: shouldAskAboutProfile + hidden + shouldAskAboutProfile + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 139 + + + + hidden: shouldAskAboutProfile + + + + + + hidden: shouldAskAboutProfile + hidden + shouldAskAboutProfile + + NSValueTransformerName + NSNegateBoolean + + 2 + + + 143 + + + + finishPrompt: + + + + 144 + + + + finishPrompt: + + + + 145 + + + + value: shouldSendProfile + + + + + + value: shouldSendProfile + value + shouldSendProfile + + YES + + YES + NSNullPlaceholder + NSValidatesImmediately + + + YES + + + + + 2 + + + 148 + + + + value: promptDescription + + + + + + value: promptDescription + value + promptDescription + 2 + + + 161 + + + + value: arrangedObjects.displayValue + + + + + + value: arrangedObjects.displayValue + value + arrangedObjects.displayValue + 2 + + + 173 + + + + value: arrangedObjects.displayKey + + + + + + value: arrangedObjects.displayKey + value + arrangedObjects.displayKey + 2 + + + 174 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 5 + + + YES + + + + Profile Info + + + 6 + + + YES + + + + + + + + + + + + 13 + + + YES + + + + + + 14 + + + YES + + + + + + 32 + + + YES + + + + + + 33 + + + YES + + + + + + 34 + + + YES + + + + + + 37 + + + YES + + + + + + 71 + + + YES + + + + + + 24 + + + Array Controller + + + 39 + + + YES + + + + + MoreInfoView + + + 40 + + + YES + + + + + + + + 41 + + + YES + + + + + + + 42 + + + YES + + + + + + 43 + + + + + 44 + + + YES + + + + + + 45 + + + + + 46 + + + YES + + + + + + 49 + + + User Defaults Controller + + + 176 + + + + + 177 + + + + + 178 + + + + + 179 + + + + + 180 + + + + + 181 + + + + + 182 + + + + + 183 + + + + + 184 + + + + + 185 + + + + + + + YES + + YES + -3.IBPluginDependency + -3.ImportedFromIB2 + 13.IBPluginDependency + 13.ImportedFromIB2 + 14.IBPluginDependency + 14.ImportedFromIB2 + 184.IBShouldRemoveOnLegacySave + 185.IBShouldRemoveOnLegacySave + 24.IBPluginDependency + 24.ImportedFromIB2 + 32.IBPluginDependency + 32.ImportedFromIB2 + 33.IBPluginDependency + 33.ImportedFromIB2 + 34.IBPluginDependency + 34.ImportedFromIB2 + 37.IBPluginDependency + 37.ImportedFromIB2 + 39.IBEditorWindowLastContentRect + 39.IBPluginDependency + 39.ImportedFromIB2 + 40.IBPluginDependency + 40.ImportedFromIB2 + 41.IBPluginDependency + 41.ImportedFromIB2 + 42.IBPluginDependency + 42.ImportedFromIB2 + 43.IBPluginDependency + 43.ImportedFromIB2 + 44.IBPluginDependency + 44.ImportedFromIB2 + 45.IBPluginDependency + 45.ImportedFromIB2 + 46.IBPluginDependency + 46.ImportedFromIB2 + 49.IBPluginDependency + 49.ImportedFromIB2 + 5.IBEditorWindowLastContentRect + 5.IBPluginDependency + 5.IBWindowTemplateEditedContentRect + 5.ImportedFromIB2 + 5.windowTemplate.hasMinSize + 5.windowTemplate.minSize + 6.IBPluginDependency + 6.ImportedFromIB2 + 71.IBPluginDependency + 71.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{155, 294}, {362, 205}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{108, 557}, {446, 168}} + com.apple.InterfaceBuilder.CocoaPlugin + {{108, 557}, {446, 168}} + + + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 185 + + + + YES + + FirstResponder + + IBUserSource + + + + + NSObject + + IBUserSource + + + + + SUUpdatePermissionPrompt + SUWindowController + + YES + + YES + finishPrompt: + toggleMoreInfo: + + + YES + id + id + + + + YES + + YES + delegate + descriptionTextField + moreInfoButton + moreInfoView + + + YES + id + NSTextField + NSButton + NSView + + + + IBUserSource + + + + + SUWindowController + NSWindowController + + IBUserSource + + + + + + 0 + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../Sparkle.xcodeproj + 3 + + diff --git a/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib new file mode 100644 index 00000000000..e32d8a410de Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/pt_PT.lproj/Sparkle.strings b/mozilla/camino/sparkle/pt_PT.lproj/Sparkle.strings new file mode 100755 index 00000000000..e3ed170ce74 Binary files /dev/null and b/mozilla/camino/sparkle/pt_PT.lproj/Sparkle.strings differ diff --git a/mozilla/camino/sparkle/relaunch.m b/mozilla/camino/sparkle/relaunch.m index e693e37767b..415c356dcae 100644 --- a/mozilla/camino/sparkle/relaunch.m +++ b/mozilla/camino/sparkle/relaunch.m @@ -1,20 +1,28 @@ #import -#include +#import @interface TerminationListener : NSObject { +@private const char *executablePath; pid_t parentProcessId; } -- (void) relaunch; +- (void)relaunch __dead2; @end @implementation TerminationListener +- (void)watchdog:(NSTimer *)timer +{ + ProcessSerialNumber psn; + if (GetProcessForPID(parentProcessId, &psn) == procNotFound) + [self relaunch]; +} + - (id) initWithExecutablePath:(const char *)execPath parentProcessId:(pid_t)ppid { self = [super init]; @@ -29,21 +37,19 @@ return self; } -- (void)watchdog:(NSTimer *)timer -{ - ProcessSerialNumber psn; - if (GetProcessForPID(parentProcessId, &psn) == procNotFound) - [self relaunch]; -} - - (void) relaunch { [[NSWorkspace sharedWorkspace] openFile:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:executablePath length:strlen(executablePath)]]; + NSString* path = NSTemporaryDirectory(); + if (path) + { + path = [path stringByAppendingPathComponent:@"relaunch"]; #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [[NSFileManager defaultManager] removeFileAtPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"relaunch"] handler:nil]; + [[NSFileManager defaultManager] removeFileAtPath:path handler:nil]; #else - [[NSFileManager defaultManager] removeItemAtPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"relaunch"] error:NULL]; + [[NSFileManager defaultManager] removeItemAtPath:path error:nil]; #endif + } exit(0); } diff --git a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib deleted file mode 100644 index 4b1ab30e5b5..00000000000 --- a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib +++ /dev/null @@ -1,50 +0,0 @@ - - - - - IBClasses - - - CLASS - SUWindowController - LANGUAGE - ObjC - SUPERCLASS - NSWindowController - - - ACTIONS - - doNotInstall - id - installLater - id - installNow - id - - CLASS - SUAutomaticUpdateAlert - LANGUAGE - ObjC - SUPERCLASS - SUWindowController - - - CLASS - FirstResponder - LANGUAGE - ObjC - SUPERCLASS - NSObject - - - CLASS - NSObject - LANGUAGE - ObjC - - - IBVersion - 1 - - diff --git a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib deleted file mode 100644 index 2b3d4257668..00000000000 --- a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib +++ /dev/null @@ -1,20 +0,0 @@ - - - - - IBFramework Version - 670 - IBLastKnownRelativeProjectPath - ../Sparkle.xcodeproj - IBOldestOS - 5 - IBOpenObjects - - 6 - - IBSystem Version - 9E17 - targetFramework - IBCocoaFramework - - diff --git a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib index 1d4655c593e..2b40ed6d74e 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib and b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.strings b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.strings index f6fb56d7370..e4178c7185f 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.strings and b/mozilla/camino/sparkle/ru.lproj/SUAutomaticUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/classes.nib b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/classes.nib deleted file mode 100644 index 994d4c368f2..00000000000 --- a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/classes.nib +++ /dev/null @@ -1,67 +0,0 @@ - - - - - IBClasses - - - CLASS - SUWindowController - LANGUAGE - ObjC - SUPERCLASS - NSWindowController - - - CLASS - NSApplication - LANGUAGE - ObjC - SUPERCLASS - NSResponder - - - ACTIONS - - installUpdate - id - remindMeLater - id - skipThisVersion - id - - CLASS - SUUpdateAlert - LANGUAGE - ObjC - OUTLETS - - delegate - id - description - NSTextField - releaseNotesView - WebView - - SUPERCLASS - SUWindowController - - - CLASS - FirstResponder - LANGUAGE - ObjC - SUPERCLASS - NSObject - - - CLASS - NSObject - LANGUAGE - ObjC - - - IBVersion - 1 - - diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/info.nib b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/info.nib deleted file mode 100644 index 2b3d4257668..00000000000 --- a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/info.nib +++ /dev/null @@ -1,20 +0,0 @@ - - - - - IBFramework Version - 670 - IBLastKnownRelativeProjectPath - ../Sparkle.xcodeproj - IBOldestOS - 5 - IBOpenObjects - - 6 - - IBSystem Version - 9E17 - targetFramework - IBCocoaFramework - - diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib index 103b1cf8478..52bed5e1341 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib and b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.strings b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.strings index 325eafcdb5f..dfa7f72a1d3 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.strings and b/mozilla/camino/sparkle/ru.lproj/SUUpdateAlert.strings differ diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/designable.nib b/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/designable.nib index a3e879844c7..978e014a186 100644 --- a/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/designable.nib +++ b/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/designable.nib @@ -2,35 +2,33 @@ 1050 - 10A432 + 10B504 732 - 1038 + 1038.2 437.00 com.apple.InterfaceBuilder.CocoaPlugin 732 - - - + com.apple.InterfaceBuilder.CocoaPlugin - - + + SUUpdatePermissionPrompt - + FirstResponder - + NSApplication - + 1 2 - {{83, 492}, {470, 168}} + {{83, 492}, {438, 168}} 1886912512 @@ -39,67 +37,70 @@ View - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} {213, 107} - - + + 256 - - + + 257 - {{255, 12}, {201, 32}} - + {{216, 12}, {208, 32}} + + 1 YES - + -2080244224 134217728 Проверять автоматически - + LucidaGrande 13 1044 - + 1 -2038284033 1 - + DQ 200 25 - - + + 257 - {{138, 12}, {117, 32}} - + {{88, 12}, {128, 32}} + + YES - + 67239424 134217728 Не проверять - - + + -2038284033 1 - + Gw 200 25 - - + + 264 {{104, 114}, {289, 34}} - + + YES - + 67239424 272629760 Проверять обновления автоматически? @@ -108,34 +109,35 @@ 13 2072 - - + + 6 System controlColor - + 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA - + 6 System controlTextColor - + 3 MAA - - + + 266 {{104, 81}, {315, 42}} - + + YES - + 67239424 272629760 DO NOT LOCALIZE @@ -144,23 +146,24 @@ 11 3100 - - - + + + - - + + 264 {{104, 53}, {278, 18}} - + + YES - + -2080244224 163840 - Отправлять информацию о системе + Включать анонимную информацию о системе - + 1211912703 2 @@ -176,8 +179,8 @@ 25 - - + + 264 Apple PDF pasteboard type @@ -188,9 +191,10 @@ NeXT TIFF v4.0 pasteboard type {{23, 84}, {64, 64}} - + + YES - + 130560 33554432 @@ -204,18 +208,19 @@ YES - - + + 265 {{80, 50}, {27, 26}} - + + YES - + 67239424 134250496 - - + + -1194573569 133 @@ -225,13 +230,15 @@ - {470, 168} + {438, 168} + + - {{0, 0}, {1440, 878}} + {{0, 0}, {1280, 778}} {213, 129} - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} - + visibleKey visibleValue @@ -245,23 +252,24 @@ YES YES - + 266 - - + + 274 - - + + 2304 - - + + 4352 - {353, 113} - + {353, 99} + + YES @@ -269,7 +277,7 @@ {{346, 0}, {12, 17}} - + 128 40 1000 @@ -278,39 +286,39 @@ 2048 - + 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA - + 6 System headerTextColor - + - + 69336577 131072 Text Cell - - + + 6 System textBackgroundColor - + 3 MQA - + 3 YES - + - + 219 40 1000 @@ -319,26 +327,26 @@ 2048 - - + + - + 69336577 131072 Text Cell - - - + + + 3 YES - + 3 2 - + 6 System @@ -359,71 +367,83 @@ 0 - {{1, 1}, {353, 113}} - - - + {{1, 1}, {353, 99}} + + + + 6 System controlBackgroundColor - + 4 - - + + -2147483392 {{-22, 1}, {11, 125}} - + + 256 - + _doScroller: 0.78125 - - + + -2147483392 {{-100, -100}, {345, 11}} - + + 257 - + _doScroller: 0.99047619104385376 - {{4, 5}, {355, 115}} - - + {{4, 5}, {355, 101}} + + + 530 - - - + + + AAAAAAAAAABBgAAAQYAAAA - - + + 266 - {{1, 128}, {358, 70}} - + {{1, 114}, {358, 84}} + + YES - + 67239424 272629760 - Информация о системе помогает нам планировать дальнейшее развитие программы. Следующая информация будет отправлена: + 0JDQvdC+0L3QuNC80L3QsNGPINC40L3RhNC+0YDQvNCw0YbQuNGPINC+INGB0LjRgdGC0LXQvNC1INC4 +0YHQv9C+0LvRjNC30YPQtdGC0YHRjywg0YfRgtC+0LHRiyDQv9C+0LzQvtGH0Ywg0L3QsNC8INC/0LvQ +sNC90LjRgNC+0LLQsNGC0Ywg0LTQsNC70YzQvdC10LnRiNC10LUg0YDQsNC30LLQuNGC0LjQtSDQv9GA +0L7Qs9GA0LDQvNC80YsuINCf0L7QttCw0LvRg9C50YHRgtCwLCDRgdCy0Y/QttC40YLQtdGB0Ywg0YEg +0L3QsNC80Lgg0LXRgdC70Lgg0YMg0JLQsNGBINC10YHRgtGMINC60LDQutC40LUt0LvQuNCx0L4g0LLQ +vtC/0YDQvtGB0Ysg0L/QviDRjdGC0L7QvNGDINC/0L7QstC+0LTRgy4KCtCh0LvQtdC00YPRjtGJ0LDR +jyDQuNC90YTQvtGA0LzQsNGG0LjRjyDQsdGD0LTQtdGCINC+0YLQv9GA0LDQstC70LXQvdCwOg - - - + + + {362, 205} + NSView NSResponder - + SUIncludeProfile SUSendProfileInfo @@ -436,11 +456,11 @@ contentArray: systemProfileInformationArray - - + + - - + + contentArray: systemProfileInformationArray contentArray systemProfileInformationArray @@ -452,27 +472,27 @@ window - - + + 126 moreInfoView - - + + 127 value: icon - - + + - - + + value: icon value icon @@ -484,35 +504,35 @@ toggleMoreInfo: - - + + 131 moreInfoButton - - + + 132 descriptionTextField - - + + 133 hidden: shouldAskAboutProfile - - + + - - + + hidden: shouldAskAboutProfile hidden shouldAskAboutProfile @@ -528,11 +548,11 @@ hidden: shouldAskAboutProfile - - + + - - + + hidden: shouldAskAboutProfile hidden shouldAskAboutProfile @@ -548,27 +568,27 @@ finishPrompt: - - + + 144 finishPrompt: - - + + 145 value: shouldSendProfile - - + + - - + + value: shouldSendProfile value shouldSendProfile @@ -584,11 +604,11 @@ value: promptDescription - - + + - - + + value: promptDescription value promptDescription @@ -600,11 +620,11 @@ value: arrangedObjects.displayValue - - + + - - + + value: arrangedObjects.displayValue value arrangedObjects.displayValue @@ -616,11 +636,11 @@ value: arrangedObjects.displayKey - - + + - - + + value: arrangedObjects.displayKey value arrangedObjects.displayKey @@ -635,230 +655,230 @@ 0 - + -2 - + File's Owner -1 - + First Responder -3 - + Application 5 - + - + Profile Info 6 - + - - - - - - - + + + + + + + - + 13 - + - + - + 14 - + - + - + 32 - + - + - + 33 - + - + - + 34 - + - + - + 37 - + - + - + 71 - + - + - + 24 - + Array Controller 39 - + - - + + MoreInfoView 40 - + - - - + + + - + 41 - + - - + + - + 42 - + - + - + 43 - - + + 44 - + - + - + 45 - - + + 46 - + - + - + 49 - + User Defaults Controller - 163 - - + 176 + + - 164 - - + 177 + + - 165 - - + 178 + + - 166 - - + 179 + + - 167 - - + 180 + + - 168 - - + 181 + + - 169 - - + 182 + + - 170 - - + 183 + + - 171 - - + 184 + + - 172 - - + 185 + + @@ -869,8 +889,18 @@ com.apple.InterfaceBuilder.CocoaPlugin - - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -881,7 +911,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{399, 203}, {362, 205}} + {{934, 245}, {362, 205}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -900,7 +930,9 @@ com.apple.InterfaceBuilder.CocoaPlugin + {{853, 636}, {438, 168}} com.apple.InterfaceBuilder.CocoaPlugin + {{853, 636}, {438, 168}} {213, 107} @@ -913,66 +945,18 @@ - 174 + 185 FirstResponder + NSObject IBUserSource - - NSObject - - IBProjectSource - SUAppcast.h - - - - NSObject - - IBProjectSource - SUAutomaticUpdateAlert.h - - - - NSObject - - IBProjectSource - SUInstaller.h - - - - NSObject - - IBProjectSource - SUUnarchiver.h - - - - NSObject - - IBProjectSource - SUUpdateAlert.h - - - - NSObject - - IBProjectSource - SUUpdatePermissionPrompt.h - - - - NSObject - - IBProjectSource - SUUpdater.h - - NSObject @@ -993,24 +977,11 @@ NSButton NSView - - - - SUUpdatePermissionPrompt - SUWindowController IBUserSource - - SUWindowController - NSWindowController - - IBProjectSource - SUWindowController.h - - SUWindowController NSWindowController @@ -1020,599 +991,12 @@ - - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSArrayController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSArrayController.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSController - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSController.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSImageCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSImageCell.h - - - - NSImageView - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSImageView.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebDownload.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebEditingDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebFrameLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebJavaPlugIn.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPlugin.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPluginContainer.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPolicyDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebResourceLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebScriptObject.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebUIDelegate.h - - - - NSObjectController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSObjectController.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSScrollView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSScrollView.h - - - - NSScroller - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSScroller.h - - - - NSTableColumn - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableColumn.h - - - - NSTableView - NSControl - - - - NSTextField - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSTextField.h - - - - NSTextFieldCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSTextFieldCell.h - - - - NSUserDefaultsController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSUserDefaultsController.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - NSWindowController - NSResponder - - showWindow: - id - - - IBFrameworkSource - AppKit.framework/Headers/NSWindowController.h - - - 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - YES ../Sparkle.xcodeproj 3 diff --git a/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib b/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib index 5bff1961ae5..1f62b55875e 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib and b/mozilla/camino/sparkle/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib differ diff --git a/mozilla/camino/sparkle/ru.lproj/Sparkle.strings b/mozilla/camino/sparkle/ru.lproj/Sparkle.strings index d9300a4c459..2a76d394c61 100644 Binary files a/mozilla/camino/sparkle/ru.lproj/Sparkle.strings and b/mozilla/camino/sparkle/ru.lproj/Sparkle.strings differ