aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cross_compile_android/android_utilities.py
Commit message (Collapse)AuthorAgeFilesLines
* Android Building: Fix error in macOSShyamnath Premnadh2025-03-271-9/+2
| | | | | | | | | | | | - When building the macOS wheel locally, there was an error that the Android NDK path prefix was repeated causing the path not to be found. This patch fixes this error. - Additionally simplify some code. Pick-to: 6.8 6.9 Task-number: PYSIDE-1612 Change-Id: Ifce51e6e84c5ab51e03a11c6766a652e3784b32b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Android: Upgrade Android NDK to r27cShyamnath Premnadh2025-03-261-2/+2
| | | | | | | | | | | | - Upgrade Android NDK to r27c, similar to Qt base. - Api level 35 is the new default. - Remove the option mpopcnt for QT_COMPILER_FLAGS for arm64, because this option does not apply to arm64 and errors with api-level of 35. Pick-to: 6.8 6.8.3 6.9 Task-number: PYSIDE-1612 Change-Id: Icf8f2853ba23fd7d4c83c275947efbee0a54198d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: Fix bug with non provided ndk_path and sdk_pathShyamnath Premnadh2024-11-121-28/+39
| | | | | | | | | | | | | | | | - Updates de524f258c3980814fbc724ed61816894403fa3f. Basically the download part should be outside the 'if download_only' block because otherwise the ndk_path and sdk_path would remain None when ndk_path and sdk_path are not provided via command line arguments. - Adds some error handling to the NDK and Command Line Tools download functions. Pick-to: 6.8 Task-number: PYSIDE-1612 Change-Id: I545f148caf1c185a1a2cbeeebd5aad3a5359d52b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix flake8 and typing issuesAdrian Herrmann2024-06-211-3/+6
| | | | | | | | | Fix a number of miscellaneous flake8 and typing issues exposed after updating to the modern typing syntax from 3.10 onwards. Task-number: PYSIDE-2786 Change-Id: I5476d1208dd1da3fa93bdec02bc6124a80b247fc Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use modern typing syntaxAdrian Herrmann2024-06-201-2/+1
| | | | | | | | | | | | We can already use the modern typing syntax introduced with Python 3.10 in 3.9 via future statement definitions, even before we raise the minimum Python version to 3.10. Note that direct expressions with "|" don't work yet. Task-number: PYSIDE-2786 Change-Id: Ie36c140fc960328322502ea29cf6868805a7c558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Android: Download Android NDK and SDK from macOS hostShyamnath Premnadh2024-06-031-13/+54
| | | | | | | | | | | | | | | - For macOS, the Ndk is downloaded as .dmg image. This code downloads the .dmg image and mounts it to extract the NDK. - The SDK is downloaded as a .zip file. It is then extracted. - For the build-tools, version sometimes previously the latest version was downloaded which also included RC versions. The current code changes makes sure that RC versions are not downloaded. Pick-to: 6.7 Task-number: PYSIDE-2766 Change-Id: I1be39b1dff55bb1f2f4c3f4882908b429d37f4cd Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Android Deployment: Adjust with 6.7Shyamnath Premnadh2024-03-111-1/+1
| | | | | | | | | - Amend according with d1760bc8100c94a831f80080a5433a360266c5e2 - Update Android NDK to r26b aligning with Qt Task-number: PYSIDE-1612 Change-Id: I4ddb99568617d73213f83536f2c2a2e028d927ee Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Android Cross Compilation - Fix flake8 warningsShyamnath Premnadh2024-01-241-3/+3
| | | | | | Pick-to: 6.6 Change-Id: Id6e9cdbc7c0b763e8bbb4b7e8dc3ab568b65ebf8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment: auto download the required Android NDK and SDKShyamnath Premnadh2023-09-081-0/+256
- Enable automatic download of Android NDK and SDK for creating Android PySide6 and shiboken6 wheels. Earlier, the user was required to manually download it and supply as a command line argument. - They are downloaded into the HOME directory of the user into the folder .pyside6_android_deploy. This is also similar to buildozer which downloads them into .buildozer. - The downloaded NDK is set to r25c, same as buildozer. The latest Android SDK packages are downloaded. - For the deployment tool, incase the NDK and SDK path are not provided either through the command line or through the configuration .spec file, the it will look for the NDK and SDK inside .pyside6_android_deploy, before falling back to the default Android NDK and SDK that buildozer supplies. buildozer will download them. - As a addition, a small code rearranging is also done, along with changing the deprecated subprocess.call() to subprocess.run(). Task-number: PYSIDE-1612 Change-Id: Ie8d51f8c7634b5b320b1dce2d4164985cbfbaaca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>