From bf26dac15df8fe5853fcb9d55c0fbfd0e1d83c72 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 7 Feb 2023 10:41:15 +0100 Subject: [PATCH] add support for android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a --- CHANGELOG.md | 1 + .../SenseGloveConnectImpl.Build.cs | 58 +++++++++++++++++-- .../SenseGloveCoreImpl.Build.cs | 29 +++++++++- .../lib/android/arm64/debug/libserial.a | 3 + .../lib/android/arm64/debug/libsgconnect.a | 3 + .../lib/android/arm64/debug/libsgcore.a | 3 + .../lib/android/arm64/release/libserial.a | 3 + .../lib/android/arm64/release/libsgconnect.a | 3 + .../lib/android/arm64/release/libsgcore.a | 3 + .../lib/android/armv7/debug/libserial.a | 3 + .../lib/android/armv7/debug/libsgconnect.a | 3 + .../lib/android/armv7/debug/libsgcore.a | 3 + .../lib/android/armv7/release/libserial.a | 3 + .../lib/android/armv7/release/libsgconnect.a | 3 + .../lib/android/armv7/release/libsgcore.a | 3 + .../lib/android/x64/debug/libserial.a | 3 + .../lib/android/x64/debug/libsgconnect.a | 3 + .../lib/android/x64/debug/libsgcore.a | 3 + .../lib/android/x64/release/libserial.a | 3 + .../lib/android/x64/release/libsgconnect.a | 3 + .../lib/android/x64/release/libsgcore.a | 3 + .../lib/android/x86/debug/libserial.a | 3 + .../lib/android/x86/debug/libsgconnect.a | 3 + .../lib/android/x86/debug/libsgcore.a | 3 + .../lib/android/x86/release/libserial.a | 3 + .../lib/android/x86/release/libsgconnect.a | 3 + .../lib/android/x86/release/libsgcore.a | 3 + 27 files changed, 151 insertions(+), 9 deletions(-) create mode 100644 Source/ThirdParty/lib/android/arm64/debug/libserial.a create mode 100644 Source/ThirdParty/lib/android/arm64/debug/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/arm64/debug/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/arm64/release/libserial.a create mode 100644 Source/ThirdParty/lib/android/arm64/release/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/arm64/release/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/armv7/debug/libserial.a create mode 100644 Source/ThirdParty/lib/android/armv7/debug/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/armv7/debug/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/armv7/release/libserial.a create mode 100644 Source/ThirdParty/lib/android/armv7/release/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/armv7/release/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/x64/debug/libserial.a create mode 100644 Source/ThirdParty/lib/android/x64/debug/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/x64/debug/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/x64/release/libserial.a create mode 100644 Source/ThirdParty/lib/android/x64/release/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/x64/release/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/x86/debug/libserial.a create mode 100644 Source/ThirdParty/lib/android/x86/debug/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/x86/debug/libsgcore.a create mode 100644 Source/ThirdParty/lib/android/x86/release/libserial.a create mode 100644 Source/ThirdParty/lib/android/x86/release/libsgconnect.a create mode 100644 Source/ThirdParty/lib/android/x86/release/libsgcore.a diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd5a87b..4fd42daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial support for the upcoming Unreal Engine 5.2. +- Add support for Android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a ### Changed diff --git a/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs b/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs index 63cb3577..46e93eff 100644 --- a/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs +++ b/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs @@ -86,18 +86,41 @@ public class SenseGloveConnectImpl : ModuleRules #if ! UE_5_2_OR_LATER IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile); List Architectures = ToolChain.GetAllArchitectures(); + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + foreach (string Arch in Architectures) { - if (Arch != "-arm64") + if (Arch == "-arm64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64")); + break; + } + else if (Arch == "-armv7") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7")); + break; + } + else if (Arch == "-x64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64")); + break; + } + else if (Arch == "-86") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86")); + break; + } + else { Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!"); + break; } } - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus")); LibraryName = string.Format("lib{0}.a", LibraryName); #else - Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!"); + Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!"); #endif } else if (Target.Platform == UnrealTargetPlatform.Linux) @@ -187,18 +210,41 @@ public class SenseGloveConnectImpl : ModuleRules #if ! UE_5_2_OR_LATER IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile); List Architectures = ToolChain.GetAllArchitectures(); + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + foreach (string Arch in Architectures) { - if (Arch != "-arm64") + if (Arch == "-arm64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64")); + break; + } + else if (Arch == "-armv7") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7")); + break; + } + else if (Arch == "-x64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64")); + break; + } + else if (Arch == "-86") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86")); + break; + } + else { Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!"); + break; } } - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus")); LibraryName = string.Format("lib{0}.a", LibraryName); #else - Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!"); + Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!"); #endif } else if (Target.Platform == UnrealTargetPlatform.Linux) diff --git a/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs b/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs index 5c6efe8f..2b3a7d63 100644 --- a/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs +++ b/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs @@ -85,18 +85,41 @@ public class SenseGloveCoreImpl : ModuleRules #if ! UE_5_2_OR_LATER IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile); List Architectures = ToolChain.GetAllArchitectures(); + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + foreach (string Arch in Architectures) { - if (Arch != "-arm64") + if (Arch == "-arm64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64")); + break; + } + else if (Arch == "-armv7") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7")); + break; + } + else if (Arch == "-x64") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64")); + break; + } + else if (Arch == "-86") + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86")); + break; + } + else { Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!"); + break; } } - LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus")); LibraryName = string.Format("lib{0}.a", LibraryName); #else - Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!"); + Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!"); #endif } else if (Target.Platform == UnrealTargetPlatform.Linux) diff --git a/Source/ThirdParty/lib/android/arm64/debug/libserial.a b/Source/ThirdParty/lib/android/arm64/debug/libserial.a new file mode 100644 index 00000000..bc3a10ab --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a93067e4d50a1c7cd9c48660e08526af8bb22781ee51feaed3bf986ba40a68a +size 1242308 diff --git a/Source/ThirdParty/lib/android/arm64/debug/libsgconnect.a b/Source/ThirdParty/lib/android/arm64/debug/libsgconnect.a new file mode 100644 index 00000000..40910302 --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d56c252b171489ce31349ae0dd7d9e9fcf051b5098fa7c5981ad4c59b2c7cf8 +size 8010300 diff --git a/Source/ThirdParty/lib/android/arm64/debug/libsgcore.a b/Source/ThirdParty/lib/android/arm64/debug/libsgcore.a new file mode 100644 index 00000000..b1a7f101 --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fca565a04fc66a76985fdf8437f50acc7ab237a2186daaa4a204bfd97906cc5 +size 14046838 diff --git a/Source/ThirdParty/lib/android/arm64/release/libserial.a b/Source/ThirdParty/lib/android/arm64/release/libserial.a new file mode 100644 index 00000000..a81fb3e8 --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c382a309fa7e9df4037842c5236e97090f693099a93cea5a9c74049dc47db13 +size 202928 diff --git a/Source/ThirdParty/lib/android/arm64/release/libsgconnect.a b/Source/ThirdParty/lib/android/arm64/release/libsgconnect.a new file mode 100644 index 00000000..ee7a2bad --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32162f3da34e183816aff1b4fb36cd1f7d818687c01c4ebc56086e734544ebb4 +size 996108 diff --git a/Source/ThirdParty/lib/android/arm64/release/libsgcore.a b/Source/ThirdParty/lib/android/arm64/release/libsgcore.a new file mode 100644 index 00000000..2751cdd8 --- /dev/null +++ b/Source/ThirdParty/lib/android/arm64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2457b51c5d6bae292a83f2f596de3b04a7680f1ff739f61cb0f4022cc0bfa72d +size 1427178 diff --git a/Source/ThirdParty/lib/android/armv7/debug/libserial.a b/Source/ThirdParty/lib/android/armv7/debug/libserial.a new file mode 100644 index 00000000..794a8c7b --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf55f2fadbcf249bb76ca0af4d558154636f1b5e559f627f2861b95dac81793d +size 1105208 diff --git a/Source/ThirdParty/lib/android/armv7/debug/libsgconnect.a b/Source/ThirdParty/lib/android/armv7/debug/libsgconnect.a new file mode 100644 index 00000000..cbefd6f4 --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a381e67b4f593de438e6eaa582cd56c2628bacc16363afa3b5ec7230ac7f94a7 +size 6954128 diff --git a/Source/ThirdParty/lib/android/armv7/debug/libsgcore.a b/Source/ThirdParty/lib/android/armv7/debug/libsgcore.a new file mode 100644 index 00000000..3ba8673e --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fa1fb0d336079d71dece95fcf5ef2892d60e4ecac1b496e7cddfc3e29f8f1db +size 13099722 diff --git a/Source/ThirdParty/lib/android/armv7/release/libserial.a b/Source/ThirdParty/lib/android/armv7/release/libserial.a new file mode 100644 index 00000000..b11e1fe1 --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cee0a3069b9b698488c3b84bc65623fe132816bd80801f1166e72662aef6ff2 +size 175296 diff --git a/Source/ThirdParty/lib/android/armv7/release/libsgconnect.a b/Source/ThirdParty/lib/android/armv7/release/libsgconnect.a new file mode 100644 index 00000000..d7da21e7 --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:915951c65f236a31c5d7554bbf629d177e56ad30f557005f5f68dc74ee07dca3 +size 950742 diff --git a/Source/ThirdParty/lib/android/armv7/release/libsgcore.a b/Source/ThirdParty/lib/android/armv7/release/libsgcore.a new file mode 100644 index 00000000..d639bacd --- /dev/null +++ b/Source/ThirdParty/lib/android/armv7/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:088f633ffa5135092f6a7337489cf1a80bb3f1a0229e9132bb588bd7f75d8953 +size 1243092 diff --git a/Source/ThirdParty/lib/android/x64/debug/libserial.a b/Source/ThirdParty/lib/android/x64/debug/libserial.a new file mode 100644 index 00000000..288e983b --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ffdd7694b78946563be7c8349514756b94996a0347b51d9e15d100c4a1a271 +size 1207420 diff --git a/Source/ThirdParty/lib/android/x64/debug/libsgconnect.a b/Source/ThirdParty/lib/android/x64/debug/libsgconnect.a new file mode 100644 index 00000000..aa5aa064 --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7ec0edfd92fec6ad0ade77ba32c2527942188e01085a3f501e44d27cf464806 +size 7811908 diff --git a/Source/ThirdParty/lib/android/x64/debug/libsgcore.a b/Source/ThirdParty/lib/android/x64/debug/libsgcore.a new file mode 100644 index 00000000..70847971 --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10209559995dee0e1e0ae41faab6d41138221c5aeb8fb554ee3ee30f22abb50b +size 13769742 diff --git a/Source/ThirdParty/lib/android/x64/release/libserial.a b/Source/ThirdParty/lib/android/x64/release/libserial.a new file mode 100644 index 00000000..636e8074 --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90c91afe2ef5e9dd5bc5092a62354f361a17d7d75ffaae75558fbe5573b49724 +size 204416 diff --git a/Source/ThirdParty/lib/android/x64/release/libsgconnect.a b/Source/ThirdParty/lib/android/x64/release/libsgconnect.a new file mode 100644 index 00000000..5d3d87fb --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:986562b2eb438def9381cf9bb972afbcbfb4e168b06a4b4a1a34785653ee368f +size 976960 diff --git a/Source/ThirdParty/lib/android/x64/release/libsgcore.a b/Source/ThirdParty/lib/android/x64/release/libsgcore.a new file mode 100644 index 00000000..3c0e5f4d --- /dev/null +++ b/Source/ThirdParty/lib/android/x64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19fa30faa542727a3f558d63a1bf06ad34827c3fdc932a2d1da2cc6adb5dc1c8 +size 1461004 diff --git a/Source/ThirdParty/lib/android/x86/debug/libserial.a b/Source/ThirdParty/lib/android/x86/debug/libserial.a new file mode 100644 index 00000000..db439e69 --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a81add5289fb46cdfe57daab6bc77dd5b73896248fbb6722842169075eb9ad08 +size 981424 diff --git a/Source/ThirdParty/lib/android/x86/debug/libsgconnect.a b/Source/ThirdParty/lib/android/x86/debug/libsgconnect.a new file mode 100644 index 00000000..933bf2f4 --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea845b179e9f78b93947fd9adf2fd9a1918392f4fac03c758722b7f0cfc3aee0 +size 6482968 diff --git a/Source/ThirdParty/lib/android/x86/debug/libsgcore.a b/Source/ThirdParty/lib/android/x86/debug/libsgcore.a new file mode 100644 index 00000000..b4080c4c --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c927263ed9d53519a50be44394a6f50435f0f808f360c52a3e0092b038607c8b +size 11279882 diff --git a/Source/ThirdParty/lib/android/x86/release/libserial.a b/Source/ThirdParty/lib/android/x86/release/libserial.a new file mode 100644 index 00000000..57310177 --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d3dfbe3c1664c2c3b29a2faaa3fc2d43fb6f98f84fd90f25b098e56f53f02e3 +size 161336 diff --git a/Source/ThirdParty/lib/android/x86/release/libsgconnect.a b/Source/ThirdParty/lib/android/x86/release/libsgconnect.a new file mode 100644 index 00000000..05919561 --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f003809d3b68ff4526cbd9c19323e8706fcd89bc88134ddb0499befef5eba84 +size 775346 diff --git a/Source/ThirdParty/lib/android/x86/release/libsgcore.a b/Source/ThirdParty/lib/android/x86/release/libsgcore.a new file mode 100644 index 00000000..02412957 --- /dev/null +++ b/Source/ThirdParty/lib/android/x86/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:735277535743d0a16d2427c6402ee9c86d901b3f6f8d3e3335a1b693a699c445 +size 1188424