2019-03-08 05:24:54 -06:00
===> Note that at the moment the iOS app does not work if built from the master branch. <===
2018-10-24 04:07:55 -05: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
2018-10-24 04:44:47 -05:00
cross-compiling LibreOffice.) Of course there is no requirement to use
those --enable options; as a minimum, just
--with-distro=LibreOfficeiOS should work.
2018-10-24 04:07:55 -05:00
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.
2019-02-18 09:43:48 -06:00
3) Either: do a separate clone of the online repo on Linux, run autogen.sh,
2018-10-24 04:44:47 -05:00
and configure it with the --enable-iosapp option:
2018-10-24 04:07:55 -05:00
2018-11-26 16:35:57 -06:00
./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice"
2018-10-24 04:07:55 -05:00
Then run make. That will produce files in loleaflet/dist, nothing
2018-10-30 04:25:33 -05:00
else. Copy those to the corresponding folder in the online clone
2018-10-24 04:07:55 -05:00
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
2019-01-25 04:02:45 -06:00
~/lo/online-ios-device folder.
2018-10-24 04:07:55 -05:00
2019-02-18 09:43:48 -06:00
3) Or: install brew: https://brew.sh/
Then:
brew install libtool npm
./autogen.sh
sudo python -m ensurepip --default-pip
sudo pip install polib lxml
make ; make
2018-10-24 04:07:55 -05:00
4) In the online folder form step 2, edit the
2018-11-23 03:26:05 -06:00
ios/Mobile.xcodeproj/project.pbxproj file in your favourite text
2018-10-24 04:07:55 -05:00
editor.
2018-11-04 04:48:00 -06:00
Change LOSRCDIR and all instances of "../ios-device" to refer the the
LibreOffice core source directory from step 1.
2018-10-24 04:07:55 -05:00
2018-10-30 04:25:33 -05:00
Then run:
./autogen.sh
and
2018-11-04 04:48:00 -06:00
./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice" --with-lo-builddir=$HOME/lo/ios --with-poco-includes=/opt/ios-poco/include --with-poco-libs=/opt/ios-poco/lib
2018-10-30 04:25:33 -05:00
2018-11-01 18:13:17 -05:00
The configure script puts the app name as the CFBundleDisplayName
2018-11-23 03:26:05 -06:00
property into the ios/Mobile/Info.plist file, and set up some
2019-01-25 04:02:45 -06:00
symbolic links that point to the LibreOffice core source and build
2018-11-01 18:13:17 -05:00
directories (which can be the same, of course).
2018-10-30 04:25:33 -05:00
2019-01-24 08:21:28 -06:00
4) Before opening the Xcode project for the first time
- seriously consider disabling source code indexing, this
spawns a vast number of git processes, and consumes huge
amounts of CPU & memory:
Xcode -> Preferences, "Source Control", uncheck "Enable Source Control"
5) Now you can open the Mobile Xcode project, build it, and run it.