[Libreoffice-commits] core.git: ios/CustomTarget_MobileLibreOffice_app.mk ios/MobileLibreOffice ios/Module_ios.mk ios/shared
Roi Illouz
roi.illouz at cloudon.com
Tue Oct 29 20:16:50 CET 2013
ios/CustomTarget_MobileLibreOffice_app.mk | 136 ++++++++++
ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj | 29 --
ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist | 2
ios/Module_ios.mk | 1
ios/shared/ios_sharedlo.xcodeproj/project.pbxproj | 5
5 files changed, 145 insertions(+), 28 deletions(-)
New commits:
commit 84cfb9b9926e88f75deffc6742a07a4390203bfb
Author: Roi Illouz <roi.illouz at cloudon.com>
Date: Tue Oct 29 18:25:25 2013 +0200
New CustomTarget, move Xcode setup to Makefile
Change-Id: Id03bf8002902f1adec57356601b28ab2c743df2a
Reviewed-on: https://gerrit.libreoffice.org/6476
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/ios/CustomTarget_MobileLibreOffice_app.mk b/ios/CustomTarget_MobileLibreOffice_app.mk
new file mode 100644
index 0000000..e3e95c1
--- /dev/null
+++ b/ios/CustomTarget_MobileLibreOffice_app.mk
@@ -0,0 +1,136 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# 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 ------------------------------------------------------------------------
+
+LO_XCCONFIG := lo.xcconfig
+DEST_RESOURCE := MobileLibreOffice/resource_link
+BUILDID :=$(shell cd $(SRCDIR) && git log -1 --format=%H)
+
+#- Macros ---------------------------------------------------------------------
+
+define MobileLibreOfficeXcodeBuild
+ CC=;xcodebuild -project MobileLibreOffice/MobileLibreOffice.xcodeproj -scheme MobileLibreOffice -arch armv7 -configuration $(if $(ENABLE_DEBUG),Debug,Release) $(1) >/dev/null
+endef
+#- Targets --------------------------------------------------------------------
+
+.PHONY: MobileLibreOffice_setup
+
+#==============================================================================
+# Register target
+$(eval $(call gb_CustomTarget_CustomTarget,ios/MobileLibreOffice))
+#==============================================================================
+
+#==============================================================================
+# Build
+$(call gb_CustomTarget_get_target,ios/MobileLibreOffice): MobileLibreOffice_setup
+#==============================================================================
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
+ $(call MobileLibreOfficeXcodeBuild, clean build)
+
+#==============================================================================
+# Setup
+MobileLibreOffice_setup:
+#==============================================================================
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
+
+ # Put xcconfig in source dir for Xcode projects
+ if test $(SRCDIR) != $(BUILDDIR); then \
+ cp $(BUILDDIR)/ios/$(LO_XCCONFIG) $(SRCDIR)/ios; \
+ fi
+
+ # Libs #
+ # Create the link flags in the xcconfig for Xcode linkage
+ for path in $(OUTDIR)/lib \
+ $(INSTDIR)/program \
+ $(WORKDIR)/LinkTarget/StaticLibrary \
+ $(WORKDIR)/UnpackedTarball/*/.libs/ \
+ $(WORKDIR)/UnpackedTarball/*/src/.libs \
+ $(WORKDIR)/UnpackedTarball/*/src/*/.libs \
+ $(WORKDIR)/UnpackedTarball/openssl; do \
+ flags+=" -L$$path"; \
+ for lib in $$path/lib*.a; do \
+ if [ ! -r $$lib ]; then \
+ continue; \
+ fi; \
+ base=$${lib##*/lib}; \
+ base=$${base%\.a}; \
+ flags+=" -l$${base}"; \
+ done; \
+ done; \
+ file=$(LO_XCCONFIG); \
+ sed -i '' -e "s|^\(LINK_LDFLAGS =\).*$$|\1 $$flags|" $$file;
+
+ # Resources #
+ rm -rf $(DEST_RESOURCE) 2>/dev/null
+ mkdir -p $(DEST_RESOURCE)
+ mkdir -p $(DEST_RESOURCE)/ure
+
+ # copy rdb files
+ cp $(OUTDIR)/bin/offapi.rdb $(DEST_RESOURCE)
+ cp $(OUTDIR)/bin/udkapi.rdb $(DEST_RESOURCE)
+ cp $(OUTDIR)/bin/oovbaapi.rdb $(DEST_RESOURCE)
+ cp $(INSTDIR)/program/services/services.rdb $(DEST_RESOURCE)
+ cp $(INSTDIR)/ure/share/misc/services.rdb $(DEST_RESOURCE)/ure
+
+ # copy .res files
+ # program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
+ # we could set STAR_RESOURCE_PATH instead. sigh...
+ mkdir -p $(DEST_RESOURCE)/program/resource
+ cp $(INSTDIR)/program/resource/*en-US.res $(DEST_RESOURCE)/program/resource
+
+ # soffice.cfg
+ mkdir -p $(DEST_RESOURCE)/share/config
+ cp -R $(INSTDIR)/share/config/soffice.cfg $(DEST_RESOURCE)/share/config
+
+ # "registry"
+ cp -R $(INSTDIR)/share/registry $(DEST_RESOURCE)/share
+
+ # Set up rc, the "inifile". See getIniFileName_Impl().
+ file=$(DEST_RESOURCE)/rc; \
+ echo '[Bootstrap]' > $$file; \
+ echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' >> $$file; \
+ echo 'HOME=$$APP_DATA_DIR/tmp' >> $$file;
+
+ # Set up fundamentalrc, unorc, bootstraprc and versionrc.
+ # Do we really need all these?
+ file=$(DEST_RESOURCE)/fundamentalrc; \
+ echo '[Bootstrap]' > $$file; \
+ echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' >> $$file; \
+ echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry res:$${BRAND_BASE_DIR}/registry' >> $$file;
+
+ file=$(DEST_RESOURCE)/unorc; \
+ echo '[Bootstrap]' > $$file;
+
+ # bootstraprc must be in $BRAND_BASE_DIR/program
+ mkdir -p $(DEST_RESOURCE)/program
+ file=$(DEST_RESOURCE)/program/bootstraprc; \
+ echo '[Bootstrap]' > $$file; \
+ echo 'InstallMode=<installmode>' >> $$file; \
+ echo "ProductKey=LibreOffice $(PRODUCTVERSION)" >> $$file; \
+ echo 'UserInstallation=file://$$APP_DATA_DIR/../Library/Application%20Support' >> $$file;
+
+ # Is this really needed?
+ file=$(DEST_RESOURCE)/program/versionrc; \
+ echo '[Version]' > $$file; \
+ echo 'AllLanguages=en-US' >> $$file; \
+ echo 'BuildVersion=' >> $$file; \
+ echo "buildid=$(BUILDID)" >> $$file; \
+ echo 'ProductMajor=360' >> $$file; \
+ echo 'ProductMinor=1' >> $$file;
+
+#==============================================================================
+# Clean
+$(call gb_CustomTarget_get_clean_target,ios/MobileLibreOffice):
+#==============================================================================
+ $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
+ $(call MobileLibreOfficeXcodeBuild, clean)
+ rm -f $(LO_XCCONFIG) 2>/dev/null
+
+#------------------------------------------------------------------------------
+# vim: set noet sw=4 ts=4:
diff --git a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
index 36a6346..2f30ea4 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
+++ b/ios/MobileLibreOffice/MobileLibreOffice.xcodeproj/project.pbxproj
@@ -17,8 +17,8 @@
681D78C2180C12D300D52D5E /* udkapi.rdb in Resources */ = {isa = PBXBuildFile; fileRef = 681D78B7180C12D300D52D5E /* udkapi.rdb */; };
681D78C3180C12D300D52D5E /* unorc in Resources */ = {isa = PBXBuildFile; fileRef = 681D78B8180C12D300D52D5E /* unorc */; };
681D78C6180C136400D52D5E /* ure in Resources */ = {isa = PBXBuildFile; fileRef = 681D78C5180C136400D52D5E /* ure */; };
- 688EAAE9180D3130003741B3 /* lo.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 688EAAE8180D3130003741B3 /* lo.xcconfig */; };
688EAB01180D67E9003741B3 /* libios_sharedlo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 688EAAFE180D679F003741B3 /* libios_sharedlo.a */; };
+ 689A7ECC181EA0DD0020710C /* mlo-icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 68B99ED6180BBF7100FFEA35 /* mlo-icon-57.png */; };
689EBAEB18069FB7002F1CD7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 689EBAEA18069FB7002F1CD7 /* UIKit.framework */; };
689EBAED18069FB7002F1CD7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 689EBAEC18069FB7002F1CD7 /* Foundation.framework */; };
689EBAEF18069FB7002F1CD7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 689EBAEE18069FB7002F1CD7 /* CoreGraphics.framework */; };
@@ -48,7 +48,6 @@
68B98C42180B38CD00FFEA35 /* MLOMagnifier at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 68B98C33180B38CD00FFEA35 /* MLOMagnifier at 2x.png */; };
68B98C43180B38CD00FFEA35 /* MLOMagnifierMask at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 68B98C34180B38CD00FFEA35 /* MLOMagnifierMask at 2x.png */; };
68B99ED3180BBEE900FFEA35 /* test1.odt in Resources */ = {isa = PBXBuildFile; fileRef = 68B99ED2180BBEE900FFEA35 /* test1.odt */; };
- 68B99ED8180BBF7100FFEA35 /* mlo-icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 68B99ED6180BBF7100FFEA35 /* mlo-icon-57.png */; };
68B99ED9180BBF7100FFEA35 /* mlo-icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 68B99ED7180BBF7100FFEA35 /* mlo-icon-114.png */; };
68C6FC51180AD0CA005ACB02 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 68C6FC4F180AD0CA005ACB02 /* libz.dylib */; };
68C6FC52180AD0CA005ACB02 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 68C6FC50180AD0CA005ACB02 /* libiconv.dylib */; };
@@ -74,7 +73,6 @@
681D78B1180C12D300D52D5E /* oovbaapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = oovbaapi.rdb; path = resource_link/oovbaapi.rdb; sourceTree = SOURCE_ROOT; };
681D78B2180C12D300D52D5E /* program */ = {isa = PBXFileReference; lastKnownFileType = folder; name = program; path = resource_link/program; sourceTree = SOURCE_ROOT; };
681D78B3180C12D300D52D5E /* rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rc; path = resource_link/rc; sourceTree = SOURCE_ROOT; };
- 681D78B4180C12D300D52D5E /* registry */ = {isa = PBXFileReference; lastKnownFileType = folder; name = registry; path = resource_link/registry; sourceTree = SOURCE_ROOT; };
681D78B5180C12D300D52D5E /* services.rdb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = services.rdb; path = resource_link/services.rdb; sourceTree = SOURCE_ROOT; };
681D78B6180C12D300D52D5E /* share */ = {isa = PBXFileReference; lastKnownFileType = folder; name = share; path = resource_link/share; sourceTree = SOURCE_ROOT; };
681D78B7180C12D300D52D5E /* udkapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = udkapi.rdb; path = resource_link/udkapi.rdb; sourceTree = SOURCE_ROOT; };
@@ -294,7 +292,6 @@
children = (
681D78C5180C136400D52D5E /* ure */,
681D78B2180C12D300D52D5E /* program */,
- 681D78B4180C12D300D52D5E /* registry */,
681D78B6180C12D300D52D5E /* share */,
681D78AF180C12D300D52D5E /* fundamentalrc */,
681D78B0180C12D300D52D5E /* offapi.rdb */,
@@ -343,7 +340,6 @@
isa = PBXNativeTarget;
buildConfigurationList = 689EBB0D18069FB8002F1CD7 /* Build configuration list for PBXNativeTarget "MobileLibreOffice" */;
buildPhases = (
- 68B98C23180B2FE500FFEA35 /* ShellScript */,
689EBAE318069FB7002F1CD7 /* Sources */,
689EBAE418069FB7002F1CD7 /* Frameworks */,
689EBAE518069FB7002F1CD7 /* Resources */,
@@ -407,7 +403,7 @@
689EBAFD18069FB8002F1CD7 /* Default.png in Resources */,
689EBAFF18069FB8002F1CD7 /* Default at 2x.png in Resources */,
689EBB0118069FB8002F1CD7 /* Default-568h at 2x.png in Resources */,
- 68B99ED8180BBF7100FFEA35 /* mlo-icon-57.png in Resources */,
+ 689A7ECC181EA0DD0020710C /* mlo-icon-57.png in Resources */,
68B99ED9180BBF7100FFEA35 /* mlo-icon-114.png in Resources */,
68B98C35180B38CD00FFEA35 /* MLOButtonBack.png in Resources */,
68B98C36180B38CD00FFEA35 /* MLOButtonBack at 2x.png in Resources */,
@@ -435,28 +431,11 @@
681D78C2180C12D300D52D5E /* udkapi.rdb in Resources */,
681D78C3180C12D300D52D5E /* unorc in Resources */,
681D78C6180C136400D52D5E /* ure in Resources */,
- 688EAAE9180D3130003741B3 /* lo.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXShellScriptBuildPhase section */
- 68B98C23180B2FE500FFEA35 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "dest_resource=resource_link\nproduct_ver=`sed -ne 's/^\\(export PRODUCTVERSION=\\)\\(.*\\)/\\2/p' $LO_BUILDDIR/config_host.mk`\nbuildid=`(cd $LO_SRCDIR && git log -1 --format=%H)`\n\nrm $dest_resource\nmkdir -p $dest_resource\n\n#touch $SRCROOT/MobileLibreOffice/main.m\n\n# Libs #\nfor path in $LO_OUTDIR/lib $LO_INSTDIR/program $LO_WORKDIR/LinkTarget/StaticLibrary $LO_WORKDIR/UnpackedTarball/*/.libs/ $LO_WORKDIR/UnpackedTarball/*/src/.libs $LO_WORKDIR/UnpackedTarball/*/src/*/.libs $LO_WORKDIR/UnpackedTarball/openssl; do\n flags+=\" -L$path\"\n for lib in $path/lib*.a; do\n if [ ! -r $lib ]; then\n continue\n fi\n base=${lib##*/lib}\n base=${base%\\.a}\n flags+=\" -l${base}\"\n done\ndone\n\nfile=../lo.xcconfig\nsed -i '' -e \"s|^\\(LINK_LDFLAGS =\\).*$|\\1 $flags|\" $file\n \n# Resources #\nmkdir -p $dest_resource/ure\n\n# copy rdb files\ncp $LO_OUTDIR/bin/offapi.rdb $dest_resource\ncp $LO_O
UTDIR/bin/udkapi.rdb $dest_resource\ncp $LO_OUTDIR/bin/oovbaapi.rdb $dest_resource\ncp $LO_INSTDIR/program/services/services.rdb $dest_resource\ncp $LO_INSTDIR/ure/share/misc/services.rdb $dest_resource/ure\n\n# copy .res files\n# program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,\n# we could set STAR_RESOURCE_PATH instead. sigh...\nmkdir -p $dest_resource/program/resource\ncp $LO_INSTDIR/program/resource/*en-US.res $dest_resource/program/resource\n\n# soffice.cfg\nmkdir -p $dest_resource/share/config\ncp -R $LO_INSTDIR/share/config/soffice.cfg $dest_resource/share/config\n \n# \"registry\"\ncp -R $LO_INSTDIR/share/registry $dest_resource/share\n \n# Set up rc, the \"inifile\". See getIniFileName_Impl().\nfile=$dest_resource/rc\necho '[Bootstrap]' > $file\necho 'URE_BOOTSTRAP=file://$APP_DATA_DIR/fundamentalrc' >> $file\necho 'HOME=$APP_DATA_DIR/tmp' >> $
file\n\n# Set up fundamentalrc, unorc, bootstraprc and versionrc.\n# Do we really need all these?\nfile=$dest_resource/fundamentalrc\necho '[Bootstrap]' > $file\necho 'BRAND_BASE_DIR=file://$APP_DATA_DIR' >> $file\necho 'CONFIGURATION_LAYERS=xcsxcu:${BRAND_BASE_DIR}/share/registry res:${BRAND_BASE_DIR}/registry' >> $file\n\nfile=$dest_resource/unorc\necho '[Bootstrap]' > $file\n\n# bootstraprc must be in $BRAND_BASE_DIR/program\nmkdir -p $dest_resource/program\nfile=$dest_resource/program/bootstraprc\necho '[Bootstrap]' > $file\necho 'InstallMode=<installmode>' >> $file\necho \"ProductKey=LibreOffice $product_ver\" >> $file\necho 'UserInstallation=file://$APP_DATA_DIR/../Library/Application%20Support' >> $file\n\n# Is this really needed?\nfile=$dest_resource/program/versionrc\nec
ho '[Version]' > $file\necho 'AllLanguages=en-US' >> $file\necho 'BuildVersion=' >> $file\necho \"buildid=$buildid\" >> $file\necho 'ProductMajor=360' >> $file\necho 'ProductMinor=1' >> $file\n ";
- };
-/* End PBXShellScriptBuildPhase section */
-
/* Begin PBXSourcesBuildPhase section */
689EBAE318069FB7002F1CD7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -523,7 +502,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = NO;
- ONLY_ACTIVE_ARCH = YES;
+ ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-ObjC",
"$(LINK_LDFLAGS)",
@@ -649,7 +628,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = NO;
- ONLY_ACTIVE_ARCH = YES;
+ ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-ObjC",
"$(LINK_LDFLAGS)",
diff --git a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist b/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist
index 227fc30..8962963 100644
--- a/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist
+++ b/ios/MobileLibreOffice/MobileLibreOffice/MobileLibreOffice-Info.plist
@@ -34,10 +34,10 @@
<dict>
<key>CFBundleIconFiles</key>
<array>
- <string>mlo-icon-57.png</string>
<string>mlo-icon-114.png</string>
<string>mlo-icon-72.png</string>
<string>mlo-icon-144.png</string>
+ <string>mlo-icon-57.png</string>
</array>
</dict>
</dict>
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
index d70e277..96cef28 100644
--- a/ios/Module_ios.mk
+++ b/ios/Module_ios.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,ios))
ifeq ($(OS),IOS)
$(eval $(call gb_Module_add_targets,ios,\
+ CustomTarget_MobileLibreOffice_app \
Executable_LibreOffice \
CustomTarget_LibreOffice_app \
))
diff --git a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
index 40adba6..8f07817 100644
--- a/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
+++ b/ios/shared/ios_sharedlo.xcodeproj/project.pbxproj
@@ -559,7 +559,7 @@
LD_NO_PIE = NO;
LINK_WITH_STANDARD_LIBRARIES = NO;
LLVM_LTO = NO;
- ONLY_ACTIVE_ARCH = YES;
+ ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
};
@@ -595,6 +595,7 @@
LD_NO_PIE = NO;
LINK_WITH_STANDARD_LIBRARIES = NO;
LLVM_LTO = NO;
+ ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
VALIDATE_PRODUCT = YES;
@@ -673,7 +674,7 @@
LD_NO_PIE = NO;
LINK_WITH_STANDARD_LIBRARIES = NO;
LLVM_LTO = NO;
- ONLY_ACTIVE_ARCH = YES;
+ ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
};
More information about the Libreoffice-commits
mailing list