Skip to content

Commit

Permalink
Add support for .NET Framework 4.5 - 4.5.2
Browse files Browse the repository at this point in the history
Add .gitignore
  • Loading branch information
DomGries committed Jun 2, 2014
1 parent b2d53de commit 726fb25
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/*.exe
9 changes: 5 additions & 4 deletions bin/MyProgramDependencies/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion scripts/products/dotnetfx35.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion scripts/products/dotnetfx35lp.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion scripts/products/dotnetfx35sp1.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion scripts/products/dotnetfx35sp1lp.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
28 changes: 28 additions & 0 deletions scripts/products/dotnetfx45.iss
Original file line number Diff line number Diff line change
@@ -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;
20 changes: 19 additions & 1 deletion scripts/products/dotnetfxversion.iss
Original file line number Diff line number Diff line change
@@ -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\';
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
18 changes: 16 additions & 2 deletions setup.iss
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -19,6 +22,8 @@
#define use_dotnetfx40
#define use_wic

#define use_dotnetfx45

#define use_vc2010

#define use_mdac28
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 726fb25

Please sign in to comment.