README.Android | 7 ++++++- android/qa/desktop/Makefile | 17 +++++++++-------- android/qa/desktop/jni/Android.mk | 23 +++++++++++++++++++++++ android/qa/desktop/jni/Application.mk | 2 ++ cppuhelper/source/bootstrap.cxx | 11 +++++++++++ desktop/source/app/appinit.cxx | 7 +++++++ 6 files changed, 58 insertions(+), 9 deletions(-)
New commits: commit 4b7b244fe71f5ed589b5e72f81b7b2f79096c68d Author: Michael Meeks <michael.me...@suse.com> Date: Mon Jan 23 17:09:31 2012 +0000 android: make desktop/ marginally debuggable diff --git a/android/qa/desktop/jni/Android.mk b/android/qa/desktop/jni/Android.mk new file mode 100644 index 0000000..c5c2ed3 --- /dev/null +++ b/android/qa/desktop/jni/Android.mk @@ -0,0 +1,23 @@ +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := dummy +LOCAL_SRC_FILES := dummy.c +LOCAL_LDLIBS := + +include $(BUILD_SHARED_LIBRARY) diff --git a/android/qa/desktop/jni/Application.mk b/android/qa/desktop/jni/Application.mk new file mode 100644 index 0000000..a11b28d --- /dev/null +++ b/android/qa/desktop/jni/Application.mk @@ -0,0 +1,2 @@ +APP_ABI := armeabi-v7a +APP_PLATFORM := android-14 commit e74a3585a0b6ffed998800b2be8617c0c095e02e Author: Michael Meeks <michael.me...@suse.com> Date: Mon Jan 23 17:08:55 2012 +0000 android: update README and fix a number of silly escaping issues diff --git a/README.Android b/README.Android index dd1a639..b5e32c7 100644 --- a/README.Android +++ b/README.Android @@ -24,7 +24,7 @@ test output to enjoy. After a while of this loop you'll probably find that android has lost a lot of space on your device at this point: - adb shell stop ; adb shell start + adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start and continue onwards & upwards. @@ -44,6 +44,11 @@ attached, so you need to carefully guess where to put: into the code; and when you see that in logcat, you have time to run: ndk-gdb and it will attach the process. + thread 12 # or perhaps 13 + backtrace + + may show you the native code trace. + * Common Errors / Gotchas lo_dlneeds: Could not read ELF header of /data/data/org.libreoffice...libfoo.so diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile index c6ddf59..18d9999 100644 --- a/android/qa/desktop/Makefile +++ b/android/qa/desktop/Makefile @@ -37,16 +37,16 @@ buildrcs: echo "[Bootstrap]" > assets/program/fundamentalrc echo "LO_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc echo "URE_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc # checkme - is this used to find configs ? - echo "BRAND_BASE_DIR=file:///assets/" >> assets/program/fundamentalrc - echo "CONFIGURATION_LAYERS=xcsxcu:${BRAND_BASE_DIR}/share/registry module:${BRAND_BASE_DIR}/share/registry/modules res:${BRAND_BASE_DIR}/share/registry bundledext:${${BRAND_BASE_DIR}/program/unorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:${${BRAND_BASE_DIR}/program/unorc:SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini xcsxcu:${${BRAND_BASE_DIR}/program/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry userext:${${BRAND_BASE_DIR}/program/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:${$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/registrymodifications.xcu" >> assets/program/fundamentalrc - echo "URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway" >> assets/program/fundamentalrc - echo "URE_MORE_TYPES=file:///assets/ure/share/misc/types.rdb file:///assets/program/types/types.rdb $${URE_MORE_TYPES}" >> assets/program/fundamentalrc - echo "URE_MORE_SERVICES=file:///assets/ure/share/misc/services.rdb file:///assets/program/services/services.rdb $${URE_MORE_SERVICES}" >> assets/program/fundamentalrc + echo "BRAND_BASE_DIR=file:///assets" >> assets/program/fundamentalrc + echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry module:$${BRAND_BASE_DIR}/share/registry/modules res:$${BRAND_BASE_DIR}/share/registry bundledext:$${$${BRAND_BASE_DIR}/program/unorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini sharedext:$${$${BRAND_BASE_DIR}/program/unorc:SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini xcsxcu:$${$${BRAND_BASE_DIR}/program/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/registry userext:$${$${BRAND_BASE_DIR}/program/unorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini user:$${$$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/registrymodifications.xcu' >> assets/program/fundamentalrc + echo 'URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway' >> assets/program/fundamentalrc + echo 'URE_MORE_TYPES=file:///assets/ure/share/misc/types.rdb file:///assets/program/types/types.rdb' >> assets/program/fundamentalrc + echo 'URE_MORE_SERVICES=file:///assets/ure/share/misc/services.rdb file:///assets/program/services/services.rdb <$$ORIGIN/services>*' >> assets/program/fundamentalrc # unorc ini ... echo "[Bootstrap]" > assets/program/unorc echo "URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/unorc - echo "UNO_TYPES=file:///assets/ure/share/misc/types.rdb file:///assets/program/types/types.rdb $${URE_MORE_TYPES}" >> assets/program/unorc - echo "UNO_SERVICES=file:///assets/ure/share/misc/services.rdb file:///assets/program/services/services.rdb $${URE_MORE_SERVICES}" >> assets/program/unorc + echo 'UNO_TYPES=file:///assets/ure/share/misc/types.rdb file:///assets/program/types/types.rdb $${URE_MORE_TYPES}' >> assets/program/unorc + echo 'UNO_SERVICES=file:///assets/ure/share/misc/services.rdb file:///assets/program/services/services.rdb $${URE_MORE_SERVICES}' >> assets/program/unorc copy-stuff: buildrcs # @@ -189,7 +189,8 @@ uninstall: run: echo "FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf -env:INIFILENAME=file:///assets/program/sofficerc" > cmdline adb push cmdline $(APP_DATA_PATH)/cmdline - adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo -e lo-main-delay 5 -e lo-strace yes -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline" + adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline" +# add -e lo-strace yes # if you want that # If you reinstall an app several times, even if you uninstall it # between, disk space seems to leak that won't get recycled until you commit 847494bc43c4647b28464b6159760bbbf65e7a60 Author: Michael Meeks <michael.me...@suse.com> Date: Mon Jan 23 16:56:33 2012 +0000 android: nasty hack to overcome unpleasantness of UNO bootstrapping diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index 05d404b..063bece 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -98,8 +98,19 @@ Bootstrap const & get_unorc() SAL_THROW( () ) static rtlBootstrapHandle s_bstrap = 0; if (! s_bstrap) { +#ifdef ANDROID + // Wouldn't it be lovely to avoid this fugly hard-coding. + // The problem is that the 'create_boostrap_macro_expander_factory()' + // required for bootstrapping services, calls cppu::get_unorc directly + // instead of re-using the BoostrapHandle from: + // defaultBootstrap_InitialComponentContext + // and since rtlBootstrapHandle is not ref-counted doing anything + // clean here is hardish. + OUString iniName( RTL_CONSTASCII_USTRINGPARAM( "file:///assets/program/unorc" ) ); +#else OUString iniName( get_this_libpath() + OUSTR("/" SAL_CONFIGFILE("uno")) ); +#endif rtlBootstrapHandle bstrap = rtl_bootstrap_args_open( iniName.pData ); ClearableMutexGuard guard( Mutex::getGlobalMutex() ); commit 91c7d943e144deaf6146addb682e0283f9c3b070 Author: Michael Meeks <michael.me...@suse.com> Date: Mon Jan 23 15:32:47 2012 +0000 android: setup the unorc path correctly into assets diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index d988171..076899d 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -185,9 +185,16 @@ Reference< XMultiServiceFactory > Desktop::CreateApplicationServiceManager() { RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createApplicationServiceManager" ); +#ifdef ANDROID + rtl::OUString aUnoRc( OUString( RTL_CONSTASCII_USTRINGPARAM( "file:///assets/program/unorc" ) ) ); + return Reference<XMultiServiceFactory>( + cppu::defaultBootstrap_InitialComponentContext( aUnoRc )->getServiceManager(), + UNO_QUERY_THROW); +#else return Reference<XMultiServiceFactory>( cppu::defaultBootstrap_InitialComponentContext()->getServiceManager(), UNO_QUERY_THROW); +#endif } void Desktop::DestroyApplicationServiceManager( Reference< XMultiServiceFactory >& xSMgr ) _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits