lok: initialize to dispatch ".uno:RunMacro" command
[LibreOffice.git] / ios / CustomTarget_iOS_setup.mk
blobd417be34cfed63d954e5bbaf7ac1e3df8de4aeea
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/.
11 #- Env ------------------------------------------------------------------------
12 IOSGEN = $(BUILDDIR)/workdir/CustomTarget/ios
13 IOSRES = $(IOSGEN)/resources
14 IOSDIRS = $(IOSGEN) \
15 $(IOSGEN)/Debug_x86_64 \
16 $(IOSGEN)/Debug_arm64 \
17 $(IOSGEN)/Release_x86_64 \
18 $(IOSGEN)/Release_arm64 \
19 $(IOSRES) \
20 $(IOSRES)/services \
21 $(IOSRES)/program \
22 $(IOSRES)/share \
23 $(IOSRES)/config \
24 $(IOSRES)/share/filter
27 #- Top level -----------------------------------------------------------------
28 $(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_setup))
30 $(call gb_CustomTarget_get_target,ios/iOS_setup): $(IOSGEN)/native-code.h
33 #- create directories --------------------------------------------------------
34 $(IOSDIRS):
35 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MKD,2)
36 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),MKD)
37 mkdir -p $(IOSDIRS)
38 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),MKD)
41 #- Generate resources --------------------------------------------------------
42 $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
43 $(SRCDIR)/ios/CustomTarget_iOS_setup.mk \
44 $(SRCDIR)/solenv/bin/native-code.py \
45 $(IOSGEN) \
46 $(IOSDIRS)
47 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),EN2,2)
48 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),EN2)
49 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),EN2)
51 # generate native-code.h (used by LibreOffice.c)
52 xcrun python3 $(SRCDIR)/solenv/bin/native-code.py \
53 -C -g core -g writer -g calc -g draw -g edit \
54 > $(IOSGEN)/native-code.h
56 # copy resource files used to start/run LibreOffice
57 cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt$(ICU_MAJOR)l.dat $(IOSRES)/icudt$(ICU_MAJOR)l.dat
58 cp $(INSTDIR)/program/types.rdb $(IOSRES)/udkapi.rdb
59 cp $(INSTDIR)/program/types/offapi.rdb $(IOSRES)
60 cp $(INSTDIR)/program/types/oovbaapi.rdb $(IOSRES)
61 cp $(INSTDIR)/program/services/services.rdb $(IOSRES)/services
62 cp $(INSTDIR)/program/services.rdb $(IOSRES)
63 if test -d $(INSTDIR)/program/resource; then \
64 cp -R $(INSTDIR)/program/resource $(IOSRES)/program; \
66 mkdir -p $(IOSRES)/share/config
67 cp -R $(INSTDIR)/share/config/soffice.cfg $(IOSRES)/share/config
68 cp $(INSTDIR)/share/filter/oox-drawingml-adj-names $(IOSRES)/share/filter
69 cp $(INSTDIR)/share/filter/oox-drawingml-cs-presets $(IOSRES)/share/filter
70 cp $(INSTDIR)/share/filter/vml-shape-types $(IOSRES)/share/filter
71 cp -R $(INSTDIR)/share/registry $(IOSRES)/share
72 cp $(INSTDIR)/share/config/*zip $(IOSRES)/share/config
73 cp -R $(INSTDIR)/share/liblangtag $(IOSRES)/share
74 cp -R $(INSTDIR)/share/theme_definitions $(IOSRES)/share
75 cp -R $(INSTDIR)/share/template $(IOSRES)/share
76 mkdir -p $(IOSRES)/share/fonts
77 cp -R $(INSTDIR)/share/fonts/truetype $(IOSRES)/share/fonts
78 cp -R $(INSTDIR)/share/gallery $(IOSRES)/share
79 cp -R $(INSTDIR)/share/palette $(IOSRES)/share
80 cp -R $(INSTDIR)/share/fingerprint $(IOSRES)/share
81 cp $(SRCDIR)/ios/welcome.odt $(IOSRES)
83 # Set up rc (the "inifile", fundamentalrc, unorc, bootstraprc and versionrc.
84 (echo '[Bootstrap]' \
85 && echo 'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' \
86 && echo 'HOME=$$SYSUSERHOME' \
87 ) > $(IOSRES)/rc
89 (echo '[Bootstrap]' \
90 && echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' \
91 && echo 'BRAND_INI_DIR=file:://$$APP_DATA_DIR' \
92 && echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
93 && echo 'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
94 && echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry ' \
95 'res:$${BRAND_BASE_DIR}/share/registry' \
96 && echo 'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' \
97 && echo 'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \
98 'file://$$APP_DATA_DIR/offapi.rdb' \
99 && echo 'UNO_SERVICES=file://$$APP_DATA_DIR/services.rdb ' \
100 'file://$$APP_DATA_DIR/services/services.rdb' \
101 && echo 'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' \
102 ) > $(IOSRES)/fundamentalrc;
104 echo '[Bootstrap]' > $(IOSRES)/unorc
106 # bootstraprc must be in $BRAND_BASE_DIR/program
107 (echo '[Bootstrap]' \
108 && echo 'InstallMode=<installmode>' \
109 && echo "ProductKey=LibreOffice $(PRODUCTVERSION)" \
110 && echo 'UserInstallation=$$SYSUSERHOME' \
111 ) > $(IOSRES)/program/bootstraprc
113 (echo '[Version]' \
114 && echo 'AllLanguages=en-US' \
115 && echo "buildid=$(shell git -C $(SRCDIR) log -1 --format=%H)" \
116 ) > $(IOSRES)/program/versionrc
118 $(SRCDIR)/bin/lo-all-static-libs | sed -e 's/ /\
119 /g' >$(IOSGEN)/ios-all-static-libs.list
121 #- clean ios -----------------------------------------------------------------
122 $(call gb_CustomTarget_get_clean_target,ios/iOS_setup):
123 $(call gb_Output_announce,$(subst $(WORKDIR)/Clean/,,$@),$(false),ENV,2)
124 rm -rf $(IOSRES)/* $(IOSGEN)/native-code.h $(IOSGEN)
126 # vim: set noet sw=4 ts=4: