Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Framework 4.8 support #1507

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion src/Setup/FxHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static const int fx462ReleaseVersion = 394802; // Minimum version for .NET 4.6.2
static const int fx47ReleaseVersion = 460798; // Minimum version for .NET 4.7
static const int fx471ReleaseVersion = 461308; // Minimum version for .NET 4.7.1
static const int fx472ReleaseVersion = 461808; // Minimum version for .NET 4.7.2
static const int fx48ReleaseVersion = 528040; // Minimum version for .NET 4.8

// According to https://msdn.microsoft.com/en-us/library/8z6watww%28v=vs.110%29.aspx,
// to install .NET 4.5 we must be Vista SP2+, Windows 7 SP1+, or later.
Expand All @@ -34,6 +35,7 @@ NetVersion CFxHelper::GetRequiredDotNetVersion()
if (resourceFlag.Compare(L"net47") == 0) return NetVersion::net47;
if (resourceFlag.Compare(L"net471") == 0) return NetVersion::net471;
if (resourceFlag.Compare(L"net472") == 0) return NetVersion::net472;
if (resourceFlag.Compare(L"net48") == 0) return NetVersion::net48;

//Default to standard net45
return NetVersion::net45;
Expand Down Expand Up @@ -75,6 +77,8 @@ int CFxHelper::GetDotNetVersionReleaseNumber(NetVersion version)
return fx471ReleaseVersion;
case NetVersion::net472:
return fx472ReleaseVersion;
case NetVersion::net48:
return fx48ReleaseVersion;
case NetVersion::net45:
default:
return fx45ReleaseVersion;
Expand Down Expand Up @@ -281,6 +285,10 @@ HRESULT CFxHelper::InstallDotNetFramework(NetVersion version, bool isQuiet)

UINT CFxHelper::GetInstallerMainInstructionForVersion(NetVersion version)
{
if (version >= NetVersion::net48) {
return IDS_FXINSTRUCTION48;
}

if (version >= NetVersion::net47) {
return IDS_FXINSTRUCTION47;
}
Expand All @@ -293,6 +301,10 @@ UINT CFxHelper::GetInstallerMainInstructionForVersion(NetVersion version)

UINT CFxHelper::GetInstallerContentForVersion(NetVersion version)
{
if (version >= NetVersion::net48) {
return IDS_FXCONTENT48;
}

if (version >= NetVersion::net47) {
return IDS_FXCONTENT47;
}
Expand All @@ -305,6 +317,10 @@ UINT CFxHelper::GetInstallerContentForVersion(NetVersion version)

UINT CFxHelper::GetInstallerExpandedInfoForVersion(NetVersion version)
{
if (version >= NetVersion::net48) {
return IDS_FXEXPANDEDINFO48;
}

if (version >= NetVersion::net47) {
return IDS_FXEXPANDEDINFO47;
}
Expand All @@ -317,6 +333,10 @@ UINT CFxHelper::GetInstallerExpandedInfoForVersion(NetVersion version)

UINT CFxHelper::GetInstallerUrlForVersion(NetVersion version)
{
if (version >= NetVersion::net48) {
return IDS_FXDOWNLOADURL48;
}

if (version >= NetVersion::net47) {
return IDS_FXDOWNLOADURL47;
}
Expand Down Expand Up @@ -369,7 +389,7 @@ HRESULT CFxHelper::HandleRebootRequirement(bool isQuiet)
}

//
// Write a runonce entry to the registry to tell it to continue with
// Write a runonce entry to the registry to tell it to continue with
// setup after a reboot
//
bool CFxHelper::WriteRunOnceEntry()
Expand Down
2 changes: 1 addition & 1 deletion src/Setup/FxHelper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

enum class NetVersion {net45=0, net451=1, net452=2, net46=3, net461=4, net462=5, net47=6, net471=7, net472=8};
enum class NetVersion {net45=0, net451=1, net452=2, net46=3, net461=4, net462=5, net47=6, net471=7, net472=8, net48=9};

class CFxHelper
{
Expand Down
Binary file modified src/Setup/Setup.rc
Binary file not shown.
Binary file modified src/Setup/resource.h
Binary file not shown.