[Libreoffice-commits] core.git: 3 commits - desktop/source ios/CustomTarget_iOS_prelink.mk ios/CustomTarget_iOS_setup.mk ios/source
jan Iversen
jani at libreoffice.org
Wed Jan 10 13:23:37 UTC 2018
desktop/source/lib/init.cxx | 7 ++++---
ios/CustomTarget_iOS_prelink.mk | 37 +++++++++++++++++++++++--------------
ios/CustomTarget_iOS_setup.mk | 39 ++++++++++++++++++++++++++++++++-------
ios/source/LibreOfficeKit.c | 6 ++++--
4 files changed, 63 insertions(+), 26 deletions(-)
New commits:
commit d9bde4c6af35beca7be6da93834fc56a6c1bf753
Author: jan Iversen <jani at libreoffice.org>
Date: Wed Jan 10 14:20:19 2018 +0100
iOS, corrected path in LO
Patch thanks to Jon Nermut.
LO looked in the wrong directories on iOS
Change-Id: I8a9c019f7443445b780bc2ce1c77c998f74239e8
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ae0a99b8424f..7b97d1beeca0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3438,14 +3438,15 @@ static bool initialize_uno(const OUString& aAppProgramURL)
{
#ifdef IOS
// For iOS we already hardcode the inifile as "rc" in the .app directory.
- (void) aAppProgramURL;
+ rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("soffice"));
+ xContext = cppu::defaultBootstrap_InitialComponentContext(aAppProgramURL + "/rc");
#elif defined MACOSX
rtl::Bootstrap::setIniFilename(aAppProgramURL + "/../Resources/" SAL_CONFIGFILE("soffice"));
+ xContext = cppu::defaultBootstrap_InitialComponentContext();
#else
rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("soffice"));
-#endif
-
xContext = cppu::defaultBootstrap_InitialComponentContext();
+#endif
if (!xContext.is())
{
diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 91fd2a0cfe33..9b7986cfda46 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -67,10 +67,10 @@ $(IOSGEN)/native-code.h: $(WORKDIR)/ios $(BUILDDIR)/config_host.mk \
# Set up fundamentalrc, unorc, bootstraprc and versionrc.
(echo '[Bootstrap]' \
- && echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \
- && echo 'BRAND_INI_DIR=$${ORIGIN}' \
+ && echo 'BRAND_BASE_DIR=$$APP_DATA_DIR/..' \
+ && echo 'BRAND_INI_DIR=$$APP_DATA_DIR' \
&& echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
- && echo 'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
+ && echo '##BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
&& echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry ' \
'res:$${BRAND_BASE_DIR}/registry' \
&& echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' \
commit e4f5c5cebbca1e1ceab0b4ab68031f275e46b504
Author: jan Iversen <jani at libreoffice.org>
Date: Wed Jan 10 13:16:52 2018 +0100
iOS, reference to hook_2 wrong
Change-Id: I4f0051bac812969988b701383a9df7db96ce245e
diff --git a/ios/source/LibreOfficeKit.c b/ios/source/LibreOfficeKit.c
index 4ed3c919bafb..e9344ca89a2c 100644
--- a/ios/source/LibreOfficeKit.c
+++ b/ios/source/LibreOfficeKit.c
@@ -19,8 +19,10 @@
// Force reference to libreofficekit_hook
-extern __attribute__((used)) void *libreofficekit_hook_2(const char *);
-static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook_2;
+extern __attribute__((used))
+LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path);
+static __attribute__((used))
+LibreOfficeKit *(*foop)(const char *, const char *) = libreofficekit_hook_2;
// pointers to our instance
static LibreOfficeKit* kit;
commit ffd994298d62f86a36b00e98fd41c326e0e9bad0
Author: jan Iversen <jani at libreoffice.org>
Date: Wed Jan 10 08:35:42 2018 +0100
iOS, catch library changes in make
Updated makefiles to be dependent on the static libs, ensuring
that iOS is rebuild when a core library changed.
Change-Id: I5ebd1d703eb9a3af0e284910cdc307dd62f4d3fc
diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index fec4fd271511..d105c135e76b 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -6,16 +6,21 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#- Env ------------------------------------------------------------------------
+IOSLIB = ''
IOSLD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
IOSCLANG = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
ifeq ($(ENABLE_DEBUG),TRUE)
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib
-IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
+ifeq ($(CPUNAME),X86_64)
+IOSKIT = $(IOSGEN)/simulator/libKit
else
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).dylib
-IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
+IOSKIT = $(IOSGEN)/debug/libKit
+endif
+else
+ifeq ($(CPUNAME),ARM64)
+IOSKIT = $(IOSGEN)/release/libKit
+endif
endif
@@ -23,7 +28,7 @@ endif
#- Top level -----------------------------------------------------------------
$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink))
-$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
+$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT).dylib
@@ -32,14 +37,19 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
FORCE:
-$(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o
- $(IOSLD) -r -ios_version_min 11.2 \
+IOSPREBUILD: FORCE
+ $(eval IOSLIBS = `$(SRCDIR)/bin/lo-all-static-libs`)
+
+
+
+$(IOSKIT).dylib: $(WORKDIR)/ios $(call gb_StaticLibrary_get_target,iOS_kitBridge) $(IOSLIBS)
+ $(IOSLD) -r -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
-o $(IOSOBJ) \
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
- `$(SRCDIR)/bin/lo-all-static-libs`
- $(AR) -r $(IOSKIT2) $(IOSOBJ)
+ $(IOSLIBS)
+ $(AR) -r $(IOSKIT).a $(IOSOBJ)
$(IOSCLANG) -dynamiclib -mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \
-arch `echo $(CPUNAME) | tr '[:upper:]' '[:lower:]'` \
@@ -61,15 +71,14 @@ $(IOSKIT): $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o
-single_module \
-compatibility_version 1 \
-current_version 1 \
- $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
- `$(SRCDIR)/bin/lo-all-static-libs` \
- -o $(IOSKIT)
+ $(IOSKIT).a \
+ -o $(IOSKIT).dylib
ifeq ($(origin IOS_CODEID),undefined)
@echo "please define environment variable IOS_CODEID as\n" \
"export IOS_CODEID=<your apple code identifier>"
@exit -1
else
- codesign -s "$(IOS_CODEID)" $(IOSKIT)
+ codesign -s "$(IOS_CODEID)" $(IOSKIT).dylib
endif
@@ -77,7 +86,7 @@ endif
#- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
- rm -f $(IOSKIT) $(IOSKIT2)
+ rm -f $(IOSKIT).a $(IOSKIT).dylib
diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 8b128d463580..91fd2a0cfe33 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -17,15 +17,28 @@ $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_setup))
$(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h
+#- build ---------------------------------------------------------------------
+.PHONY: FORCE
+FORCE:
-#- Generate dynamic files ---------------------------------------------------
-$(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
+$(WORKDIR)/ios:
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRE,2)
mkdir -p $(IOSGEN) $(IOSRES) $(IOSRES)/services \
$(IOSRES)/share/config $(IOSRES)/share/filter $(IOSRES)/program \
+ $(IOSGEN)/simulator \
+ $(IOSGEN)/debug \
+ $(IOSGEN)/release \
$(IOSGEN) $(WORKDIR)/ios;
+
+
+#- Generate dynamic files ---------------------------------------------------
+$(IOSGEN)/native-code.h: $(WORKDIR)/ios $(BUILDDIR)/config_host.mk \
+ $(SRCDIR)/ios/CustomTarget_iOS_setup.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
# generate file with call declarations
$(SRCDIR)/solenv/bin/native-code.py \
-C -g core -g writer -g calc -g draw -g edit \
@@ -88,8 +101,20 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_i
#- clean ios -----------------------------------------------------------------
$(call gb_CustomTarget_get_clean_target,ios/iOS_setup):
$(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2)
- rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSAPPXC)
+ echo $(call gb_StaticLibrary_get_target,iOS_kitBridge)
+ rm -rf $(IOSRES) $(IOSGEN)/native-code.h $(IOSGEN)/build
rm -rf $(WORKDIR)/ios
+ifeq ($(ENABLE_DEBUG),TRUE)
+ifeq ($(CPUNAME),X86_64)
+ rm -f $(IOSGEN)/simulator/*
+else
+ rm -f $(IOSGEN)/debug/*
+endif
+else
+ifeq ($(CPUNAME),ARM64)
+ rm -f $(IOSGEN)/release/*
+endif
+endif
More information about the Libreoffice-commits
mailing list