[Libreoffice-commits] online.git: 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:47:25 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 ea659b3d99e848f7c066162ef9450d14ff737f54
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Sat Mar 30 19:12:19 2019 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Apr 12 13:44:40 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 bb583b2d8..944a7d624 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,10 +73,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.]))
@@ -98,6 +94,10 @@ AC_ARG_ENABLE([androidapp],
                               to work similarly to the iOS app, from the JavaScript and the pseudo WebSocket
                               message plumbing point of view.]))
 
+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.
@@ -320,15 +320,18 @@ AC_SUBST(LIBPNG_INCLUDES)
 AC_SUBST(LIBPNG_LIBS)
 AC_SUBST(LOKIT_PATH)
 
+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)
@@ -340,7 +343,6 @@ 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 d9423c112..a6d431808 100644
--- a/ios/Mobile/Info.plist.in
+++ b/ios/Mobile/Info.plist.in
@@ -210,7 +210,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 59bc7a5f4..58854944e 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 d6cff247e..2f3132365 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -222,7 +222,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT
 		-DIOSAPP=$(ENABLE_IOSAPP) \
 		-DGTKAPP=$(ENABLE_GTKAPP) \
 		-DANDROIDAPP=$(ENABLE_ANDROIDAPP) \
-		-DMOBILEAPPNAME="$(MOBILE_APP_NAME)" \
+		-DMOBILEAPPNAME="$(APP_NAME)" \
 		-DLOLEAFLET_CSS="$(subst $(SPACE),$(COMMA),$(LOLEAFLET_CSS_M4))" \
 		-DBUNDLE_CSS="$(abs_builddir)/dist/bundle.css" \
 		-DGLOBAL_JS="$(abs_builddir)/dist/global.js" \
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index e7365eef2..57ddfd705 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2780,6 +2780,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