From a09aa0b33f424eb50060a304bf5799c8f99a9940 Mon Sep 17 00:00:00 2001 From: Zorg Date: Tue, 28 Jun 2016 22:55:16 -0400 Subject: [PATCH] Package installs should be guided by default. Opt out for non-guided. --- Sparkle/SUInstaller.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index afa9d667..2b9b6fac 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -42,7 +42,7 @@ *bundleFileName = [[host bundlePath] lastPathComponent], *alternateBundleFileName = [[host name] stringByAppendingPathExtension:[[host bundlePath] pathExtension]]; BOOL isPackage = NO; - BOOL isGuided = NO; + BOOL isGuided = YES; NSString *fallbackPackagePath = nil; NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inUpdateFolder]; NSString *bundleFileNameNoExtension = [bundleFileName stringByDeletingPathExtension]; @@ -92,9 +92,12 @@ } if (isPackage) { - // foo.app -> foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg - if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_guided"]) { - isGuided = YES; + // Guided installs used to be opt-in (i.e, Sparkle would detect foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg), + // but to get an unguided install, the developer now must opt-out of guided installations. + + // foo.app -> foo.sparkle_unguided.pkg or foo.sparkle_unguided.mpkg + if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_unguided"]) { + isGuided = NO; } }