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

@@ -2243,6 +2243,7 @@
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"$(NO_SPARKLE)",
"DEBUG=1", "DEBUG=1",
"$(inherited)", "$(inherited)",
); );
@@ -2285,6 +2286,7 @@
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES; GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "$(NO_SPARKLE)";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;

View File

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

View File

@@ -35,7 +35,7 @@
- (void)awakeFromNib { - (void)awakeFromNib {
/* only enable bindings to settings in release mode */ /* only enable bindings to settings in release mode */
#if defined(DEBUG) || defined(NOSPARKLE) #if defined(DEBUG) || defined(NO_SPARKLE)
self.checkIntervallPopupButton.enabled = NO; self.checkIntervallPopupButton.enabled = NO;
self.automaticallyCheckForUpdatesCheckButton.enabled = NO; self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
#else #else