fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ios / CustomTarget_TiledLibreOffice_app.mk
blobf9f80285b233881e762ed95b0dd69676eac7fb57
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #- Env ------------------------------------------------------------------------
11 TiledLibreOffice_resource := experimental/TiledLibreOffice/Resources
12 BUILDID :=$(shell cd $(SRCDIR) && git log -1 --format=%H)
14 #- Macros ---------------------------------------------------------------------
16 define TiledLibreOfficeXcodeBuild
17 CC=; \
18 $(call gb_Helper_print_on_error, \
19 xcodebuild \
20 -project experimental/TiledLibreOffice/TiledLibreOffice.xcodeproj \
21 -target TiledLibreOffice \
22 -sdk $(XCODEBUILD_SDK) \
23 -arch $(XCODE_ARCHS) \
24 -configuration $(if $(ENABLE_DEBUG),Debug,Release) \
25 $(1) \
26 , $$@.log \
28 endef
30 #- Targets --------------------------------------------------------------------
32 .PHONY: TiledLibreOffice_setup
34 # Register target
35 $(eval $(call gb_CustomTarget_CustomTarget,ios/TiledLibreOffice))
37 # Build
38 # Depend on the custom target that sets up lo.xcconfig
39 $(call gb_CustomTarget_get_target,ios/TiledLibreOffice): $(call gb_CustomTarget_get_target,ios/Lo_Xcconfig) TiledLibreOffice_setup
40 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),APP,2)
41 $(SRCDIR)/solenv/bin/native-code.py \
42 -g core -g writer \
43 > $(SRCDIR)/ios/experimental/TiledLibreOffice/TiledLibreOffice/native-code.mm
44 $(call TiledLibreOfficeXcodeBuild, clean build)
46 # Setup
47 TiledLibreOffice_setup:
48 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
50 # Resources #
51 rm -rf $(TiledLibreOffice_resource) 2>/dev/null
52 mkdir -p $(TiledLibreOffice_resource)
53 mkdir -p $(TiledLibreOffice_resource)/services
55 # copy rdb files
56 cp $(INSTDIR)/program/types.rdb $(TiledLibreOffice_resource)/udkapi.rdb
57 cp $(INSTDIR)/program/types/offapi.rdb $(TiledLibreOffice_resource)
58 cp $(INSTDIR)/program/types/oovbaapi.rdb $(TiledLibreOffice_resource)
59 cp $(INSTDIR)/program/services/services.rdb $(TiledLibreOffice_resource)/services
60 cp $(INSTDIR)/program/services.rdb $(TiledLibreOffice_resource)
62 # copy .res files
63 # program/resource is hardcoded in tools/source/rc/resmgr.cxx. Sure,
64 # we could set STAR_RESOURCE_PATH instead. sigh...
65 mkdir -p $(TiledLibreOffice_resource)/program/resource
66 cp $(INSTDIR)/program/resource/*en-US.res $(TiledLibreOffice_resource)/program/resource
68 # soffice.cfg
69 mkdir -p $(TiledLibreOffice_resource)/share/config
70 cp -R $(INSTDIR)/share/config/soffice.cfg $(TiledLibreOffice_resource)/share/config
72 # Japanese and Chinese dict files
73 cp $(WORKDIR)/CustomTarget/i18npool/breakiterator/dict_*.data $(TiledLibreOffice_resource)/share
75 # Drawing ML custom shape data files
76 mkdir -p $(TiledLibreOffice_resource)/share/filter
77 cp $(INSTDIR)/share/filter/oox-drawingml-adj-names $(TiledLibreOffice_resource)/share/filter
78 cp $(INSTDIR)/share/filter/oox-drawingml-cs-presets $(TiledLibreOffice_resource)/share/filter
79 cp $(INSTDIR)/share/filter/vml-shape-types $(TiledLibreOffice_resource)/share/filter
81 # "registry"
82 cp -R $(INSTDIR)/share/registry $(TiledLibreOffice_resource)/share
84 # Set up rc, the "inifile". See getIniFileName_Impl().
85 file=$(TiledLibreOffice_resource)/rc; \
86 echo '[Bootstrap]' > $$file; \
87 echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' >> $$file; \
88 echo 'HOME=$$SYSUSERHOME' >> $$file;
90 # Set up fundamentalrc, unorc, bootstraprc and versionrc.
91 # Do we really need all these?
92 file=$(TiledLibreOffice_resource)/fundamentalrc; \
93 echo '[Bootstrap]' > $$file; \
94 echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' >> $$file; \
95 echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' >> $$file; \
96 echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry res:$${BRAND_BASE_DIR}/registry' >> $$file; \
97 echo 'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb file://$$APP_DATA_DIR/offapi.rdb' >> $$file; \
98 echo 'UNO_SERVICES=file://$$APP_DATA_DIR/services.rdb file://$$APP_DATA_DIR/services/services.rdb' >> $$file; \
99 echo 'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' >> $$file
101 file=$(TiledLibreOffice_resource)/unorc; \
102 echo '[Bootstrap]' > $$file;
104 # bootstraprc must be in $BRAND_BASE_DIR/program
105 mkdir -p $(TiledLibreOffice_resource)/program
106 file=$(TiledLibreOffice_resource)/program/bootstraprc; \
107 echo '[Bootstrap]' > $$file; \
108 echo 'InstallMode=<installmode>' >> $$file; \
109 echo "ProductKey=LibreOffice $(PRODUCTVERSION)" >> $$file; \
110 echo 'UserInstallation=$$SYSUSERHOME/userinstallation' >> $$file;
112 # Is this really needed?
113 file=$(TiledLibreOffice_resource)/program/versionrc; \
114 echo '[Version]' > $$file; \
115 echo 'AllLanguages=en-US' >> $$file; \
116 echo 'BuildVersion=' >> $$file; \
117 echo "buildid=$(BUILDID)" >> $$file;
119 # Clean
120 $(call gb_CustomTarget_get_clean_target,ios/TiledLibreOffice):
121 $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),APP,2)
122 $(call TiledLibreOfficeXcodeBuild, clean)
124 # vim: set noet sw=4 ts=4: