mirror of
https://gitlab.com/cleanflash/installer.git
synced 2026-08-12 18:31:37 +08:00
version: Update to 34.0.0.175, upgrade ILMerge and install Flash Player to Program Files (x86)
This commit is contained in:
@@ -7,6 +7,8 @@ namespace CleanFlashCommon {
|
||||
|
||||
private static string system32Path = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86);
|
||||
private static string system64Path = Environment.GetFolderPath(Environment.SpecialFolder.System);
|
||||
private static string program32Path = Environment.GetEnvironmentVariable("PROGRAMFILES(X86)") ?? Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
private static string flashProgram32Path = Path.Combine(program32Path, "Flash Player");
|
||||
private static string macromed32Path = Path.Combine(system32Path, "Macromed");
|
||||
private static string macromed64Path = Path.Combine(system64Path, "Macromed");
|
||||
private static string flash32Path = Path.Combine(macromed32Path, "Flash");
|
||||
@@ -17,6 +19,8 @@ namespace CleanFlashCommon {
|
||||
private static Dictionary<string, string> replacementStrings = new Dictionary<string, string>() {
|
||||
{ "${SYSTEM_32_PATH}", system32Path.Replace(@"\", @"\\") },
|
||||
{ "${SYSTEM_64_PATH}", system64Path.Replace(@"\", @"\\") },
|
||||
{ "${PROGRAM_32_PATH}", program32Path.Replace(@"\", @"\\") },
|
||||
{ "${PROGRAM_FLASH_32_PATH}", flashProgram32Path.Replace(@"\", @"\\") },
|
||||
{ "${FLASH_32_PATH}", flash32Path.Replace(@"\", @"\\") },
|
||||
{ "${FLASH_64_PATH}", flash64Path.Replace(@"\", @"\\") },
|
||||
{ "${VERSION}", version },
|
||||
@@ -32,6 +36,17 @@ namespace CleanFlashCommon {
|
||||
public static string GetSystem64Path() {
|
||||
return system64Path;
|
||||
}
|
||||
|
||||
public static string GetProgram32Path()
|
||||
{
|
||||
return program32Path;
|
||||
}
|
||||
|
||||
public static string GetProgramFlash32Path()
|
||||
{
|
||||
return flashProgram32Path;
|
||||
}
|
||||
|
||||
public static string[] GetSystemPaths() {
|
||||
if (Environment.Is64BitOperatingSystem) {
|
||||
return new string[] { system32Path, system64Path };
|
||||
|
||||
@@ -90,6 +90,9 @@ namespace CleanFlashCommon {
|
||||
FileUtil.DeleteFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory), "Flash Center.lnk"));
|
||||
FileUtil.DeleteFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Flash Player.lnk"));
|
||||
|
||||
// Remove Flash Player from Program Files
|
||||
FileUtil.WipeFolder(SystemInfo.GetProgramFlash32Path());
|
||||
|
||||
// Remove spyware dropped by Flash Center in the temporary folder
|
||||
string tempFolder = Path.GetTempPath();
|
||||
|
||||
|
||||
@@ -32,12 +32,13 @@ namespace CleanFlashCommon {
|
||||
}
|
||||
|
||||
public class UpdateChecker {
|
||||
private static readonly string FLASH_VERSION = "34.0.0.164";
|
||||
private static readonly string VERSION = "v34.0.0.164";
|
||||
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 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/90.0.4430.85 Safari/537.36";
|
||||
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";
|
||||
@@ -55,6 +56,11 @@ namespace CleanFlashCommon {
|
||||
return FLASH_PLAYER_EXECUTABLE;
|
||||
}
|
||||
|
||||
public static bool IsDebug()
|
||||
{
|
||||
return DEBUG;
|
||||
}
|
||||
|
||||
private static Version GetLatestVersionUnsafe() {
|
||||
using (WebClient client = new WebClient()) {
|
||||
client.Headers.Add("user-agent", USER_AGENT);
|
||||
|
||||
Reference in New Issue
Block a user