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
= $(SRCDIR
)/ios
/generated
13 IOSRES
= $(IOSGEN
)/resources
15 $(IOSGEN
)/Debug_x86_64 \
16 $(IOSGEN
)/Debug_arm64 \
17 $(IOSGEN
)/Release_x86_64 \
18 $(IOSGEN
)/Release_arm64 \
28 #- Top level -----------------------------------------------------------------
29 $(eval
$(call gb_CustomTarget_CustomTarget
,ios
/iOS_setup
))
31 $(call gb_CustomTarget_get_target
,ios
/iOS_setup
): $(IOSGEN
)/native-code.h
34 #- create directories --------------------------------------------------------
36 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),MKD
,2)
40 #- Generate resources --------------------------------------------------------
41 $(IOSGEN
)/native-code.h
: $(BUILDDIR
)/config_host.mk \
42 $(SRCDIR
)/ios
/CustomTarget_iOS_setup.mk \
43 $(SRCDIR
)/solenv
/bin
/native-code.py \
44 $(IOSGEN
) $(WORKDIR
)/ios \
46 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),EN2
,2)
48 # Secure LibreOffice.c get build if there are changes
49 rm -rf
$(WORKDIR
)/ios
/*
51 # generate native-code.h (used by LibreOffice.c)
52 $(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
/icudt60l.dat
$(IOSRES
)/icudt60l.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 cp
-R
$(INSTDIR
)/share
/config
/soffice.cfg
$(IOSRES
)/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
)/config
69 cp
$(SRCDIR
)/ios
/welcome.odt
$(IOSRES
)
71 # Set up rc (the "inifile", fundamentalrc, unorc, bootstraprc and versionrc.
73 && echo
'URE_BOOTSTRAP=file://$$APP_DATA_DIR/fundamentalrc' \
74 && echo
'HOME=$$SYSUSERHOME' \
78 && echo
'BRAND_BASE_DIR=file://$$APP_DATA_DIR' \
79 && echo
'BRAND_INI_DIR=file:://$$APP_DATA_DIR' \
80 && echo
'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
81 && echo
'##BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
82 && echo
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/registry ' \
83 'res:$${BRAND_BASE_DIR}/registry' \
84 && echo
'LO_LIB_DIR=file://$$APP_DATA_DIR/lib/' \
85 && echo
'UNO_TYPES=file://$$APP_DATA_DIR/udkapi.rdb ' \
86 'file://$$APP_DATA_DIR/offapi.rdb' \
87 && echo
'UNO_SERVICES=file://$$APP_DATA_DIR/services.rdb ' \
88 'file://$$APP_DATA_DIR/services/services.rdb' \
89 && echo
'OSL_SOCKET_PATH=$$APP_DATA_DIR/cache' \
90 ) > $(IOSRES
)/fundamentalrc
;
92 echo
'[Bootstrap]' > $(IOSRES
)/unorc
94 # bootstraprc must be in $BRAND_BASE_DIR/program
96 && echo
'InstallMode=<installmode>' \
97 && echo
"ProductKey=LibreOffice $(PRODUCTVERSION)" \
98 && echo
'UserInstallation=$$SYSUSERHOME/userinstallation' \
99 ) > $(IOSRES
)/program
/bootstraprc
102 && echo
'AllLanguages=en-US' \
103 && echo
'BuildVersion=' \
104 && echo
"buildid=$(BUILDID)" \
105 ) > $(IOSRES
)/program
/versionrc
108 #- clean ios -----------------------------------------------------------------
109 $(call gb_CustomTarget_get_clean_target
,ios
/iOS_setup
):
110 $(call gb_Output_announce
,$(subst $(WORKDIR
)/Clean
/,,$@
),$(false
),ENV
,2)
111 rm -rf
$(IOSRES
)/* $(IOSGEN
)/native-code.h
$(IOSGEN
)/build
112 rm -rf
$(WORKDIR
)/ios
114 # vim: set noet sw=4 ts=4: