Chain the sharedfx and sharedhost MSIs into a single dotnet redist bundle.

This commit is contained in:
Sridhar Periyasamy 2016-03-17 17:54:01 -07:00 committed by Piotr Puszkiewicz
parent 55ca13eee7
commit aeaced5b63
26 changed files with 375 additions and 18 deletions

View file

@ -12,7 +12,7 @@
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.Foundation">
<bal:WixStandardBootstrapperApplication
LicenseFile="..\osx\resources\en.lproj\eula.rtf"
LicenseFile="..\..\osx\resources\en.lproj\eula.rtf"
ShowFilesInUse="yes"
ShowVersion="yes"
/>
@ -48,7 +48,7 @@
<PayloadGroup Id="DotnetCoreBAPayloads">
<Payload Name="thm.xml" Compressed="yes" SourceFile="bundle.thm" />
<Payload Name="thm.wxl" Compressed="yes" SourceFile="bundle.wxl" />
<Payload Name="bg.png" Compressed="yes" SourceFile="..\osx\resources\dotnetbackground.png" />
<Payload Name="bg.png" Compressed="yes" SourceFile="..\..\osx\resources\dotnetbackground.png" />
<Payload Name='eula.rtf' Compressed='yes' SourceFile='!(wix.WixStdbaLicenseRtf)' />
</PayloadGroup>

View file

@ -13,8 +13,8 @@ param(
[Parameter(Mandatory=$true)][string]$ReleaseSuffix
)
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
$RepoRoot = Convert-Path "$PSScriptRoot\..\.."
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.."
function RunCandleForBundle
{
@ -22,7 +22,7 @@ function RunCandleForBundle
pushd "$WixRoot"
Write-Host Running candle for bundle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
.\candle.exe -nologo `
-dDotnetSrc="$inputDir" `
@ -55,7 +55,7 @@ function RunLightForBundle
pushd "$WixRoot"
Write-Host Running light for bundle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
.\light.exe -nologo `
-cultures:en-us `

View file

@ -11,8 +11,8 @@ param(
[Parameter(Mandatory=$true)][string]$ReleaseSuffix
)
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
$RepoRoot = Convert-Path "$PSScriptRoot\..\.."
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.."
$InstallFileswsx = "install-files.wxs"
$InstallFilesWixobj = "install-files.wixobj"
@ -42,7 +42,7 @@ function RunCandle
pushd "$WixRoot"
Write-Host Running candle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
.\candle.exe -nologo `
-dDotnetSrc="$inputDir" `
@ -75,7 +75,7 @@ function RunLight
Write-Host Running light..
$CabCache = Join-Path $WixRoot "cabcache"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
.\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
-cultures:en-us `

View file

@ -20,7 +20,7 @@ function RunCandle
pushd "$WixRoot"
Write-Host Running candle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\host\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\host"
.\candle.exe -nologo `
-out "$WixObjRoot\" `

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
<Window Width="620" Height="418" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="1" Height="-36" Weight="900" Foreground="FFFFFF" Background="682079">Segoe UI</Font>
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>
<Font Id="5" Height="-14" Weight="500" Foreground="444444">Segoe UI</Font>
<Text X="11" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" Center="yes" DisablePrefix="yes">#(loc.Title)</Text>
<Page Name="Help">
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
<Text X="20" Y="115" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
</Page>
<Page Name="Install">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text Name="InstallVersion" X="11" Y="80" Width="135" Height="30" FontId="2" DisablePrefix="yes" HideWhenDisabled="yes">v[DisplayVersion]</Text>
<Text X="11" Y="110" Width="135" Height="30" FontId="2" DisablePrefix="yes">[ReleaseSuffix] [BuildType]</Text>
<Text X="11" Y="145" Width="135" Height="100" FontId="5" DisablePrefix="yes">#(loc.Motto)</Text>
<Text X="155" Y="80" Width="-11" Height="-70" TabStop="no" FontId="2" HexStyle="0x800000" DisablePrefix="yes" />
<Richedit Name="EulaRichedit" X="158" Y="81" Width="-12" Height="-71" TabStop="yes" FontId="0" />
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
</Page>
<Page Name="Options">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
</Page>
<Page Name="FilesInUse">
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FilesInUseHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>
<Text Name="FilesInUseText" X="11" Y="150" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000000C">A</Text>
<Button Name="FilesInUseCloseRadioButton" X="300" Y="-65" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
<Button Name="FilesInUseDontCloseRadioButton" X="300" Y="-45" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>
<Button Name="FilesInUseOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>
<Button Name="FilesInUseCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
</Page>
<Page Name="Progress">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>
<Page Name="Modify">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
</Page>
<Page Name="Success">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
<Text Name="SuccessInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessInstallHeader)</Text>
<Text Name="SuccessRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRepairHeader)</Text>
<Text Name="SuccessUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessUninstallHeader)</Text>
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
</Page>
<Page Name="Failure">
<Image X="0" Y="0" Width="620" Height="418" ImageFile="bg.png" />
<Text X="0" Y="0" Width="620" Height="75" FontId="1" />
<Text Name="FailureHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureHeader)</Text>
<Text Name="FailureInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureInstallHeader)</Text>
<Text Name="FailureUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureUninstallHeader)</Text>
<Text Name="FailureRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRepairHeader)</Text>
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
<Text Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
</Page>
</Theme>

View file

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Caption">[WixBundleName] Setup</String>
<String Id="Title">Microsoft Dotnet CLI for Windows</String>
<String Id="Motto">You just need a shell, a text editor and 10 minutes of your time.
Ready? Set? Let's go!</String>
<String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
<String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
<String Id="HelpHeader">Setup Help</String>
<String Id="HelpText">/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or
creates a complete local copy of the bundle in directory. Install is the default.
/passive | /quiet - displays minimal UI with no prompts or displays no UI and
no prompts. By default UI and all prompts are displayed.
/norestart - suppress any attempts to restart. By default UI will prompt before restart.
/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String>
<String Id="HelpCloseButton">&amp;Close</String>
<String Id="InstallAcceptCheckbox">I &amp;agree to the license terms and conditions</String>
<String Id="InstallOptionsButton">&amp;Options</String>
<String Id="InstallInstallButton">&amp;Install</String>
<String Id="InstallCloseButton">&amp;Close</String>
<String Id="OptionsHeader">Setup Options</String>
<String Id="OptionsLocationLabel">Install location:</String>
<String Id="OptionsBrowseButton">&amp;Browse</String>
<String Id="OptionsOkButton">&amp;OK</String>
<String Id="OptionsCancelButton">&amp;Cancel</String>
<String Id="ProgressHeader">Setup Progress</String>
<String Id="ProgressLabel">Processing:</String>
<String Id="OverallProgressPackageText">Initializing...</String>
<String Id="ProgressCancelButton">&amp;Cancel</String>
<String Id="ModifyHeader">Modify Setup</String>
<String Id="ModifyRepairButton">&amp;Repair</String>
<String Id="ModifyUninstallButton">&amp;Uninstall</String>
<String Id="ModifyCloseButton">&amp;Close</String>
<String Id="SuccessRepairHeader">Repair Successfully Completed</String>
<String Id="SuccessUninstallHeader">Uninstall Successfully Completed</String>
<String Id="SuccessInstallHeader">Installation Successfully Completed</String>
<String Id="SuccessHeader">Setup Successful</String>
<String Id="SuccessLaunchButton">&amp;Launch</String>
<String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
<String Id="SuccessRestartButton">&amp;Restart</String>
<String Id="SuccessCloseButton">&amp;Close</String>
<String Id="FailureHeader">Setup Failed</String>
<String Id="FailureInstallHeader">Setup Failed</String>
<String Id="FailureUninstallHeader">Uninstall Failed</String>
<String Id="FailureRepairHeader">Repair Failed</String>
<String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.</String>
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
<String Id="FailureRestartButton">&amp;Restart</String>
<String Id="FailureCloseButton">&amp;Close</String>
<String Id="FilesInUseHeader">Files In Use</String>
<String Id="FilesInUseLabel">The following applications are using files that need to be updated:</String>
<String Id="FilesInUseCloseRadioButton">Close the &amp;applications and attempt to restart them.</String>
<String Id="FilesInUseDontCloseRadioButton">&amp;Do not close applications. A reboot will be required.</String>
<String Id="FilesInUseOkButton">&amp;OK</String>
<String Id="FilesInUseCancelButton">&amp;Cancel</String>
</WixLocalization>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:swid="http://schemas.microsoft.com/wix/TagExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?include "Variables.wxi" ?>
<Bundle Name="$(var.ProductName)" Manufacturer="$(var.Manufacturer)"
Version="$(var.DisplayVersion)" UpgradeCode="$(var.UpgradeCode)"
AboutUrl="http://dotnet.github.io/"
Compressed="yes">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.Foundation">
<bal:WixStandardBootstrapperApplication
LicenseFile="..\..\osx\resources\en.lproj\eula.rtf"
ShowFilesInUse="yes"
ShowVersion="yes"
/>
<PayloadGroupRef Id="DotnetCoreBAPayloads" />
</BootstrapperApplicationRef>
<swid:Tag Regid="microsoft.com" InstallPath="[DOTNETHOME]" />
<Variable Name="DOTNETHOME" Type="string" Value="[ProgramFiles6432Folder]dotnet" bal:Overridable="yes" />
<util:RegistrySearch Id="PreviousInstallFolderSearch" Root="HKLM" Key="SOFTWARE\dotnet\sharedframework\$(var.FrameworkName) $(var.FrameworkDisplayVersion)\Setup" Value="InstallDir" Variable="PreviousInstallFolder" />
<util:DirectorySearch Path="[PreviousInstallFolder]" Variable="DOTNETHOME" After="PreviousInstallFolderSearch" Condition="PreviousInstallFolder" />
<Chain DisableSystemRestore="yes" ParallelCache="yes">
<MsiPackage SourceFile="$(var.SharedFXMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
<MsiPackage SourceFile="$(var.SharedHostMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
</Chain>
</Bundle>
<Fragment>
<PayloadGroup Id="DotnetCoreBAPayloads">
<Payload Name="thm.xml" Compressed="yes" SourceFile="bundle.thm" />
<Payload Name="thm.wxl" Compressed="yes" SourceFile="bundle.wxl" />
<Payload Name="bg.png" Compressed="yes" SourceFile="..\..\osx\resources\dotnetbackground.png" />
<Payload Name='eula.rtf' Compressed='yes' SourceFile='!(wix.WixStdbaLicenseRtf)' />
</PayloadGroup>
<CustomTable Id='WixStdbaInformation'>
<Row>
<Data Column='LicenseFile'>eula.rtf</Data>
</Row>
</CustomTable>
</Fragment>
</Wix>

View file

@ -0,0 +1,107 @@
# 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]$SharedFxMSIFile,
[Parameter(Mandatory=$true)][string]$SharedHostMSIFile,
[Parameter(Mandatory=$true)][string]$DotnetBundleOutput,
[Parameter(Mandatory=$true)][string]$WixRoot,
[Parameter(Mandatory=$true)][string]$DotnetMSIVersion,
[Parameter(Mandatory=$true)][string]$DotnetCLIVersion,
[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
)
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.."
function RunCandleForBundle
{
$result = $true
pushd "$WixRoot"
Write-Host Running candle for bundle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\sharedframework"
.\candle.exe -nologo `
-dMicrosoftEula="$RepoRoot\packaging\osx\resources\en.lproj\eula.rtf" `
-dBuildVersion="$DotnetMSIVersion" `
-dDisplayVersion="$DotnetCLIVersion" `
-dReleaseSuffix="$ReleaseSuffix" `
-dSharedFXMsiSourcePath="$SharedFxMSIFile" `
-dSharedHostMsiSourcePath="$SharedHostMSIFile" `
-dFrameworkName="$SharedFrameworkNugetName" `
-dFrameworkDisplayVersion="$SharedFrameworkNugetVersion" `
-dFrameworkUpgradeCode="$SharedFrameworkUpgradeCode" `
-arch "$Architecture" `
-ext WixBalExtension.dll `
-ext WixUtilExtension.dll `
-ext WixTagExtension.dll `
"$AuthWsxRoot\bundle.wxs" | Out-Host
if($LastExitCode -ne 0)
{
$result = $false
Write-Host "Candle failed with exit code $LastExitCode."
}
popd
return $result
}
function RunLightForBundle
{
$result = $true
pushd "$WixRoot"
Write-Host Running light for bundle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\sharedframework"
.\light.exe -nologo `
-cultures:en-us `
bundle.wixobj `
-ext WixBalExtension.dll `
-ext WixUtilExtension.dll `
-ext WixTagExtension.dll `
-b "$AuthWsxRoot" `
-out $DotnetBundleOutput | Out-Host
if($LastExitCode -ne 0)
{
$result = $false
Write-Host "Light failed with exit code $LastExitCode."
}
popd
return $result
}
Write-Host "Creating shared framework bundle at $DotnetBundleOutput"
if([string]::IsNullOrEmpty($WixRoot))
{
Exit -1
}
if(-Not (RunCandleForBundle))
{
Exit -1
}
if(-Not (RunLightForBundle))
{
Exit -1
}
if(!(Test-Path $DotnetBundleOutput))
{
throw "Unable to create the dotnet bundle."
Exit -1
}
Write-Host -ForegroundColor Green "Successfully created shared framework bundle - $DotnetBundleOutput"
exit $LastExitCode

View file

@ -53,7 +53,7 @@ function RunCandle
pushd "$WixRoot"
Write-Host Running candle..
$AuthWsxRoot = Join-Path $RepoRoot "packaging\sharedframework\windows"
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\sharedframework"
$SharedFrameworkComponentVersion = $SharedFrameworkNugetVersion.Replace('-', '_');
.\candle.exe -nologo `

View file

@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.Build
public class InstallerTargets
{
[Target(nameof(MsiTargets.GenerateMsis),
nameof(MsiTargets.GenerateBundle),
nameof(MsiTargets.GenerateBundles),
nameof(PkgTargets.GeneratePkgs))]//,
//nameof(InstallerTargets.GenerateDebs))]
public static BuildTargetResult GenerateInstaller(BuildTargetContext c)

View file

@ -30,6 +30,8 @@ namespace Microsoft.DotNet.Cli.Build
private static string SharedFrameworkMsi { get; set; }
private static string SharedFrameworkBundle { get; set; }
private static string Engine { get; set; }
private static string MsiVersion { get; set; }
@ -68,6 +70,7 @@ namespace Microsoft.DotNet.Cli.Build
SdkMsi = Path.ChangeExtension(SdkBundle, "msi");
Engine = Path.Combine(Path.GetDirectoryName(SdkBundle), ENGINE);
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile");
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
@ -90,13 +93,22 @@ namespace Microsoft.DotNet.Cli.Build
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi),
nameof(GenerateCliSdkBundle),
nameof(GenerateSharedFxBundle))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateBundles(BuildTargetContext c)
{
return c.Success();
}
[Target]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateCliSdkMsi(BuildTargetContext c)
{
var cliSdkRoot = c.BuildContext.Get<string>("CLISDKRoot");
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "generatemsi.ps1"),
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatemsi.ps1"),
cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliVersion, Arch, Channel)
.Execute()
.EnsureSuccessful();
@ -117,7 +129,7 @@ namespace Microsoft.DotNet.Cli.Build
Directory.CreateDirectory(wixObjRoot);
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "host", "windows", "generatemsi.ps1"),
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
inputDir, SharedHostMsi, WixRoot, MsiVersion, CliVersion, Arch, wixObjRoot)
.Execute()
.EnsureSuccessful();
@ -141,7 +153,7 @@ namespace Microsoft.DotNet.Cli.Build
Directory.CreateDirectory(wixObjRoot);
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "sharedframework", "windows", "generatemsi.ps1"),
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatemsi.ps1"),
inputDir, SharedFrameworkMsi, WixRoot, MsiVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch, wixObjRoot)
.Execute()
.EnsureSuccessful();
@ -151,10 +163,10 @@ namespace Microsoft.DotNet.Cli.Build
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateBundle(BuildTargetContext c)
public static BuildTargetResult GenerateCliSdkBundle(BuildTargetContext c)
{
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "generatebundle.ps1"),
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "clisdk", "generatebundle.ps1"),
SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, Arch, Channel)
.EnvironmentVariable("Stage2Dir", Dirs.Stage2)
.Execute()
@ -162,6 +174,22 @@ namespace Microsoft.DotNet.Cli.Build
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult GenerateSharedFxBundle(BuildTargetContext c)
{
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
var upgradeCode = Utils.GenerateGuidFromName($"{sharedFrameworkNuGetName}-{sharedFrameworkNuGetVersion}-{Arch}-bundle").ToString().ToUpper();
Cmd("powershell", "-NoProfile", "-NoLogo",
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"),
SharedFrameworkMsi, SharedHostMsi, SharedFrameworkBundle, WixRoot, MsiVersion, CliVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch, Channel)
.Execute()
.EnsureSuccessful();
return c.Success();
}
[Target(nameof(MsiTargets.InitMsi))]
[BuildPlatforms(BuildPlatform.Windows)]
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)