close
Warning:
AdminModule failed with TracError: Unable to instantiate component <class 'trac.ticket.admin.ComponentAdminPanel'> (super(type, obj): obj must be an instance or subtype of type)
- Timestamp:
-
Nov 16, 2014, 12:13:46 AM (11 years ago)
- Author:
-
Martin Kolman
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v28
|
v29
|
|
| 23 | 23 | For build script integration it would be nice to be able to non-interactively build a Python application package for Android, without the need to do that manually in the !QtCreator GUI. |
| 24 | 24 | |
| 25 | | Fortunately the [http://doc-snapshot.qt-project.org/qt5-5.3/deployment-android.html#androiddeployqt '''androiddeployqt'''] tools seems to do just that. :) |
| | 25 | Fortunately the [http://doc-snapshot.qt-project.org/qt5-5.3/deployment-android.html#androiddeployqt '''androiddeployqt'''] tool seems to do just that. :) |
| 26 | 26 | |
| 27 | 27 | ==== Using androiddeployqt ==== |
| | 28 | |
| | 29 | The '''androiddeployqt''' makes it possible to create android packages (APK) for Qt applications from the command line. |
| | 30 | |
| | 31 | But before you can start using it, you need to export paths to your Android NDK & SDK as environmental variables so that the tools can find them: |
| | 32 | |
| | 33 | {{{ |
| | 34 | export ANDROID_NDK_ROOT=<path to Android NDK top level folder> |
| | 35 | export ANDROID_SDK_ROOT=<path to Android SDK top level folder> |
| | 36 | }}} |
| | 37 | |
| | 38 | Note that the NDK should preferably be the same one that has been used for your Python 3 for Android build. |
| | 39 | |
| | 40 | Next you need to run ''qmake'' & ''make'' in your project directory to prepare it for '''androiddeployqt'''. |
| | 41 | |
| | 42 | Note that you should use the ''qmake'' that from your Qt for Android SDK, not the system-wide ''qmake'', so that any platform dependent code (C++ launcher, etc.) in your project is correctly compiled for Android. For example for the Qt 5.3 Android SDK on Linux installed in ''/opt'' this "android qmake" is in {{{/opt/Qt5.3/5.3/android_armv7/bin/qmake}}}. |
| | 43 | |
| | 44 | {{{ |
| | 45 | qmake |
| | 46 | make install INSTALL_ROOT=android-build/ |
| | 47 | }}} |
| | 48 | |
| | 49 | Next run the tool to create an APK: |
| | 50 | |
| | 51 | {{{ |
| | 52 | androiddeployqt --output android-build/ --verbose |
| | 53 | }}} |
| | 54 | |
| | 55 | This is just a basic usage example, the tool can do much more such as deploying the APK to device, signing the AKC, using a different Qt library deploy methods, etc. |