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 \
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)
39 #- Generate resources --------------------------------------------------------
40 $(IOSGEN
)/native-code.h
: $(BUILDDIR
)/config_host.mk \
41 $(SRCDIR
)/ios
/CustomTarget_iOS_setup.mk \
42 $(SRCDIR
)/solenv
/bin
/native-code.py \
45 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),EN2
,2)
47 # generate native-code.h (used by LibreOffice.c)
48 $(SRCDIR
)/solenv
/bin
/native-code.py \
49 -C
-g core
-g writer
-g calc
-g draw
-g edit \
50 > $(IOSGEN
)/native-code.h
52 # copy resource files used to start/run LibreOffice
53 cp
$(WORKDIR
)/UnpackedTarball
/icu
/source
/data
/in
/icudt
$(ICU_MAJOR
)l.dat
$(IOSRES
)/icudt
$(ICU_MAJOR
)l.dat
54 cp
$(INSTDIR
)/program
/types.rdb
$(IOSRES
)/udkapi.rdb
55 cp
$(INSTDIR
)/program
/types
/offapi.rdb
$(IOSRES
)
56 cp
$(INSTDIR
)/program
/types
/oovbaapi.rdb
$(IOSRES
)
57 cp
$(INSTDIR
)/program
/services
/services.rdb
$(IOSRES
)/services
58 cp
$(INSTDIR
)/program
/services.rdb
$(IOSRES
)
59 if
test -d
$(INSTDIR
)/program
/resource
; then \
60 cp
-R
$(INSTDIR
)/program
/resource
$(IOSRES
)/program
; \
62 mkdir
-p
$(IOSRES
)/share
/config
63 cp
-R
$(INSTDIR
)/share
/config
/soffice.cfg
$(IOSRES
)/share
/config
64 cp
$(INSTDIR
)/share
/filter/oox-drawingml-adj-names
$(IOSRES
)/filter
65 cp
$(INSTDIR
)/share
/filter/oox-drawingml-cs-presets
$(IOSRES
)/filter
66 cp
$(INSTDIR
)/share
/filter/vml-shape-types
$(IOSRES
)/filter
67 cp
-R
$(INSTDIR
)/share
/registry
$(IOSRES
)
68 cp
$(INSTDIR
)/share
/config
/*zip
$(IOSRES
)/share
/config
69 cp
-R
$(INSTDIR
)/share
/liblangtag
$(IOSRES
)/share
70 cp
-R
$(INSTDIR
)/share
/theme_definitions
$(IOSRES
)/share
71 cp
-R
$(INSTDIR
)/share
/template
$(IOSRES
)/share
72 mkdir
-p
$(IOSRES
)/share
/fonts
73 cp
-R
$(INSTDIR
)/share
/fonts
/truetype
$(IOSRES
)/share
/fonts
74 cp
-R
$(INSTDIR
)/share
/gallery
$(IOSRES
)/share
75 cp
$(SRCDIR
)/ios
/welcome.odt
$(IOSRES
)
77 # Set up rc (the "inifile", fundamentalrc, unorc, bootstraprc and versionrc.
79 && echo
'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' \
80 && echo
'HOME=$$SYSUSERHOME' \
84 && echo
'BRAND_BASE_DIR=file://$$APP_DATA_DIR' \
85 && echo
'BRAND_INI_DIR=file:://$$APP_DATA_DIR' \
86 && echo
'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
87 && echo
'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
88 && echo
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/registry ' \
89 'res:$${BRAND_BASE_DIR}/registry' \
90 && echo
'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' \
91 && echo
'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \
92 'file://$$APP_DATA_DIR/offapi.rdb' \
93 && echo
'UNO_SERVICES=file://$$APP_DATA_DIR/services.rdb ' \
94 'file://$$APP_DATA_DIR/services/services.rdb' \
95 && echo
'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' \
96 ) > $(IOSRES
)/fundamentalrc
;
98 echo
'[Bootstrap]' > $(IOSRES
)/unorc
100 # bootstraprc must be in $BRAND_BASE_DIR/program
101 (echo
'[Bootstrap]' \
102 && echo
'InstallMode=<installmode>' \
103 && echo
"ProductKey=LibreOffice $(PRODUCTVERSION)" \
104 && echo
'UserInstallation=$$SYSUSERHOME' \
105 ) > $(IOSRES
)/program
/bootstraprc
108 && echo
'AllLanguages=en-US' \
109 && echo
'BuildVersion=' \
110 && echo
"buildid=$(shell git -C $(SRCDIR) log -1 --format=%H)" \
111 ) > $(IOSRES
)/program
/versionrc
113 $(SRCDIR
)/bin
/lo-all-static-libs | sed
-e
's/ /\
114 /g' >$(IOSGEN
)/ios-all-static-libs.list
116 #- clean ios -----------------------------------------------------------------
117 $(call gb_CustomTarget_get_clean_target
,ios
/iOS_setup
):
118 $(call gb_Output_announce
,$(subst $(WORKDIR
)/Clean
/,,$@
),$(false
),ENV
,2)
119 rm -rf
$(IOSRES
)/* $(IOSGEN
)/native-code.h
$(IOSGEN
)
121 # vim: set noet sw=4 ts=4: