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
18 $(call gb_Helper_print_on_error
, \
20 -project experimental
/TiledLibreOffice
/TiledLibreOffice.xcodeproj \
21 -target TiledLibreOffice \
22 -sdk
$(XCODEBUILD_SDK
) \
23 -arch
$(XCODE_ARCHS
) \
24 -configuration
$(if
$(ENABLE_DEBUG
),Debug
,Release
) \
30 #- Targets --------------------------------------------------------------------
32 .PHONY
: TiledLibreOffice_setup
35 $(eval
$(call gb_CustomTarget_CustomTarget
,ios
/TiledLibreOffice
))
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 \
43 > $(SRCDIR
)/ios
/experimental
/TiledLibreOffice
/TiledLibreOffice
/native-code.mm
44 $(call TiledLibreOfficeXcodeBuild
, clean build
)
47 TiledLibreOffice_setup
:
48 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ENV
,2)
51 rm -rf
$(TiledLibreOffice_resource
) 2>/dev
/null
52 mkdir
-p
$(TiledLibreOffice_resource
)
53 mkdir
-p
$(TiledLibreOffice_resource
)/services
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
)
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
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
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;
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: