@@ -1546,46 +1546,52 @@ function Build-DocC() {
1546
1546
}
1547
1547
}
1548
1548
1549
- function Build-Installer () {
1549
+ function Build-Installer ($Arch ) {
1550
1550
$Properties = @ {
1551
1551
BundleFlavor = " offline" ;
1552
- DEVTOOLS_ROOT = " $ ( $HostArch .ToolchainInstallRoot ) \" ;
1553
- TOOLCHAIN_ROOT = " $ ( $HostArch .ToolchainInstallRoot ) \" ;
1552
+ DEVTOOLS_ROOT = " $ ( $Arch .ToolchainInstallRoot ) \" ;
1553
+ TOOLCHAIN_ROOT = " $ ( $Arch .ToolchainInstallRoot ) \" ;
1554
1554
INCLUDE_SWIFT_FORMAT = " true" ;
1555
- SWIFT_FORMAT_BUILD = " $ ( $HostArch .BinaryCache ) \swift-format\release" ;
1555
+ SWIFT_FORMAT_BUILD = " $ ( $Arch .BinaryCache ) \swift-format\release" ;
1556
1556
INCLUDE_SWIFT_INSPECT = " true" ;
1557
- SWIFT_INSPECT_BUILD = " $ ( $HostArch .BinaryCache ) \swift-inspect\release" ;
1557
+ SWIFT_INSPECT_BUILD = " $ ( $Arch .BinaryCache ) \swift-inspect\release" ;
1558
1558
INCLUDE_SWIFT_DOCC = " true" ;
1559
- SWIFT_DOCC_BUILD = " $ ( $HostArch .BinaryCache ) \swift-docc\release" ;
1559
+ SWIFT_DOCC_BUILD = " $ ( $Arch .BinaryCache ) \swift-docc\release" ;
1560
1560
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = " ${SourceCache} \swift-docc-render-artifact" ;
1561
1561
}
1562
1562
1563
1563
Isolate- EnvVars {
1564
- Invoke-VsDevShell $HostArch
1565
- $VCRedistInstallerPath = " ${env: VCToolsRedistDir} \vc_redist.$ ( $HostArch .ShortName ) .exe"
1564
+ Invoke-VsDevShell $Arch
1565
+ $VCRedistInstallerPath = " ${env: VCToolsRedistDir} \vc_redist.$ ( $Arch .ShortName ) .exe"
1566
1566
if (Test-Path $VCRedistInstallerPath ) {
1567
1567
$Properties [" VCRedistInstaller" ] = $VCRedistInstallerPath
1568
1568
$Properties [" VSVersion" ] = $env: VSCMD_VER
1569
1569
}
1570
1570
}
1571
1571
1572
- foreach ($Arch in $SDKArchs ) {
1573
- $Properties [" INCLUDE_$ ( $Arch .VSName.ToUpperInvariant ()) _SDK" ] = " true"
1574
- $Properties [" PLATFORM_ROOT_$ ( $Arch .VSName.ToUpperInvariant ()) " ] = " $ ( $Arch .PlatformInstallRoot ) \"
1575
- $Properties [" SDK_ROOT_$ ( $Arch .VSName.ToUpperInvariant ()) " ] = " $ ( $Arch .SDKInstallRoot ) \"
1572
+ foreach ($SDK in $SDKArchs ) {
1573
+ $Properties [" INCLUDE_$ ( $SDK .VSName.ToUpperInvariant ()) _SDK" ] = " true"
1574
+ $Properties [" PLATFORM_ROOT_$ ( $SDK .VSName.ToUpperInvariant ()) " ] = " $ ( $SDK .PlatformInstallRoot ) \"
1575
+ $Properties [" SDK_ROOT_$ ( $SDK .VSName.ToUpperInvariant ()) " ] = " $ ( $SDK .SDKInstallRoot ) \"
1576
1576
}
1577
1577
1578
- Build-WiXProject bundle\installer.wixproj - Arch $HostArch - Properties $Properties
1578
+ Build-WiXProject bundle\installer.wixproj - Arch $Arch - Properties $Properties
1579
+ }
1579
1580
1580
- if ($Stage -and (-not $ToBatch )) {
1581
- Copy-File " $ ( $HostArch.BinaryCache ) \installer\Release\$ ( $HostArch.VSName ) \*.cab" " $Stage \"
1582
- Copy-File " $ ( $HostArch.BinaryCache ) \installer\Release\$ ( $HostArch.VSName ) \*.msi" " $Stage \"
1583
- Copy-File " $ ( $HostArch.BinaryCache ) \installer\Release\$ ( $HostArch.VSName ) \*.msm" " $Stage \"
1584
- Copy-File " $ ( $HostArch.BinaryCache ) \installer\Release\$ ( $HostArch.VSName ) \installer.exe" " $Stage \"
1585
- # Extract installer engine to ease code-signing on swift.org CI
1586
- New-Item - Type Directory - Path " $ ( $HostArch.BinaryCache ) \installer\$ ( $HostArch.VSName ) \" - ErrorAction Ignore | Out-Null
1587
- Invoke-Program " $BinaryCache \wix-4.0.1\tools\net6.0\any\wix.exe" -- burn detach " $ ( $HostArch.BinaryCache ) \installer\Release\$ ( $HostArch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $ ( $HostArch.BinaryCache ) \installer\$ ( $HostArch.VSName ) \"
1581
+ function Build-ArtifactPresentation ($Arch ) {
1582
+ if ($ToBatch -or -not $Stage ) { return }
1583
+
1584
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \*.cab" " $Stage \"
1585
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \*.msi" " $Stage \"
1586
+ foreach ($SDK in $SDKArchs ) {
1587
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \sdk.$ ( $SDK.VSName ) .cab" " $Stage \"
1588
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \sdk.$ ( $SDK.VSName ) .msi" " $Stage \"
1589
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \sdk.$ ( $SDK.VSName ) .msm" " $Stage \"
1588
1590
}
1591
+ Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" " $Stage \"
1592
+ # Extract installer engine to ease code-signing on swift.org CI
1593
+ New-Item - Type Directory - Path " $ ( $Arch.BinaryCache ) \installer\$ ( $Arch.VSName ) \" - ErrorAction Ignore | Out-Null
1594
+ Invoke-Program " $BinaryCache \wix-4.0.1\tools\net6.0\any\wix.exe" -- burn detach " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $ ( $Arch.BinaryCache ) \installer\$ ( $Arch.VSName ) \"
1589
1595
}
1590
1596
1591
1597
# -------------------------------------------------------------------
@@ -1655,9 +1661,11 @@ if (-not $SkipBuild) {
1655
1661
}
1656
1662
1657
1663
if (-not $SkipPackaging ) {
1658
- Build-Installer
1664
+ Build-Installer $HostArch
1659
1665
}
1660
1666
1667
+ Build-ArtifactPresentation $HostARch
1668
+
1661
1669
if ($Test -contains " swift" ) { Build-Compilers $HostArch - Test }
1662
1670
if ($Test -contains " dispatch" ) { Build-Dispatch $HostArch - Test }
1663
1671
if ($Test -contains " foundation" ) { Build-Foundation $HostArch - Test }
0 commit comments