diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2d82bfc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/*.exe diff --git a/bin/MyProgramDependencies/readme.txt b/bin/MyProgramDependencies/readme.txt index f1c573d..4f074ee 100644 --- a/bin/MyProgramDependencies/readme.txt +++ b/bin/MyProgramDependencies/readme.txt @@ -11,12 +11,13 @@ dependencies: | dotnetfx20sp1[*1]_[*2].exe | dotnetfx20sp2[*1].exe | dotnetfx20sp2[*1]_[*2].exe -| dotnetfx35[*1].exe -| dotnetfx35[*1]_[*2].exe -| dotnetfx35sp1[*1].exe -| dotnetfx35sp1[*1]_[*2].exe +| dotnetfx35.exe +| dotnetfx35_[*2].exe +| dotnetfx35sp1.exe +| dotnetfx35sp1_[*2].exe | dotNetFx40_Client_setup.exe | dotNetFx40_Full_setup.exe +| dotnetfx45.exe | msi20.exe | msi31.exe | msi45_[*3] diff --git a/scripts/products/dotnetfx35.iss b/scripts/products/dotnetfx35.iss index ed757b2..435c10d 100644 --- a/scripts/products/dotnetfx35.iss +++ b/scripts/products/dotnetfx35.iss @@ -16,7 +16,7 @@ const procedure dotnetfx35(); begin if (netfxinstalled(NetFx35, '') = false) then - AddProduct('dotnetfx35' + GetArchitectureString() + '.exe', + AddProduct('dotnetfx35.exe', '/lang:enu /passive /norestart', CustomMessage('dotnetfx35_title'), CustomMessage('dotnetfx35_size'), diff --git a/scripts/products/dotnetfx35lp.iss b/scripts/products/dotnetfx35lp.iss index 38a036c..101020f 100644 --- a/scripts/products/dotnetfx35lp.iss +++ b/scripts/products/dotnetfx35lp.iss @@ -14,7 +14,7 @@ procedure dotnetfx35lp(); begin if (ActiveLanguage() <> 'en') then begin if (not netfxinstalled(NetFx35, CustomMessage('dotnetfx35lp_lcid'))) then - AddProduct('dotnetfx35' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe', + AddProduct('dotnetfx35_' + ActiveLanguage() + '.exe', '/lang:enu /passive /norestart', CustomMessage('dotnetfx35lp_title'), CustomMessage('dotnetfx35lp_size'), diff --git a/scripts/products/dotnetfx35sp1.iss b/scripts/products/dotnetfx35sp1.iss index 3574d51..042d26f 100644 --- a/scripts/products/dotnetfx35sp1.iss +++ b/scripts/products/dotnetfx35sp1.iss @@ -17,7 +17,7 @@ const procedure dotnetfx35sp1(); begin if (netfxspversion(NetFx35, '') < 1) then - AddProduct('dotnetfx35sp1' + GetArchitectureString() + '.exe', + AddProduct('dotnetfx35sp1.exe', '/lang:enu /passive /norestart', CustomMessage('dotnetfx35sp1_title'), CustomMessage('dotnetfx35sp1_size'), diff --git a/scripts/products/dotnetfx35sp1lp.iss b/scripts/products/dotnetfx35sp1lp.iss index 518cd22..9081343 100644 --- a/scripts/products/dotnetfx35sp1lp.iss +++ b/scripts/products/dotnetfx35sp1lp.iss @@ -14,7 +14,7 @@ procedure dotnetfx35sp1lp(); begin if (ActiveLanguage() <> 'en') then begin if (netfxspversion(NetFx35, CustomMessage('dotnetfx35sp1lp_lcid')) < 1) then - AddProduct('dotnetfx35sp1' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe', + AddProduct('dotnetfx35sp1_' + ActiveLanguage() + '.exe', '/lang:enu /passive /norestart', CustomMessage('dotnetfx35sp1lp_title'), CustomMessage('dotnetfx35sp1lp_size'), diff --git a/scripts/products/dotnetfx45.iss b/scripts/products/dotnetfx45.iss new file mode 100644 index 0000000..fdb5423 --- /dev/null +++ b/scripts/products/dotnetfx45.iss @@ -0,0 +1,28 @@ +// requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2012 R2, Windows Vista Service Pack 2 +// WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below +// http://www.microsoft.com/en-us/download/details.aspx?id=42642 + +[CustomMessages] +dotnetfx45_title=.NET Framework 4.5.2 + +dotnetfx45_size=1 MB - 68 MB + +;http://www.microsoft.com/globaldev/reference/lcid-all.mspx +en.dotnetfx45_lcid='' +de.dotnetfx45_lcid='/lcid 1031 ' + + +[Code] +const + dotnetfx45_url = 'http://download.microsoft.com/download/B/4/1/B4119C11-0423-477B-80EE-7A474314B347/NDP452-KB2901954-Web.exe'; + +procedure dotnetfx45(MinVersion: integer); +begin + if (not netfxinstalled(NetFx45, '') or (netfxspversion(NetFx45, '') < MinVersion)) then + AddProduct('dotnetfx45.exe', + CustomMessage('dotnetfx45_lcid') + '/q /passive /norestart', + CustomMessage('dotnetfx45_title'), + CustomMessage('dotnetfx45_size'), + dotnetfx45_url, + false, false); +end; \ No newline at end of file diff --git a/scripts/products/dotnetfxversion.iss b/scripts/products/dotnetfxversion.iss index 25c3433..349e2b1 100644 --- a/scripts/products/dotnetfxversion.iss +++ b/scripts/products/dotnetfxversion.iss @@ -1,6 +1,6 @@ [Code] type - NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full); + NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full, NetFx45); const netfx11plus_reg = 'Software\Microsoft\NET Framework Setup\NDP\'; @@ -30,6 +30,13 @@ begin RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Install', regVersion); NetFx40Full: RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Install', regVersion); + NetFx45: + begin + RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion); + // >= 4.5.0 and <= 4.5.2 + Result := (regVersion >= 378389) and (regVersion <= 379893); + Exit; + end; end; Result := (regVersion <> 0); end; @@ -64,6 +71,17 @@ begin NetFx40Full: if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Servicing', regVersion)) then regVersion := -1; + NetFx45: + if (RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion)) then begin + if (regVersion = 379893) then + regVersion := 2 // 4.5.2 + else if (regVersion = 378675) or (regVersion = 378758) then + regVersion := 1 // 4.5.1 + else if (regVersion = 378389) then + regVersion := 0 // 4.5.0 + else + regVersion := -1; + end; end; Result := regVersion; end; diff --git a/setup.iss b/setup.iss index 83055e1..6e70355 100644 --- a/setup.iss +++ b/setup.iss @@ -1,3 +1,6 @@ +;contribute on github.com/stfx/innodependencyinstaller or codeproject.com/Articles/20868/NET-Framework-1-1-2-0-3-5-Installer-for-InnoSetup + +;comment out product defines to disable installing them ;#define use_iis #define use_kb835732 @@ -19,6 +22,8 @@ #define use_dotnetfx40 #define use_wic +#define use_dotnetfx45 + #define use_vc2010 #define use_mdac28 @@ -30,13 +35,13 @@ #define use_sql2008express #define MyAppSetupName 'MyProgram' -#define MyAppVersion '4.0' +#define MyAppVersion '5.0' [Setup] AppName={#MyAppSetupName} AppVersion={#MyAppVersion} AppVerName={#MyAppSetupName} {#MyAppVersion} -AppCopyright=Copyright © stfx 2007-2011 +AppCopyright=Copyright © stfx 2007-2014 VersionInfoVersion={#MyAppVersion} VersionInfoCompany=stfx AppPublisher=stfx @@ -143,6 +148,10 @@ Filename: "{app}\MyProgram.exe"; Description: "{cm:LaunchProgram,MyProgram}"; Fl #include "scripts\products\dotnetfx40full.iss" #endif +#ifdef use_dotnetfx45 +#include "scripts\products\dotnetfx45.iss" +#endif + #ifdef use_wic #include "scripts\products\wic.iss" #endif @@ -258,6 +267,11 @@ begin dotnetfx40client(); #endif +#ifdef use_dotnetfx45 + //dotnetfx45(2); // min allowed version is .netfx 4.5.2 + dotnetfx45(0); // min allowed version is .netfx 4.5.0 +#endif + #ifdef use_vc2010 vcredist2010(); #endif