我正在使用 InnoSetup 安装我构建的应用程序。我的客户要求它在使用此 InnoSetup 插件安装时下载最新的 DLL:
http://www.sherlocksoftware.org/page.php?id=50
很简单。我让它按我想要的方式工作,但是没有[Files]部分(因为它下载它们而不是将它们构建到脚本中),我不确定如何将下载的 DLL 注册到 GAC。在[Files]部分中,我使用了标志gacinstall。
现在我不再使用[Files],我想知道是否有办法通过 Pascal 脚本将 DLL 安装到 GAC?
这是我的设置脚本的相关部分:
[Code]
procedure InitializeWizard();
begin
itd_init;
itd_addfile('{#DownloadLocation}/mylibrary1.dll',expandconstant('{tmp}\mylibrary1.dll'));
itd_addfile('{#DownloadLocation}/mylibrary2.dll',expandconstant('{tmp}\mylibrary1.dll'));
itd_downloadafter(wpReady);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssInstall then begin //Lets install those files that were downloaded for us
filecopy(expandconstant('{tmp}\mylibrary1.dll'),expandconstant('{app}\mylibrary1.dll'),false);
filecopy(expandconstant('{tmp}\mylibrary2.dll'),expandconstant('{app}\mylibrary2.dll'),false);
end;
end;
[Run]
Filename: "{app}\{#MyAppExeName}"; Parameters: "-i"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: runhidden
Filename: "{app}\{#MyAppSvcName}"; Parameters: "-i"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Description: "Launch the ItraceIT configuration tool"; Flags: postinstall nowait skipifsilent
[UninstallRun]
Filename: "{app}\{#MyAppSvcName}"; Parameters: "-u"; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Parameters: "-u"; Flags: runhidden
谢谢你的帮助。