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
15 $(IOSGEN
)/Debug_x86_64 \
16 $(IOSGEN
)/Debug_arm64 \
17 $(IOSGEN
)/Release_x86_64 \
18 $(IOSGEN
)/Release_arm64 \
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 --------------------------------------------------------
35 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),MKD
,2)
36 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),MKD
)
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 \
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 mkdir
-p
$(IOSRES
)/share
/spell
$(IOSRES
)/share
/thes
80 # Install the Swiss German dictionary and use it for Liechtenstein, too.
81 # Install also thesauruses.
82 if
test -d
$(INSTDIR
)/share
/extensions
/dict-de
; then \
83 cp
$(INSTDIR
)/share
/extensions
/dict-de
/de_CH_frami.aff
$(IOSRES
)/share
/spell
/de_CH.aff
; \
84 cp
$(INSTDIR
)/share
/extensions
/dict-de
/de_CH_frami.dic
$(IOSRES
)/share
/spell
/de_CH.dic
; \
85 cp
$(INSTDIR
)/share
/extensions
/dict-de
/de_CH_frami.aff
$(IOSRES
)/share
/spell
/de_LI.aff
; \
86 cp
$(INSTDIR
)/share
/extensions
/dict-de
/de_CH_frami.dic
$(IOSRES
)/share
/spell
/de_LI.dic
; \
87 cp
$(INSTDIR
)/share
/extensions
/*/th_
*_v2.
* $(IOSRES
)/share
/thes
; \
88 cp
$(INSTDIR
)/share
/extensions
/dict-en
/th_en_US_v2.dat
$(IOSRES
)/share
/thes
/th_en_GB_v2.dat
; \
89 cp
$(INSTDIR
)/share
/extensions
/dict-en
/th_en_US_v2.idx
$(IOSRES
)/share
/thes
/th_en_GB_v2.idx
; \
91 cp
-R
$(INSTDIR
)/share
/palette
$(IOSRES
)/share
92 cp
-R
$(INSTDIR
)/share
/fingerprint
$(IOSRES
)/share
93 cp
$(SRCDIR
)/ios
/welcome.odt
$(IOSRES
)
95 # Set up rc (the "inifile", fundamentalrc, unorc, bootstraprc and versionrc.
97 && echo
'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' \
98 && echo
'HOME=$$SYSUSERHOME' \
101 (echo
'[Bootstrap]' \
102 && echo
'BRAND_BASE_DIR=file://$$APP_DATA_DIR' \
103 && echo
'BRAND_INI_DIR=file:://$$APP_DATA_DIR' \
104 && echo
'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
105 && echo
'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
106 && echo
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry ' \
107 'res:$${BRAND_BASE_DIR}/share/registry' \
108 && echo
'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' \
109 && echo
'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \
110 'file://$$APP_DATA_DIR/offapi.rdb' \
111 && echo
'UNO_SERVICES=file://$$APP_DATA_DIR/services.rdb ' \
112 'file://$$APP_DATA_DIR/services/services.rdb' \
113 && echo
'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' \
114 ) > $(IOSRES
)/fundamentalrc
;
116 echo
'[Bootstrap]' > $(IOSRES
)/unorc
118 # bootstraprc must be in $BRAND_BASE_DIR/program
119 (echo
'[Bootstrap]' \
120 && echo
'InstallMode=<installmode>' \
121 && echo
"ProductKey=LibreOffice $(PRODUCTVERSION)" \
122 && echo
'UserInstallation=$$SYSUSERHOME' \
123 ) > $(IOSRES
)/program
/bootstraprc
126 && echo
'AllLanguages=en-US' \
127 && echo
"buildid=$(shell git -C $(SRCDIR) log -1 --format=%H)" \
128 ) > $(IOSRES
)/program
/versionrc
130 $(SRCDIR
)/bin
/lo-all-static-libs | sed
-e
's/ /\
131 /g' >$(IOSGEN
)/ios-all-static-libs.list
133 #- clean ios -----------------------------------------------------------------
134 $(call gb_CustomTarget_get_clean_target
,ios
/iOS_setup
):
135 $(call gb_Output_announce
,$(subst $(WORKDIR
)/Clean
/,,$@
),$(false
),ENV
,2)
136 rm -rf
$(IOSRES
)/* $(IOSGEN
)/native-code.h
$(IOSGEN
)
138 # vim: set noet sw=4 ts=4: