From d44ef6bb753c588b6a9062f86521e1b71dbd193b Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 29 May 2016 16:39:46 -0400 Subject: [PATCH] Installer progress: change the dock icon to the bundle being updated This way we don't have to include an icon for the installer progress app. There is a minor issue where the dock icon changes back before termination. However, this app should show up in rare cases in the first place, so I still think this is a good trade off. For most applications, it makes more sense to use the app's icon than Sparkle's. That and we can save some disk space usage. --- Configurations/ConfigInstallerProgress.xcconfig | 1 - Sparkle/InstallerProgress/InstallerProgressAppController.m | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Configurations/ConfigInstallerProgress.xcconfig b/Configurations/ConfigInstallerProgress.xcconfig index 967c9f9e..2b0e0005 100644 --- a/Configurations/ConfigInstallerProgress.xcconfig +++ b/Configurations/ConfigInstallerProgress.xcconfig @@ -2,6 +2,5 @@ INFOPLIST_FILE = Sparkle/InstallerProgress/InstallerProgress-Info.plist PRODUCT_NAME = $(SPARKLE_INSTALLER_PROGRESS_TOOL_NAME) -ASSETCATALOG_COMPILER_APPICON_NAME = $(SPARKLE_ICON_NAME) SKIP_INSTALL = YES CLANG_ENABLE_MODULES = NO diff --git a/Sparkle/InstallerProgress/InstallerProgressAppController.m b/Sparkle/InstallerProgress/InstallerProgressAppController.m index e9f9ce2d..d7c72f38 100644 --- a/Sparkle/InstallerProgress/InstallerProgressAppController.m +++ b/Sparkle/InstallerProgress/InstallerProgressAppController.m @@ -11,6 +11,7 @@ #import "SURemoteMessagePort.h" #import "SUMessageTypes.h" #import "SULog.h" +#import "SUApplicationInfo.h" /*! * Terminate the application after a delay from launching the new update to avoid OS activation issues @@ -56,6 +57,8 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3; exit(EXIT_FAILURE); } + application.applicationIconImage = [SUApplicationInfo bestIconForBundle:bundle]; + application.delegate = self; _application = application;