From 9feb64700ca919fde0c6d13fce51c6d724010f77 Mon Sep 17 00:00:00 2001 From: Dominik Chrastecky Date: Fri, 11 Oct 2024 20:18:44 +0200 Subject: [PATCH] Add fallback, fix SHA --- setup.iss | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/setup.iss b/setup.iss index 54ba91b..b79b00f 100644 --- a/setup.iss +++ b/setup.iss @@ -16,7 +16,8 @@ #define MyAppURL "https://github.com/RikudouSage/GogDownloader" #define MyAppExeName "GogDownloader.exe" #define PhpLink "https://windows.php.net/downloads/releases/php-8.3.12-nts-Win32-vs16-x64.zip" -#define PhpSha "2e302fd376a67cfb43dfd6c8fec1ccd503604cee2717fddc4098fedfb778ddb9" +#define PhpLinkFallback "https://files.catbox.moe/mzsohg.zip" +#define PhpSha "4214c13f1c66a7b98f088d8d26b18e35117228b853ba4394479d2d3df693c3b3" #define VcRedistLink "https://aka.ms/vs/17/release/vc_redist.x64.exe" [Setup] @@ -247,7 +248,17 @@ begin except DownloadSuccess := False; end; - + + if not DownloadSuccess then + begin + try + DownloadTemporaryFile('{#PhpLinkFallback}', 'php.zip', '{#PhpSha}', nil); + DownloadSuccess := True; + except + DownloadSuccess := False; + end; + end; + if not DownloadSuccess then begin MsgBox(ExpandConstant('{cm:DownloadPhpFailed}'), mbError, MB_OK);