From 5ea0d2c665358460247e6a7862346946d318b5eb Mon Sep 17 00:00:00 2001 From: Sridhar Periyasamy Date: Thu, 14 Apr 2016 11:47:51 -0700 Subject: [PATCH 1/2] Remove check for previous versions of CLI SDK. In the MSI we used to check for any previous installation and we prevent any installation of 'Release' version on top of 'Nightly' version and vice versa. This is no longer needed since CLI SxS now. This is reminiscent of pre-sharedFx CLI. Fixes - #2467 --- packaging/windows/clisdk/bundle.thm | 1 - packaging/windows/clisdk/bundle.wxs | 2 -- packaging/windows/clisdk/checkbuildtype.wxs | 14 -------------- packaging/windows/clisdk/dotnet.wxs | 2 -- packaging/windows/clisdk/generatebundle.ps1 | 4 +--- packaging/windows/clisdk/generatemsi.ps1 | 6 +----- packaging/windows/clisdk/registrykeys.wxs | 2 -- packaging/windows/clisdk/variables.wxi | 9 +-------- scripts/dotnet-cli-build/MsiTargets.cs | 4 ++-- 9 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 packaging/windows/clisdk/checkbuildtype.wxs diff --git a/packaging/windows/clisdk/bundle.thm b/packaging/windows/clisdk/bundle.thm index 16839fa68..d8a983717 100644 --- a/packaging/windows/clisdk/bundle.thm +++ b/packaging/windows/clisdk/bundle.thm @@ -23,7 +23,6 @@ v[DisplayVersion] - [ReleaseSuffix] [BuildType] #(loc.Motto) diff --git a/packaging/windows/clisdk/bundle.wxs b/packaging/windows/clisdk/bundle.wxs index cfd89df67..d1f6039ef 100644 --- a/packaging/windows/clisdk/bundle.wxs +++ b/packaging/windows/clisdk/bundle.wxs @@ -23,9 +23,7 @@ - - diff --git a/packaging/windows/clisdk/checkbuildtype.wxs b/packaging/windows/clisdk/checkbuildtype.wxs deleted file mode 100644 index 603e67ee2..000000000 --- a/packaging/windows/clisdk/checkbuildtype.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - Installed OR NOT INSTALLEDCLIBUILDTYPE OR INSTALLEDCLIBUILDTYPE ~= "$(var.BuildType)" - - - \ No newline at end of file diff --git a/packaging/windows/clisdk/dotnet.wxs b/packaging/windows/clisdk/dotnet.wxs index 561a469ab..3872a645f 100644 --- a/packaging/windows/clisdk/dotnet.wxs +++ b/packaging/windows/clisdk/dotnet.wxs @@ -28,8 +28,6 @@ - - diff --git a/packaging/windows/clisdk/generatebundle.ps1 b/packaging/windows/clisdk/generatebundle.ps1 index 483772c17..f06414f3b 100644 --- a/packaging/windows/clisdk/generatebundle.ps1 +++ b/packaging/windows/clisdk/generatebundle.ps1 @@ -10,8 +10,7 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$DotnetCLIVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture, - [Parameter(Mandatory=$true)][string]$ReleaseSuffix + [Parameter(Mandatory=$true)][string]$Architecture ) . "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" @@ -30,7 +29,6 @@ function RunCandleForBundle -dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" ` -dBuildVersion="$DotnetMSIVersion" ` -dDisplayVersion="$DotnetCLIVersion" ` - -dReleaseSuffix="$ReleaseSuffix" ` -dCLISDKMsiSourcePath="$CLISDKMSIFile" ` -dUpgradeCode="$UpgradeCode" ` -dSharedFXMsiSourcePath="$SharedFxMSIFile" ` diff --git a/packaging/windows/clisdk/generatemsi.ps1 b/packaging/windows/clisdk/generatemsi.ps1 index 452da389e..abb1a066d 100644 --- a/packaging/windows/clisdk/generatemsi.ps1 +++ b/packaging/windows/clisdk/generatemsi.ps1 @@ -8,8 +8,7 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$DotnetCLIVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture, - [Parameter(Mandatory=$true)][string]$ReleaseSuffix + [Parameter(Mandatory=$true)][string]$Architecture ) . "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" @@ -51,13 +50,11 @@ function RunCandle -dBuildVersion="$DotnetMSIVersion" ` -dDisplayVersion="$DotnetCLIVersion" ` -dUpgradeCode="$UpgradeCode" ` - -dReleaseSuffix="$ReleaseSuffix" ` -arch "$Architecture" ` -ext WixDependencyExtension.dll ` "$AuthWsxRoot\dotnet.wxs" ` "$AuthWsxRoot\provider.wxs" ` "$AuthWsxRoot\registrykeys.wxs" ` - "$AuthWsxRoot\checkbuildtype.wxs" ` $InstallFileswsx | Out-Host if($LastExitCode -ne 0) @@ -84,7 +81,6 @@ function RunLight dotnet.wixobj ` provider.wixobj ` registrykeys.wixobj ` - checkbuildtype.wixobj ` $InstallFilesWixobj ` -b "$inputDir" ` -b "$AuthWsxRoot" ` diff --git a/packaging/windows/clisdk/registrykeys.wxs b/packaging/windows/clisdk/registrykeys.wxs index efb5c2b39..7b8acded5 100644 --- a/packaging/windows/clisdk/registrykeys.wxs +++ b/packaging/windows/clisdk/registrykeys.wxs @@ -10,7 +10,6 @@ - @@ -21,7 +20,6 @@ - diff --git a/packaging/windows/clisdk/variables.wxi b/packaging/windows/clisdk/variables.wxi index dd462f1de..77f007fb9 100644 --- a/packaging/windows/clisdk/variables.wxi +++ b/packaging/windows/clisdk/variables.wxi @@ -1,11 +1,5 @@ - - - - - - @@ -13,14 +7,13 @@ - + - diff --git a/scripts/dotnet-cli-build/MsiTargets.cs b/scripts/dotnet-cli-build/MsiTargets.cs index aa5156be0..ec178a599 100644 --- a/scripts/dotnet-cli-build/MsiTargets.cs +++ b/scripts/dotnet-cli-build/MsiTargets.cs @@ -127,7 +127,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatemsi.ps1"), - cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch, Channel) + cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch) .Execute() .EnsureSuccessful(); return c.Success(); @@ -188,7 +188,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatebundle.ps1"), - SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch, Channel) + SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch) .EnvironmentVariable("Stage2Dir", Dirs.Stage2) .Execute() .EnsureSuccessful(); From 47816da80d40ea7a05ae0fd5d567d178808ac742 Mon Sep 17 00:00:00 2001 From: Sridhar Periyasamy Date: Fri, 15 Apr 2016 12:11:10 -0700 Subject: [PATCH 2/2] Remove any 'beta' string from the MSI installers. Fixes #2463 --- packaging/windows/clisdk/bundle.thm | 3 +-- packaging/windows/clisdk/bundle.wxs | 2 -- packaging/windows/clisdk/generatebundle.ps1 | 6 ++++-- packaging/windows/clisdk/generatemsi.ps1 | 6 ++++-- packaging/windows/clisdk/variables.wxi | 4 ++-- packaging/windows/host/generatemsi.ps1 | 6 ++++-- packaging/windows/host/variables.wxi | 2 +- packaging/windows/sharedframework/bundle.thm | 4 +--- .../windows/sharedframework/generatebundle.ps1 | 4 +--- scripts/dotnet-cli-build/MsiTargets.cs | 18 +++++++++--------- 10 files changed, 27 insertions(+), 28 deletions(-) diff --git a/packaging/windows/clisdk/bundle.thm b/packaging/windows/clisdk/bundle.thm index d8a983717..ac73538a8 100644 --- a/packaging/windows/clisdk/bundle.thm +++ b/packaging/windows/clisdk/bundle.thm @@ -22,8 +22,7 @@ - v[DisplayVersion] - #(loc.Motto) + #(loc.Motto) diff --git a/packaging/windows/clisdk/bundle.wxs b/packaging/windows/clisdk/bundle.wxs index d1f6039ef..1bb50e2e8 100644 --- a/packaging/windows/clisdk/bundle.wxs +++ b/packaging/windows/clisdk/bundle.wxs @@ -23,8 +23,6 @@ - - diff --git a/packaging/windows/clisdk/generatebundle.ps1 b/packaging/windows/clisdk/generatebundle.ps1 index f06414f3b..f1beabc30 100644 --- a/packaging/windows/clisdk/generatebundle.ps1 +++ b/packaging/windows/clisdk/generatebundle.ps1 @@ -8,7 +8,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetBundleOutput, [Parameter(Mandatory=$true)][string]$WixRoot, [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, - [Parameter(Mandatory=$true)][string]$DotnetCLIVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$Architecture ) @@ -28,7 +29,8 @@ function RunCandleForBundle -dDotnetSrc="$inputDir" ` -dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" ` -dBuildVersion="$DotnetMSIVersion" ` - -dDisplayVersion="$DotnetCLIVersion" ` + -dDisplayVersion="$DotnetCLIDisplayVersion" ` + -dNugetVersion="$DotnetCLINugetVersion" ` -dCLISDKMsiSourcePath="$CLISDKMSIFile" ` -dUpgradeCode="$UpgradeCode" ` -dSharedFXMsiSourcePath="$SharedFxMSIFile" ` diff --git a/packaging/windows/clisdk/generatemsi.ps1 b/packaging/windows/clisdk/generatemsi.ps1 index abb1a066d..ba83887f8 100644 --- a/packaging/windows/clisdk/generatemsi.ps1 +++ b/packaging/windows/clisdk/generatemsi.ps1 @@ -6,7 +6,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIOutput, [Parameter(Mandatory=$true)][string]$WixRoot, [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, - [Parameter(Mandatory=$true)][string]$DotnetCLIVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$Architecture ) @@ -48,7 +49,8 @@ function RunCandle -dDotnetSrc="$inputDir" ` -dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" ` -dBuildVersion="$DotnetMSIVersion" ` - -dDisplayVersion="$DotnetCLIVersion" ` + -dDisplayVersion="$DotnetCLIDisplayVersion" ` + -dNugetVersion="$DotnetCLINugetVersion" ` -dUpgradeCode="$UpgradeCode" ` -arch "$Architecture" ` -ext WixDependencyExtension.dll ` diff --git a/packaging/windows/clisdk/variables.wxi b/packaging/windows/clisdk/variables.wxi index 77f007fb9..2afbba0de 100644 --- a/packaging/windows/clisdk/variables.wxi +++ b/packaging/windows/clisdk/variables.wxi @@ -4,10 +4,10 @@ - + - + diff --git a/packaging/windows/host/generatemsi.ps1 b/packaging/windows/host/generatemsi.ps1 index 6870151eb..97eb186de 100644 --- a/packaging/windows/host/generatemsi.ps1 +++ b/packaging/windows/host/generatemsi.ps1 @@ -6,7 +6,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetHostMSIOutput, [Parameter(Mandatory=$true)][string]$WixRoot, [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, - [Parameter(Mandatory=$true)][string]$DotnetCLIVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, [Parameter(Mandatory=$true)][string]$Architecture, [Parameter(Mandatory=$true)][string]$WixObjRoot ) @@ -28,7 +29,8 @@ function RunCandle -dHostSrc="$SharedHostPublishRoot" ` -dMicrosoftEula="$RepoRoot\packaging\osx\clisdk\resources\en.lproj\eula.rtf" ` -dBuildVersion="$DotnetMSIVersion" ` - -dDisplayVersion="$DotnetCLIVersion" ` + -dDisplayVersion="$DotnetCLIDisplayVersion" ` + -dNugetVersion="$DotnetCLINugetVersion" ` -arch $Architecture ` "$AuthWsxRoot\host.wxs" ` "$AuthWsxRoot\provider.wxs" ` diff --git a/packaging/windows/host/variables.wxi b/packaging/windows/host/variables.wxi index 71ea4a1d8..97c18491f 100644 --- a/packaging/windows/host/variables.wxi +++ b/packaging/windows/host/variables.wxi @@ -8,7 +8,7 @@ - + diff --git a/packaging/windows/sharedframework/bundle.thm b/packaging/windows/sharedframework/bundle.thm index 16839fa68..ac73538a8 100644 --- a/packaging/windows/sharedframework/bundle.thm +++ b/packaging/windows/sharedframework/bundle.thm @@ -22,9 +22,7 @@ - v[DisplayVersion] - [ReleaseSuffix] [BuildType] - #(loc.Motto) + #(loc.Motto) diff --git a/packaging/windows/sharedframework/generatebundle.ps1 b/packaging/windows/sharedframework/generatebundle.ps1 index f0b909058..a9aaf0df3 100644 --- a/packaging/windows/sharedframework/generatebundle.ps1 +++ b/packaging/windows/sharedframework/generatebundle.ps1 @@ -11,8 +11,7 @@ param( [Parameter(Mandatory=$true)][string]$SharedFrameworkNugetName, [Parameter(Mandatory=$true)][string]$SharedFrameworkNugetVersion, [Parameter(Mandatory=$true)][string]$SharedFrameworkUpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture, - [Parameter(Mandatory=$true)][string]$ReleaseSuffix + [Parameter(Mandatory=$true)][string]$Architecture ) . "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" @@ -30,7 +29,6 @@ function RunCandleForBundle -dMicrosoftEula="$RepoRoot\packaging\osx\sharedframework\resources\en.lproj\eula.rtf" ` -dBuildVersion="$DotnetMSIVersion" ` -dDisplayVersion="$DotnetCLIVersion" ` - -dReleaseSuffix="$ReleaseSuffix" ` -dSharedFXMsiSourcePath="$SharedFxMSIFile" ` -dSharedHostMsiSourcePath="$SharedHostMSIFile" ` -dFrameworkName="$SharedFrameworkNugetName" ` diff --git a/scripts/dotnet-cli-build/MsiTargets.cs b/scripts/dotnet-cli-build/MsiTargets.cs index ec178a599..b5c26d32a 100644 --- a/scripts/dotnet-cli-build/MsiTargets.cs +++ b/scripts/dotnet-cli-build/MsiTargets.cs @@ -41,12 +41,12 @@ namespace Microsoft.DotNet.Cli.Build private static string MsiVersion { get; set; } - private static string CliVersion { get; set; } + private static string CliDisplayVersion { get; set; } + + private static string CliNugetVersion { get; set; } private static string Arch { get; } = CurrentArchitecture.Current.ToString(); - private static string Channel { get; set; } - private static void AcquireWix(BuildTargetContext c) { if (File.Exists(Path.Combine(WixRoot, "candle.exe"))) @@ -92,8 +92,8 @@ namespace Microsoft.DotNet.Cli.Build var buildVersion = c.BuildContext.Get("BuildVersion"); MsiVersion = buildVersion.GenerateMsiVersion(); - CliVersion = buildVersion.SimpleVersion; - Channel = c.BuildContext.Get("Channel"); + CliDisplayVersion = buildVersion.SimpleVersion; + CliNugetVersion = buildVersion.NuGetVersion; AcquireWix(c); return c.Success(); @@ -127,7 +127,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatemsi.ps1"), - cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch) + cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliDisplayVersion, CliNugetVersion, upgradeCode, Arch) .Execute() .EnsureSuccessful(); return c.Success(); @@ -148,7 +148,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"), - inputDir, SharedHostMsi, WixRoot, MsiVersion, CliVersion, Arch, wixObjRoot) + inputDir, SharedHostMsi, WixRoot, MsiVersion, CliDisplayVersion, CliNugetVersion, Arch, wixObjRoot) .Execute() .EnsureSuccessful(); return c.Success(); @@ -188,7 +188,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatebundle.ps1"), - SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, upgradeCode, Arch) + SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliDisplayVersion, CliNugetVersion, upgradeCode, Arch) .EnvironmentVariable("Stage2Dir", Dirs.Stage2) .Execute() .EnsureSuccessful(); @@ -205,7 +205,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"), - SharedFrameworkMsi, SharedHostMsi, SharedFrameworkBundle, WixRoot, MsiVersion, CliVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch, Channel) + SharedFrameworkMsi, SharedHostMsi, SharedFrameworkBundle, WixRoot, MsiVersion, CliDisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch) .Execute() .EnsureSuccessful(); return c.Success();