在某些系统(主要是 Windows 7)上,我们在Download failed: An error occurred in the secure channel support
使用 Inno Download Plugin 下载文件时遇到错误。我们尝试添加idpSetOption('AllowContinue', '1');
从其中一个答案中找到的内容,但这并没有解决问题。我们正在下载的文件不是超级关键,因此如果下载失败,我们可以忽略错误并继续安装。
最小的、可重现的例子
#include "D:\idp.iss"
[Setup]
PrivilegesRequired=admin
AppName=My Project
AppVersion=2.0
DefaultDirName={pf}\My Project
DefaultGroupName=My Project
UninstallDisplayIcon={app}\My Project.exe
Compression=lzma2
SolidCompression=yes
OutputDir=D:\setup
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
OutputBaseFilename=Setup
[Files]
Source: "My Project.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{tmp}\online.exe"; DestDir: "{commondesktop}"; Flags: external; ExternalSize: 1736547
Source: "{tmp}\offline.exe"; DestDir: "{commondesktop}"; Flags: external; ExternalSize: 166148
[Icons]
Name: "{group}\My Project"; Filename: "{app}\My Project.exe"; WorkingDir: "{app}"; Comment: "Launch My Project"
[Run]
Filename: "{app}\My Project.EXE"; Description: "My Project"; Flags: postinstall
[Code]
procedure InitializeWizard();
begin
idpSetOption('AllowContinue', '1');
idpAddFileSize('https://download.mysite.com/download/online.exe', ExpandConstant('{tmp}\online.exe'), 1736547);
idpAddFileSize('https://download.mysite.com/download/offline.exe', ExpandConstant('{tmp}\offline.exe'), 166148);
idpDownloadAfter(wpReady);
end;