Kaydet (Commit) a3035495 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Make the DocumentLoader experimental app build again

üst 2cbb41b3
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" /> <uses-sdk android:minSdkVersion="9" />
<application android:label="@string/app_name" <application android:label="LO Experimental DocumentLoader"
android:debuggable="true"> android:debuggable="true">
<activity android:name=".DocumentLoader" <activity android:name=".DocumentLoader"
android:label="LO DocumentLoader" android:label="LO DocumentLoader"
......
NDK_HOME:=$(shell type -p ndk-build) include ../../../config_host.mk
NDK_HOME:=$(shell dirname $(NDK_HOME))
# The package of this app
APP_PACKAGE=org.libreoffice.android.examples
SODEST=libs/armeabi-v7a SODEST=libs/armeabi-v7a
OBJLOCAL=obj/local/armeabi-v7a OBJLOCAL=obj/local/armeabi-v7a
define COPYSO define COPYSO
cp $(1) $(SODEST)$(if $(2),/$(2)) && \ cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
arm-linux-androideabi-strip --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
cp $(1) $(OBJLOCAL)$(if $(2),/$(2)) cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
endef endef
...@@ -18,37 +19,11 @@ endef ...@@ -18,37 +19,11 @@ endef
all: build-ant all: build-ant
copy-stuff: copy-stuff:
# First always clean # First always clean
rm -rf libs $(OBJLOCAL) rm -rf libs $(OBJLOCAL)
mkdir -p $(SODEST) $(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 # Copy shared libraries (including UNO components) we need to
# libs/armeabi-v7a so that ant will include them in the .apk. # libs/armeabi-v7a so that ant will include them in the .apk.
# #
...@@ -70,8 +45,8 @@ copy-stuff: ...@@ -70,8 +45,8 @@ copy-stuff:
lo-bootstrap \ lo-bootstrap \
localedata_en \ localedata_en \
localedata_others \ localedata_others \
mergedlo \
reg \ reg \
sal_textenc \
store \ store \
ucbhelper4gcc3 \ ucbhelper4gcc3 \
uno_cppu \ uno_cppu \
...@@ -87,7 +62,7 @@ copy-stuff: ...@@ -87,7 +62,7 @@ copy-stuff:
done done
# #
# Then the shared GNU C++ library # 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 # Then other "assets". Let the directory structure under assets mimic
# that under solver for now. # that under solver for now.
...@@ -101,20 +76,47 @@ copy-stuff: ...@@ -101,20 +76,47 @@ copy-stuff:
# #
# Then gdbserver and gdb.setup so that we can debug with ndk-gdb. # 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 echo set solib-search-path ./obj/local/armeabi-v7a >$(SODEST)/gdb.setup
build-ant: copy-stuff 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 install: copy-stuff
unset JAVA_HOME && ant debug install unset JAVA_HOME && $(ANT) debug install
@echo @echo
@echo 'Run it with something like what "make run" does (see Makefile)' @echo 'Run it with something like what "make run" does (see Makefile)'
@echo @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 adb shell am start -n org.libreoffice.android.examples/.DocumentLoader -e input /assets/test1.odt
clean: clean:
rm -rf bin assets $(ANT) clean
rm -rf assets libs $(SODEST) $(OBJLOCAL)
# Location of the SDK. This is only used by Ant.
sdk.dir=@ANDROID_SDK_HOME@
...@@ -9,3 +9,6 @@ ...@@ -9,3 +9,6 @@
# Project target. # Project target.
target=android-14 target=android-14
# Use the Bootstrap class
android.library.reference.1=../../Bootstrap
...@@ -3254,6 +3254,7 @@ if test "$cross_compiling" = "yes"; then ...@@ -3254,6 +3254,7 @@ if test "$cross_compiling" = "yes"; then
tar cf - \ tar cf - \
bin/repo-list.in \ bin/repo-list.in \
android/Bootstrap/local.properties.in \ android/Bootstrap/local.properties.in \
android/experiments/DocumentLoader/local.properties.in \
android/qa/sc/local.properties.in \ android/qa/sc/local.properties.in \
android/qa/desktop/local.properties.in \ android/qa/desktop/local.properties.in \
config.guess \ config.guess \
...@@ -11238,7 +11239,11 @@ else ...@@ -11238,7 +11239,11 @@ else
echo > config_host.mk.last echo > config_host.mk.last
fi fi
AC_CONFIG_FILES([config_host.mk ooo.lst bin/repo-list android/Bootstrap/local.properties android/qa/sc/local.properties android/qa/desktop/local.properties]) AC_CONFIG_FILES([config_host.mk ooo.lst bin/repo-list \
android/Bootstrap/local.properties \
android/experiments/DocumentLoader/local.properties \
android/qa/sc/local.properties \
android/qa/desktop/local.properties])
AC_OUTPUT AC_OUTPUT
# touch the config timestamp file set_soenv.stamp # touch the config timestamp file set_soenv.stamp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment