mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 20:59:27 +00:00
added nosparkle define to explicitly disable sparkle updates
This commit is contained in:
@@ -157,13 +157,16 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
#if defined(NOSPARKLE)
|
||||
NSLog(@"Sparkle explicitly disabled!!!");
|
||||
#endif
|
||||
/* Daemon instanziieren */
|
||||
[MPLockDaemon defaultDaemon];
|
||||
[MPAutotypeDaemon defaultDaemon];
|
||||
/* Create Plugin Manager */
|
||||
[MPPluginHost sharedHost];
|
||||
#ifndef DEBUG
|
||||
/* Only enable updater in Release */
|
||||
#if !defined(DEBUG) && !defined(NOSPARKLE)
|
||||
/* Disable updates if in debug or nosparkle */
|
||||
[SUUpdater sharedUpdater];
|
||||
#endif
|
||||
}
|
||||
@@ -231,10 +234,10 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
||||
}
|
||||
|
||||
- (void)checkForUpdates:(id)sender {
|
||||
#ifdef DEBUG
|
||||
#if defined(DEBUG) || defined(NOSPARKLE)
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.messageText = @"Updates are disabled!";
|
||||
alert.informativeText = [NSString stringWithFormat:@"Sparkle updates are only available in offical releases of %@!", NSApp.applicationName];
|
||||
alert.informativeText = [NSString stringWithFormat:@"Sparkle updates are disabled for this build of %@!", NSApp.applicationName];
|
||||
[alert addButtonWithTitle:@"Ok"];
|
||||
[alert runModal];
|
||||
#else
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
- (void)awakeFromNib {
|
||||
/* only enable bindings to settings in release mode */
|
||||
#ifdef DEBUG
|
||||
#if defined(DEBUG) || defined(NOSPARKLE)
|
||||
self.checkIntervallPopupButton.enabled = NO;
|
||||
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user