Skip to content

Commit

Permalink
Merge pull request #1481 from glopesdev/net48
Browse files Browse the repository at this point in the history
Update bootstrapper to .NET 4.8
  • Loading branch information
glopesdev committed Jul 20, 2023
2 parents 9153353 + ea66c26 commit fa4c2bd
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
indent_style = space

# XML project files
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,wxs}]
indent_size = 2

# XML config files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Bundle.wxs" />
<Compile Include="NetFx472.wxs" />
<Compile Include="NetFx48.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
Expand Down
12 changes: 6 additions & 6 deletions Bonsai.Setup.Bootstrapper/Bundle.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<?define EditorProjectPath="..\Bonsai.Editor"?>
<?define ProductUpgradeCode="762f27b1-165b-45a1-b04c-a3ba198fd9d7"?>
<?define VCRTRegistryKey="SOFTWARE\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum"?>
<Bundle Name="$(var.ProductDisplayName)" Version="!(bind.PackageVersion.Bonsai)" Manufacturer="Goncalo Lopes" UpgradeCode="$(var.ProductUpgradeCode)" IconSourceFile="$(var.EditorProjectPath)\Bonsai.ico">

<Bundle Name="$(var.ProductDisplayName)" Version="!(bind.PackageVersion.Bonsai)" Manufacturer="Goncalo Lopes" UpgradeCode="$(var.ProductUpgradeCode)" IconSourceFile="$(var.EditorProjectPath)\Bonsai.ico">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="License.rtf"
ShowVersion="yes"
Expand All @@ -22,15 +22,15 @@
<util:RegistrySearch Root="HKLM" Key="$(var.VCRTRegistryKey)" Value="Install" Variable="VCRTInstalled" Win64="no"/>
<util:RegistrySearch Root="HKLM" Key="$(var.VCRTRegistryKey)" Value="Install" Variable="VCRT64Installed" Win64="yes"/>

<Chain>
<PackageGroupRef Id="NetFx472Web"/>
<Chain>
<PackageGroupRef Id="NetFx48Web"/>
<ExePackage Id="VCRT" SourceFile="vc_redist.x86.exe" InstallCommand="/q /norestart" Permanent="yes" DetectCondition="VCRTInstalled"/>
<ExePackage Id="VCRT64" SourceFile="vc_redist.x64.exe" InstallCommand="/q /norestart" Permanent="yes" InstallCondition="VersionNT64" DetectCondition="VCRT64Installed"/>
<MsiPackage Id="Bonsai" SourceFile="$(var.Bonsai.Setup.TargetPath)">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
<MsiProperty Name="INSTALLVSIX" Value="[InstallVsixCheckbox]"/>
<MsiProperty Name="INSTALL64" Value="VersionNT64"/>
</MsiPackage>
</Chain>
</Bundle>
</Chain>
</Bundle>
</Wix>
100 changes: 0 additions & 100 deletions Bonsai.Setup.Bootstrapper/NetFx472.wxs

This file was deleted.

100 changes: 100 additions & 0 deletions Bonsai.Setup.Bootstrapper/NetFx48.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<!--
.NET Framework installation state properties
Official documentation can be found at the following location:
.NET Framework 4.5.x/4.6.x/4.7.x/4.8.x - http://msdn.microsoft.com/en-us/library/w0x726c2(v=vs.110).aspx
-->

<?define NetFx48MinRelease = 528040 ?>
<?define NetFx48WebLink = https://go.microsoft.com/fwlink/?LinkId=2085155 ?>
<?define NetFx48RedistLink = https://go.microsoft.com/fwlink/?LinkId=2088631 ?>
<?define NetFx48EulaLink = https://referencesource.microsoft.com/license.html ?>

<Fragment>
<PropertyRef Id="WIXNETFX4RELEASEINSTALLED" />
<Property Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED" Secure="yes" />
<SetProperty Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED" Value="1" After="AppSearch">
WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx48MinRelease)"
</SetProperty>
</Fragment>

<Fragment>
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>

<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx48Web" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx48EulaLink)" Overridable="yes" />
<WixVariable Id="NetFx48WebDetectCondition" Value="NETFRAMEWORK45 &gt;= $(var.NetFx48MinRelease)" Overridable="yes" />
<WixVariable Id="NetFx48WebInstallCondition" Value="" Overridable="yes" />
<WixVariable Id="NetFx48WebPackageDirectory" Value="redist\" Overridable="yes" />

<PackageGroup Id="NetFx48Web">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48WebLog].html&quot;"
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48WebLog].html&quot;"
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48WebLog].html&quot;"
PerMachine="yes"
DetectCondition="!(wix.NetFx48WebDetectCondition)"
InstallCondition="!(wix.NetFx48WebInstallCondition)"
Id="NetFx48Web"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
DownloadUrl="$(var.NetFx48WebLink)"
LogPathVariable="NetFx48WebLog"
Compressed="no"
Name="!(wix.NetFx48WebPackageDirectory)ndp48-web.exe">
<RemotePayload
CertificatePublicKey="F49F9B33E25E33CCA0BFB15A62B7C29FFAB3880B"
CertificateThumbprint="ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
Description="Microsoft .NET Framework 4.8 Setup"
Hash="4181398AA1FD5190155AC3A388434E5F7EA0B667"
ProductName="Microsoft .NET Framework 4.8"
Size="1439328"
Version="4.8.4115.0" />
</ExePackage>
</PackageGroup>
</Fragment>

<Fragment>
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>

<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx48Redist" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx48EulaLink)" Overridable="yes" />
<WixVariable Id="NetFx48RedistDetectCondition" Value="NETFRAMEWORK45 &gt;= $(var.NetFx48MinRelease)" Overridable="yes" />
<WixVariable Id="NetFx48RedistInstallCondition" Value="" Overridable="yes" />
<WixVariable Id="NetFx48RedistPackageDirectory" Value="redist\" Overridable="yes" />

<PackageGroup Id="NetFx48Redist">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48RedistLog].html&quot;"
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48RedistLog].html&quot;"
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48RedistLog].html&quot;"
PerMachine="yes"
DetectCondition="!(wix.NetFx48RedistDetectCondition)"
InstallCondition="!(wix.NetFx48RedistInstallCondition)"
Id="NetFx48Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
DownloadUrl="$(var.NetFx48RedistLink)"
LogPathVariable="NetFx48RedistLog"
Compressed="no"
Name="!(wix.NetFx48RedistPackageDirectory)ndp48-x86-x64-allos-enu.exe">
<RemotePayload
CertificatePublicKey="F49F9B33E25E33CCA0BFB15A62B7C29FFAB3880B"
CertificateThumbprint="ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
Description="Microsoft .NET Framework 4.8 Setup"
Hash="E322E2E0FB4C86172C38A97DC6C71982134F0570"
ProductName="Microsoft .NET Framework 4.8"
Size="117380440"
Version="4.8.4115.0" />
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
4 changes: 2 additions & 2 deletions Bonsai.Setup/Runtime.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<?define Win64="no"?>
<?define ProductDisplayName="Bonsai"?>
<?define Product32DisplayName="Bonsai (x86)"?>
<?define BonsaiBuildPath="..\Bonsai\bin\Release\net472"?>
<?define BonsaiBuildPath="..\Bonsai\bin\Release\net48"?>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="BonsaiExecutable" Guid="*" Win64="$(var.Win64)">
Expand Down
2 changes: 1 addition & 1 deletion Bonsai/Bonsai.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>Bonsai Rx Reactive Extensions</PackageTags>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net48</TargetFramework>
<VersionPrefix>2.8.0</VersionPrefix>
<OutputType>Exe</OutputType>
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
Expand Down
2 changes: 1 addition & 1 deletion Bonsai/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bonsai
{
static class Launcher
{
internal static readonly NuGetFramework ProjectFramework = NuGetFramework.ParseFolder("net472");
internal static readonly NuGetFramework ProjectFramework = NuGetFramework.ParseFolder("net48");

internal static int LaunchPackageManager(
PackageConfiguration packageConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion Bonsai32/Bonsai32.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<UseWindowsForms>true</UseWindowsForms>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
<VersionPrefix>2.8.0</VersionPrefix>
<OutputType>Exe</OutputType>
Expand Down

0 comments on commit fa4c2bd

Please sign in to comment.