libreoffice-online/Mobile
Tor Lillqvist 0b49485383 Require running configure also in tree where you will build the iOS app
Take the user-visible name of the iOS app as a configure parameter
--with-iosapp-name. The only purpose of running the configure script
in this case is to get that expanded into the Info.plist file.

You need autofoo to build LibreOffice core for iOS anyway, so this
doesn't really add any new hurdles for a potential developer who wants
to build the iOS app

Bypass some checks that aren't relevant (and would fail) in this case.
Could bypass a lot more of configure.ac in the ENABLE_IOSAPP case.

Change-Id: Ia0cb82ad552da1bb597411748f0cd74f825774fa
2018-10-30 12:10:31 +02:00
..
Mobile Require running configure also in tree where you will build the iOS app 2018-10-30 12:10:31 +02:00
Mobile.xcodeproj Add source files from vcl/headless for easier breakpointing 2018-10-30 00:22:45 +02:00
TestFakeSocket Improve shutdown semantics 2018-09-18 13:04:11 +03:00
README Require running configure also in tree where you will build the iOS app 2018-10-30 12:10:31 +02:00

How to build the iOS app:

1) First you need to build the LibreOffice core code for iOS. Put in
your autogen.input something like this:

--enable-debug
--enable-dbgutil
--enable-werror
--with-distro=LibreOfficeiOS

and build "normally". (Naturally, no unit tests will be run when
cross-compiling LibreOffice.) Of course there is no requirement to use
those --enable options; as a minimum, just
--with-distro=LibreOfficeiOS should work.

This will produce a large number of static archives (.a) here and
there in instdir and workdir, but no app that can be run as such. (You
can see a list of them in
workdir/CustomTarget/ios/ios-all-static-libs.list)

2) Do a separate clone of the online repo on macOS, but don't run any
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 --enable-iosapp

Then run make. That will produce files in loleaflet/dist, nothing
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 -'

where misan.local is the macOS machine where I build the app, in the
~lo/online-ios-device folder.

4) In the online folder form step 2, edit the
Mobile/Mobile.xcodeproj/project.pbxproj file in your favourite text
editor.

Change all instances of ../../../../ios-device to the path to where
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.