- 追加された行はこの色です。
- 削除された行はこの色です。
&tag(InnoSetup/dotnetframework);
*目次 [#rae62553]
#contents
*関連ページ [#v700e139]
-[[InnoSetup]]
*参考情報 [#i08dd412]
-[[Modular InnoSetup Dependency Installer - CodeProject:http://www.codeproject.com/Articles/20868/NET-Framework-Installer-for-InnoSetup]]
*概要 [#u056389c]
-Modular InnoSetup Dependency Installerを使うのがいいらしい。
*Modular InnoSetup Dependency Installerの使用方法 [#x942f34e]
**とりあえずの手順 [#had9e74f]
-[[Modular InnoSetup Dependency Installer - CodeProject:http://www.codeproject.com/Articles/20868/NET-Framework-Installer-for-InnoSetup]]からダウンロード。
-setup.issをコンパイルすればとりあえずデモインストーラーが作成できる。
-ただしそのままのsetup.issには不用なコードがたくさん含まれているので必要な部分だけ抜き出したほうがよいかもしれない。
**自分のissに組み込む方法 [#v7f021ed]
-[[Downloading and Installing .NET 4.0 with Inno Setup:http://www.stintercorp.com/articles/developer/innosetup_dotnetinstaller.aspx]]にある手順が参考になる。
#pre{{
// dotnet_Passive enabled shows the .NET/VC2010 installation progress
#define dotnet_Passive
#define use_dotnetfx40
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
[Run]
#include "scripts\products.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\fileversion.iss"
#ifdef use_dotnetfx40
#include "scripts\products\dotnetfx40client.iss"
#include "scripts\products\dotnetfx40full.iss"
#endif
[CustomMessages]
win2000sp3_title=Windows 2000 Service Pack 3
winxpsp2_title=Windows XP Service Pack 2
winxpsp3_title=Windows XP Service Pack 3
[Code]
function InitializeSetup(): Boolean;
begin
//init windows version
initwinversion();
if not minwinspversion(5, 1, 3) then begin
MsgBox(FmtMessage(CustomMessage('depinstall_missing'),
[CustomMessage('winxpsp3_title')]), mbError, MB_OK);
exit;
end;
// If no .NET 4.0 framework found, download and install
#ifdef use_dotnetfx40
if not dotnetfx40client(true) then
if not dotnetfx40full(true) then
dotnetfx40client(false);
#endif
Result := true;
end;
}}