InnoSetupを使用して、作成したアプリケーションをインストールしています。私のクライアントは、このInnoSetupアドオンを使用して、インストール時に最新のDLLをダウンロードするように要求しています。
http://www.sherlocksoftware.org/page.php?id=50
十分に単純です。思い通りに動作しましたが、[ファイル]セクションがないと(スクリプトに組み込むのではなくダウンロードするため)、ダウンロードしたDLLをGACに登録する方法がわかりません。[ファイル]セクションで、フラグgacinstallを使用していました。
[ファイル]を使用しなくなったので、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
ご協力いただきありがとうございます。