Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@
<AppSearch Before="LaunchConditions" />
<LaunchConditions After="FindRelatedProducts" />
<MigrateFeatureStates />
<Custom Action="CheckForSharedConfiguration" After="InstallInitialize">OPT_NO_SHARED_CONFIG_CHECK=0 AND NOT Installed AND NOT REMOVE="ALL"</Custom>
<!-- OPT_NO_SHARED_CONFIG_CHECK could be numeric 0, string 0, or empty - all of which correspond to "false" -->
<Custom Action="CheckForSharedConfiguration" After="InstallInitialize">(NOT OPT_NO_SHARED_CONFIG_CHECK OR OPT_NO_SHARED_CONFIG_CHECK="" OR OPT_NO_SHARED_CONFIG_CHECK="0") AND NOT Installed AND NOT REMOVE="ALL"</Custom>
<Custom Action="CA_UNLOCk_HANDLER_PROPERTY" After="InstallFiles"><![CDATA[(NOT PATCH)]]></Custom>
<Custom Action="CA_UNLOCk_HANDLER" After="CA_UNLOCk_HANDLER_PROPERTY"><![CDATA[(NOT PATCH)]]></Custom>
<Custom Action="UpdateDynamicCompression" After="InstallFiles"><![CDATA[(NOT PATCH)]]></Custom>
Expand Down
31 changes: 31 additions & 0 deletions src/Installers/Windows/HostOptions/HostOptions.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<Name>$(HostOptionsName)</Name>
<OutputName>$(HostOptionsName)</OutputName>
<OutputType>Package</OutputType>
<ProductNameFolder>Microsoft ASP.NET Core Hosting Bundle Options</ProductNameFolder>
<ProductNameShort>AspNetCore.HostOptions</ProductNameShort>
<Platform>x86</Platform>
<ProjectGuid>20248cd1-c5aa-4f42-ad88-bc260d64deea</ProjectGuid>
<IsShipping>true</IsShipping>
<SchemaVersion>2.0</SchemaVersion>

<!-- Namespace used to generate stable UUID3 GUIDs for MSI ProductCode, etc. DO NOT CHANGE THIS. -->
<NamespaceGuid>$(HostingBundleNamespaceGuid)</NamespaceGuid>
</PropertyGroup>

<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

<PropertyGroup>
<PackageFileName>dotnet-hosting-options-$(PackageVersion)-win$(TargetExt)</PackageFileName>
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Hosting Bundle Options</ProductName>
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
</PropertyGroup>
</Project>
70 changes: 70 additions & 0 deletions src/Installers/Windows/HostOptions/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.Version)"
Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="$(var.InstallerVersion)" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id="1" />

<!-- Custom Actions to assign a default of 0 to all switches -->
<CustomAction Id="Set_OPT_NO_ANCM" Property="OPT_NO_ANCM" Value="0" />
<CustomAction Id="Set_OPT_NO_FTS" Property="OPT_NO_FTS" Value="0" />
<CustomAction Id="Set_OPT_NO_LTS" Property="OPT_NO_LTS" Value="0" />
<CustomAction Id="Set_OPT_NO_SHAREDFX" Property="OPT_NO_SHAREDFX" Value="0" />
<CustomAction Id="Set_OPT_NO_RUNTIME" Property="OPT_NO_RUNTIME" Value="0" />
<CustomAction Id="Set_OPT_NO_X86" Property="OPT_NO_X86" Value="0" />
<CustomAction Id="Set_OPT_NO_SHARED_CONFIG_CHECK" Property="OPT_NO_SHARED_CONFIG_CHECK" Value="0" />

<InstallExecuteSequence>
<!-- Only set the options to 0 if they weren't already set in the hosting bundle. -->
<!-- First option is to use user input, if they passed any (if they explicitly set an option to the empty string, we convert that to 0 here). -->
<!-- Second option is to use registry values, if present. -->
<!-- Third option is to set the options all to 0, which we do here. -->
<Custom Action="Set_OPT_NO_ANCM" After="AppSearch">NOT OPT_NO_ANCM OR OPT_NO_ANCM=""</Custom>
<Custom Action="Set_OPT_NO_FTS" After="AppSearch">NOT OPT_NO_FTS OR OPT_NO_FTS=""</Custom>
<Custom Action="Set_OPT_NO_LTS" After="AppSearch">NOT OPT_NO_LTS OR OPT_NO_LTS=""</Custom>
<Custom Action="Set_OPT_NO_SHAREDFX" After="AppSearch">NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX=""</Custom>
<Custom Action="Set_OPT_NO_RUNTIME" After="AppSearch">NOT OPT_NO_RUNTIME OR OPT_NO_RUNTIME=""</Custom>
<Custom Action="Set_OPT_NO_X86" After="AppSearch">NOT OPT_NO_X86 OR OPT_NO_X86=""</Custom>
<Custom Action="Set_OPT_NO_SHARED_CONFIG_CHECK" After="AppSearch">NOT OPT_NO_SHARED_CONFIG_CHECK OR OPT_NO_SHARED_CONFIG_CHECK=""</Custom>
</InstallExecuteSequence>

<Feature Id="ProductFeature" Title="HostOptions" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="dotnet">
<Directory Id="MM" Name="$(var.MajorVersion).$(var.MinorVersion)" />
</Directory>
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="MM">

<?ifdef ProductOptionsKey?>
<?undef ProductOptionsKey?>
<?endif?>

<?define ProductOptionsKey=SOFTWARE\Microsoft\dotnet\host\options\$(var.MajorVersion).$(var.MinorVersion)?>

<Component Id="OPT" Guid="*">
<RegistryKey Root="HKLM" Key="$(var.ProductOptionsKey)">
<RegistryValue Name="OPT_NO_ANCM" Type="integer" Value="[OPT_NO_ANCM]" KeyPath="yes" />
<RegistryValue Name="OPT_NO_FTS" Type="integer" Value="[OPT_NO_FTS]" />
<RegistryValue Name="OPT_NO_LTS" Type="integer" Value="[OPT_NO_LTS]" />
<RegistryValue Name="OPT_NO_SHAREDFX" Type="integer" Value="[OPT_NO_SHAREDFX]" />
<RegistryValue Name="OPT_NO_RUNTIME" Type="integer" Value="[OPT_NO_RUNTIME]" />
<RegistryValue Name="OPT_NO_X86" Type="integer" Value="[OPT_NO_X86]" />
<RegistryValue Name="OPT_NO_SHARED_CONFIG_CHECK" Type="integer" Value="[OPT_NO_SHARED_CONFIG_CHECK]" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
7 changes: 4 additions & 3 deletions src/Installers/Windows/SharedFrameworkLib/Library.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
<?undef DotNetHome?>
<?endif?>
<?if $(var.Platform)=x86?>
<?define SharedFrameworkInstallCondition=(NOT OPT_NO_SHAREDFX) AND (NOT OPT_NO_X86)?>
<!-- These variables could be unset at this point, which we explicitly treat as 'false' -->
<?define SharedFrameworkInstallCondition=(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")?>
<?define DotNetHome=DOTNETHOME_X86?>
<?elseif $(var.Platform)=x64?>
<?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX)?>
<?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")?>
<?define DotNetHome=DOTNETHOME_X64?>
<?elseif $(var.Platform)=arm64?>
<?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX)?>
<?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")?>
<?define DotNetHome=DOTNETHOME_ARM64?>
<?endif?>

Expand Down
6 changes: 4 additions & 2 deletions src/Installers/Windows/WindowsHostingBundle/ANCM.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@
<PackageGroup Id="PG_ANCM">
<RollbackBoundary Id="RB_ANCM" />

<!-- OPT_NO_ANCM could be unset at this point, which we explicitly treat as 'false' -->
<MsiPackage Id="AspNetCoreModuleV2_x86" SourceFile="$(var.AspNetCoreModuleV2_x86.TargetPath)"
Name="$(var.AspNetCoreModuleV2_x86.TargetFileName)"
Compressed="yes"
Vital="yes"
Visible="no"
InstallCondition="NOT VersionNT64 AND (VersionNT &gt;= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM)">
InstallCondition="NOT VersionNT64 AND (VersionNT &gt;= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM=&quot;0&quot;)">
<MsiProperty Name="OPT_NO_SHARED_CONFIG_CHECK" Value="[OPT_NO_SHARED_CONFIG_CHECK]" />
</MsiPackage>

<!-- OPT_NO_SHARED_CONFIG_CHECK could be unset at this point, which we explicitly treat as 'false' -->
<MsiPackage Id="AspNetCoreModuleV2_x64" SourceFile="$(var.AspNetCoreModuleV2_x64.TargetPath)"
Name="$(var.AspNetCoreModuleV2_x64.TargetFileName)"
Compressed="yes"
Vital="yes"
Visible="no"
InstallCondition="VersionNT64 AND (VersionNT64 &gt;= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM)">
InstallCondition="VersionNT64 AND (VersionNT64 &gt;= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM OR OPT_NO_ANCM=&quot;0&quot;)">
<MsiProperty Name="OPT_NO_SHARED_CONFIG_CHECK" Value="[OPT_NO_SHARED_CONFIG_CHECK]" />
</MsiPackage>
</PackageGroup>
Expand Down
Loading