[Libreoffice-commits] .: 3 commits - README.Android vcl/android vcl/Library_vcl.mk

Michael Meeks michael at kemper.freedesktop.org
Fri Jan 20 02:20:23 PST 2012


 README.Android              |   30 ++++++++++++++++++++++++
 vcl/Library_vcl.mk          |   17 ++++++++++++-
 vcl/android/androidinst.cxx |   55 +++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 100 insertions(+), 2 deletions(-)

New commits:
commit 56db0770f64a1b68c3f5c08106562a10d521a894
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Jan 20 10:19:42 2012 +0000

    android: more goodness into the README a bit more

diff --git a/README.Android b/README.Android
index 503b50b..555f093 100644
--- a/README.Android
+++ b/README.Android
@@ -20,7 +20,13 @@ Then it is necessary to get stdout/err to go to somewhere we can find it:
 	make run ; adb shell logcat
 
 	And if all goes well - you should have some nice unit
-test output to enjoy.
+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
+
+	and continue onwards & upwards.
 
 * Detailed explanation
 
commit d45b38c9e332b184d3e61b38403c0e867ab6653b
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Jan 20 09:44:26 2012 +0000

    android: add missing VCL init symbol goodness

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 647bb2e..3983608 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -458,11 +458,26 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/generic/fontmanager/fontmanager \
     vcl/generic/fontmanager/helper \
     vcl/generic/fontmanager/parseAFM \
-    vcl/android/androidinst \
     vcl/unx/generic/printer/jobdata \
     vcl/unx/generic/printer/ppdparser \
     vcl/null/printerinfomanager \
+    vcl/android/androidinst \
+    vcl/headless/svpbmp \
+    vcl/headless/svpdummies \
+    vcl/headless/svpelement \
+    vcl/headless/svpframe \
+    vcl/headless/svpgdi \
+    vcl/headless/svpinst \
+    vcl/headless/svpdata \
+    vcl/headless/svpprn \
+    vcl/headless/svptext \
+    vcl/headless/svpvd \
+))
+
+$(eval $(call gb_Library_add_linked_libs,vcl,\
+	basebmp \
 ))
+
 $(eval $(call gb_Library_use_externals,vcl,\
 	fontconfig \
 	freetype \
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 3ce5d5b..6a1bbcd 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -52,9 +52,14 @@ public:
                                   int nDefButton )
     {
         (void)rButtons; (void)nDefButton;
+#if 0
         __android_log_print(ANDROID_LOG_INFO, "LibreOffice - dialog '%s': '%s'",
                             rtl::OUStringToOString(rTitle, RTL_TEXTENCODING_ASCII_US).getStr(),
                             rtl::OUStringToOString(rMessage, RTL_TEXTENCODING_ASCII_US).getStr());
+#endif
+        fprintf (stderr, "LibreOffice - dialog '%s': '%s'",
+                 rtl::OUStringToOString(rTitle, RTL_TEXTENCODING_ASCII_US).getStr(),
+                 rtl::OUStringToOString(rMessage, RTL_TEXTENCODING_ASCII_US).getStr());
         return 0;
     }
 };
@@ -74,9 +79,57 @@ public:
 
 SalInstance *CreateSalInstance()
 {
-    SvpSalInstance* pInstance = new SvpSalInstance( new SalYieldMutex() );
+    AndroidSalInstance* pInstance = new AndroidSalInstance( new SalYieldMutex() );
     new AndroidSalData( pInstance );
     return pInstance;
 }
 
+void DestroySalInstance( SalInstance *pInst )
+{
+    pInst->ReleaseYieldMutex();
+    delete pInst;
+}
+
+// All the interesting stuff is slaved from the AndroidSalInstance
+void InitSalData()   {}
+void DeInitSalData() {}
+void InitSalMain()   {}
+void DeInitSalMain() {}
+
+void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore )
+{
+    rtl::OUString aError( rErrorText );
+    if( aError.isEmpty() )
+        aError = rtl::OUString::createFromAscii("Unknown application error");
+    ::fprintf( stderr, "%s\n", rtl::OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
+
+#if 0
+    __android_log_print(ANDROID_LOG_INFO, "SalAbort: '%s'",
+                        rtl::OUStringToOString(aError, RTL_TEXTENCODING_ASCII_US).getStr());
+#endif
+    fprintf( stderr, "SalAbort: '%s'",
+             rtl::OUStringToOString(aError, RTL_TEXTENCODING_ASCII_US).getStr() );
+    if( bDumpCore )
+        abort();
+    else
+        _exit(1);
+}
+
+const OUString& SalGetDesktopEnvironment()
+{
+    static rtl::OUString aEnv( RTL_CONSTASCII_USTRINGPARAM( "android" ) );
+    return aEnv;
+}
+
+SalData::SalData() :
+    m_pInstance( 0 ),
+    m_pPlugin( 0 ),
+    m_pPIManager(0 )
+{
+}
+
+SalData::~SalData()
+{
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a0ce2a2f7a8533fd2ea6cd4a05e250a32f609ed7
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Jan 20 09:44:00 2012 +0000

    android: more notes on running the test

diff --git a/README.Android b/README.Android
index e58c811..503b50b 100644
--- a/README.Android
+++ b/README.Android
@@ -1,5 +1,29 @@
 Android-specific notes
 
+* Getting something running
+
+	Create an AVD in the android UI, don't even try to get
+the data partition size right in the GUI, that is doomed to producing
+and AVD that doesn't work. Instead start it from the console:
+
+	emulator-arm -avd <Name> -partition-size 500
+
+	Where <Name> is the literal name of the AVD that you entered.
+Then it is necessary to get stdout/err to go to somewhere we can find it:
+
+	adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start
+
+	Then:
+
+	cd android/qa/sc
+	make clean all install
+	make run ; adb shell logcat
+
+	And if all goes well - you should have some nice unit
+test output to enjoy.
+
+* Detailed explanation
+
 Unit tests are the first thing we want to run on Android, to get some
 idea how well, if at all, the basic LO libraraies work. We want to
 build even unit tests as normal Android apps, i.e. packaged as .apk


More information about the Libreoffice-commits mailing list