@@ -91,6 +91,9 @@ Default: @("Android", "AndroidExperimental")
91
91
An array of architectures for which the Android Swift SDK should be built.
92
92
Default: @("aarch64", "armv7", "i686", "x86_64")
93
93
94
+ . PARAMETER Windows
95
+ Build Windows SDKs.
96
+
94
97
. PARAMETER WinSDKVersion
95
98
The version number of the Windows SDK to be used.
96
99
Overrides the value resolved by the Visual Studio command prompt.
@@ -189,6 +192,7 @@ param
189
192
[string []] $AndroidSDKArchitectures = @ (" aarch64" , " armv7" , " i686" , " x86_64" ),
190
193
191
194
# Windows SDK Options
195
+ [switch ] $Windows = $true ,
192
196
[ValidatePattern (" ^\d+\.\d+\.\d+(?:-\w+)?" )]
193
197
[string ] $WinSDKVersion = " " ,
194
198
[string []] $WindowsSDKVersions = @ (" Windows" , " WindowsExperimental" ),
@@ -3812,7 +3816,12 @@ function Build-Installer([Hashtable] $Platform) {
3812
3816
}
3813
3817
}
3814
3818
3815
- $Properties [" Platforms" ] = " `" windows$ ( if ($Android ) { " ;android" }) `" " ;
3819
+ $Properties [" Platforms" ] = " `" $ (
3820
+ @ (
3821
+ if ($Windows ) { " windows" }
3822
+ if ($Android ) { " android" }
3823
+ ) -Join " ;"
3824
+ ) `" " ;
3816
3825
$Properties [" AndroidArchitectures" ] = " `" $ ( ($AndroidSDKBuilds | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3817
3826
$Properties [" WindowsArchitectures" ] = " `" $ ( ($WindowsSDKBuilds | ForEach-Object { $_.Architecture.LLVMName }) -Join " ;" ) `" "
3818
3827
$Properties [" ToolchainVariants" ] = " `" asserts$ ( if ($IncludeNoAsserts ) { " ;noasserts" }) `" " ;
@@ -3935,62 +3944,64 @@ if (-not $SkipBuild) {
3935
3944
SwiftSyntax_DIR = (Get-ProjectCMakeModules $BuildPlatform Compilers);
3936
3945
}
3937
3946
3938
- foreach ($Build in $WindowsSDKBuilds ) {
3939
- if ($IncludeDS2 ) {
3940
- Invoke-BuildStep Build-DS2 $Build
3947
+ if ($Windows ) {
3948
+ foreach ($Build in $WindowsSDKBuilds ) {
3949
+ if ($IncludeDS2 ) {
3950
+ Invoke-BuildStep Build-DS2 $Build
3951
+ }
3952
+
3953
+ Invoke-BuildStep Build-ZLib $Build
3954
+ Invoke-BuildStep Build-XML2 $Build
3955
+ Invoke-BuildStep Build-CURL $Build
3941
3956
}
3942
3957
3943
- Invoke-BuildStep Build-ZLib $Build
3944
- Invoke-BuildStep Build-XML2 $Build
3945
- Invoke-BuildStep Build-CURL $Build
3946
- }
3958
+ foreach ($SDK in $WindowsSDKVersions ) {
3959
+ switch ($SDK ) {
3960
+ Windows {
3961
+ foreach ($Build in $WindowsSDKBuilds ) {
3962
+ Invoke-BuildStep Build-SDK $Build
3947
3963
3948
- foreach ($SDK in $WindowsSDKVersions ) {
3949
- switch ($SDK ) {
3950
- Windows {
3951
- foreach ($Build in $WindowsSDKBuilds ) {
3952
- Invoke-BuildStep Build-SDK $Build
3964
+ Get-ChildItem " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3965
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3966
+ Move-Item $_.FullName " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3967
+ }
3953
3968
3954
- Get-ChildItem " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3955
- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3956
- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3969
+ # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
3970
+ Copy-Directory " $ ( Get-SwiftSDK Windows) \usr\bin" " $ ( [IO.Path ]::Combine((Get-InstallDir $Build ), " Runtimes" , $ProductVersion , " usr" )) "
3957
3971
}
3958
3972
3959
- # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
3960
- Copy-Directory " $ ( Get-SwiftSDK Windows) \usr\bin " " $ ( [ IO.Path ]::Combine(( Get-InstallDir $Build ) , " Runtimes " , $ProductVersion , " usr " ) ) "
3973
+ Install- SDK $WindowsSDKBuilds
3974
+ Write-SDKSettings Windows
3961
3975
}
3962
3976
3963
- Install-SDK $WindowsSDKBuilds
3964
- Write-SDKSettings Windows
3965
- }
3977
+ WindowsExperimental {
3978
+ foreach ( $Build in $WindowsSDKBuilds ) {
3979
+ Invoke-BuildStep Build-ExperimentalSDK $Build
3966
3980
3967
- WindowsExperimental {
3968
- foreach ($Build in $WindowsSDKBuilds ) {
3969
- Invoke-BuildStep Build-ExperimentalSDK $Build
3981
+ $SDKROOT = Get-SwiftSDK Windows - Identifier WindowsExperimental
3970
3982
3971
- $SDKROOT = Get-SwiftSDK Windows - Identifier WindowsExperimental
3983
+ Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3984
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3985
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3986
+ }
3972
3987
3973
- Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift \windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3974
- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3975
- Move-Item $_.FullName " $SDKROOT \usr\lib\swift \windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3976
- }
3988
+ Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static \windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3989
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3990
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static \windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3991
+ }
3977
3992
3978
- Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3979
- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3980
- Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3993
+ # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
3994
+ Copy-Directory " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\bin" " $ ( [IO.Path ]::Combine((Get-InstallDir $Build ), " Runtimes" , " $ProductVersion .experimental" , " usr" )) "
3981
3995
}
3982
3996
3983
- # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
3984
- Copy-Directory " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\bin " " $ ( [ IO.Path ]::Combine(( Get-InstallDir $Build ) , " Runtimes " , " $ProductVersion .experimental " , " usr " ) ) "
3997
+ Install- SDK $WindowsSDKBuilds - Identifier WindowsExperimental
3998
+ Write-SDKSettings Windows - Identifier WindowsExperimental
3985
3999
}
3986
-
3987
- Install-SDK $WindowsSDKBuilds - Identifier WindowsExperimental
3988
- Write-SDKSettings Windows - Identifier WindowsExperimental
3989
4000
}
3990
4001
}
3991
- }
3992
4002
3993
- Write-PlatformInfoPlist Windows
4003
+ Write-PlatformInfoPlist Windows
4004
+ }
3994
4005
3995
4006
if ($Android ) {
3996
4007
foreach ($Build in $AndroidSDKBuilds ) {
0 commit comments