mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
* origin/quiet-automatic-update: Allow manual checks when an install on quit update is pending Allow the delegate to trigger a silent install and relaunch Support silent relaunches Increment the sudden termination counter if installing on quit Set up install on quit for critical automatic updates too Updating Sparkle.strings for the new, more strongly worded strings that are displayed for a 'critical update' Prompts the user to update after a week (rather than a day) if he doesn't quit the app. Adding <sparkle:tags> appcast item element, <sparkle:criticalUpdate /> tag Fixed a no-autorelease-pool leak. We have this check box that says "Automatically download and install updates in the future." But we only download them automatically. We still ask permission again before installing them. Conflicts: SUBasicUpdateDriver.m en.lproj/Sparkle.strings finish_installation.m
59 lines
1.1 KiB
Objective-C
59 lines
1.1 KiB
Objective-C
//
|
|
// SUUpdateDriver.m
|
|
// Sparkle
|
|
//
|
|
// Created by Andy Matuschak on 5/7/08.
|
|
// Copyright 2008 Andy Matuschak. All rights reserved.
|
|
//
|
|
|
|
#import "SUUpdateDriver.h"
|
|
#import "SUHost.h"
|
|
|
|
NSString * const SUUpdateDriverFinishedNotification = @"SUUpdateDriverFinished";
|
|
|
|
@implementation SUUpdateDriver
|
|
- initWithUpdater:(SUUpdater *)anUpdater
|
|
{
|
|
if ((self = [super init]))
|
|
updater = anUpdater;
|
|
return self;
|
|
}
|
|
|
|
- (NSString *)description { return [NSString stringWithFormat:@"%@ <%@, %@>", [self class], [host bundlePath], [host installationPath]]; }
|
|
|
|
- (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)h
|
|
{
|
|
appcastURL = [URL copy];
|
|
host = [h retain];
|
|
}
|
|
|
|
- (void)abortUpdate
|
|
{
|
|
[self setValue:[NSNumber numberWithBool:YES] forKey:@"finished"];
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdateDriverFinishedNotification object:self];
|
|
}
|
|
|
|
- (BOOL)isInterruptible { return isInterruptible; }
|
|
|
|
- (BOOL)finished { return finished; }
|
|
|
|
- (void)dealloc
|
|
{
|
|
[host release];
|
|
[appcastURL release];
|
|
[super dealloc];
|
|
}
|
|
|
|
- (SUHost*)host
|
|
{
|
|
return host;
|
|
}
|
|
|
|
- (void)setHost:(SUHost*)newHost
|
|
{
|
|
[host release];
|
|
host = [newHost retain];
|
|
}
|
|
|
|
@end
|