Merge pull request #12600 from dsplaisted/workload-manifest-msis
Bundle workload manifests as separate MSIs
This commit is contained in:
commit
a329cf4049
6 changed files with 112 additions and 307 deletions
|
@ -1,84 +1,95 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Android" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.iOS" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100" Version="$(XamarinMacCatalystWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.MacCatalyst" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.macOS.Manifest-6.0.100" Version="$(XamarinMacOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.macOS" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.Maui.Manifest-6.0.100" Version="$(MauiWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Maui" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.tvOS.Manifest-6.0.100" Version="$(XamarinTvOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.tvOS" />
|
||||
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="$(MonoWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Workload.Mono.ToolChain" />
|
||||
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="$(EmscriptenWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Workload.Emscripten" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.Android" FeatureBand="6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.iOS" FeatureBand="6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst" FeatureBand="6.0.100" Version="$(XamarinMacCatalystWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.macOS" FeatureBand="6.0.100" Version="$(XamarinMacOSWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.Maui" FeatureBand="6.0.100" Version="$(MauiWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Sdk.tvOS" FeatureBand="6.0.100" Version="$(XamarinTvOSWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain" FeatureBand="6.0.100" Version="$(MonoWorkloadManifestVersion)" />
|
||||
<BundledManifests Include="Microsoft.NET.Workload.Emscripten" FeatureBand="6.0.100" Version="$(EmscriptenWorkloadManifestVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Restore workload manifests via PackageReference -->
|
||||
<!-- Calculate NuGet package IDs for bundled manifests -->
|
||||
<PropertyGroup>
|
||||
<!-- TODO: Not exactly sure how this value should be calculated -->
|
||||
<!--<MsiArchitectureForWorkloadManifests>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</MsiArchitectureForWorkloadManifests>-->
|
||||
<MsiArchitectureForWorkloadManifests>$(Architecture)</MsiArchitectureForWorkloadManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<BundledManifestsForPackageDownload Include="@(BundledManifests)" >
|
||||
<Version>[%(Version)]</Version>
|
||||
</BundledManifestsForPackageDownload>
|
||||
|
||||
<PackageDownload Include="@(BundledManifestsForPackageDownload)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BundledManifests Update="@(BundledManifests)" >
|
||||
<RestoredNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredNupkgContentPath>
|
||||
<BundledManifests Update="@(BundledManifests)">
|
||||
<NupkgId>%(Identity).Manifest-%(FeatureBand)</NupkgId>
|
||||
<MsiNupkgId>%(Identity).Manifest-%(FeatureBand).Msi.$(MsiArchitectureForWorkloadManifests)</MsiNupkgId>
|
||||
<RestoredNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(NupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredNupkgContentPath>
|
||||
<RestoredMsiNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(MsiNupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredMsiNupkgContentPath>
|
||||
<RestoredMsiPathInNupkg>$([MSBuild]::NormalizePath('%(RestoredMsiNupkgContentPath)/data/%(NupkgId).%(Version)-$(MsiArchitectureForWorkloadManifests).msi'))</RestoredMsiPathInNupkg>
|
||||
</BundledManifests>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="LayoutManifests"
|
||||
DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI"/>
|
||||
<!-- Restore workload manifests via PackageDownload -->
|
||||
<ItemGroup>
|
||||
<PackageDownload Include="@(BundledManifests->'%(NupkgId)')" >
|
||||
<Version>[%(Version)]</Version>
|
||||
</PackageDownload>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' != 'arm' ">
|
||||
<PackageDownload Include="@(BundledManifests->'%(MsiNupkgId)')" >
|
||||
<Version>[%(Version)]</Version>
|
||||
</PackageDownload>
|
||||
|
||||
<Target Name="LayoutManifestsForSDK"
|
||||
DependsOnTargets="SetupBundledComponents;GenerateManifestVersions">
|
||||
<PackageReference Include="Microsoft.DotNet.SignCheck" Version="$(ArcadeSdkVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ValidateBundledManifestSigning"
|
||||
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' != 'arm' ">
|
||||
|
||||
<PropertyGroup>
|
||||
<SignCheckExe>$(PkgMicrosoft_DotNet_SignCheck)\tools\Microsoft.DotNet.SignCheck.exe</SignCheckExe>
|
||||
<SignCheckLog Condition="'$(SignCheckLog)' == ''">$(ArtifactsLogDir)\workloadmanifestsigncheck.log</SignCheckLog>
|
||||
<SignCheckErrorLog Condition="'$(SignCheckErrorLog)' == ''">$(ArtifactsLogDir)\workloadmanifestsigncheck.errors.log</SignCheckErrorLog>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SignCheckWorkloadManifestMsiInputFiles Include="@(BundledManifests->'%(RestoredMsiPathInNupkg)')" />
|
||||
</ItemGroup>
|
||||
|
||||
<Exec Command="$(SignCheckExe) ^
|
||||
--recursive ^
|
||||
-f UnsignedFiles ^
|
||||
-i @(SignCheckWorkloadManifestMsiInputFiles, ' ') ^
|
||||
-l $(SignCheckLog) ^
|
||||
-e $(SignCheckErrorLog)" />
|
||||
|
||||
<Error
|
||||
Text="Signing validation failed for workload manifest MSI. Check $(SignCheckErrorLog) for more information."
|
||||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" />
|
||||
|
||||
<Message
|
||||
Text="##vso[artifact.upload containerfolder=LogFiles;artifactname=LogFiles]{SignCheckErrorLog}"
|
||||
Condition="Exists($(SignCheckErrorLog)) and '$([System.IO.File]::ReadAllText($(SignCheckErrorLog)))' != ''" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutManifests"
|
||||
DependsOnTargets="SetupBundledComponents">
|
||||
|
||||
<ItemGroup>
|
||||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\*"
|
||||
Condition="Exists('%(RestoredNupkgContentPath)\data')"
|
||||
DestinationPath="$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())"
|
||||
RestoredNupkgContentPath="%(RestoredNupkgContentPath)"
|
||||
WorkloadManifestId="%(Identity)"/>
|
||||
|
||||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\localize\*"
|
||||
Condition="Exists('%(RestoredNupkgContentPath)\data\localize')"
|
||||
DestinationPath="$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/localize"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="No workload manifest content found." Condition="'@(ManifestContent->Count())' == '0'" />
|
||||
|
||||
<Copy SourceFiles="@(ManifestContent)"
|
||||
DestinationFolder="$(RedistLayoutPath)sdk-manifests/$(CliProductBandVersion)00/%(DestinationPath)"/>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutManifestsForMSI"
|
||||
DependsOnTargets="SetupBundledComponents;GenerateManifestVersions"
|
||||
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm'">
|
||||
|
||||
<Copy SourceFiles="@(ManifestContent)"
|
||||
DestinationFolder="$(BaseOutputPath)$(Configuration)\sdk-manifests\sdk-manifests/$(CliProductBandVersion)00/%(DestinationPath)"/>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateManifestVersions">
|
||||
|
||||
<PropertyGroup>
|
||||
<ManifestsMSIInstallerFile>$(ArtifactsNonShippingPackagesDir)dotnet-sdkmanifests-$(FullNugetVersion)-$(ProductMonikerRid)$(InstallerExtension)</ManifestsMSIInstallerFile>
|
||||
<ManifestsDependencyKeyName>SDK_Manifests_$([MSBuild]::ValueOrDefault('$(Version)', '').Replace('-', '_'))</ManifestsDependencyKeyName>
|
||||
<ManifestsBrandName>Microsoft .NET SDK Workload Manifests $(Version)</ManifestsBrandName>
|
||||
<ManifestsLayoutPath>$(BaseOutputPath)$(Configuration)\sdk-manifests</ManifestsLayoutPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<GenerateMsiVersion BuildNumber="$(CombinedBuildNumberAndRevision)"
|
||||
Major="$(VersionMajor)"
|
||||
Minor="$(VersionMinor)"
|
||||
Patch="$(VersionFeature)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="ManifestMsiVersion" />
|
||||
</GenerateMsiVersion>
|
||||
|
||||
<GenerateGuidFromName Name="$(ManifestsMSIInstallerFile)">
|
||||
<Output TaskParameter="GeneratedGuid"
|
||||
PropertyName="ManifestsInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
|
||||
<ItemGroup>
|
||||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\*"
|
||||
Condition="Exists('%(RestoredNupkgContentPath)\data')"
|
||||
DestinationPath="$([MSBuild]::ValueOrDefault('%(WorkloadManifestId)', '').ToLower())"
|
||||
RestoredNupkgContentPath="%(RestoredNupkgContentPath)"
|
||||
WorkloadManifestId="%(WorkloadManifestId)"/>
|
||||
|
||||
<ManifestContent Include="%(BundledManifests.RestoredNupkgContentPath)\data\localize\*"
|
||||
Condition="Exists('%(RestoredNupkgContentPath)\data\localize')"
|
||||
DestinationPath="$([MSBuild]::ValueOrDefault('%(WorkloadManifestId)', '').ToLower())/localize"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="No workload manifest content found." Condition="'@(ManifestContent->Count())' == '0'" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -38,9 +38,6 @@
|
|||
<SdkPlaceholderInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.SdkPlaceholder.$(Architecture).$(FullNugetVersion).nupkg</SdkPlaceholderInstallerNupkgFile>
|
||||
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile>
|
||||
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
|
||||
|
||||
<ManifestInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Manifest.nuspec</ManifestInstallerNuspecFile>
|
||||
<ManifestInstallerNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Manifest.$(Architecture).$(FullNugetVersion).nupkg</ManifestInstallerNupkgFile>
|
||||
|
||||
<SdkResolverLayoutPath>$(ArtifactsDir)bin/SdkResolver/$(Configuration)</SdkResolverLayoutPath>
|
||||
<VSToolsResolverNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.Resolver.nuspec</VSToolsResolverNuspecFile>
|
||||
|
@ -283,49 +280,36 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateManifestsMsi"
|
||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo"
|
||||
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm'"
|
||||
Inputs="@(BundledManifests);$(ManifestsGenerateMsiPowershellScript)"
|
||||
Outputs="$(ManifestsMSIInstallerFile)">
|
||||
|
||||
<Target Name="GenerateWorkloadManifestsWxs"
|
||||
DependsOnTargets="ValidateBundledManifestSigning">
|
||||
<PropertyGroup>
|
||||
<ManifestsGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemanifestsmsi.ps1</ManifestsGenerateMsiPowershellScript>
|
||||
<WorkloadManifestsWxsPath>$(IntermediateOutputPath)WorkloadManifests.wxs</WorkloadManifestsWxsPath>
|
||||
<WorkloadManifestsWxsContent>
|
||||
<![CDATA[
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<PackageGroup Id="PG_WorkloadManifests">
|
||||
@(BundledManifests->'<MsiPackage SourceFile="%(RestoredMsiPathInNupkg)">
|
||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||
</MsiPackage>', '
|
||||
')
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
]]>
|
||||
</WorkloadManifestsWxsContent>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(ManifestsGenerateMsiPowershellScript) ^
|
||||
'$(ManifestsLayoutPath)' ^
|
||||
'$(ManifestsMSIInstallerFile)' ^
|
||||
'$(WixRoot)' ^
|
||||
'$(ManifestsBrandName)' ^
|
||||
'$(ManifestMsiVersion)' ^
|
||||
'$(ManifestMsiVersion)' ^
|
||||
'$(FullNugetVersion)' ^
|
||||
'$(ManifestsInstallerUpgradeCode)' ^
|
||||
'$(ManifestsDependencyKeyName)' ^
|
||||
'$(Architecture)' ^
|
||||
-InformationAction Continue" />
|
||||
<ItemGroup>
|
||||
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\provider.wixobj" />
|
||||
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifests.wixobj" />
|
||||
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\dotnethome_x64.wixobj" />
|
||||
<ManifestsMsiWixSrcFiles Include="$(WixRoot)\Manifest-install-files.wixobj" />
|
||||
</ItemGroup>
|
||||
|
||||
<CreateLightCommandPackageDrop
|
||||
LightCommandWorkingDir="$(LightCommandObjDir)"
|
||||
OutputFolder="$(LightCommandPackagesDir)"
|
||||
NoLogo="true"
|
||||
Cultures="en-us"
|
||||
InstallerFile="$(ArtifactsNonShippingPackagesDir)$(ManifestsMSIInstallerFile)"
|
||||
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
|
||||
WixSrcFiles="@(ManifestsMsiWixSrcFiles)">
|
||||
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
|
||||
</CreateLightCommandPackageDrop>
|
||||
<WriteLinesToFile File="$(WorkloadManifestsWxsPath)"
|
||||
Lines="$(WorkloadManifestsWxsContent)"
|
||||
WriteOnlyWhenDifferent="true"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkBundle"
|
||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi;GenerateTemplatesMsis;GenerateManifestsMsi;SignTemplatesMsis"
|
||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;SignSdkMsi;GenerateTemplatesMsis;GenerateWorkloadManifestsWxs;SignTemplatesMsis"
|
||||
Condition=" '$(OS)' == 'Windows_NT' "
|
||||
Inputs="$(SdkMSIInstallerFile);
|
||||
$(DownloadedSharedFrameworkInstallerFile);
|
||||
|
@ -344,6 +328,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
||||
'$(WorkloadManifestsWxsPath)' ^
|
||||
'$(SdkMSIInstallerFile)' ^
|
||||
'$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)' ^
|
||||
'$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
||||
|
@ -360,7 +345,6 @@
|
|||
'$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
||||
'$(FinalizerExe)' ^
|
||||
'$(LatestTemplateMsiInstallerFile)' ^
|
||||
'$(ManifestsMsiInstallerFile)' ^
|
||||
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
||||
'$(WixRoot)' ^
|
||||
'$(SdkBrandName)' ^
|
||||
|
@ -377,6 +361,7 @@
|
|||
-InformationAction Continue " />
|
||||
<ItemGroup>
|
||||
<BundleMsiWixSrcFiles Include="$(WixRoot)\bundle.wixobj" />
|
||||
<BundleMsiWixSrcFiles Include="$(WixRoot)\WorkloadManifests.wixobj" />
|
||||
<BundleMsiWixSrcFiles Include="$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)" />
|
||||
</ItemGroup>
|
||||
<CreateLightCommandPackageDrop
|
||||
|
@ -460,24 +445,6 @@
|
|||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateManifestNupkg"
|
||||
DependsOnTargets="GenerateLayout;GenerateManifestsMsi"
|
||||
Condition=" '$(OS)' == 'Windows_NT' "
|
||||
Inputs="$(ManifestsMSIInstallerFile);
|
||||
$(ManifestInstallerNuspecFile);
|
||||
$(GenerateNupkgPowershellScript)"
|
||||
Outputs="$(ManifestInstallerNupkgFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||
'$(ArtifactsDir)' ^
|
||||
'$(ManifestsMSIInstallerFile)' ^
|
||||
'$(FullNugetVersion)' ^
|
||||
'$(ManifestInstallerNuspecFile)' ^
|
||||
'$(ManifestInstallerNupkgFile)' ^
|
||||
'$(Architecture)' ^
|
||||
'$(MajorMinorVersion)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateVSToolsNupkg"
|
||||
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
||||
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86' "
|
||||
|
@ -555,14 +522,12 @@
|
|||
GenerateSdkMsi;
|
||||
SignSdkMsi;
|
||||
GenerateTemplatesMsis;
|
||||
GenerateManifestsMsi;
|
||||
SignTemplatesMsis;
|
||||
GenerateSdkBundle;
|
||||
SignSdkBundle;
|
||||
GenerateSdkPlaceholderMsi;
|
||||
SignSdkPlaceholderMsi;
|
||||
GenerateToolsetNupkg;
|
||||
GenerateManifestNupkg;
|
||||
GenerateTemplatesNupkgs;
|
||||
GenerateSdkPlaceholderNupkg;
|
||||
GenerateVSToolsNupkg;
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>VS.Redist.Common.NetCore.Manifest.$ARCH$</id>
|
||||
<version>1.0.0</version>
|
||||
<title>VS.Redist.Common.NetCore.Manifest.$ARCH$</title>
|
||||
<authors>Microsoft</authors>
|
||||
<owners>Microsoft</owners>
|
||||
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
|
||||
<projectUrl>https://github.com/dotnet/core-sdk</projectUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>.NET Core $MAJOR_MINOR$ SDK Manifests ($ARCH$) Windows Installer MSI as a .nupkg for internal Visual Studio build consumption</description>
|
||||
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="$PAYLOAD_FILES$" />
|
||||
</files>
|
||||
</package>
|
|
@ -194,10 +194,7 @@
|
|||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||
<MsiProperty Name="ALLOWMSIINSTALL" Value="True" />
|
||||
</MsiPackage>
|
||||
<MsiPackage SourceFile="$(var.ManifestsMsiSourcePath)">
|
||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||
<MsiProperty Name="ALLOWMSIINSTALL" Value="True" />
|
||||
</MsiPackage>
|
||||
<PackageGroupRef Id="PG_WorkloadManifests" />
|
||||
<MsiPackage SourceFile="$(var.CLISDKMsiSourcePath)">
|
||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||
<MsiProperty Name="EXEFULLPATH" Value="[WixBundleOriginalSource]" />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$WorkloadManifestWxsFile,
|
||||
[Parameter(Mandatory=$true)][string]$CLISDKMSIFile,
|
||||
[Parameter(Mandatory=$true)][string]$ASPNETRuntimeWixLibFile,
|
||||
[Parameter(Mandatory=$true)][string]$SharedFxMSIFile,
|
||||
|
@ -18,7 +19,6 @@ param(
|
|||
[Parameter(Mandatory=$true)][string]$WindowsDesktopTargetingPackMSIFile,
|
||||
[Parameter(Mandatory=$true)][string]$FinalizerExe,
|
||||
[Parameter(Mandatory=$true)][string]$TemplatesMSIFile,
|
||||
[Parameter(Mandatory=$true)][string]$ManifestsMSIFile,
|
||||
[Parameter(Mandatory=$true)][string]$DotnetBundleOutput,
|
||||
[Parameter(Mandatory=$true)][string]$WixRoot,
|
||||
[Parameter(Mandatory=$true)][string]$ProductMoniker,
|
||||
|
@ -78,7 +78,7 @@ function RunCandleForBundle
|
|||
-ext WixBalExtension.dll `
|
||||
-ext WixUtilExtension.dll `
|
||||
-ext WixTagExtension.dll `
|
||||
"$AuthWsxRoot\bundle.wxs"
|
||||
"$AuthWsxRoot\bundle.wxs" "$WorkloadManifestWxsFile"
|
||||
|
||||
Write-Information "Candle output: $candleOutput"
|
||||
|
||||
|
@ -97,11 +97,14 @@ function RunLightForBundle
|
|||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
$WorkloadManifestWixobjFile = [System.IO.Path]::GetFileNameWithoutExtension($WorkloadManifestWxsFile) + ".wixobj"
|
||||
|
||||
Write-Information "Running light for bundle.."
|
||||
|
||||
$lightOutput = .\light.exe -nologo `
|
||||
-cultures:en-us `
|
||||
bundle.wixobj `
|
||||
$WorkloadManifestWixobjFile `
|
||||
$ASPNETRuntimeWixlibFile `
|
||||
-ext WixBalExtension.dll `
|
||||
-ext WixUtilExtension.dll `
|
||||
|
|
|
@ -1,153 +0,0 @@
|
|||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$inputDir,
|
||||
[Parameter(Mandatory=$true)][string]$DotnetMSIOutput,
|
||||
[Parameter(Mandatory=$true)][string]$WixRoot,
|
||||
[Parameter(Mandatory=$true)][string]$ProductMoniker,
|
||||
[Parameter(Mandatory=$true)][string]$DotnetMSIVersion,
|
||||
[Parameter(Mandatory=$true)][string]$SDKBundleVersion,
|
||||
[Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion,
|
||||
[Parameter(Mandatory=$true)][string]$UpgradeCode,
|
||||
[Parameter(Mandatory=$true)][string]$DependencyKeyName,
|
||||
[Parameter(Mandatory=$true)][string]$Architecture
|
||||
)
|
||||
|
||||
$InstallFileswsx = ".\manifest-install-files.wxs"
|
||||
$InstallFilesWixobj = "manifest-install-files.wixobj"
|
||||
|
||||
function RunHeat
|
||||
{
|
||||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Information "Running heat.."
|
||||
|
||||
$heatOutput = .\heat.exe dir `"$inputDir`" -template fragment `
|
||||
-sreg -ag `
|
||||
-var var.DotnetSrc `
|
||||
-cg InstallFiles `
|
||||
-srd `
|
||||
-dr DOTNETHOME `
|
||||
-out manifest-install-files.wxs
|
||||
|
||||
Write-Information "Heat output: $heatOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Information "Heat failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
Write-Information "RunHeat result: $result"
|
||||
return $result
|
||||
}
|
||||
|
||||
function RunCandle
|
||||
{
|
||||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Information "Running candle.."
|
||||
|
||||
$candleOutput = .\candle.exe -nologo `
|
||||
-dDotnetSrc="$inputDir" `
|
||||
-dMicrosoftEula="$PSScriptRoot\dummyeula.rtf" `
|
||||
-dProductMoniker="$ProductMoniker" `
|
||||
-dBuildVersion="$DotnetMSIVersion" `
|
||||
-dSDKBundleVersion="$SDKBundleVersion" `
|
||||
-dNugetVersion="$DotnetCLINugetVersion" `
|
||||
-dUpgradeCode="$UpgradeCode" `
|
||||
-dDependencyKeyName="$DependencyKeyName" `
|
||||
-arch "$Architecture" `
|
||||
-ext WixDependencyExtension.dll `
|
||||
"$PSScriptRoot\manifests.wxs" `
|
||||
"$PSScriptRoot\provider.wxs" `
|
||||
"$PSScriptRoot\dotnethome_x64.wxs" `
|
||||
$InstallFileswsx
|
||||
|
||||
Write-Information "Candle output: $candleOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Information "Candle failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
return $result
|
||||
}
|
||||
|
||||
function RunLight
|
||||
{
|
||||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Information "Running light.."
|
||||
$CabCache = Join-Path $WixRoot "cabcache"
|
||||
|
||||
$lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
|
||||
-cultures:en-us `
|
||||
manifests.wixobj `
|
||||
provider.wixobj `
|
||||
dotnethome_x64.wixobj `
|
||||
$InstallFilesWixobj `
|
||||
-b "$inputDir" `
|
||||
-b "$PSScriptRoot" `
|
||||
-reusecab `
|
||||
-cc "$CabCache" `
|
||||
-out $DotnetMSIOutput
|
||||
|
||||
Write-Information "Light output: $lightOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Information "Light failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
return $result
|
||||
}
|
||||
|
||||
if(!(Test-Path $inputDir))
|
||||
{
|
||||
throw "$inputDir not found"
|
||||
}
|
||||
|
||||
Write-Information "Creating manifests MSI at $DotnetMSIOutput"
|
||||
|
||||
if([string]::IsNullOrEmpty($WixRoot))
|
||||
{
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(-Not (RunHeat))
|
||||
{
|
||||
Write-Information "Heat failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(-Not (RunCandle))
|
||||
{
|
||||
Write-Information "Candle failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(-Not (RunLight))
|
||||
{
|
||||
Write-Information "Light failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(!(Test-Path $DotnetMSIOutput))
|
||||
{
|
||||
throw "Unable to create the manifests MSI."
|
||||
Exit -1
|
||||
}
|
||||
|
||||
Write-Information "Successfully created manifests MSI - $DotnetMSIOutput"
|
||||
|
||||
exit $LastExitCode
|
Loading…
Add table
Add a link
Reference in a new issue