summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mobile/Mobile/Info.plist.in168
-rw-r--r--Mobile/README29
-rwxr-xr-xautogen.sh4
-rw-r--r--configure.ac204
4 files changed, 309 insertions, 96 deletions
diff --git a/Mobile/Mobile/Info.plist.in b/Mobile/Mobile/Info.plist.in
new file mode 100644
index 0000000000..0baf5a047d
--- /dev/null
+++ b/Mobile/Mobile/Info.plist.in
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleDisplayName</key>
+ <string>@IOSAPP_NAME@</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>OpenDocument Flat Text</string>
+ <key>LSHandlerRank</key>
+ <string>Default</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.collabora.office.uti.fodt</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeIconFiles</key>
+ <array/>
+ <key>CFBundleTypeName</key>
+ <string>Plain Text</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Alternate</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>public.text</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeName</key>
+ <string>OpenDocument Text</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>org.oasis-open.opendocument.text</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeIconFiles</key>
+ <array/>
+ <key>CFBundleTypeName</key>
+ <string>Microsoft Word Document</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Alternate</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.microsoft.word.doc</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleTypeIconFiles</key>
+ <array/>
+ <key>CFBundleTypeName</key>
+ <string>OpenDocument Spreadsheet</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Owner</string>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>org.oasis-open.opendocument.spreadsheet</string>
+ </array>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIFileSharingEnabled</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportsDocumentBrowser</key>
+ <true/>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeIdentifier</key>
+ <string>com.collabora.office.uti.fodt</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <string>fodt</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeDescription</key>
+ <string>OpenDocument Text</string>
+ <key>UTTypeIconFiles</key>
+ <array/>
+ <key>UTTypeIdentifier</key>
+ <string>org.oasis-open.opendocument.text</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <string>odt</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeDescription</key>
+ <string>OpenDocument Spreadsheet</string>
+ <key>UTTypeIconFiles</key>
+ <array/>
+ <key>UTTypeIdentifier</key>
+ <string>org.oasis-open.opendocument.spreadsheet</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <string>ods</string>
+ </dict>
+ </dict>
+ </array>
+ <key>UTImportedTypeDeclarations</key>
+ <array/>
+</dict>
+</plist>
diff --git a/Mobile/README b/Mobile/README
index e273c5b784..989faa0029 100644
--- a/Mobile/README
+++ b/Mobile/README
@@ -24,13 +24,10 @@ make or open the Mobile project there yet.
3) Do a separate clone of the online repo on Linux, run autogen.sh,
and configure it with the --enable-iosapp option:
-./configure --disable-ssl --enable-iosapp --with-lo-path=/home/tml/lo/fedora/instdir --with-lokit-path=/home/tml/lo/fedora/include
-
-(The --with-lo-path and --with-lokit-path options are actually
-irrelevant, but needed anyway.)
+./configure --enable-iosapp
Then run make. That will produce files in loleaflet/dist, nothing
-else. Copy those to the corresponding folder in the online close
+else. Copy those to the corresponding folder in the online clone
from step 2. This is what I do:
make clean && make && tar cf - loleaflet/dist | ssh misan.local 'cd lo/online-ios-device && tar xvf -'
@@ -47,4 +44,26 @@ you built LibreOffice core for iOS in step 1. Change the value of
PNGINSTDIR to where you have installed libpng compiled for iOS. Change
POCOINSTDIR to where you have installed Poco compiled for iOS.
+Then run:
+
+./autogen.sh
+
+and
+
+./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice"
+
+The only purpose of running the configure script in this tree is to
+get the app name as the CFBundleDisplayName property into the
+Mobile/Mobile/Info.plist file.
+
+Sure, as we require editing the project.pbxproj file anyway, we could
+as well also require editing the Info.plist file and avoid having to
+run the configure script.
+
+Or maybe the other way around, should we also have the configure
+script expand the project.pbxproj file, passing the configure script
+pointers to the LibreOffice source and build directories, and POCO and
+PNG install directories. Those would then expaned in project.pbxproj,
+and it wouldn't need to be hand-edited.
+
4) Now you can open the Mobile Xcode project, build it, and run it.
diff --git a/autogen.sh b/autogen.sh
index 1ce95d8404..1e558726f3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,7 +16,9 @@ EOF
exit 1
}
-libtoolize || failed "libtool"
+if test `uname -s` = Linux; then
+ libtoolize || failed "libtool"
+fi
aclocal || failed "aclocal"
diff --git a/configure.ac b/configure.ac
index 872a17145d..c27e2d29ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,13 @@ AC_ARG_ENABLE([anonymize-filenames],
AC_ARG_ENABLE([iosapp],
AS_HELP_STRING([--enable-iosapp],
[Use in a tree where the only purpose is to build the HTML and CSS stuff
- to be copied to a Mac where the iOS app is being built.]))
+ to be copied to a Mac where the iOS app is being built, *or* in a tree where
+ you will build the iOS app. In the latter case the only purpose of running
+ configure is to put the app name in the Info.plist file.]))
+
+AC_ARG_WITH([iosapp-name],
+ AS_HELP_STRING([--with-iosapp-name],
+ [Set the user-visible name of the iOS app you build. Default "Mobile".]))
AC_ARG_ENABLE([gtkapp],
AS_HELP_STRING([--enable-gtkapp],
@@ -195,11 +201,17 @@ if "x$anonym_msg" = "x"; then
anonym_msg="no anonymization of usernames or filenames"
fi
ENABLE_IOSAPP=
+IOSAPP_NAME="Mobile"
if test "$enable_iosapp" = "yes"; then
ENABLE_IOSAPP=true
+ m4_define([PKG_CHECK_MODULES],[])
+ if test -n "$with_iosapp_name"; then
+ IOSAPP_NAME="$with_iosapp_name"
+ fi
fi
AC_SUBST(ENABLE_IOSAPP)
AM_CONDITIONAL([ENABLE_IOSAPP], [test "$ENABLE_IOSAPP" = "true"])
+AC_SUBST(IOSAPP_NAME)
ENABLE_GTKAPP=
if test "$enable_gtkapp" = "yes"; then
@@ -339,10 +351,15 @@ AS_IF([test `uname -s` != Darwin],
[],
[AC_MSG_ERROR([dlopen not found])])])
-AC_SEARCH_LIBS([png_create_write_struct],
- [png],
- [],
- [AC_MSG_ERROR([libpng not available?])])
+AS_IF([test "$ENABLE_IOSAPP" != "true"],
+ [AC_SEARCH_LIBS([png_create_write_struct],
+ [png],
+ [],
+ [AC_MSG_ERROR([libpng not available?])])
+ PKG_CHECK_MODULES([ZLIB], [zlib])
+
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit])
+ ])
AS_IF([test `uname -s` = Linux],
[AC_SEARCH_LIBS([cap_get_proc],
@@ -350,10 +367,6 @@ AS_IF([test `uname -s` = Linux],
[],
[AC_MSG_ERROR([libcap not available?])])])
-PKG_CHECK_MODULES([ZLIB], [zlib])
-
-PKG_CHECK_MODULES([CPPUNIT], [cppunit])
-
AS_IF([test "$ENABLE_GTKAPP" = true],
[PKG_CHECK_MODULES([WEBKIT],[webkit2gtk-4.0])])
@@ -395,87 +408,97 @@ AC_SUBST(ENABLE_SUPPORT_KEY)
LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
-AC_CHECK_HEADERS([LibreOfficeKit/LibreOfficeKit.h],
- [],
- [AC_MSG_ERROR([header LibreOfficeKit/LibreOfficeKit.h not found, perhaps you want to use --with-lokit-path])])
-AC_CHECK_HEADERS([Poco/Net/WebSocket.h],
- [],
- [AC_MSG_ERROR([header Poco/Net/WebSocket.h not found, perhaps you want to use --with-poco-includes])])
-DISABLE_SECCOMP=
-if test "$enable_seccomp" != "no"; then
- AC_CHECK_HEADERS([linux/seccomp.h],
- [],
- [AC_MSG_ERROR([critical security header linux/seccomp.h not found. If kernel on target system does not support SECCOMP, you can use --disable-seccomp, but mind the security consequences.])])
- AC_DEFINE([DISABLE_SECCOMP],0,[Whether to disable SECCOMP])
-else
- AC_DEFINE([DISABLE_SECCOMP],1,[Whether to disable SECCOMP])
-fi
-
-AC_MSG_CHECKING([Whether OpenSSL has PKCS5_PBKDF2_HMAC()])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10001000L
-#error PKCS5_PBKDF2_HMAC() is in OpenSSL 1.0.1 or newer
-#endif
-])],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],1,[whether OpenSSL has PKCS5_PBKDF2_HMAC()])],
- [AC_MSG_RESULT([no])
- AC_MSG_WARN([OpenSSL is too old. Secure password storage for Admin Console is not supported.])
- AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],0,[Whether OpenSSL has PKCS5_PBKDF2_HMAC()])])
-
-AC_MSG_CHECKING([POCO version])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <Poco/Version.h>
-#if POCO_VERSION < 0x01070100
-#error Require Poco 1.7.1 or newer
-#endif
-])],
- [AC_MSG_RESULT([OK])],
- [AC_MSG_ERROR([The POCO version is too old])])
-
-# If poco is built with --unbundled, it uses the system pcre library
-AC_MSG_CHECKING([If we need to link with -lpcre])
-AC_LINK_IFELSE([AC_LANG_SOURCE([
-#include <Poco/RegularExpression.h>
-int main(int argc, char **argv)
-{
- Poco::RegularExpression e("abc.[def]");
- Poco::RegularExpression::Match m;
- return e.match(argv[[1]], m);
-}
-])],
- [AC_MSG_RESULT([No])],
- [AC_MSG_RESULT([Yes])
- LIBS="$LIBS -lpcre"])
-
-AC_PATH_PROG(NPM, npm, no)
-if test "$NPM" = "no"; then
- AC_MSG_ERROR([npm required to build loleaflet, but not installed])
-else
- NPM_VER=`npm -v | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
- if test "$NPM_VER" -ge 30900 -a "$NPM_VER" -lt 31004; then
- AC_MSG_ERROR([This npm version is buggy, either upgrade to >= 3.10.4 or downgrade to < 3.9.0])
- fi
-fi
-
-AC_PATH_PROG(NODE, node, no)
-if test "$NODE" = "no"; then
- AC_MSG_ERROR([node required to build loleaflet, but not installed])
-else
- NODE_VER=`node --version | sed 's/^v//' | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
- if test "$NODE_VER" -lt 60000; then
- AC_MSG_ERROR([This node version is old, upgrade to >= 6.0.0])
- fi
-fi
-
-test "$prefix" = NONE && prefix=$ac_default_prefix
-LOOLWSD_CACHEDIR=${localstatedir}/cache/${PACKAGE}
-while :; do
- oldvalue=$LOOLWSD_CACHEDIR
- LOOLWSD_CACHEDIR=`eval echo $LOOLWSD_CACHEDIR`
- test $LOOLWSD_CACHEDIR = $oldvalue && break
-done
+AS_IF([test "$ENABLE_IOSAPP" != "true"],
+ [AC_CHECK_HEADERS([LibreOfficeKit/LibreOfficeKit.h],
+ [],
+ [AC_MSG_ERROR([header LibreOfficeKit/LibreOfficeKit.h not found, perhaps you want to use --with-lokit-path])])
+ AC_CHECK_HEADERS([Poco/Net/WebSocket.h],
+ [],
+ [AC_MSG_ERROR([header Poco/Net/WebSocket.h not found, perhaps you want to use --with-poco-includes])])
+ DISABLE_SECCOMP=
+ if test "$enable_seccomp" != "no"; then
+ AC_CHECK_HEADERS([linux/seccomp.h],
+ [],
+ [AC_MSG_ERROR([critical security header linux/seccomp.h not found. If kernel on target system does not support SECCOMP, you can use --disable-seccomp, but mind the security consequences.])])
+ AC_DEFINE([DISABLE_SECCOMP],0,[Whether to disable SECCOMP])
+ else
+ AC_DEFINE([DISABLE_SECCOMP],1,[Whether to disable SECCOMP])
+ fi
+
+ AC_MSG_CHECKING([Whether OpenSSL has PKCS5_PBKDF2_HMAC()])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <openssl/opensslv.h>
+ #if OPENSSL_VERSION_NUMBER < 0x10001000L
+ #error PKCS5_PBKDF2_HMAC() is in OpenSSL 1.0.1 or newer
+ #endif
+ ])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],1,[whether OpenSSL has PKCS5_PBKDF2_HMAC()])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_WARN([OpenSSL is too old. Secure password storage for Admin Console is not supported.])
+ AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],0,[Whether OpenSSL has PKCS5_PBKDF2_HMAC()])])
+
+ AC_MSG_CHECKING([POCO version])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <Poco/Version.h>
+ #if POCO_VERSION < 0x01070100
+ #error Require Poco 1.7.1 or newer
+ #endif
+ ])],
+ [AC_MSG_RESULT([OK])],
+ [AC_MSG_ERROR([The POCO version is too old])])
+
+ # If poco is built with --unbundled, it uses the system pcre library
+ AC_MSG_CHECKING([If we need to link with -lpcre])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([
+ #include <Poco/RegularExpression.h>
+ int main(int argc, char **argv)
+ {
+ Poco::RegularExpression e("abc.[def]");
+ Poco::RegularExpression::Match m;
+ return e.match(argv[[1]], m);
+ }
+ ])],
+ [AC_MSG_RESULT([No])],
+ [AC_MSG_RESULT([Yes])
+ LIBS="$LIBS -lpcre"])
+
+ ])
+
+AS_IF([test `uname -s` = "Linux"],
+ # We need npm and node only on Linux, both in the normal Online case,
+ # and when only building JS for the iOS app. When building the iOS app itself on macOS,
+ # don't do this.
+ [AC_PATH_PROG(NPM, npm, no)
+ if test "$NPM" = "no"; then
+ AC_MSG_ERROR([npm required to build loleaflet, but not installed])
+ else
+ NPM_VER=`npm -v | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+ if test "$NPM_VER" -ge 30900 -a "$NPM_VER" -lt 31004; then
+ AC_MSG_ERROR([This npm version is buggy, either upgrade to >= 3.10.4 or downgrade to < 3.9.0])
+ fi
+ fi
+
+ AC_PATH_PROG(NODE, node, no)
+ if test "$NODE" = "no"; then
+ AC_MSG_ERROR([node required to build loleaflet, but not installed])
+ else
+ NODE_VER=`node --version | sed 's/^v//' | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+ if test "$NODE_VER" -lt 60000; then
+ AC_MSG_ERROR([This node version is old, upgrade to >= 6.0.0])
+ fi
+ fi
+ ])
+
+AS_IF([test "$ENABLE_IOSAPP" != "true"],
+ [test "$prefix" = NONE && prefix=$ac_default_prefix
+ LOOLWSD_CACHEDIR=${localstatedir}/cache/${PACKAGE}
+ while :; do
+ oldvalue=$LOOLWSD_CACHEDIR
+ LOOLWSD_CACHEDIR=`eval echo $LOOLWSD_CACHEDIR`
+ test $LOOLWSD_CACHEDIR = $oldvalue && break
+ done
+ ])
# need this after the other stuff that uses the compiler because we don't want to run configure-tests with the plugins enabled
AS_IF([test -n "$with_compiler_plugins"],
@@ -513,6 +536,7 @@ AC_LINK_FILES([loleaflet/node_shrinkwrap], [loleaflet/node_shrinkwrap])
AC_CONFIG_FILES([Makefile
gtk/Makefile
+ Mobile/Mobile/Info.plist
test/Makefile
loleaflet/Makefile
loleaflet/npm-shrinkwrap.json