我使用InnoSetup來安裝我建立的應用程序。我的客戶端請求,它下載最新的DLL。一旦使用該插件InnoSetup安裝:我可以使用Pascal腳本(InnoSetup)向GAC註冊嗎?
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
感謝您的幫助。
更新爲我意識到可以使用'[Files]'部分。 – 2011-06-06 03:13:20