Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Commented preprocessor switches. Added a named switch for normalizing…

… an app name (it was just a #if 1 before).
  • Loading branch information...
commit 5a5b171a685f3dc5a350e4a6845fdf501b43a15a 1 parent 343d686
@uliwitness uliwitness authored
Showing with 14 additions and 1 deletion.
  1. +13 −0 SUConstants.h
  2. +1 −1  SUHost.m
View
13 SUConstants.h
@@ -10,9 +10,22 @@
#ifndef SUCONSTANTS_H
#define SUCONSTANTS_H
+// -----------------------------------------------------------------------------
+// Preprocessor flags:
+// -----------------------------------------------------------------------------
+
+// Turn off DSA signature check (practically invites man-in-the-middle attacks):
#define ENDANGER_USERS_WITH_INSECURE_UPDATES 1
+
+// Sparkle usually doesn't allow downgrades as they're usually accidental, but
+// if your app has a downgrade function or URL handler, turn this on:
#define PERMIT_AUTOMATED_DOWNGRADES 1
+// If your app file on disk is named "MyApp 1.1b4", Sparkle usually updates it
+// in place, giving you an app named 1.1b4 that is actually 1.2. Turn the
+// following on to always reset the name back to "MyApp":
+#define NORMALIZE_INSTALLED_APP_NAME 1
+
// -----------------------------------------------------------------------------
// Notifications:
// -----------------------------------------------------------------------------
View
2  SUHost.m
@@ -48,7 +48,7 @@ - (NSString *)bundlePath
- (NSString *)installationPath
{
-#if 1
+#if NORMALIZE_INSTALLED_APP_NAME
return [[[bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent: [NSString stringWithFormat: @"%@.%@", [bundle objectForInfoDictionaryKey:@"CFBundleName"], [[bundle bundlePath] pathExtension]]];
#else
return [bundle bundlePath];
Please sign in to comment.
Something went wrong with that request. Please try again.