MSI: update architecture specific filenames (#6379)

This commit is contained in:
Travis Plunk
2018-03-13 14:02:12 -07:00
committed by GitHub
parent 88b3833ee3
commit 8ba6f319f3
2 changed files with 12 additions and 5 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductDirectoryName = "$(env.ProductDirectoryName)" ?>
<?define FileArchitecture = "$(env.FileArchitecture)" ?>
<Fragment>
<DirectoryRef Id="$(var.ProductDirectoryName)">
<Component Id="cmp3B130879A26D2E954251BB81E8948069" Guid="{CD268615-4603-4A5F-B126-340ADF2EDDD5}">
@@ -127,7 +128,7 @@
<File Id="fil8E8E3BF1C97D92DFEB4FC97D778F238F" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Runtime.CompilerServices.VisualC.dll" />
</Component>
<Component Id="cmp8777CA81FBD5C5FAC86993893043793D" Guid="{B2D9982B-D46A-4D69-AA16-CC7EC49D357F}">
<File Id="fil9A6CE1B34698E9E81BC367B9E9CEBF25" KeyPath="yes" Source="$(env.ProductSourcePath)\sos_amd64_amd64_4.6.26020.003.dll" />
<File Id="fil9A6CE1B34698E9E81BC367B9E9CEBF25" KeyPath="yes" Source="$(env.ProductSourcePath)\sos_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26020.003.dll" />
</Component>
<Component Id="cmp5977DC14DE00AD6E597A2FEBB8C3B58B" Guid="{8E01E3C2-0596-46D8-95DD-BCA308A88941}">
<File Id="filEE7925E7A712381B024DAE39831F7AEB" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Threading.dll" />
@@ -418,7 +419,7 @@
<File Id="fil69EA4231E04E7B76EE0676A3C7EB4F91" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Security.Cryptography.Pkcs.dll" />
</Component>
<Component Id="cmp87DE113A572097FF094F31D019BB29BE" Guid="{2773E961-6227-40EE-B293-2929168E960A}">
<File Id="fil9320215B904D0997AADD8E1C11CA0998" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_amd64_amd64_4.6.26020.003.dll" />
<File Id="fil9320215B904D0997AADD8E1C11CA0998" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26020.003.dll" />
</Component>
<Component Id="cmpCC989C2FC3319628C5A0897A9CDB4C7D" Guid="{2FC1414C-925B-4653-B376-0DC7114DAA4C}">
<File Id="fil2FBB26045517B5A73BF6024C55539694" KeyPath="yes" Source="$(env.ProductSourcePath)\api-ms-win-core-processthreads-l1-1-0.dll" />
@@ -649,7 +650,7 @@
<File Id="fil8C9F81981EE0D89E23A0F34229C279F4" KeyPath="yes" Source="$(env.ProductSourcePath)\Microsoft.PowerShell.ConsoleHost.dll" />
</Component>
<Component Id="cmpA121CF3AEBFDFC8F050A701833744EDC" Guid="{EA6B3F03-0727-4AEE-B822-FE96B2524D4E}">
<File Id="filC698A1716F7E5821974226CE8F89D814" KeyPath="yes" Source="$(env.ProductSourcePath)\Microsoft.DiaSymReader.Native.amd64.dll" />
<File Id="filC698A1716F7E5821974226CE8F89D814" KeyPath="yes" Source="$(env.ProductSourcePath)\Microsoft.DiaSymReader.Native.$(var.FileArchitecture).dll" />
</Component>
<Component Id="cmpC65F6EE65E7395F8683053ECF4C5597A" Guid="{66FCAD0C-93B4-4767-89D5-8F8DCFB46DE5}">
<File Id="fil1E7F567FCFFB88F7850FCB18077243D1" KeyPath="yes" Source="$(env.ProductSourcePath)\api-ms-win-core-handle-l1-1-0.dll" />
+8 -2
View File
@@ -2163,13 +2163,15 @@ function New-MSIPackage
[Environment]::SetEnvironmentVariable("UpgradeCodeX64", '39243d76-adaf-42b1-94fb-16ecf83237c8', "Process")
[Environment]::SetEnvironmentVariable("UpgradeCodeX86", '86abcfbd-1ccc-4a88-b8b2-0facfde29094', "Process")
}
$fileArchitecture = 'amd64'
$ProductProgFilesDir = "ProgramFiles64Folder"
if ($ProductTargetArchitecture -eq "x86")
{
$fileArchitecture = 'x86'
$ProductProgFilesDir = "ProgramFilesFolder"
}
[Environment]::SetEnvironmentVariable("ProductProgFilesDir", $ProductProgFilesDir, "Process")
[Environment]::SetEnvironmentVariable("FileArchitecture", $fileArchitecture, "Process")
$wixFragmentPath = Join-Path $env:Temp "Fragment.wxs"
$wixObjProductPath = Join-Path $env:Temp "Product.wixobj"
@@ -2245,7 +2247,11 @@ function Test-FileWxs
[string] $HeatFilesWxsPath
)
[xml] $filesAssetXml = Get-Content -Raw -Path $FilesWxsPath
# Update the fileArchitecture in our file to the actual value. Since, the heat file will have the actual value.
# Wix will update this automaticaly, but the output is not the same xml
$filesAssetString = (Get-Content -Raw -Path $FilesWxsPath).Replace('$(var.FileArchitecture)',$env:FileArchitecture)
[xml] $filesAssetXml = $filesAssetString
[xml] $heatFilesXml = Get-Content -Raw -Path $HeatFilesWxsPath
$assetFiles = $filesAssetXml.GetElementsByTagName('File')
$heatFiles = $heatFilesXml.GetElementsByTagName('File')