[Libreoffice-commits] core.git: 2 commits - desktop/source ios/CustomTarget_iOS_setup.mk

2018-09-05 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx   |8 
 ios/CustomTarget_iOS_setup.mk |4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 46b2350cb303a84ffd549447d313c7ced50e7032
Author: Tor Lillqvist 
AuthorDate: Wed Sep 5 21:57:29 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Sep 5 21:57:59 2018 +0300

Handle passing a null pAppPath to lo_initialize() on iOS

Change-Id: I293ede0dbac4b36a1b91b86100bc11593b402d06

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 416b42f3ce04..5c89c1dbd386 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3857,6 +3857,14 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 ::osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction 
>(lo_initialize),
   aAppURL);
 osl::FileBase::getSystemPathFromFileURL( aAppURL, aAppPath );
+#ifdef IOS
+// The above gives something like
+// 
"/private/var/containers/Bundle/Application/953AA851-CC15-4C60-A2CB-C2C6F24E6F71/Foo.app/Foo",
+// and we want to drop the final component (the binary name).
+sal_Int32 lastSlash = aAppPath.lastIndexOf('/');
+assert(lastSlash > 0);
+aAppPath = aAppPath.copy(0, lastSlash);
+#endif
 }
 
 OUString aAppURL;
commit 60569747d57cb1eb5b67ec57198b7f9ab7b87fb0
Author: Tor Lillqvist 
AuthorDate: Wed Sep 5 20:30:24 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Sep 5 21:57:59 2018 +0300

Don't copy files into the source directory, use workdir

(The LibreOfficeLight Xcode project still needs to be adapted
correspondingly.)

Change-Id: I0b17c595fc0d169f6393ab8734a1eecb241f59be

diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 4f4449e6eaaa..94fffd34349e 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -9,7 +9,7 @@
 
 
 #- Env 
-IOSGEN  = $(SRCDIR)/ios/generated
+IOSGEN  = $(BUILDDIR)/workdir/CustomTarget/ios
 IOSRES  = $(IOSGEN)/resources
 IOSDIRS = $(IOSGEN) \
   $(IOSGEN)/Debug_x86_64 \
@@ -105,7 +105,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
) > $(IOSRES)/program/versionrc
 
$(SRCDIR)/bin/lo-all-static-libs | sed -e 's/ /\
-/g' >$(WORKDIR)/ios-all-static-libs.list
+/g' >$(IOSGEN)/ios-all-static-libs.list
 
 #- clean ios  -
 $(call gb_CustomTarget_get_clean_target,ios/iOS_setup):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - desktop/source ios/CustomTarget_iOS_setup.mk

2018-01-20 Thread jan Iversen
 desktop/source/app/appinit.cxx |7 +++
 ios/CustomTarget_iOS_setup.mk  |1 -
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit cc2b9a257b6436ab6f84d6e158a64c09b0937eb6
Author: jan Iversen 
Date:   Sat Jan 20 18:52:39 2018 +0100

iOS, remove double [bootstrap]

two bootstrap sections in one rc file seems wrong.

Change-Id: Ic7f8eac2d3d07b35736d11ad1fbe705135cb1785

diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 543ef306a7db..6242354eeebe 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -58,7 +58,6 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
(echo '[Bootstrap]' \
&& echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' \
&& echo 'HOME=$$SYSUSERHOME'  \
-   && echo '[Bootstrap]' \
) > $(IOSRES)/rc
 
# Set up fundamentalrc, unorc, bootstraprc and versionrc.
commit feb601b75142f3234bb51f9566a70c4db488a061
Author: jan Iversen 
Date:   Sat Jan 20 18:51:13 2018 +0100

iOS, allow unorc to be read

One reason why init did not work, was that it did a throw due
to a wrong path on unorc

Change-Id: I928f25358befe05f8986e9ebcffda27e8beb397c

diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 853eaf8734ae..826c525eb6c1 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -80,6 +80,13 @@ void Desktop::InitApplicationServiceManager()
 sm.set(
 cppu::defaultBootstrap_InitialComponentContext( aUnoRc 
)->getServiceManager(),
 UNO_QUERY_THROW);
+#elif defined(IOS)
+OUString uri( "$APP_DATA_DIR" );
+rtl_bootstrap_expandMacros(  );
+OUString aUnoRc("file://" + uri  + "/unorc");
+sm.set(
+   cppu::defaultBootstrap_InitialComponentContext( aUnoRc 
)->getServiceManager(),
+   UNO_QUERY_THROW);
 #else
 sm.set(
 cppu::defaultBootstrap_InitialComponentContext()->getServiceManager(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits