[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - configure.ac ios/config.h.in ios/Mobile loleaflet/Makefile.am wsd/LOOLWSD.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Apr 12 11:23:11 UTC 2019


 configure.ac             |   20 +++++++++++---------
 ios/Mobile/Info.plist.in |    2 +-
 ios/config.h.in          |    2 ++
 loleaflet/Makefile.am    |    2 +-
 wsd/LOOLWSD.cpp          |    3 +++
 5 files changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 97a32da59709bab65155352636d2f16de739871f
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Sat Mar 30 19:12:19 2019 +0100
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Apr 12 13:22:52 2019 +0200

    Use the app name more generally, not only on iOS.
    
    Preparation for using it on Android too.
    
    Change-Id: Iee7778b2625a02a98daff5df87c39f4ab1d18144
    Reviewed-on: https://gerrit.libreoffice.org/70651
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/configure.ac b/configure.ac
index dace37db4..5f60b3d23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,10 +69,6 @@ AC_ARG_ENABLE([iosapp],
                               to be copied to a Mac where the iOS app is being built, *or* in a tree where
                               you will build the iOS app.]))
 
-AC_ARG_WITH([iosapp-name],
-              AS_HELP_STRING([--with-iosapp-name=<name>],
-                             [Set the user-visible name of the iOS app you build. Default "Mobile".]))
-
 AC_ARG_WITH([iosapp-appicon],
               AS_HELP_STRING([--with-iosapp-appicon=<path>],
                              [Point to a directory containing an icon set to use instead of the default empty one.]))
@@ -88,6 +84,10 @@ AC_ARG_ENABLE([gtkapp],
                               to work similarly to the iOS app, from the JavaScript and the pseudo WebSocket
                               message plumbing point of view. See gtk/README.]))
 
+AC_ARG_WITH([app-name],
+              AS_HELP_STRING([--with-app-name=<name>],
+                             [Set the user-visible name of the app you build.]))
+
 AC_ARG_ENABLE([seccomp],
               AS_HELP_STRING([--disable-seccomp],
                              [Disable use of linux/seccomp.h header when kernel on target system does not support it.
@@ -224,15 +224,18 @@ if test -z "$anonym_msg";  then
   anonym_msg="no anonymization of usernames or filenames"
 fi
 
+APP_NAME="LOOL"
+if test -n "$with_app_name"; then
+   APP_NAME="$with_app_name"
+fi
+AC_DEFINE_UNQUOTED([APP_NAME],["$APP_NAME"],[The user-visible name of the app you build.])
+AC_SUBST(APP_NAME)
+
 ENABLE_IOSAPP=
-MOBILE_APP_NAME="Mobile"
 IOSAPP_BUNDLE_VERSION=
 
 if test "$enable_iosapp" = "yes"; then
    ENABLE_IOSAPP=true
-   if test -n "$with_iosapp_name"; then
-      MOBILE_APP_NAME="$with_iosapp_name"
-   fi
 
    if test -f BUNDLE-VERSION; then
        IOSAPP_BUNDLE_VERSION=$(cat BUNDLE-VERSION)
@@ -287,7 +290,6 @@ if test "$enable_iosapp" = "yes"; then
 fi
 AC_SUBST(ENABLE_IOSAPP)
 AM_CONDITIONAL([ENABLE_IOSAPP], [test "$ENABLE_IOSAPP" = "true"])
-AC_SUBST(MOBILE_APP_NAME)
 AC_SUBST(IOSAPP_BUNDLE_VERSION)
 
 ENABLE_GTKAPP=
diff --git a/ios/Mobile/Info.plist.in b/ios/Mobile/Info.plist.in
index 2141a6339..7ffb8d88d 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -202,7 +202,7 @@
     <key>CFBundleDevelopmentRegion</key>
     <string>$(DEVELOPMENT_LANGUAGE)</string>
     <key>CFBundleDisplayName</key>
-    <string>@MOBILE_APP_NAME@</string>
+    <string>@APP_NAME@</string>
     <key>CFBundleDocumentTypes</key>
     <array>
        <!-- Document sub-types are listed in order ODF, OOXML, MSO, other -->
diff --git a/ios/config.h.in b/ios/config.h.in
index 18ca58e4e..c1f501fe9 100644
--- a/ios/config.h.in
+++ b/ios/config.h.in
@@ -1,6 +1,8 @@
 /* config.h.  Manually edited from config.h.in.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+#define APP_NAME "@APP_NAME@"
+
 /* Whether to disable SECCOMP */
 #define DISABLE_SECCOMP 1
 
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 2732e1928..258801b0e 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -244,7 +244,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT
 	@m4 -E -DDEBUG=$(ENABLE_DEBUG) \
 		-DIOSAPP=$(ENABLE_IOSAPP) \
 		-DGTKAPP=$(ENABLE_GTKAPP) \
-		-DMOBILEAPPNAME="$(MOBILE_APP_NAME)" \
+		-DMOBILEAPPNAME="$(APP_NAME)" \
 		-DLOLEAFLET_CSS="$(subst $(SPACE),$(COMMA),$(LOLEAFLET_CSS_M4))" \
 		-DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(GLOBAL_JS) $(NODE_MODULES_JS) \
 		$(call LOLEAFLET_JS,$(srcdir)/build/build.js) \
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index a0a4eed48..b16ed79d8 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2794,6 +2794,9 @@ private:
         // Hint to encourage use on mobile devices
         capabilities->set("hasMobileSupport", true);
 
+        // Set the product name
+        capabilities->set("productName", APP_NAME);
+
         std::ostringstream ostrJSON;
         capabilities->stringify(ostrJSON);
         return ostrJSON.str();


More information about the Libreoffice-commits mailing list