]> sigrok.org Git - pulseview.git/blame - android/custom_rules.xml
Fix build with -DENABLE_DECODE=n.
[pulseview.git] / android / custom_rules.xml
CommitLineData
a4ef3993
MC
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
1c90d94f 3 This file is part of the PulseView project.
a4ef3993 4
1c90d94f 5 Copyright (C) 2014 Marcus Comstedt <marcus@mc.pp.se>
a4ef3993 6
1c90d94f
UH
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
a4ef3993 11
1c90d94f
UH
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
a4ef3993 16
1c90d94f
UH
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
a4ef3993
MC
19-->
20<project>
1c90d94f
UH
21 <property name="pulseview-source-path" value="${basedir}/.."/>
22 <property name="pulseview-build-path" value="${pulseview-source-path}"/>
23 <property name="cmake-cache" value="${pulseview-build-path}/CMakeCache.txt"/>
1c90d94f
UH
24 <target name="-get-prefix">
25 <loadproperties srcFile="${cmake-cache}" prefix="cmake">
26 <filterchain>
27 <replaceregex pattern=":[A-Z]*=" replace="="/>
28 </filterchain>
29 </loadproperties>
30 <property name="prefix" value="${cmake.CMAKE_INSTALL_PREFIX}"/>
b00f0979 31 <property name="android.abi" value="${cmake.ANDROID_ABI}"/>
1c90d94f 32 </target>
1c90d94f
UH
33 <target name="-declare-anttasks" depends="-get-prefix">
34 <taskdef resource="anttasks.properties"
35 classpath="${prefix}/jar/sigrok-androidutils-anttasks.jar"/>
36 </target>
1c90d94f
UH
37 <target name="-pre-build" depends="-get-prefix, -declare-anttasks">
38 <copylibs todir="${native.libs.absolute.dir}" property="bundled_libs">
39 <fileset dir="${pulseview-build-path}/libs"/>
aaa4c010
MC
40 <include name="libpulseview.so"/>
41 <exclude name="libQt5*.so"/>
42 <exclude name="libc.so"/>
43 <exclude name="libm.so"/>
44 <exclude name="libdl.so"/>
45 <exclude name="liblog.so"/>
46 <exclude name="libstdc++.so"/>
47 <exclude name="libz.so"/>
1c90d94f 48 </copylibs>
b00f0979
MC
49 <copy todir="${native.libs.absolute.dir}">
50 <fileset dir="${prefix}/jar">
51 <include name="QtAndroid-bundled.jar" />
52 <include name="QtAndroidAccessibility-bundled.jar" />
53 </fileset>
54 </copy>
55 <copy todir="${native.libs.absolute.dir}/${android.abi}">
56 <fileset dir="${prefix}/lib">
57 <include name="libQt5Core.so" />
58 <include name="libQt5Gui.so" />
59 <include name="libQt5Widgets.so" />
60 <include name="libQt5Svg.so" />
61 </fileset>
62 </copy>
63 <copy todir="${native.libs.absolute.dir}/${android.abi}">
64 <fileset dir="${prefix}/plugins">
65 <include name="platforms/android/libqtforandroid.so"/>
66 <include name="platforms/libqeglfs.so"/>
67 <include name="platforms/libqminimal.so"/>
68 <include name="platforms/libqminimalegl.so"/>
69 <include name="platforms/libqoffscreen.so"/>
70 <include name="generic/libqevdevkeyboardplugin.so"/>
71 <include name="generic/libqevdevmouseplugin.so"/>
72 <include name="generic/libqevdevtabletplugin.so"/>
73 <include name="generic/libqevdevtouchplugin.so"/>
74 <include name="imageformats/libqsvg.so"/>
75 <include name="iconengines/libqsvgicon.so"/>
b00f0979
MC
76 </fileset>
77 <filtermapper>
78 <replacestring from="/" to="_" />
79 <prefixlines prefix="libplugins_" />
80 </filtermapper>
81 </copy>
1c90d94f
UH
82 <copy file="${prefix}/jar/sigrok-androidutils.jar"
83 tofile="${jar.libs.absolute.dir}/sigrok-androidutils.jar"/>
84 <copy file="${prefix}/share/sigrok-androidutils/device_filter.xml"
85 tofile="${resource.absolute.dir}/xml/device_filter.xml"/>
86 <copy file="bundled_libs.xml.in"
87 tofile="${resource.absolute.dir}/values/bundled_libs.xml">
88 <filterset>
89 <filter token="bundled_libs" value="${bundled_libs}"/>
90 </filterset>
91 </copy>
5ea53b3c 92 <copy file="${pulseview-source-path}/icons/pulseview.png"
1c90d94f
UH
93 tofile="${resource.absolute.dir}/drawable/logo.png"/>
94 <copy todir="${source.absolute.dir}">
95 <fileset dir="${prefix}/src/android/java/src">
96 <include name="org/qtproject/qt5/android/bindings/**"/>
97 <include name="org/kde/necessitas/ministro/**"/>
98 </fileset>
99 </copy>
100 <copy todir="${resource.absolute.dir}">
101 <fileset dir="${prefix}/src/android/java/res">
102 <include name="**/strings.xml"/>
103 </fileset>
104 </copy>
105 <copy todir="${asset.absolute.dir}/libsigrokdecode">
106 <fileset dir="${prefix}/share/libsigrokdecode"/>
107 </copy>
108 <copy todir="${asset.absolute.dir}/python3.3">
109 <fileset dir="${prefix}/lib/python3.3">
110 <include name="**/*.py"/>
111 <exclude name="**/test/**"/>
754602a3
UH
112 <exclude name="**/tests/**"/>
113 <exclude name="**/tkinter/**"/>
114 <exclude name="**/turtledemo/**"/>
115 <exclude name="**/turtle.py"/>
116 <exclude name="**/idlelib/**"/>
1c90d94f
UH
117 </fileset>
118 </copy>
2388a732
MC
119 <copy todir="${asset.absolute.dir}/sigrok-firmware">
120 <fileset dir="${prefix}/share/sigrok-firmware"/>
121 </copy>
1c90d94f 122 </target>
a4ef3993 123</project>