Added NO_SPARKLE environment ot preprocessor for customization

This commit is contained in:
michael starke
2017-06-13 11:30:22 +02:00
parent 4ac7cf1a91
commit 4e4b0f06f6
3 changed files with 6 additions and 4 deletions

View File

@@ -157,7 +157,7 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
}
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
#if defined(NOSPARKLE)
#if defined(NO_SPARKLE)
NSLog(@"Sparkle explicitly disabled!!!");
#endif
/* Daemon instanziieren */
@@ -165,7 +165,7 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
[MPAutotypeDaemon defaultDaemon];
/* Create Plugin Manager */
[MPPluginHost sharedHost];
#if !defined(DEBUG) && !defined(NOSPARKLE)
#if !defined(DEBUG) && !defined(NO_SPARKLE)
/* Disable updates if in debug or nosparkle */
[SUUpdater sharedUpdater];
#endif
@@ -234,7 +234,7 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
}
- (void)checkForUpdates:(id)sender {
#if defined(DEBUG) || defined(NOSPARKLE)
#if defined(DEBUG) || defined(NO_SPARKLE)
NSAlert *alert = [[NSAlert alloc] init];
alert.messageText = @"Updates are disabled!";
alert.informativeText = [NSString stringWithFormat:@"Sparkle updates are disabled for this build of %@!", NSApp.applicationName];