From e2eb862efbca6070dc5c661e746840409c8d471d Mon Sep 17 00:00:00 2001 From: jbeisner Date: Thu, 11 Jul 2019 00:43:29 +0000 Subject: [PATCH 1/4] Creating a Windows MSI for templates. --- src/redist/targets/BundledTemplates.targets | 23 ++- src/redist/targets/GenerateLayout.targets | 2 + src/redist/targets/GenerateMSIs.targets | 76 +++++++-- .../targets/GetRuntimeInformation.targets | 2 + src/redist/targets/Signing.targets | 32 +++- .../VS.Redist.Common.NetCore.Templates.nuspec | 19 +++ .../packaging/windows/clisdk/bundle.wxs | 4 + .../windows/clisdk/generatebundle.ps1 | 2 + .../windows/clisdk/generatetemplatesmsi.ps1 | 149 ++++++++++++++++++ .../packaging/windows/clisdk/templates.wxs | 49 ++++++ 10 files changed, 339 insertions(+), 19 deletions(-) create mode 100644 src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.Templates.nuspec create mode 100644 src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 create mode 100644 src/redist/targets/packaging/windows/clisdk/templates.wxs diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index 234a66589..e698e7a31 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -1,4 +1,14 @@ + + + $(MicrosoftNETCoreAppPackageVersion.IndexOf('-')) + $(MicrosoftNETCoreAppPackageVersion) + $(MicrosoftNETCoreAppPackageVersion.Substring(0, $(MicrosoftNETCoreAppVersionPreReleaseSeparator))) + $(MicrosoftNETCoreAppMajorMinorPatchVersion)-$(VersionSuffix) + + + @@ -25,13 +35,20 @@ - + - + DestinationFolder="$(RedistLayoutPath)templates/$(BundledTemplatesVersion)"/> + + + + diff --git a/src/redist/targets/GenerateLayout.targets b/src/redist/targets/GenerateLayout.targets index c39adc4ed..8a66ee6f3 100644 --- a/src/redist/targets/GenerateLayout.targets +++ b/src/redist/targets/GenerateLayout.targets @@ -2,6 +2,7 @@ $(BaseOutputPath)$(Configuration)\dotnet\ $(BaseOutputPath)$(Configuration)\dotnet-internal\ + $(BaseOutputPath)$(Configuration)\dotnet-templates\ $(IntermediateOutputPath)downloads\ @@ -415,6 +416,7 @@ GenerateBundledVersions; LayoutRuntimeGraph; LayoutTemplates; + LayoutTemplatesForMSI; LayoutBundledTools; RetargetTools; CrossgenLayout; diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index dffddf82c..3f9118d95 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -16,11 +16,14 @@ $(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1 $(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt + $(MSBuildThisFileDirectory)packaging/windows/clisdk/generatetemplatesmsi.ps1 $(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1 $(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1 $(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec $(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Toolset.$(Architecture).$(FullNugetVersion).nupkg + $(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.NetCore.Templates.nuspec + $(ArtifactsNonShippingPackagesDir)VS.Redist.Common.NetCore.Templates.$(Architecture).$(FullNugetVersion).nupkg $(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Tools.Net.Core.SDK.nuspec $(ArtifactsNonShippingPackagesDir)VS.Tools.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg @@ -36,6 +39,8 @@ $(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension) $(ArtifactsShippingPackagesDir)d$(Architecture)-1.cab + $(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionTemplates)$(InstallerExtension) + $(ArtifactsShippingPackagesDir)t$(Architecture)-1.cab $(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) $(ProductBandCombinedHostHostFxrFrameworkSdkName) @@ -49,15 +54,9 @@ - - - - - - + + + + + @@ -104,8 +108,9 @@ + + + + + + + + + + + Condition=" '$(OS)' == 'Windows_NT' and !$(Architecture.StartsWith('arm')) " /> diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets index ff9ee1781..82ed1085a 100644 --- a/src/redist/targets/GetRuntimeInformation.targets +++ b/src/redist/targets/GetRuntimeInformation.targets @@ -42,9 +42,11 @@ $(Architecture) dotnet-sdk-internal + dotnet-templates dotnet-sdk $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) + $(ArtifactNameTemplates)-$(SdkVersion)-$(ProductMonikerRid) dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) @@ -248,6 +250,14 @@ SkipUnchangedFiles="False" UseHardlinksIfPossible="False" /> + + + + + + + + + + @@ -50,6 +51,12 @@ SkipUnchangedFiles="False" UseHardlinksIfPossible="False"/> + + $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion) $(SdkVersion) $(RedistLayoutPath)sdk/ + $(RedistLayoutPath)Templates/ $(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension) $(SdkRPMInstallerFile) @@ -183,6 +191,7 @@ $(RpmIntermediatesDir)/RpmLayoutDirectory/ $(RpmLayoutDirectory)package_root $(RpmLayoutPackageRoot)/sdk + $(RpmLayoutPackageRoot)/Templates $(RpmLayoutDirectory)docs $(RpmLayoutDirectory)templates $(RpmLayoutDirectory)scripts From 5475a81a55abc330be998810b7b4cde96cad58f4 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Mon, 15 Jul 2019 10:25:17 -0700 Subject: [PATCH 3/4] Switch to lower case t (templates) for the folder name under dotnet. --- src/redist/targets/BundledTemplates.targets | 4 ++-- src/redist/targets/GenerateDebs.targets | 4 ++-- src/redist/targets/GeneratePKG.targets | 4 ++-- src/redist/targets/GenerateRPMs.targets | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index 3c498063e..e698e7a31 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -42,13 +42,13 @@ + DestinationFolder="$(RedistLayoutPath)templates/$(BundledTemplatesVersion)"/> + DestinationFolder="$(TemplatesLayoutPath)templates/$(BundledTemplatesVersion)"/> diff --git a/src/redist/targets/GenerateDebs.targets b/src/redist/targets/GenerateDebs.targets index 2d093603a..421b6e70a 100644 --- a/src/redist/targets/GenerateDebs.targets +++ b/src/redist/targets/GenerateDebs.targets @@ -83,7 +83,7 @@ $(RepoRoot)Documentation/manpages $(RepoRoot)test/EndToEnd/EndToEnd.Tests.csproj $(RedistLayoutPath)sdk/ - $(RedistLayoutPath)Templates/ + $(RedistLayoutPath)templates/ @@ -252,7 +252,7 @@ - + @@ -141,7 +141,7 @@ DestinationDirectory="$(SdkInternalLayoutPath)" /> + DestinationFiles="@(TemplateFiles->'$(SdkInternalLayoutPath)/templates/%(RecursiveDir)%(Filename)%(Extension)')" /> $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion) $(SdkVersion) $(RedistLayoutPath)sdk/ - $(RedistLayoutPath)Templates/ + $(RedistLayoutPath)templates/ $(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension) $(SdkRPMInstallerFile) @@ -191,7 +191,7 @@ $(RpmIntermediatesDir)/RpmLayoutDirectory/ $(RpmLayoutDirectory)package_root $(RpmLayoutPackageRoot)/sdk - $(RpmLayoutPackageRoot)/Templates + $(RpmLayoutPackageRoot)/templates $(RpmLayoutDirectory)docs $(RpmLayoutDirectory)templates $(RpmLayoutDirectory)scripts From 34a888c02f957beb5556a2ac7613e54b9c5fc3af Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Mon, 15 Jul 2019 17:22:56 -0700 Subject: [PATCH 4/4] Fixing the condition for when we do a build without a suffix (final branding). --- src/redist/targets/BundledTemplates.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index e698e7a31..fe161fe49 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -5,7 +5,8 @@ $(MicrosoftNETCoreAppPackageVersion.IndexOf('-')) $(MicrosoftNETCoreAppPackageVersion) $(MicrosoftNETCoreAppPackageVersion.Substring(0, $(MicrosoftNETCoreAppVersionPreReleaseSeparator))) - $(MicrosoftNETCoreAppMajorMinorPatchVersion)-$(VersionSuffix) + $(MicrosoftNETCoreAppMajorMinorPatchVersion) + $(BundledTemplatesVersion)-$(VersionSuffix)