From 5b374708c50040cda2e9fb8b19abb47dbb04e1a7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 19 Jul 2021 12:01:38 +0300 Subject: [PATCH] debug: Add debug labels --- CleanFlashCommon/UpdateChecker.cs | 4 ++-- CleanFlashInstaller/Installer.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CleanFlashCommon/UpdateChecker.cs b/CleanFlashCommon/UpdateChecker.cs index 1a7e7aa..bd61ce1 100644 --- a/CleanFlashCommon/UpdateChecker.cs +++ b/CleanFlashCommon/UpdateChecker.cs @@ -32,13 +32,13 @@ namespace CleanFlashCommon { } public class UpdateChecker { + private static readonly bool DEBUG = true; private static readonly string FLASH_VERSION = "34.0.0.175"; private static readonly string VERSION = "v34.0.0.175"; - private static readonly string FLASH_PLAYER_EXECUTABLE = "flashplayer_sa.exe"; + private static readonly string FLASH_PLAYER_EXECUTABLE = DEBUG ? "flashplayer_sa_debug.exe" : "flashplayer_sa.exe"; private static readonly string AUTHOR = "cleanflash"; private static readonly string REPO = "installer"; private static readonly string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"; - private static readonly bool DEBUG = false; public static string GetAPILink() { return "https://api.github.com/repos/" + AUTHOR + "/" + REPO + "/releases/latest"; diff --git a/CleanFlashInstaller/Installer.cs b/CleanFlashInstaller/Installer.cs index eec1627..ce2ce0b 100644 --- a/CleanFlashInstaller/Installer.cs +++ b/CleanFlashInstaller/Installer.cs @@ -84,11 +84,16 @@ namespace CleanFlashInstaller { if (flags.IsSet(InstallFlags.PLAYER)) { form.UpdateProgressLabel("Installing 32-bit Standalone Flash Player...", true); ExtractArchive("flash_player_32.zip", flashProgram32Path); - + string name = "Flash Player"; string description = "Standalone Flash Player " + UpdateChecker.GetFlashVersion(); string executable = Path.Combine(flashProgram32Path, UpdateChecker.GetFlashPlayerExecutable()); + if (UpdateChecker.IsDebug()) { + name += " (Debug)"; + description += " (Debug)"; + } + if (flags.IsSet(InstallFlags.PLAYER_START_MENU)) { CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), executable, name, description); }