[Libreoffice-commits] core.git: 3 commits - android/Bootstrap android/CustomTarget_android_desktop.mk android/CustomTarget_docloader.mk android/CustomTarget_lo4android.mk android/CustomTarget_sdremote.mk android/experimental android/Module_android.mk android/sdremote ios/CustomTarget_Viewer_app.mk odk/examples sal/osl
Tor Lillqvist
tml at iki.fi
Fri Mar 1 00:56:49 PST 2013
android/Bootstrap/Makefile.shared | 6 +--
android/CustomTarget_android_desktop.mk | 34 ++++++++++++++++++++
android/CustomTarget_docloader.mk | 19 +++++++----
android/CustomTarget_lo4android.mk | 21 +++++++-----
android/CustomTarget_sdremote.mk | 8 +++-
android/Module_android.mk | 1
android/experimental/DocumentLoader/Makefile | 2 -
android/experimental/LibreOffice4Android/Makefile | 2 -
android/experimental/desktop/Makefile | 2 -
android/sdremote/Makefile | 6 +--
ios/CustomTarget_Viewer_app.mk | 3 +
odk/examples/java/DocumentHandling/test/test1.odt |binary
sal/osl/all/log.cxx | 37 ++++++++++++++++++++--
13 files changed, 111 insertions(+), 30 deletions(-)
New commits:
commit 18e035964e92cb4348a4de0bafc4114608ed4754
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Mar 1 10:55:34 2013 +0200
Cleanups to the android and ios makefilery
Also build the "desktop" app from gbuild.
Change-Id: I45fc265c9515b22e10bd7644f54dbfa23601e063
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index 9eb1800..de025c0 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -23,7 +23,7 @@ define COPYSO
endef
define COPYJAR
-cp $(1) libs
+mkdir -p libs && cp $(1) libs
endef
#
@@ -58,7 +58,7 @@ properties:
echo "APP_PLATFORM := android-14" >> jni/Application.mk
install: build-ant
- unset JAVA_HOME && $(ANT) debug install
+ unset JAVA_HOME && $(ANT) -quiet debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -67,7 +67,7 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
clean: android_version_setup properties
- $(ANT) clean
+ $(ANT) -quiet -keep-going clean
rm -rf assets libs $(SODEST) $(OBJLOCAL) $(BOOTSTRAPDIR)/no-resource-compress.xml
#
diff --git a/android/CustomTarget_android_desktop.mk b/android/CustomTarget_android_desktop.mk
new file mode 100644
index 0000000..bc62a33
--- /dev/null
+++ b/android/CustomTarget_android_desktop.mk
@@ -0,0 +1,34 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_CustomTarget_CustomTarget,android/desktop))
+
+android_desktop_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/Desktop)
+
+$(call gb_CustomTarget_get_target,android/desktop) : \
+ $(android_desktop_DIR)/done
+
+# We know that CustomTarget_lo4android.mk is included before this file
+# in Module_android.mk, so lo4android_DIR is defined. We want that to
+# be built completely first, so that we can serialize Ant access to
+# Bootstrap and abs-lib, which are used by Desktop (this makefile),
+# LibreOffice4Android, DocumentLoader and sdremote. We don't want one
+# Ant to be cleaning out one place while another is building stuff
+# that depends on it. Yeah, this sucks
+
+$(android_desktop_DIR)/done : $(lo4android_DIR)/done
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
+ cd $(SRCDIR)/android/experimental/desktop && $(MAKE) all
+ mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
+ cp $(SRCDIR)/android/experimental/desktop/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
+
+$(call gb_CustomTarget_get_clean_target,android/desktop) :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
+ cd $(SRCDIR)/android/experimental/desktop && $(MAKE) clean
+
+# vim: set noet sw=4 ts=4:
diff --git a/android/CustomTarget_docloader.mk b/android/CustomTarget_docloader.mk
index e0d5fbb..c30699e 100644
--- a/android/CustomTarget_docloader.mk
+++ b/android/CustomTarget_docloader.mk
@@ -13,16 +13,21 @@ docloader_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/Documen
$(call gb_CustomTarget_get_target,android/docloader) : \
$(docloader_DIR)/done
-# We know that CustomTarget_sdremote.mk is included first, so sdremote_DIR is
-# defined. We want that to be built completely first, so that we can
-# serialize Ant access to Bootstrap, which is used both by DocumentLoader and
-# sdremote. We don't want one Ant to be cleaning out Bootstrap while another
-# is building stuff that depends on it. Yeah, this sucks
+# We know that CustomTarget_sdremote.mk is included first, so
+# sdremote_DIR is defined. We want that to be built completely first,
+# so that we can serialize Ant access to Bootstrap, which is used both
+# by DocumentLoader and sdremote. We don't want one Ant to be cleaning
+# out Bootstrap while another is building stuff that depends on it.
+# Yeah, this sucks
$(docloader_DIR)/done : $(sdremote_DIR)/done
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
- cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) clean && $(MAKE) all
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
+ cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/experimental/DocumentLoader/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
+$(call gb_CustomTarget_get_clean_target,android/docloader) :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
+ cd $(SRCDIR)/android/experimental/DocumentLoader && $(MAKE) clean
+
# vim: set noet sw=4 ts=4:
diff --git a/android/CustomTarget_lo4android.mk b/android/CustomTarget_lo4android.mk
index b0703ed..461067a 100644
--- a/android/CustomTarget_lo4android.mk
+++ b/android/CustomTarget_lo4android.mk
@@ -13,17 +13,22 @@ lo4android_DIR := $(call gb_CustomTarget_get_workdir,android/experimental/LibreO
$(call gb_CustomTarget_get_target,android/lo4android) : \
$(lo4android_DIR)/done
-# We know that CustomTarget_docloader.mk is included before this file in
-# Module_android-mk, so docloader_DIR is defined. We want that to be built
-# completely first, so that we can serialize Ant access to Bootstrap and
-# abs-lib, which are used by LibreOffice4Android, DocumentLoader and
-# sdremote. We don't want one Ant to be cleaning out one place while another
-# is building stuff that depends on it. Yeah, this sucks
+# We know that CustomTarget_docloader.mk is included before this file
+# in Module_android.mk, so docloader_DIR is defined. We want that to
+# be built completely first, so that we can serialize Ant access to
+# Bootstrap and abs-lib, which are used by LibreOffice4Android (this
+# makefile), DocumentLoader and sdremote. We don't want one Ant to be
+# cleaning out one place while another is building stuff that depends
+# on it. Yeah, this sucks
$(lo4android_DIR)/done : $(docloader_DIR)/done
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
- cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) clean && $(MAKE) all
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
+ cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/experimental/LibreOffice4Android/bin/*-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
+$(call gb_CustomTarget_get_clean_target,android/lo4android) :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
+ cd $(SRCDIR)/android/experimental/LibreOffice4Android && $(MAKE) clean
+
# vim: set noet sw=4 ts=4:
diff --git a/android/CustomTarget_sdremote.mk b/android/CustomTarget_sdremote.mk
index 878c6df..69a572a 100644
--- a/android/CustomTarget_sdremote.mk
+++ b/android/CustomTarget_sdremote.mk
@@ -13,9 +13,13 @@ sdremote_DIR := $(call gb_CustomTarget_get_workdir,android/sdremote)
$(call gb_CustomTarget_get_target,android/sdremote) : $(sdremote_DIR)/done
$(sdremote_DIR)/done : $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,1)
- cd $(SRCDIR)/android/sdremote && $(MAKE) clean && $(MAKE) all
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MAK,2)
+ cd $(SRCDIR)/android/sdremote && $(MAKE) all
mkdir -p $(SRCDIR)/instsetoo_native/$(INPATH)/bin
cp $(SRCDIR)/android/sdremote/bin/ImpressRemote-debug.apk $(SRCDIR)/instsetoo_native/$(INPATH)/bin
+$(call gb_CustomTarget_get_clean_target,android/sdremote) :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),MAK,2)
+ cd $(SRCDIR)/android/sdremote && $(MAKE) clean
+
# vim: set noet sw=4 ts=4:
diff --git a/android/Module_android.mk b/android/Module_android.mk
index d28b270..2e225b5 100644
--- a/android/Module_android.mk
+++ b/android/Module_android.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_Module_add_targets,android,\
CustomTarget_sdremote \
CustomTarget_docloader \
CustomTarget_lo4android \
+ CustomTarget_android_desktop \
))
endif
diff --git a/android/experimental/DocumentLoader/Makefile b/android/experimental/DocumentLoader/Makefile
index c0e9ca8..136f201 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -125,7 +125,7 @@ build-ant: android_version_setup copy-stuff link-so properties
$(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
done
#
- unset JAVA_HOME && $(ANT) debug
+ unset JAVA_HOME && $(ANT) -quiet debug
run:
adb shell am start -n org.libreoffice.android.examples/.DocumentLoader -e input /assets/test1.odt
diff --git a/android/experimental/LibreOffice4Android/Makefile b/android/experimental/LibreOffice4Android/Makefile
index d0ae325..d33bcae 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -128,7 +128,7 @@ build-ant: android_version_setup copy-stuff link-so properties
$(call COPYJAR,$(OUTDIR)/bin/$${F}.jar); \
done
#
- unset JAVA_HOME && $(ANT) debug
+ unset JAVA_HOME && $(ANT) -quiet debug
run:
adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity -e input /assets/test1.odt
diff --git a/android/experimental/desktop/Makefile b/android/experimental/desktop/Makefile
index 7069cb3..d4b7945 100644
--- a/android/experimental/desktop/Makefile
+++ b/android/experimental/desktop/Makefile
@@ -153,7 +153,7 @@ setup-jars:
done
build-ant: android_version_setup copy-stuff link-so properties setup-jars
- unset JAVA_HOME && $(ANT) debug
+ unset JAVA_HOME && $(ANT) -quiet debug
run:
$(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/.Desktop
diff --git a/android/sdremote/Makefile b/android/sdremote/Makefile
index 9d9712a..49fad92 100644
--- a/android/sdremote/Makefile
+++ b/android/sdremote/Makefile
@@ -11,14 +11,14 @@ include ../../config_host.mk
all: properties translations.done
mkdir -p ../abs-lib/libs
cp $(ANDROID_SDK_HOME)/extras/android/support/v4/android-support-v4.jar ../abs-lib/libs
- $(ANT) debug
+ $(ANT) -quiet debug
properties:
echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
echo sdk.dir=$(ANDROID_SDK_HOME) >../abs-lib/local.properties
clean: properties translations.clean
- $(ANT) clean
+ $(ANT) -quiet -keep-going clean
install: all
$(ANDROID_SDK_HOME)/platform-tools/adb install -r ./bin/ImpressRemote-debug.apk
@@ -55,6 +55,6 @@ translations.done: $(foreach lang,$(call android_get_langlist),$(call android_ge
translations.clean:
rm -rf $(foreach lang,$(call android_get_langlist),$(call android_get_podir,$(lang)))
rm -rf $(foreach lang,$(call android_get_langlist),translations-$(lang).db)
- rm translations.done
+ rm -f translations.done
# vim: set noet sw=4 ts=4:
diff --git a/ios/CustomTarget_Viewer_app.mk b/ios/CustomTarget_Viewer_app.mk
index c92092b..d2ccf34 100644
--- a/ios/CustomTarget_Viewer_app.mk
+++ b/ios/CustomTarget_Viewer_app.mk
@@ -56,7 +56,7 @@ appdir=$(dir $(SCRIPT_OUTPUT_FILE_0))
buildid=$(shell git log -1 --format=%H)
$(SCRIPT_OUTPUT_FILE_0) : $(call gb_Executable_get_target,Viewer)
- $(call gb_Output_announce,$@,fii,APP,2)
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
mkdir -p $(appdir)/ure
mv $(call gb_Executable_get_target,Viewer) $(SCRIPT_OUTPUT_FILE_0)
#
@@ -138,6 +138,7 @@ $(call gb_CustomTarget_get_target,ios/Viewer_app) : $(call gb_Executable_get_tar
$(call gb_Postprocess_get_target,AllModulesButInstsetNative)
$(call gb_CustomTarget_get_clean_target,ios/Viewer_app) :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
# Here we just assume that Xcode's settings are default, or something
rm -rf experimental/Viewer/build
commit 6a1cb54c31a0e7591173afa167938535bbe5cf6e
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Mar 1 10:52:30 2013 +0200
Pass log output directly to the Android log mechanism
Writing to stderr just takes a detour through the pipe we set up ourselves and
read in a separate thread, and eventually ends up being passed to
__android_log_print() anyway.
Change-Id: I46356910e48926f22c8dc88d9eba6acbc8bce751
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index c084bdd..fcf0a17 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -62,6 +62,10 @@
bool sal_use_syslog;
#endif
+#ifdef ANDROID
+#include <android/log.h>
+#endif
+
// Avoid the use of other sal code in this file as much as possible, so that
// this code can be called from other sal code without causing endless
// recursion.
@@ -209,27 +213,54 @@ void log(
char const * message)
{
std::ostringstream s;
+#ifndef ANDROID
#ifdef HAVE_SYSLOG_H
if (!sal_use_syslog)
#endif
s << toString(level) << ':';
+#endif
if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) {
- s << /*no where*/' ' << message << '\n';
+ s << /*no area or where */ ' ' << message << '\n';
} else {
- s << area << ':' << OSL_DETAIL_GETPID << ':'
- << osl::Thread::getCurrentIdentifier() << ':';
+#ifdef ANDROID
+ // The area will be used as the "tag", and log info already contgains the pid on Android
+#else
+ s << area << ':' << OSL_DETAIL_GETPID << ':';
+#endif
+ s << osl::Thread::getCurrentIdentifier() << ':';
if (strncmp(where, SRCDIR, sizeof(SRCDIR)-1) == 0)
s << where+sizeof(SRCDIR);
else
s << where;
s << message << '\n';
}
+#ifdef ANDROID
+ int android_log_level;
+ switch (level) {
+ case SAL_DETAIL_LOG_LEVEL_INFO:
+ android_log_level = ANDROID_LOG_INFO;
+ break;
+ case SAL_DETAIL_LOG_LEVEL_WARN:
+ android_log_level = ANDROID_LOG_WARN;
+ break;
+ case SAL_DETAIL_LOG_LEVEL_DEBUG:
+ android_log_level = ANDROID_LOG_DEBUG;
+ break;
+ default:
+ android_log_level = ANDROID_LOG_INFO;
+ break;
+ }
+ if (area == NULL)
+ area = "LibreOffice";
+ __android_log_print(android_log_level, area, "%s", s.str().c_str());
+#else
#ifdef HAVE_SYSLOG_H
if (sal_use_syslog)
syslog(toSyslogPriority(level), "%s", s.str().c_str());
else
#endif
std::fputs(s.str().c_str(), stderr);
+#endif
}
}
commit 742bb0ebe3f309c372934397acb463b4e172b4bf
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Mar 1 10:50:06 2013 +0200
Use "optimal" zoom setting
Change-Id: Iaac4488aacf08525676dbfca0b747ea777c0d60a
diff --git a/odk/examples/java/DocumentHandling/test/test1.odt b/odk/examples/java/DocumentHandling/test/test1.odt
index 1025907..70db63b 100644
Binary files a/odk/examples/java/DocumentHandling/test/test1.odt and b/odk/examples/java/DocumentHandling/test/test1.odt differ
More information about the Libreoffice-commits
mailing list