]> sigrok.org Git - pulseview.git/commitdiff
Android: Bundle Qt libs with the APK
authorMarcus Comstedt <redacted>
Fri, 29 Aug 2014 20:10:54 +0000 (22:10 +0200)
committerUwe Hermann <redacted>
Sun, 31 Aug 2014 17:27:55 +0000 (19:27 +0200)
android/AndroidManifest.xml
android/custom_rules.xml
android/res/values/libs.xml

index d4913b8b36e36fe108ddb66c431a90077df2a51e..6002c3c8971aca75ec59636ab344b2bc5830ed77 100644 (file)
                        <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
                        <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
                        <!-- Deploy Qt libs as part of package -->
-                       <meta-data android:name="android.app.bundle_local_qt_libs" android:value="0"/>
+                       <meta-data android:name="android.app.bundle_local_qt_libs" android:value="1"/>
                        <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
                        <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
                        <!-- Run with local libs -->
-                       <meta-data android:name="android.app.use_local_qt_libs" android:value="0"/>
+                       <meta-data android:name="android.app.use_local_qt_libs" android:value="1"/>
                        <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
                        <meta-data android:name="android.app.load_local_libs" android:value="plugins/platforms/android/libqtforandroid.so"/>
                        <meta-data android:name="android.app.load_local_jars" android:value="jar/QtAndroid.jar:jar/QtAndroidAccessibility.jar:jar/QtAndroid-bundled.jar:jar/QtAndroidAccessibility-bundled.jar"/>
index 4ba1bb6e86b0be8d58354ed3b9c29f15954b5aa7..b4cfe654b06d75c04ea81d05867477a93b4450e5 100644 (file)
@@ -29,6 +29,7 @@
                        </filterchain>
                </loadproperties>
                <property name="prefix" value="${cmake.CMAKE_INSTALL_PREFIX}"/>
+               <property name="android.abi" value="${cmake.ANDROID_ABI}"/>
        </target>
 
        <target name="-declare-anttasks" depends="-get-prefix">
                        <include name="libgnustl_shared.so"/>
                        <exclude name="lib*.so"/>
                </copylibs>
+               <copy todir="${native.libs.absolute.dir}">
+                       <fileset dir="${prefix}/jar">
+                               <include name="QtAndroid-bundled.jar" />
+                               <include name="QtAndroidAccessibility-bundled.jar" />
+                       </fileset>
+               </copy>
+               <copy todir="${native.libs.absolute.dir}/${android.abi}">
+                       <fileset dir="${prefix}/lib">
+                               <include name="libQt5Core.so" />
+                               <include name="libQt5Gui.so" />
+                               <include name="libQt5Widgets.so" />
+                               <include name="libQt5Svg.so" />
+                       </fileset>
+               </copy>
+               <copy todir="${native.libs.absolute.dir}/${android.abi}">
+                       <fileset dir="${prefix}/plugins">
+                               <include name="platforms/android/libqtforandroid.so"/>
+                               <include name="platforms/libqeglfs.so"/>
+                               <include name="platforms/libqminimal.so"/>
+                               <include name="platforms/libqminimalegl.so"/>
+                               <include name="platforms/libqoffscreen.so"/>
+                               <include name="generic/libqevdevkeyboardplugin.so"/>
+                               <include name="generic/libqevdevmouseplugin.so"/>
+                               <include name="generic/libqevdevtabletplugin.so"/>
+                               <include name="generic/libqevdevtouchplugin.so"/>
+                               <include name="imageformats/libqsvg.so"/>
+                               <include name="iconengines/libqsvgicon.so"/>
+                               <include name="accessible/libqtaccessiblewidgets.so"/>
+                       </fileset>
+                       <filtermapper>
+                               <replacestring from="/" to="_" />
+                               <prefixlines prefix="libplugins_" />
+                       </filtermapper>
+               </copy>
                <copy file="${prefix}/jar/sigrok-androidutils.jar"
                        tofile="${jar.libs.absolute.dir}/sigrok-androidutils.jar"/>
                <copy file="${prefix}/share/sigrok-androidutils/device_filter.xml"
index 9f415028efb3762d6fd241a3bf202cda3cc3eb9a..912a858f3e020403feef004077fd81ba89b2f39d 100644 (file)
@@ -23,6 +23,7 @@
        </array>
        <array name="qt_libs">
                <!-- %%INSERT_QT_LIBS%% -->
+               <item>gnustl_shared</item>
                <item>Qt5Core</item>
                <item>Qt5Gui</item>
                <item>Qt5Widgets</item>
        </array>
        <array name="bundled_in_lib">
                <!-- %%INSERT_BUNDLED_IN_LIB%% -->
+               <item>libplugins_platforms_android_libqtforandroid.so:plugins/platforms/android/libqtforandroid.so</item>
+               <item>libplugins_platforms_libqeglfs.so:plugins/platforms/libqeglfs.so</item>
+               <item>libplugins_platforms_libqminimal.so:plugins/platforms/libqminimal.so</item>
+               <item>libplugins_platforms_libqminimalegl.so:plugins/platforms/libqminimalegl.so</item>
+               <item>libplugins_platforms_libqoffscreen.so:plugins/platforms/libqoffscreen.so</item>
+               <item>libplugins_generic_libqevdevkeyboardplugin.so:plugins/generic/libqevdevkeyboardplugin.so</item>
+               <item>libplugins_generic_libqevdevmouseplugin.so:plugins/generic/libqevdevmouseplugin.so</item>
+               <item>libplugins_generic_libqevdevtabletplugin.so:plugins/generic/libqevdevtabletplugin.so</item>
+               <item>libplugins_generic_libqevdevtouchplugin.so:plugins/generic/libqevdevtouchplugin.so</item>
+               <item>libplugins_imageformats_libqsvg.so:plugins/imageformats/libqsvg.so</item>
+               <item>libplugins_iconengines_libqsvgicon.so:plugins/iconengines/libqsvgicon.so</item>
+               <item>libplugins_accessible_libqtaccessiblewidgets.so:plugins/accessible/libqtaccessiblewidgets.so</item>
        </array>
+
        <array name="bundled_in_assets">
                <!-- %%INSERT_BUNDLED_IN_ASSETS%% -->
        </array>