swiftlang / swift-installer-scripts

Apache License 2.0
73 stars 35 forks source link

[android] optionally include DS2 in Android SDK #335

Closed andrurogerz closed 1 week ago

andrurogerz commented 2 weeks ago

Conditionally include DS2 in the Android SDK when building the MSI with -p:ANDROID_INCLUDE_DS2=true passed to msbuild. Has no impact on the generated installer if this property is not set.

Related to the build.ps1 changes in https://github.com/swiftlang/swift/pull/76113

Validation

Verified by manually invoking msbuild against locally built swift toolchain (with local changes to build DS2) with and without -p:ANDROID_INCLUDE_DS2=true and manually inspected the output MSI file with MSI Viewer. Done for aarch64, x86_64, i686, and armv7.

MSBuild.exe -nologo -restore -maxCpuCount -p:BaseOutputPath=S:\b\installer\ -p:Configuration=Release -p:SignOutput=false -p:PLATFORM_ROOT="S:\b\arm64\Android.platform" -p:SDK_ROOT="S:\b\arm64\Android.platform\Developer\SDKs\Android.sdk" -p:ProductVersion=0.0.0 -p:ProductArchitecture=aarch64 -p:ANDROID_INCLUDE_DS2=true "S:\SourceCache\swift-installer-scripts\platforms\Windows\android_sdk\android_sdk.wixproj"
MSBuild.exe -nologo -restore -maxCpuCount -p:BaseOutputPath=S:\b\installer\ -p:Configuration=Release -p:SignOutput=false -p:PLATFORM_ROOT="S:\b\x64\Android.platform" -p:SDK_ROOT="S:\b\x64\Android.platform\Developer\SDKs\Android.sdk" -p:ProductVersion=0.0.0 -p:ProductArchitecture=x86_64 -p:ANDROID_INCLUDE_DS2=true "S:\SourceCache\swift-installer-scripts\platforms\Windows\android_sdk\android_sdk.wixproj"
MSBuild.exe -nologo -restore -maxCpuCount -p:BaseOutputPath=S:\b\installer\ -p:Configuration=Release -p:SignOutput=false -p:PLATFORM_ROOT="S:\b\armv7\Android.platform" -p:SDK_ROOT="S:\b\armv7\Android.platform\Developer\SDKs\Android.sdk" -p:ProductVersion=0.0.0 -p:ProductArchitecture=armv7 -p:ANDROID_INCLUDE_DS2=true "S:\SourceCache\swift-installer-scripts\platforms\Windows\android_sdk\android_sdk.wixproj"
MSBuild.exe -nologo -restore -maxCpuCount -p:BaseOutputPath=S:\b\installer\ -p:Configuration=Release -p:SignOutput=false -p:PLATFORM_ROOT="S:\b\x86\Android.platform" -p:SDK_ROOT="S:\b\x86\Android.platform\Developer\SDKs\Android.sdk" -p:ProductVersion=0.0.0 -p:ProductArchitecture=i686 -p:ANDROID_INCLUDE_DS2=true "S:\SourceCache\swift-installer-scripts\platforms\Windows\android_sdk\android_sdk.wixproj"
compnerd commented 1 week ago

The last change only modified the location and is not enabled in Apple CI, so I'm going to merge this without re-running.