Skip to content

[android] optionally include DS2 in Android SDK #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platforms/Windows/android_sdk/android_sdk.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<DefineConstants>
$(DefineConstants);
ANDROID_INCLUDE_DS2=$(ANDROID_INCLUDE_DS2);
SwiftShimsPath=$(SwiftShimsPath);
</DefineConstants>
</PropertyGroup>
Expand Down
25 changes: 25 additions & 0 deletions platforms/Windows/android_sdk/android_sdk.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,31 @@
<?define ArchName = "arm64"?>
<?define ArchArchDir = "aarch64"?>
<?define ArchTriple = "aarch64-unknown-linux-android"?>
<?define ArchTripleDir = "aarch64-unknown-linux-android"?>
<?elseif $(ProductArchitecture) = "x86_64"?>
<?define ArchName = "amd64"?>
<?define ArchArchDir = "x86_64"?>
<?define ArchTriple = "x86_64-unknown-linux-android"?>
<?define ArchTripleDir = "x86_64-unknown-linux-android"?>
<?elseif $(ProductArchitecture) = "armv7"?>
<?define ArchName = "arm"?>
<?define ArchArchDir = "armv7"?>
<!--
The Swift compiler outputs Android armv7 .swiftdoc, .swiftmodule, and
.swiftinterface files with the name armv7-unknown-linux-android. Since the
correct triple is armv7-unknown-linux-androideabi, define two constants to
deal with the inconsistency.

TODO: consider updating Swift compiler to output file names matching the
correct triple.
-->
<?define ArchTriple = "armv7-unknown-linux-android"?>
<?define ArchTripleDir = "armv7-unknown-linux-androideabi"?>
<?elseif $(ProductArchitecture) = "i686"?>
<?define ArchName = "x86"?>
<?define ArchArchDir = "i686"?>
<?define ArchTriple = "i686-unknown-linux-android"?>
<?define ArchTripleDir = "i686-unknown-linux-android"?>
<?endif?>

<Package
Expand Down Expand Up @@ -79,6 +92,9 @@
</Directory>
</Directory>
</Directory>
<Directory Name="$(ArchTripleDir)">
<Directory Id="Android_Library_ARCH_bin" Name="bin" />
</Directory>
</Directory>
<Directory Name="SDKs">
<!-- Android.sdk -->
Expand Down Expand Up @@ -156,6 +172,14 @@
</Component>
</ComponentGroup>

<ComponentGroup Id="DS2">
<?if $(ANDROID_INCLUDE_DS2) == true ?>
<Component Directory="Android_Library_ARCH_bin">
<File Source="$(PLATFORM_ROOT)\Developer\Library\$(ArchTripleDir)\bin\ds2" />
</Component>
<?endif?>
</ComponentGroup>

<ComponentGroup Id="SwiftRemoteMirror" Directory="AndroidSDK_usr_include_swift_SwiftRemoteMirror">
<Component>
<File Source="$(SDK_ROOT)\usr\include\swift\SwiftRemoteMirror\MemoryReaderInterface.h" />
Expand Down Expand Up @@ -1283,6 +1307,7 @@
<ComponentGroupRef Id="Registrar" />
<ComponentGroupRef Id="Configuration" />
<ComponentGroupRef Id="SwiftShims" />
<ComponentGroupRef Id="DS2" />

<ComponentGroupRef Id="VersionedDirectoryCleanup" />
</Feature>
Expand Down