summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-03-21 19:56:18 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-03-22 22:49:47 +0200
commita3035495eb67651e5bf3d785ac8f1a73eb3abf37 (patch)
tree55c7383204a44273568254709c3d8b4a65842b86 /android
parent2cbb41b3ab036504f66418b28559aa40fd773b61 (diff)
Make the DocumentLoader experimental app build again
Diffstat (limited to 'android')
-rw-r--r--android/experiments/DocumentLoader/AndroidManifest.xml2
-rw-r--r--android/experiments/DocumentLoader/Makefile78
-rw-r--r--android/experiments/DocumentLoader/local.properties.in2
-rw-r--r--android/experiments/DocumentLoader/project.properties3
4 files changed, 46 insertions, 39 deletions
diff --git a/android/experiments/DocumentLoader/AndroidManifest.xml b/android/experiments/DocumentLoader/AndroidManifest.xml
index c137311155d1..e3001d6875fa 100644
--- a/android/experiments/DocumentLoader/AndroidManifest.xml
+++ b/android/experiments/DocumentLoader/AndroidManifest.xml
@@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" />
- <application android:label="@string/app_name"
+ <application android:label="LO Experimental DocumentLoader"
android:debuggable="true">
<activity android:name=".DocumentLoader"
android:label="LO DocumentLoader"
diff --git a/android/experiments/DocumentLoader/Makefile b/android/experiments/DocumentLoader/Makefile
index 7db82ae1a43a..5612fbf235f4 100644
--- a/android/experiments/DocumentLoader/Makefile
+++ b/android/experiments/DocumentLoader/Makefile
@@ -1,12 +1,13 @@
-NDK_HOME:=$(shell type -p ndk-build)
-NDK_HOME:=$(shell dirname $(NDK_HOME))
+include ../../../config_host.mk
+
+# The package of this app
+APP_PACKAGE=org.libreoffice.android.examples
SODEST=libs/armeabi-v7a
OBJLOCAL=obj/local/armeabi-v7a
define COPYSO
-cp $(1) $(SODEST)$(if $(2),/$(2)) && \
-arm-linux-androideabi-strip --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
+cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
endef
@@ -18,37 +19,11 @@ endef
all: build-ant
-copy-stuff:
+copy-stuff:
# First always clean
rm -rf libs $(OBJLOCAL)
mkdir -p $(SODEST) $(OBJLOCAL)
#
-# Copy jar files we need, and even construct one.
-#
- for F in $(strip \
- java_uno \
- juh \
- jurt \
- ridl \
- unoloader \
- ); do \
- $(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
- done
-#
-# lo-bootstrap.jar from ../../Bootstrap
-#
- cp ../../Bootstrap/lo-bootstrap.jar libs
-#
-# com.sun.star.frame.XComponentLoader is not in any jar
-#
- cd libs && \
- LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib \
- DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib \
- $(OUTDIR_FOR_BUILD)/bin/javamaker -BUCR -nD \
- $(OUTDIR)/bin/udkapi.rdb $(OUTDIR)/bin/offapi.rdb \
- -Tcom.sun.star.frame.XComponentLoader && \
- jar cvf more.jar com
-#
# Copy shared libraries (including UNO components) we need to
# libs/armeabi-v7a so that ant will include them in the .apk.
#
@@ -70,8 +45,8 @@ copy-stuff:
lo-bootstrap \
localedata_en \
localedata_others \
+ mergedlo \
reg \
- sal_textenc \
store \
ucbhelper4gcc3 \
uno_cppu \
@@ -87,7 +62,7 @@ copy-stuff:
done
#
# Then the shared GNU C++ library
- $(call COPYSO,$(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so)
+ $(call COPYSO,$(ANDROID_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.
@@ -101,20 +76,47 @@ copy-stuff:
#
# 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)
+ cp $(ANDROID_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
+#
+# Copy jar files we need, and even construct one.
+#
+ for F in $(strip \
+ java_uno \
+ juh \
+ jurt \
+ ridl \
+ unoloader \
+ ); do \
+ $(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
+ done
+#
+# com.sun.star.frame.XComponentLoader is not in any jar
+#
+ cd libs && \
+ LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib \
+ DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib \
+ $(OUTDIR_FOR_BUILD)/bin/javamaker -BUCR -nD \
+ $(OUTDIR)/bin/udkapi.rdb $(OUTDIR)/bin/offapi.rdb \
+ -Tcom.sun.star.frame.XComponentLoader && \
+ jar cvf more.jar com
+#
+ unset JAVA_HOME && $(ANT) debug
install: copy-stuff
- unset JAVA_HOME && ant debug install
+ unset JAVA_HOME && $(ANT) debug install
@echo
@echo 'Run it with something like what "make run" does (see Makefile)'
@echo
-run: install
+uninstall:
+ $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
+
+run:
adb shell am start -n org.libreoffice.android.examples/.DocumentLoader -e input /assets/test1.odt
clean:
- rm -rf bin assets
+ $(ANT) clean
+ rm -rf assets libs $(SODEST) $(OBJLOCAL)
diff --git a/android/experiments/DocumentLoader/local.properties.in b/android/experiments/DocumentLoader/local.properties.in
new file mode 100644
index 000000000000..27c8eb5f4dac
--- /dev/null
+++ b/android/experiments/DocumentLoader/local.properties.in
@@ -0,0 +1,2 @@
+# Location of the SDK. This is only used by Ant.
+sdk.dir=@ANDROID_SDK_HOME@
diff --git a/android/experiments/DocumentLoader/project.properties b/android/experiments/DocumentLoader/project.properties
index 730e911f2f9e..06b2d880c3d4 100644
--- a/android/experiments/DocumentLoader/project.properties
+++ b/android/experiments/DocumentLoader/project.properties
@@ -9,3 +9,6 @@
# Project target.
target=android-14
+
+# Use the Bootstrap class
+android.library.reference.1=../../Bootstrap