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">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Android" />
|
<BundledManifests Include="Microsoft.NET.Sdk.Android" FeatureBand="6.0.100" Version="$(XamarinAndroidWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.iOS" />
|
<BundledManifests Include="Microsoft.NET.Sdk.iOS" FeatureBand="6.0.100" Version="$(XamarinIOSWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100" Version="$(XamarinMacCatalystWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.MacCatalyst" />
|
<BundledManifests Include="Microsoft.NET.Sdk.MacCatalyst" FeatureBand="6.0.100" Version="$(XamarinMacCatalystWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.macOS.Manifest-6.0.100" Version="$(XamarinMacOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.macOS" />
|
<BundledManifests Include="Microsoft.NET.Sdk.macOS" FeatureBand="6.0.100" Version="$(XamarinMacOSWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.Maui.Manifest-6.0.100" Version="$(MauiWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.Maui" />
|
<BundledManifests Include="Microsoft.NET.Sdk.Maui" FeatureBand="6.0.100" Version="$(MauiWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Sdk.tvOS.Manifest-6.0.100" Version="$(XamarinTvOSWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Sdk.tvOS" />
|
<BundledManifests Include="Microsoft.NET.Sdk.tvOS" FeatureBand="6.0.100" Version="$(XamarinTvOSWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="$(MonoWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Workload.Mono.ToolChain" />
|
<BundledManifests Include="Microsoft.NET.Workload.Mono.ToolChain" FeatureBand="6.0.100" Version="$(MonoWorkloadManifestVersion)" />
|
||||||
<BundledManifests Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="$(EmscriptenWorkloadManifestVersion)" WorkloadManifestId="Microsoft.NET.Workload.Emscripten" />
|
<BundledManifests Include="Microsoft.NET.Workload.Emscripten" FeatureBand="6.0.100" Version="$(EmscriptenWorkloadManifestVersion)" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<!-- Restore workload manifests via PackageReference -->
|
|
||||||
<ItemGroup>
|
|
||||||
<BundledManifestsForPackageDownload Include="@(BundledManifests)" >
|
|
||||||
<Version>[%(Version)]</Version>
|
|
||||||
</BundledManifestsForPackageDownload>
|
|
||||||
|
|
||||||
<PackageDownload Include="@(BundledManifestsForPackageDownload)" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- 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>
|
<ItemGroup>
|
||||||
<BundledManifests Update="@(BundledManifests)">
|
<BundledManifests Update="@(BundledManifests)">
|
||||||
<RestoredNupkgContentPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower())</RestoredNupkgContentPath>
|
<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>
|
</BundledManifests>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="LayoutManifests"
|
<!-- Restore workload manifests via PackageDownload -->
|
||||||
DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI"/>
|
<ItemGroup>
|
||||||
|
<PackageDownload Include="@(BundledManifests->'%(NupkgId)')" >
|
||||||
|
<Version>[%(Version)]</Version>
|
||||||
|
</PackageDownload>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="LayoutManifestsForSDK"
|
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' != 'arm' ">
|
||||||
DependsOnTargets="SetupBundledComponents;GenerateManifestVersions">
|
<PackageDownload Include="@(BundledManifests->'%(MsiNupkgId)')" >
|
||||||
|
<Version>[%(Version)]</Version>
|
||||||
|
</PackageDownload>
|
||||||
|
|
||||||
|
<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)"
|
<Copy SourceFiles="@(ManifestContent)"
|
||||||
DestinationFolder="$(RedistLayoutPath)sdk-manifests/$(CliProductBandVersion)00/%(DestinationPath)"/>
|
DestinationFolder="$(RedistLayoutPath)sdk-manifests/$(CliProductBandVersion)00/%(DestinationPath)"/>
|
||||||
|
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
|
|
@ -39,9 +39,6 @@
|
||||||
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile>
|
<VSToolsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec</VSToolsNuspecFile>
|
||||||
<VSToolsNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</VSToolsNupkgFile>
|
<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>
|
<SdkResolverLayoutPath>$(ArtifactsDir)bin/SdkResolver/$(Configuration)</SdkResolverLayoutPath>
|
||||||
<VSToolsResolverNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.Resolver.nuspec</VSToolsResolverNuspecFile>
|
<VSToolsResolverNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.Resolver.nuspec</VSToolsResolverNuspecFile>
|
||||||
<VSToolsResolverNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.Resolver.nupkg</VSToolsResolverNupkgFile>
|
<VSToolsResolverNupkgFile>$(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.Resolver.nupkg</VSToolsResolverNupkgFile>
|
||||||
|
@ -283,49 +280,36 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="GenerateManifestsMsi"
|
<Target Name="GenerateWorkloadManifestsWxs"
|
||||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo"
|
DependsOnTargets="ValidateBundledManifestSigning">
|
||||||
Condition="$(ProductMonikerRid.StartsWith('win')) And '$(Architecture)' != 'arm'"
|
|
||||||
Inputs="@(BundledManifests);$(ManifestsGenerateMsiPowershellScript)"
|
|
||||||
Outputs="$(ManifestsMSIInstallerFile)">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Exec Command="powershell -NoProfile -NoLogo $(ManifestsGenerateMsiPowershellScript) ^
|
<WriteLinesToFile File="$(WorkloadManifestsWxsPath)"
|
||||||
'$(ManifestsLayoutPath)' ^
|
Lines="$(WorkloadManifestsWxsContent)"
|
||||||
'$(ManifestsMSIInstallerFile)' ^
|
WriteOnlyWhenDifferent="true"
|
||||||
'$(WixRoot)' ^
|
Overwrite="true" />
|
||||||
'$(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>
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="GenerateSdkBundle"
|
<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' "
|
Condition=" '$(OS)' == 'Windows_NT' "
|
||||||
Inputs="$(SdkMSIInstallerFile);
|
Inputs="$(SdkMSIInstallerFile);
|
||||||
$(DownloadedSharedFrameworkInstallerFile);
|
$(DownloadedSharedFrameworkInstallerFile);
|
||||||
|
@ -344,6 +328,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
||||||
|
'$(WorkloadManifestsWxsPath)' ^
|
||||||
'$(SdkMSIInstallerFile)' ^
|
'$(SdkMSIInstallerFile)' ^
|
||||||
'$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)' ^
|
'$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)' ^
|
||||||
'$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
'$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName)' ^
|
||||||
|
@ -360,7 +345,6 @@
|
||||||
'$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
'$(DownloadsFolder)$(DownloadedWindowsDesktopTargetingPackInstallerFileName)' ^
|
||||||
'$(FinalizerExe)' ^
|
'$(FinalizerExe)' ^
|
||||||
'$(LatestTemplateMsiInstallerFile)' ^
|
'$(LatestTemplateMsiInstallerFile)' ^
|
||||||
'$(ManifestsMsiInstallerFile)' ^
|
|
||||||
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
'$(CombinedFrameworkSdkHostMSIInstallerFile)' ^
|
||||||
'$(WixRoot)' ^
|
'$(WixRoot)' ^
|
||||||
'$(SdkBrandName)' ^
|
'$(SdkBrandName)' ^
|
||||||
|
@ -377,6 +361,7 @@
|
||||||
-InformationAction Continue " />
|
-InformationAction Continue " />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BundleMsiWixSrcFiles Include="$(WixRoot)\bundle.wixobj" />
|
<BundleMsiWixSrcFiles Include="$(WixRoot)\bundle.wixobj" />
|
||||||
|
<BundleMsiWixSrcFiles Include="$(WixRoot)\WorkloadManifests.wixobj" />
|
||||||
<BundleMsiWixSrcFiles Include="$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)" />
|
<BundleMsiWixSrcFiles Include="$(DownloadsFolder)$(DownloadedAspNetCoreSharedFxWixLibFileName)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<CreateLightCommandPackageDrop
|
<CreateLightCommandPackageDrop
|
||||||
|
@ -460,24 +445,6 @@
|
||||||
|
|
||||||
</Target>
|
</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"
|
<Target Name="GenerateVSToolsNupkg"
|
||||||
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs"
|
||||||
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86' "
|
Condition=" '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x86' "
|
||||||
|
@ -555,14 +522,12 @@
|
||||||
GenerateSdkMsi;
|
GenerateSdkMsi;
|
||||||
SignSdkMsi;
|
SignSdkMsi;
|
||||||
GenerateTemplatesMsis;
|
GenerateTemplatesMsis;
|
||||||
GenerateManifestsMsi;
|
|
||||||
SignTemplatesMsis;
|
SignTemplatesMsis;
|
||||||
GenerateSdkBundle;
|
GenerateSdkBundle;
|
||||||
SignSdkBundle;
|
SignSdkBundle;
|
||||||
GenerateSdkPlaceholderMsi;
|
GenerateSdkPlaceholderMsi;
|
||||||
SignSdkPlaceholderMsi;
|
SignSdkPlaceholderMsi;
|
||||||
GenerateToolsetNupkg;
|
GenerateToolsetNupkg;
|
||||||
GenerateManifestNupkg;
|
|
||||||
GenerateTemplatesNupkgs;
|
GenerateTemplatesNupkgs;
|
||||||
GenerateSdkPlaceholderNupkg;
|
GenerateSdkPlaceholderNupkg;
|
||||||
GenerateVSToolsNupkg;
|
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="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||||
<MsiProperty Name="ALLOWMSIINSTALL" Value="True" />
|
<MsiProperty Name="ALLOWMSIINSTALL" Value="True" />
|
||||||
</MsiPackage>
|
</MsiPackage>
|
||||||
<MsiPackage SourceFile="$(var.ManifestsMsiSourcePath)">
|
<PackageGroupRef Id="PG_WorkloadManifests" />
|
||||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
|
||||||
<MsiProperty Name="ALLOWMSIINSTALL" Value="True" />
|
|
||||||
</MsiPackage>
|
|
||||||
<MsiPackage SourceFile="$(var.CLISDKMsiSourcePath)">
|
<MsiPackage SourceFile="$(var.CLISDKMsiSourcePath)">
|
||||||
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
|
||||||
<MsiProperty Name="EXEFULLPATH" Value="[WixBundleOriginalSource]" />
|
<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.
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
param(
|
param(
|
||||||
|
[Parameter(Mandatory=$true)][string]$WorkloadManifestWxsFile,
|
||||||
[Parameter(Mandatory=$true)][string]$CLISDKMSIFile,
|
[Parameter(Mandatory=$true)][string]$CLISDKMSIFile,
|
||||||
[Parameter(Mandatory=$true)][string]$ASPNETRuntimeWixLibFile,
|
[Parameter(Mandatory=$true)][string]$ASPNETRuntimeWixLibFile,
|
||||||
[Parameter(Mandatory=$true)][string]$SharedFxMSIFile,
|
[Parameter(Mandatory=$true)][string]$SharedFxMSIFile,
|
||||||
|
@ -18,7 +19,6 @@ param(
|
||||||
[Parameter(Mandatory=$true)][string]$WindowsDesktopTargetingPackMSIFile,
|
[Parameter(Mandatory=$true)][string]$WindowsDesktopTargetingPackMSIFile,
|
||||||
[Parameter(Mandatory=$true)][string]$FinalizerExe,
|
[Parameter(Mandatory=$true)][string]$FinalizerExe,
|
||||||
[Parameter(Mandatory=$true)][string]$TemplatesMSIFile,
|
[Parameter(Mandatory=$true)][string]$TemplatesMSIFile,
|
||||||
[Parameter(Mandatory=$true)][string]$ManifestsMSIFile,
|
|
||||||
[Parameter(Mandatory=$true)][string]$DotnetBundleOutput,
|
[Parameter(Mandatory=$true)][string]$DotnetBundleOutput,
|
||||||
[Parameter(Mandatory=$true)][string]$WixRoot,
|
[Parameter(Mandatory=$true)][string]$WixRoot,
|
||||||
[Parameter(Mandatory=$true)][string]$ProductMoniker,
|
[Parameter(Mandatory=$true)][string]$ProductMoniker,
|
||||||
|
@ -78,7 +78,7 @@ function RunCandleForBundle
|
||||||
-ext WixBalExtension.dll `
|
-ext WixBalExtension.dll `
|
||||||
-ext WixUtilExtension.dll `
|
-ext WixUtilExtension.dll `
|
||||||
-ext WixTagExtension.dll `
|
-ext WixTagExtension.dll `
|
||||||
"$AuthWsxRoot\bundle.wxs"
|
"$AuthWsxRoot\bundle.wxs" "$WorkloadManifestWxsFile"
|
||||||
|
|
||||||
Write-Information "Candle output: $candleOutput"
|
Write-Information "Candle output: $candleOutput"
|
||||||
|
|
||||||
|
@ -97,11 +97,14 @@ function RunLightForBundle
|
||||||
$result = $true
|
$result = $true
|
||||||
pushd "$WixRoot"
|
pushd "$WixRoot"
|
||||||
|
|
||||||
|
$WorkloadManifestWixobjFile = [System.IO.Path]::GetFileNameWithoutExtension($WorkloadManifestWxsFile) + ".wixobj"
|
||||||
|
|
||||||
Write-Information "Running light for bundle.."
|
Write-Information "Running light for bundle.."
|
||||||
|
|
||||||
$lightOutput = .\light.exe -nologo `
|
$lightOutput = .\light.exe -nologo `
|
||||||
-cultures:en-us `
|
-cultures:en-us `
|
||||||
bundle.wixobj `
|
bundle.wixobj `
|
||||||
|
$WorkloadManifestWixobjFile `
|
||||||
$ASPNETRuntimeWixlibFile `
|
$ASPNETRuntimeWixlibFile `
|
||||||
-ext WixBalExtension.dll `
|
-ext WixBalExtension.dll `
|
||||||
-ext WixUtilExtension.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