remove urlmon.dll downloader fallback

This commit is contained in:
2026-06-11 15:47:23 -06:00
parent e161c88c73
commit ec99a17fd6

View File

@@ -205,58 +205,6 @@ Type: filesandordirs; Name: "{userappdata}\ZoiteChat\gtk3-themes\Windows-10-3.2.
Type: filesandordirs; Name: "{userappdata}\ZoiteChat\gtk3-themes\Windows-10-Dark-3.2.1-dark"; Components: themes\windows10dark
[Code]
#ifndef USE_INNO_DOWNLOAD_PLUGIN
var
FallbackDownloadUrls: array of String;
FallbackDownloadFiles: array of String;
function URLDownloadToFile(Caller: Integer; URL: String; FileName: String; Reserved: Integer; StatusCB: Integer): Integer;
external 'URLDownloadToFileW@urlmon.dll stdcall delayload';
// The Inno Download Plugin isn't always installed in CI environments.
// Provide no-op fallback procedures so installer compilation still succeeds.
procedure idpDownloadAfter(PageID: Integer);
begin
end;
procedure idpClearFiles;
begin
SetArrayLength(FallbackDownloadUrls, 0);
SetArrayLength(FallbackDownloadFiles, 0);
end;
procedure idpAddFile(URL: String; Filename: String);
var
I: Integer;
begin
I := GetArrayLength(FallbackDownloadUrls);
SetArrayLength(FallbackDownloadUrls, I + 1);
SetArrayLength(FallbackDownloadFiles, I + 1);
FallbackDownloadUrls[I] := URL;
FallbackDownloadFiles[I] := Filename;
end;
function idpDownloadQueuedFiles(): Boolean;
var
I: Integer;
ResultCode: Integer;
begin
Result := True;
for I := 0 to GetArrayLength(FallbackDownloadUrls) - 1 do
begin
if not FileExists(FallbackDownloadFiles[I]) then
begin
ResultCode := URLDownloadToFile(0, FallbackDownloadUrls[I], FallbackDownloadFiles[I], 0, 0);
if ResultCode <> 0 then
begin
MsgBox('Unable to download required installer dependency:' + #13#10 + FallbackDownloadUrls[I], mbError, MB_OK);
Result := False;
Exit;
end;
end;
end;
end;
#endif
/////////////////////////////////////////////////////////////////////
procedure InitializeWizard;