android/Bootstrap/src/org/libreoffice/android/Bootstrap.java |   13 ++++++-----
 android/qa/desktop/AndroidManifest.xml                       |    1 
 android/qa/desktop/Makefile                                  |    7 ++++-
 android/qa/desktop/res/values/strings.xml                    |    2 -
 android/qa/sc/Makefile                                       |    4 +--
 5 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit b36ff96d1d1eda76e41e57db463c2734be7ccfec
Author: Michael Meeks <michael.me...@suse.com>
Date:   Wed May 23 15:55:02 2012 +0100

    android: make launcher function as expected - starts writer.
    
    Remove now redundant FONTCONFIG cmdline arguments, and add fallbacks
    for not having cmdline arguments in the intent when launching.

diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java 
b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 82a40b7..12afc8c 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -169,7 +169,6 @@ public class Bootstrap extends NativeActivity
 
         if (cmdLine == null) {
             String indirectFile = 
getIntent().getStringExtra("lo-main-indirect-cmdline");
-
             if (indirectFile != null) {
                 try {
                     // Somewhat stupid but short way to read a file into a 
string
@@ -181,7 +180,7 @@ public class Bootstrap extends NativeActivity
             }
 
             if (cmdLine == null)
-                cmdLine = 
"/data/data/org.libreoffice.android/lib/libqa_sal_types.so";
+                cmdLine = "";
         }
 
         Log.i(TAG, String.format("cmdLine=%s", cmdLine));
@@ -192,7 +191,6 @@ public class Bootstrap extends NativeActivity
         while (argv.length > 0 &&
                argv[0].matches("[A-Z_]+=.*")) {
             putenv(argv[0]);
-            argv = Arrays.copyOfRange(argv, 1, argv.length-1);
         }
 
         // argv[0] will be replaced by android_main() in lo-bootstrap.c by the
@@ -206,8 +204,13 @@ public class Bootstrap extends NativeActivity
         int loLib = dlopen(mainLibrary);
 
         if (loLib == 0) {
-            Log.i(TAG, String.format("Could not load %s", mainLibrary));
-            return;
+            Log.i(TAG, String.format("Error: could not load %s", mainLibrary));
+            mainLibrary = "libmergedlo.so";
+            loLib = dlopen(mainLibrary);
+            if (loLib == 0) {
+                Log.i(TAG, String.format("Error: could not load fallback %s", 
mainLibrary));
+                return;
+            }
         }
 
         int lo_main = dlsym(loLib, "lo_main");
diff --git a/android/qa/desktop/AndroidManifest.xml 
b/android/qa/desktop/AndroidManifest.xml
index e59e4b5..c76425e 100644
--- a/android/qa/desktop/AndroidManifest.xml
+++ b/android/qa/desktop/AndroidManifest.xml
@@ -17,6 +17,7 @@
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
+               <extra android:name="lo-main-library" 
android:value="libmergedlo" />
             </intent-filter>
         </activity>
     </application>
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index d58a4d4..848c18b 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -223,6 +223,9 @@ copy-stuff: buildrcs
 # Then assets that are unpacked at run-time into the app's data directory.
        mkdir -p assets/unpack/etc/fonts
        cp fonts.conf assets/unpack/etc/fonts
+# A sample file for fun ...
+       mkdir -p assets/demo
+       if test -f /opt/libreoffice/tmp/writer.odt; then cp 
/opt/libreoffice/tmp/writer.odt assets/demo; fi
 #
 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
 #
@@ -244,8 +247,8 @@ uninstall:
        $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
 
 run:
-       $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n 
$(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo -e lo-strace yes -e 
lo-main-cmdline "FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf 
-env:INIFILENAME=file:///assets/program/sofficerc"
-# add -e lo-strace yes # if you want that
+       $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n 
$(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libmergedlo
+# add -e lo-strace yes # if you want some stracing action
 
 # 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
diff --git a/android/qa/desktop/res/values/strings.xml 
b/android/qa/desktop/res/values/strings.xml
index e4de92a..1672493 100644
--- a/android/qa/desktop/res/values/strings.xml
+++ b/android/qa/desktop/res/values/strings.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <string name="app_name">LibreOfficeQA-SC</string>
+    <string name="app_name">LibreOffice Viewer test</string>
 </resources>
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 7839371..815758d 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -171,12 +171,12 @@ uninstall:
        $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
 
 run_ucalc:
-       echo "STAR_RESOURCEPATH=/assets/bin 
FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf 
$(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/ComponentTarget/ucb/source/core/ucb1.component 
file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' 
-env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib 
-env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
+       echo "STAR_RESOURCEPATH=/assets/bin 
$(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/ComponentTarget/ucb/source/core/ucb1.component 
file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' 
-env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib 
-env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
        $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline 
$(APP_DATA_PATH)/cmdline
        $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n 
$(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e 
lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
 
 run_filters_test:
-       echo "STAR_RESOURCEPATH=/assets/bin 
FONTCONFIG_FILE=$(APP_DATA_PATH)/etc/fonts/fonts.conf 
$(APP_DATA_PATH)/lib/libtest_sc_filters_test.so --headless --protector 
libunoexceptionprotector.so unoexceptionprotector 
'-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry 
module:file:///assets/xml/registry/spool' 
'-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/basic/util/sb.component 
file:///assets/ComponentTarget/chart2/source/controller/chartcontroller.component
 file:///assets/ComponentTarget/chart2/source/tools/charttools.component 
file:///assets/ComponentTarget/chart2/source/model/chartmodel.component 
file:///assets/ComponentTarget/comphelper/util/comphelp.component 
file:///assets/ComponentTarget/dbaccess/util/dba.component 
file:///assets/ComponentTarget/eventattacher/source/evtatt.component 
file:///assets/ComponentTarget/fileaccess/source/fileacc.component 
 
file:///assets/ComponentTarget/filter/source/config/cache/filterconfig1.component
 file:///assets/ComponentTarget/forms/util/frm.component 
file:///assets/ComponentTarget/oox/util/oox.component 
file:///assets/ComponentTarget/package/source/xstor/xstor.component 
file:///assets/ComponentTarget/package/util/package2.component 
file:///assets/ComponentTarget/sax/source/expatwrap/expwrap.component 
file:///assets/ComponentTarget/sax/source/fastparser/fastsax.component 
file:///assets/ComponentTarget/sc/util/sc.component 
file:///assets/ComponentTarget/sc/util/scfilt.component 
file:///assets/ComponentTarget/scaddins/source/analysis/analysis.component 
file:///assets/ComponentTarget/scaddins/source/datefunc/date.component 
file:///assets/ComponentTarget/sot/util/sot.component 
file:///assets/ComponentTarget/svl/util/svl.component 
file:///assets/ComponentTarget/toolkit/util/tk.component 
file:///assets/ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component 
file:///assets/ComponentTarget/unoto
 ols/util/utl.component 
file:///assets/ComponentTarget/unoxml/source/rdf/unordf.component 
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/ComponentTarget/ucb/source/core/ucb1.component 
file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' 
-env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib 
-env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
+       echo "STAR_RESOURCEPATH=/assets/bin 
$(APP_DATA_PATH)/lib/libtest_sc_filters_test.so --headless --protector 
libunoexceptionprotector.so unoexceptionprotector 
'-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry 
module:file:///assets/xml/registry/spool' 
'-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/basic/util/sb.component 
file:///assets/ComponentTarget/chart2/source/controller/chartcontroller.component
 file:///assets/ComponentTarget/chart2/source/tools/charttools.component 
file:///assets/ComponentTarget/chart2/source/model/chartmodel.component 
file:///assets/ComponentTarget/comphelper/util/comphelp.component 
file:///assets/ComponentTarget/dbaccess/util/dba.component 
file:///assets/ComponentTarget/eventattacher/source/evtatt.component 
file:///assets/ComponentTarget/fileaccess/source/fileacc.component 
file:///assets/ComponentTarget/filter/source/config/ca
 che/filterconfig1.component 
file:///assets/ComponentTarget/forms/util/frm.component 
file:///assets/ComponentTarget/oox/util/oox.component 
file:///assets/ComponentTarget/package/source/xstor/xstor.component 
file:///assets/ComponentTarget/package/util/package2.component 
file:///assets/ComponentTarget/sax/source/expatwrap/expwrap.component 
file:///assets/ComponentTarget/sax/source/fastparser/fastsax.component 
file:///assets/ComponentTarget/sc/util/sc.component 
file:///assets/ComponentTarget/sc/util/scfilt.component 
file:///assets/ComponentTarget/scaddins/source/analysis/analysis.component 
file:///assets/ComponentTarget/scaddins/source/datefunc/date.component 
file:///assets/ComponentTarget/sot/util/sot.component 
file:///assets/ComponentTarget/svl/util/svl.component 
file:///assets/ComponentTarget/toolkit/util/tk.component 
file:///assets/ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component 
file:///assets/ComponentTarget/unotools/util/utl.component 
file:///assets/ComponentTarget/
 unoxml/source/rdf/unordf.component 
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/ComponentTarget/ucb/source/core/ucb1.component 
file:///assets/ComponentTarget/ucb/source/ucp/file/ucpfile1.component' 
-env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib 
-env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib" >cmdline
        $(ANDROID_SDK_HOME)/platform-tools/adb push cmdline 
$(APP_DATA_PATH)/cmdline
        $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n 
$(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e 
lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to