]> sigrok.org Git - pulseview.git/blob - android/custom_rules.xml
Minor whitespace fixes.
[pulseview.git] / android / custom_rules.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    This file is part of the PulseView project.
4
5    Copyright (C) 2014 Marcus Comstedt <marcus@mc.pp.se>
6
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.
11
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.
16
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/>.
19 -->
20 <project>
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"/>
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}"/>
31                 <property name="android.abi" value="${cmake.ANDROID_ABI}"/>
32         </target>
33         <target name="-declare-anttasks" depends="-get-prefix">
34                 <taskdef resource="anttasks.properties"
35                         classpath="${prefix}/jar/sigrok-androidutils-anttasks.jar"/>
36         </target>
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"/>
40                         <include name="libgnustl_shared.so"/>
41                         <include name="libffi.so"/>
42                         <exclude name="lib*.so"/>
43                 </copylibs>
44                 <copy todir="${native.libs.absolute.dir}">
45                         <fileset dir="${prefix}/jar">
46                                 <include name="QtAndroid-bundled.jar" />
47                                 <include name="QtAndroidAccessibility-bundled.jar" />
48                         </fileset>
49                 </copy>
50                 <copy todir="${native.libs.absolute.dir}/${android.abi}">
51                         <fileset dir="${prefix}/lib">
52                                 <include name="libQt5Core.so" />
53                                 <include name="libQt5Gui.so" />
54                                 <include name="libQt5Widgets.so" />
55                                 <include name="libQt5Svg.so" />
56                         </fileset>
57                 </copy>
58                 <copy todir="${native.libs.absolute.dir}/${android.abi}">
59                         <fileset dir="${prefix}/plugins">
60                                 <include name="platforms/android/libqtforandroid.so"/>
61                                 <include name="platforms/libqeglfs.so"/>
62                                 <include name="platforms/libqminimal.so"/>
63                                 <include name="platforms/libqminimalegl.so"/>
64                                 <include name="platforms/libqoffscreen.so"/>
65                                 <include name="generic/libqevdevkeyboardplugin.so"/>
66                                 <include name="generic/libqevdevmouseplugin.so"/>
67                                 <include name="generic/libqevdevtabletplugin.so"/>
68                                 <include name="generic/libqevdevtouchplugin.so"/>
69                                 <include name="imageformats/libqsvg.so"/>
70                                 <include name="iconengines/libqsvgicon.so"/>
71                                 <include name="accessible/libqtaccessiblewidgets.so"/>
72                         </fileset>
73                         <filtermapper>
74                                 <replacestring from="/" to="_" />
75                                 <prefixlines prefix="libplugins_" />
76                         </filtermapper>
77                 </copy>
78                 <copy file="${prefix}/jar/sigrok-androidutils.jar"
79                         tofile="${jar.libs.absolute.dir}/sigrok-androidutils.jar"/>
80                 <copy file="${prefix}/share/sigrok-androidutils/device_filter.xml"
81                         tofile="${resource.absolute.dir}/xml/device_filter.xml"/>
82                 <copy file="bundled_libs.xml.in"
83                         tofile="${resource.absolute.dir}/values/bundled_libs.xml">
84                         <filterset>
85                                 <filter token="bundled_libs" value="${bundled_libs}"/>
86                         </filterset>
87                 </copy>
88                 <copy file="${pulseview-source-path}/icons/sigrok-logo-notext.png"
89                         tofile="${resource.absolute.dir}/drawable/logo.png"/>
90                 <copy todir="${source.absolute.dir}">
91                         <fileset dir="${prefix}/src/android/java/src">
92                                 <include name="org/qtproject/qt5/android/bindings/**"/>
93                                 <include name="org/kde/necessitas/ministro/**"/>
94                         </fileset>
95                 </copy>
96                 <copy todir="${resource.absolute.dir}">
97                         <fileset dir="${prefix}/src/android/java/res">
98                                 <include name="**/strings.xml"/>
99                         </fileset>
100                 </copy>
101                 <copy todir="${asset.absolute.dir}/libsigrokdecode">
102                         <fileset dir="${prefix}/share/libsigrokdecode"/>
103                 </copy>
104                 <copy todir="${asset.absolute.dir}/python3.3">
105                         <fileset dir="${prefix}/lib/python3.3">
106                                 <include name="**/*.py"/>
107                                 <exclude name="**/test/**"/>
108                                 <exclude name="**/tests/**"/>
109                                 <exclude name="**/tkinter/**"/>
110                                 <exclude name="**/turtledemo/**"/>
111                                 <exclude name="**/turtle.py"/>
112                                 <exclude name="**/idlelib/**"/>
113                         </fileset>
114                 </copy>
115         </target>
116 </project>