summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2011-12-24 09:44:24 -0500
committerPeter Foley <pefoley2@verizon.net>2011-12-24 09:44:24 -0500
commitfd6649175956c9d322fe02fd413fe6970aa6819e (patch)
treece2691616f82ef55d3b8f3e45812777477e8668f /android
parentadd framework to tail_build (diff)
parentsupport libebook-1.2.so.12 (evolution 3.2) (diff)
downloadcore-fd6649175956c9d322fe02fd413fe6970aa6819e.tar.gz
core-fd6649175956c9d322fe02fd413fe6970aa6819e.zip
Merge remote-tracking branch 'origin/master' into feature/gbuild_extensions
Conflicts: Module_tail_build.mk Repository.mk extensions/util/makefile.pmk postprocess/prj/build.lst svx/AllLangResTarget_svx.mk
Diffstat (limited to 'android')
-rw-r--r--android/Bootstrap/AndroidManifest.xml19
-rw-r--r--android/Bootstrap/build.xml29
-rw-r--r--android/Bootstrap/project.properties1
-rw-r--r--android/Bootstrap/src/org/libreoffice/android/Bootstrap.java9
-rw-r--r--android/experiments/DocumentLoader/build.xml114
-rw-r--r--android/experiments/DocumentLoader/project.properties11
-rw-r--r--android/qa/sc/AndroidManifest.xml23
-rw-r--r--android/qa/sc/Makefile169
-rw-r--r--android/qa/sc/ant.properties17
-rw-r--r--android/qa/sc/build.xml114
-rw-r--r--android/qa/sc/project.properties14
-rw-r--r--android/qa/sc/res/layout/main.xml (renamed from android/Bootstrap/res/layout/main.xml)0
-rw-r--r--android/qa/sc/res/values/strings.xml4
-rw-r--r--android/qa/sc/src/dummyfile0
-rw-r--r--android/qa/simple/AndroidManifest.xml23
-rw-r--r--android/qa/simple/Makefile (renamed from android/Bootstrap/Makefile)28
-rw-r--r--android/qa/simple/ant.properties17
-rw-r--r--android/qa/simple/build.xml114
-rw-r--r--android/qa/simple/project.properties14
-rw-r--r--android/qa/simple/res/layout/main.xml12
-rw-r--r--android/qa/simple/res/values/strings.xml (renamed from android/Bootstrap/res/values/strings.xml)0
-rw-r--r--android/qa/simple/src/dummyfile0
22 files changed, 673 insertions, 59 deletions
diff --git a/android/Bootstrap/AndroidManifest.xml b/android/Bootstrap/AndroidManifest.xml
index 159bbf105d75..69c83e5a2224 100644
--- a/android/Bootstrap/AndroidManifest.xml
+++ b/android/Bootstrap/AndroidManifest.xml
@@ -3,22 +3,7 @@
package="org.libreoffice.android"
android:versionCode="1"
android:versionName="1.0">
- <uses-sdk android:minSdkVersion="9" />
- <!-- This .apk uses a subclass of NativeActivity, so it *has* Java code. -->
- <!-- android:hasCode="false" -->
- <application android:label="@string/app_name"
- android:debuggable="true">
- <!-- <activity android:name="android.app.NativeActivity" -->
- <activity android:name=".Bootstrap"
- android:label="LibreOffice Bootstrap"
- android:configChanges="orientation|keyboardHidden">
- <!-- Tell NativeActivity the name of our .so -->
- <meta-data android:name="android.app.lib_name"
- android:value="lo-bootstrap" />
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
+ <application>
+ <activity android:name="org.libreoffice.android.Bootstrap" />
</application>
</manifest>
diff --git a/android/Bootstrap/build.xml b/android/Bootstrap/build.xml
index 6b091c49c2bd..a186d8d62060 100644
--- a/android/Bootstrap/build.xml
+++ b/android/Bootstrap/build.xml
@@ -82,33 +82,4 @@
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
- <!-- Re-define the "-package-resources" target to not compress resources -->
-
- <target name="-package-resources" depends="-crunch">
- <!-- only package resources if *not* a library project -->
- <do-only-if-not-library elseText="Library project: do not package resources..." >
- <aapt executable="${aapt}"
- command="package"
- versioncode="${version.code}"
- versionname="${version.name}"
- debug="${build.is.packaging.debug}"
- manifest="AndroidManifest.xml"
- assets="${asset.absolute.dir}"
- androidjar="${android.jar}"
- apkfolder="${out.absolute.dir}"
- nocrunch="${build.packaging.nocrunch}"
- resourcefilename="${resource.package.file.name}"
- resourcefilter="${aapt.resource.filter}"
- projectLibrariesResName="project.libraries.res"
- projectLibrariesPackageName="project.libraries.package"
- previousBuildType="${build.last.target}"
- buildType="${build.target}">
- <res path="${out.res.absolute.dir}" />
- <res path="${resource.absolute.dir}" />
- <nocompress /> <!-- forces no compression on any files in assets or res/raw -->
- <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
- </aapt>
- </do-only-if-not-library>
- </target>
-
</project>
diff --git a/android/Bootstrap/project.properties b/android/Bootstrap/project.properties
index 730e911f2f9e..5ca7d6247a65 100644
--- a/android/Bootstrap/project.properties
+++ b/android/Bootstrap/project.properties
@@ -7,5 +7,6 @@
# "ant.properties", and override values to adapt the script to your
# project structure.
+android.library=true
# Project target.
target=android-14
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 46ce235d3ad4..91f965e661d4 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -136,7 +136,14 @@ public class Bootstrap extends NativeActivity
return;
}
- // Tell lo-bootstrap to Start a strace on itself if requested
+ // Start a strace on ourself if requested.
+
+ // Note that the started strace will have its stdout and
+ // stderr connected to /dev/null, so you definitely want to
+ // specify an -o option in the lo-strace extra. Also, strace
+ // will trace only *this* thread, which is not the one that
+ // eventually will run android_main() and lo_main(), so you
+ // also want the -f option.
String strace_args = getIntent().getStringExtra("lo-strace");
if (strace_args != null)
system("/system/xbin/strace -p " + getpid() + " " + (strace_args != "yes" ? strace_args : "" ) + " &");
diff --git a/android/experiments/DocumentLoader/build.xml b/android/experiments/DocumentLoader/build.xml
new file mode 100644
index 000000000000..5d960196c6b0
--- /dev/null
+++ b/android/experiments/DocumentLoader/build.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="LibreOfficeDocumentLoader" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+ <!-- Re-define the "-package-resources" target to not compress resources -->
+
+ <target name="-package-resources" depends="-crunch">
+ <!-- only package resources if *not* a library project -->
+ <do-only-if-not-library elseText="Library project: do not package resources..." >
+ <aapt executable="${aapt}"
+ command="package"
+ versioncode="${version.code}"
+ versionname="${version.name}"
+ debug="${build.is.packaging.debug}"
+ manifest="AndroidManifest.xml"
+ assets="${asset.absolute.dir}"
+ androidjar="${android.jar}"
+ apkfolder="${out.absolute.dir}"
+ nocrunch="${build.packaging.nocrunch}"
+ resourcefilename="${resource.package.file.name}"
+ resourcefilter="${aapt.resource.filter}"
+ projectLibrariesResName="project.libraries.res"
+ projectLibrariesPackageName="project.libraries.package"
+ previousBuildType="${build.last.target}"
+ buildType="${build.target}">
+ <res path="${out.res.absolute.dir}" />
+ <res path="${resource.absolute.dir}" />
+ <nocompress /> <!-- forces no compression on any files in assets or res/raw -->
+ <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
+ </aapt>
+ </do-only-if-not-library>
+ </target>
+
+</project>
diff --git a/android/experiments/DocumentLoader/project.properties b/android/experiments/DocumentLoader/project.properties
new file mode 100644
index 000000000000..730e911f2f9e
--- /dev/null
+++ b/android/experiments/DocumentLoader/project.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-14
diff --git a/android/qa/sc/AndroidManifest.xml b/android/qa/sc/AndroidManifest.xml
new file mode 100644
index 000000000000..92b374ea2c44
--- /dev/null
+++ b/android/qa/sc/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.libreoffice.android.qa.sc"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="9" />
+
+ <application android:label="@string/app_name"
+ android:debuggable="true">
+ <!-- Bootstrap is the subclass of android.app.NativeActivity -->
+ <activity android:name="org.libreoffice.android.Bootstrap"
+ android:label="LO Calc unit tests"
+ android:configChanges="orientation|keyboardHidden">
+ <!-- Tell NativeActivity the name of our .so -->
+ <meta-data android:name="android.app.lib_name"
+ android:value="lo-bootstrap" />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
new file mode 100644
index 000000000000..582784d84477
--- /dev/null
+++ b/android/qa/sc/Makefile
@@ -0,0 +1,169 @@
+# The package of this app
+APP_PACKAGE=org.libreoffice.android.qa.sc
+
+# The name of the Bootstrap activity class
+BOOTSTRAP=org.libreoffice.android.Bootstrap
+
+# The full path the the app's directory needs to be supplied in a
+# couple of places, unfortunately.
+
+APP_DATA_PATH=/data/data/$(APP_PACKAGE)
+
+NDK_HOME:=$(shell type -p ndk-build)
+NDK_HOME:=$(shell dirname $(NDK_HOME))
+
+SODEST=libs/armeabi-v7a
+OBJLOCAL=obj/local/armeabi-v7a
+
+define COPY
+cp $(1) $(SODEST)$(if $(2),/$(2)) && \
+arm-linux-androideabi-strip --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
+cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
+endef
+
+# The default target just builds.
+
+all: build-ant
+
+copy-stuff:
+#
+# Copy shared libraries we need to libs/armeabi-v7a so that ant will
+# include them in the .apk.
+#
+# Copy them to obj/local/armeabi-v7a, too, where gdb will look for
+# them.
+#
+ mkdir -p $(SODEST) $(OBJLOCAL)
+#
+# First the most important one, liblo-bootstrap.so
+ $(call COPY,$(OUTDIR)/lib/liblo-bootstrap.so)
+#
+# Then the cppunittester "program". As all "program"
+# files we build for Android actually is a shared object.
+ $(call COPY,$(OUTDIR)/bin/cppunit/cppunittester,libcppunittester.so)
+#
+# The cppunit library
+#
+ $(call COPY,$(OUTDIR)/lib/libcppunit-1.12.so)
+#
+# The tests we run here
+#
+ for F in sc_ucalc; do \
+ $(call COPY,$(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so); \
+ done
+#
+# Libs and UNO components that the tests need.
+#
+ for F in $(strip \
+ avmedialo \
+ basegfxlo \
+ bootstrap.uno \
+ canvastoolslo \
+ comphelpgcc3 \
+ configmgr.uno \
+ cppcanvaslo \
+ drawinglayerlo \
+ editenglo \
+ fontconfig \
+ forlo \
+ foruilo \
+ freetype \
+ fwelo \
+ fwilo \
+ fwklo \
+ gcc3_uno \
+ i18nisolang1gcc3 \
+ i18npaperlo \
+ i18npool.uno \
+ i18nutilgcc3 \
+ icudatalo \
+ icui18nlo \
+ iculelo \
+ icuuclo \
+ jvmaccessgcc3 \
+ jvmfwk \
+ lnglo \
+ localedata_en \
+ localedata_others \
+ msfilterlo \
+ reg \
+ saxlo \
+ sblo \
+ sfxlo \
+ sotlo \
+ store \
+ svllo \
+ svtlo \
+ svxcorelo \
+ svxlo \
+ test \
+ tklo \
+ tllo \
+ ucb1 \
+ ucbhelper4gcc3 \
+ ucpfile1 \
+ uno_cppu \
+ uno_cppuhelpergcc3 \
+ uno_sal \
+ uno_salhelpergcc3 \
+ unoexceptionprotector \
+ unotest \
+ unoxmllo \
+ utllo \
+ vbahelperlo \
+ vcllo \
+ vclplug_svplo \
+ xcrlo \
+ xml2 \
+ xmlreader \
+ xolo \
+ ); do \
+ $(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
+ done
+#
+# Then the shared GNU C++ library
+ $(call COPY,$(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so)
+#
+# Then other "assets". Let the directory structure under assets mimic
+# that under solver for now.
+ mkdir -p assets/bin assets/lib assets/xml/ure
+ cp $(OUTDIR)/bin/udkapi.rdb assets/bin
+ cp $(OUTDIR)/bin/types.rdb assets/bin
+ cp $(OUTDIR)/xml/ure/services.rdb assets/xml/ure
+ for F in framework/util/fwk i18npool/util/i18npool sfx2/util/sfx unoxml/source/service/unoxml configmgr/source/configmgr; do \
+ mkdir -p assets/ComponentTarget/`dirname $$F`; \
+ cp $(WORKDIR)/ComponentTarget/$$F.component assets/ComponentTarget/`dirname $$F`; \
+ done
+ for F in ucb1 ucpfile1; do \
+ cp $(OUTDIR)/xml/$$F.component assets/xml; \
+ done
+ cp -R $(OUTDIR)/xml/registry assets/xml
+ for F in uno_services uno_types; do \
+ sed -e 's!uri="./!uri="$(APP_DATA_PATH)/lib/!g' <$(SRC_ROOT)/testtools/$(INPATH)/lib/$${F}.rdb >assets/lib/$${F}.rdb; \
+ done
+#
+# Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
+#
+ cp $(NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver $(SODEST)
+ echo set solib-search-path ./obj/local/armeabi-v7a >$(SODEST)/gdb.setup
+
+
+build-ant: copy-stuff
+ unset JAVA_HOME && ant debug
+
+install: copy-stuff
+ unset JAVA_HOME && ant debug install
+ @echo
+ @echo 'Run it with something like what "make run" does (see Makefile)'
+ @echo
+
+uninstall:
+ adb uninstall $(APP_PACKAGE)
+
+run:
+ adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libtest_sc_ucalc.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/xml/ucb1.component file:///assets/xml/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib"
+
+clean:
+ ant clean
+ rm -rf assets $(SODEST) $(OBJLOCAL)
+
diff --git a/android/qa/sc/ant.properties b/android/qa/sc/ant.properties
new file mode 100644
index 000000000000..ee52d86d94a4
--- /dev/null
+++ b/android/qa/sc/ant.properties
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
diff --git a/android/qa/sc/build.xml b/android/qa/sc/build.xml
new file mode 100644
index 000000000000..a55977ad994e
--- /dev/null
+++ b/android/qa/sc/build.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="LibreOfficeQA-SC" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+ <!-- Re-define the "-package-resources" target to not compress resources -->
+
+ <target name="-package-resources" depends="-crunch">
+ <!-- only package resources if *not* a library project -->
+ <do-only-if-not-library elseText="Library project: do not package resources..." >
+ <aapt executable="${aapt}"
+ command="package"
+ versioncode="${version.code}"
+ versionname="${version.name}"
+ debug="${build.is.packaging.debug}"
+ manifest="AndroidManifest.xml"
+ assets="${asset.absolute.dir}"
+ androidjar="${android.jar}"
+ apkfolder="${out.absolute.dir}"
+ nocrunch="${build.packaging.nocrunch}"
+ resourcefilename="${resource.package.file.name}"
+ resourcefilter="${aapt.resource.filter}"
+ projectLibrariesResName="project.libraries.res"
+ projectLibrariesPackageName="project.libraries.package"
+ previousBuildType="${build.last.target}"
+ buildType="${build.target}">
+ <res path="${out.res.absolute.dir}" />
+ <res path="${resource.absolute.dir}" />
+ <nocompress /> <!-- forces no compression on any files in assets or res/raw -->
+ <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
+ </aapt>
+ </do-only-if-not-library>
+ </target>
+
+</project>
diff --git a/android/qa/sc/project.properties b/android/qa/sc/project.properties
new file mode 100644
index 000000000000..06b2d880c3d4
--- /dev/null
+++ b/android/qa/sc/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-14
+
+# Use the Bootstrap class
+android.library.reference.1=../../Bootstrap
diff --git a/android/Bootstrap/res/layout/main.xml b/android/qa/sc/res/layout/main.xml
index 5839d8cda704..5839d8cda704 100644
--- a/android/Bootstrap/res/layout/main.xml
+++ b/android/qa/sc/res/layout/main.xml
diff --git a/android/qa/sc/res/values/strings.xml b/android/qa/sc/res/values/strings.xml
new file mode 100644
index 000000000000..e4de92afb0b5
--- /dev/null
+++ b/android/qa/sc/res/values/strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">LibreOfficeQA-SC</string>
+</resources>
diff --git a/android/qa/sc/src/dummyfile b/android/qa/sc/src/dummyfile
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/android/qa/sc/src/dummyfile
diff --git a/android/qa/simple/AndroidManifest.xml b/android/qa/simple/AndroidManifest.xml
new file mode 100644
index 000000000000..fc18a3960f5a
--- /dev/null
+++ b/android/qa/simple/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.libreoffice.android.qa"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="9" />
+
+ <application android:label="@string/app_name"
+ android:debuggable="true">
+ <!-- Bootstrap is the subclass of android.app.NativeActivity -->
+ <activity android:name="org.libreoffice.android.Bootstrap"
+ android:label="LO simple cppunittests"
+ android:configChanges="orientation|keyboardHidden">
+ <!-- Tell NativeActivity the name of our .so -->
+ <meta-data android:name="android.app.lib_name"
+ android:value="lo-bootstrap" />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/android/Bootstrap/Makefile b/android/qa/simple/Makefile
index d8a7004579c7..a98250ba1b47 100644
--- a/android/Bootstrap/Makefile
+++ b/android/qa/simple/Makefile
@@ -1,7 +1,13 @@
+# The package of this app
+APP_PACKAGE=org.libreoffice.android.qa
+
+# The name of the Bootstrap activity class
+BOOTSTRAP=org.libreoffice.android.Bootstrap
+
# The full path the the app's directory needs to be supplied in a
# couple of places, unfortunately.
-APP_DATA_PATH=/data/data/org.libreoffice.android
+APP_DATA_PATH=/data/data/$(APP_PACKAGE)
NDK_HOME:=$(shell type -p ndk-build)
NDK_HOME:=$(shell dirname $(NDK_HOME))
@@ -17,7 +23,7 @@ endef
# The default target just builds.
-all: build-ant lo-bootstrap.jar
+all: build-ant
copy-stuff:
#
@@ -41,7 +47,7 @@ copy-stuff:
#
# cppunit "plug-ins", first ones from sal
#
- $(call COPY,../../sal/$(INPATH)/lib/*.so)
+ $(call COPY,$(SRCDIR)/sal/$(INPATH)/lib/*.so)
#
# and ones from other modules. Note that depending on when you try
# this, these might not have been built yet.
@@ -105,11 +111,7 @@ copy-stuff:
build-ant: copy-stuff
unset JAVA_HOME && ant debug
-lo-bootstrap.jar: build-ant
- cd bin/classes && jar cvf ../../lo-bootstrap.jar fi/iki/tml org/libreoffice/android/Bootstrap.class
-
-install: copy-stuff lo-bootstrap.jar
- cp lo-bootstrap.jar $(OUTDIR)bin
+install: copy-stuff
unset JAVA_HOME && ant debug install
@echo
@echo 'Run it with something like what "make run" does (see Makefile)'
@@ -118,12 +120,14 @@ install: copy-stuff lo-bootstrap.jar
run:
# Note: these are just examples.
#
- adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libqa_sal_types.so"
+ adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libqa_sal_types.so"
#
sleep 10
- adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libtest_i18npool_test_breakiterator.so --protector libunoexceptionprotector.so unoexceptionprotector '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/i18npool/util/i18npool.component' -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib"
+ adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-cmdline "$(APP_DATA_PATH)/lib/libtest_i18npool_test_breakiterator.so --protector libunoexceptionprotector.so unoexceptionprotector '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/i18npool/util/i18npool.component' -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib"
#
-# adb shell am start -n org.libreoffice.android/.Bootstrap -e lo-main-library libunoexe -e lo-main-cmdline "-ro /assets/lib/uno_services.rdb -ro /assets/lib/uno_types.rdb -s com.sun.star.test.bridge.BridgeTest -- com.sun.star.test.bridge.CppTestObject" -e lo-main-delay 2
+# adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libunoexe -e lo-main-cmdline "-ro /assets/lib/uno_services.rdb -ro /assets/lib/uno_types.rdb -s com.sun.star.test.bridge.BridgeTest -- com.sun.star.test.bridge.CppTestObject" -e lo-main-delay 2
clean:
- rm -rf bin assets
+ ant clean
+ rm -rf assets $(SODEST) $(OBJLOCAL)
+
diff --git a/android/qa/simple/ant.properties b/android/qa/simple/ant.properties
new file mode 100644
index 000000000000..ee52d86d94a4
--- /dev/null
+++ b/android/qa/simple/ant.properties
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
diff --git a/android/qa/simple/build.xml b/android/qa/simple/build.xml
new file mode 100644
index 000000000000..b5fd582c9a52
--- /dev/null
+++ b/android/qa/simple/build.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="LibreOfficeQA-simple" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+ <!-- Re-define the "-package-resources" target to not compress resources -->
+
+ <target name="-package-resources" depends="-crunch">
+ <!-- only package resources if *not* a library project -->
+ <do-only-if-not-library elseText="Library project: do not package resources..." >
+ <aapt executable="${aapt}"
+ command="package"
+ versioncode="${version.code}"
+ versionname="${version.name}"
+ debug="${build.is.packaging.debug}"
+ manifest="AndroidManifest.xml"
+ assets="${asset.absolute.dir}"
+ androidjar="${android.jar}"
+ apkfolder="${out.absolute.dir}"
+ nocrunch="${build.packaging.nocrunch}"
+ resourcefilename="${resource.package.file.name}"
+ resourcefilter="${aapt.resource.filter}"
+ projectLibrariesResName="project.libraries.res"
+ projectLibrariesPackageName="project.libraries.package"
+ previousBuildType="${build.last.target}"
+ buildType="${build.target}">
+ <res path="${out.res.absolute.dir}" />
+ <res path="${resource.absolute.dir}" />
+ <nocompress /> <!-- forces no compression on any files in assets or res/raw -->
+ <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
+ </aapt>
+ </do-only-if-not-library>
+ </target>
+
+</project>
diff --git a/android/qa/simple/project.properties b/android/qa/simple/project.properties
new file mode 100644
index 000000000000..06b2d880c3d4
--- /dev/null
+++ b/android/qa/simple/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-14
+
+# Use the Bootstrap class
+android.library.reference.1=../../Bootstrap
diff --git a/android/qa/simple/res/layout/main.xml b/android/qa/simple/res/layout/main.xml
new file mode 100644
index 000000000000..5839d8cda704
--- /dev/null
+++ b/android/qa/simple/res/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Hello World"
+ />
+</LinearLayout>
diff --git a/android/Bootstrap/res/values/strings.xml b/android/qa/simple/res/values/strings.xml
index f296dd4b137d..f296dd4b137d 100644
--- a/android/Bootstrap/res/values/strings.xml
+++ b/android/qa/simple/res/values/strings.xml
diff --git a/android/qa/simple/src/dummyfile b/android/qa/simple/src/dummyfile
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/android/qa/simple/src/dummyfile