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/.
10 instsetoo_ULFLIST
:= ActionTe \
19 $(eval
$(call gb_CustomTarget_CustomTarget
,instsetoo_native
/install))
21 $(eval
$(call gb_CustomTarget_register_targets
,instsetoo_native
/install,\
23 $(if
$(filter-out WNT
,$(OS
)),\
24 bin
/find-requires-gnome.sh \
25 bin
/find-requires-x11.sh
) \
26 $(foreach ulf
,$(instsetoo_ULFLIST
),win_ulffiles
/$(ulf
).ulf
) \
29 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/install.phony
: \
30 $(SOLARENV
)/bin
/make_installer.pl \
31 $(foreach ulf
,$(instsetoo_ULFLIST
),$(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/win_ulffiles
/$(ulf
).ulf
) \
32 $(if
$(filter-out WNT
,$(OS
)),\
33 $(addprefix $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/,\
34 bin
/find-requires-gnome.sh \
35 bin
/find-requires-x11.sh
) \
37 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
)
39 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/bin
/find-requires-
%.sh
: $(SRCDIR
)/instsetoo_native
/inc_openoffice
/unix
/find-requires-
%.sh
40 cat
$< | tr
-d
"\015" > $@
44 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/win_ulffiles
/%.ulf
: \
45 $(SRCDIR
)/instsetoo_native
/inc_openoffice
/windows
/msi_languages
/%.ulf | \
46 $(call gb_Executable_get_runtime_dependencies
,ulfex
) \
47 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
)
48 $(call gb_Output_announce
,$@
,$(true
),SUM
,1)
49 MERGEINPUT
=`$(gb_MKTEMP)` && \
50 echo
$(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/instsetoo_native
/inc_openoffice
/windows
/msi_languages.po
) > $${MERGEINPUT} && \
51 $(call gb_Helper_abbreviate_dirs
,\
52 $(call gb_Executable_get_command
,ulfex
) -i
$< -o
$@
-m
$${MERGEINPUT} -l
all ) && \
55 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/win_ulffiles
/%.ulf
: \
56 $(SRCDIR
)/instsetoo_native
/inc_openoffice
/windows
/msi_languages
/%.ulf \
57 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
)
61 export ENABLE_DOWNLOADSETS ?
= TRUE
63 export DONT_REMOVE_PACKAGE
:= TRUE
65 export instsetoo_OUT
:= $(WORKDIR
)/installation
66 export LOCAL_OUT
:= $(instsetoo_OUT
)
67 export LOCAL_COMMON_OUT
:= $(instsetoo_OUT
)
69 instsetoo_native_WITH_LANG
:= en-US
$(filter-out en-US
,$(gb_WITH_LANG
))
72 define instsetoo_native_msitemplates
74 TEMPLATE_DIR
=$(dir $@
)msi_templates \
75 && rm -rf
$${TEMPLATE_DIR} \
76 && mkdir
-p
$${TEMPLATE_DIR}/Binary \
77 && $(GNUCOPY
) $(SRCDIR
)/instsetoo_native
/inc_
$(1)/windows
/msi_templates
/*.
* $${TEMPLATE_DIR} \
78 && $(GNUCOPY
) $(SRCDIR
)/instsetoo_native
/inc_common
/windows
/msi_templates
/Binary
/*.
* $${TEMPLATE_DIR}/Binary
81 instsetoo_native_msitemplates
:=
84 define instsetoo_native_install_command
85 $(call instsetoo_native_msitemplates
,$(1))
87 $(foreach pkgformat
,$(5),\
89 -f
$(BUILDDIR
)/instsetoo_native
/util
/openoffice.lst \
90 -l
$(subst $(WHITESPACE
),$(COMMA
),$(strip $(2))) \
91 -p LibreOffice
$(if
$(filter TRUE
,$(ENABLE_RELEASE_BUILD
)),,_Dev
)$(3) \
93 -buildid
$(LIBO_VERSION_PATCH
) \
94 $(if
$(filter WNT
,$(OS
)), \
95 -msitemplate
$(dir $@
)msi_templates \
96 -msilanguage
$(dir $@
)win_ulffiles \
99 -format
$(pkgformat
) \
100 $(if
$(filter TRUE
,$(VERBOSE
)),-verbose
, \
101 $(if
$(findstring s
,$(MAKEFLAGS
)),-quiet
)) \
105 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/install.phony
:
106 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
107 rm -rf
$(instsetoo_OUT
)
108 ifeq (TRUE
,$(LIBO_DEV_INSTALL
))
109 $(call instsetoo_native_install_command
,openoffice
,en-US
,,,archive
)
110 unzip
-q
-d
$(DEVINSTALLDIR
) $(instsetoo_OUT
)/LibreOffice
$(if
$(filter TRUE
,$(ENABLE_RELEASE_BUILD
)),,_Dev
)/archive
/install/en-US
/LibreOffice
*_archive.zip
111 mv
$(DEVINSTALLDIR
)/LibreOffice
*_archive
/* $(DEVINSTALLDIR
)/opt
112 rmdir
$(DEVINSTALLDIR
)/LibreOffice
*_archive
113 ifeq (ODK
,$(filter ODK
,$(BUILD_TYPE
)))
114 $(call instsetoo_native_install_command
,sdkoo
,en-US
,_SDK
,,archive
)
115 unzip
-q
-d
$(DEVINSTALLDIR
) $(instsetoo_OUT
)/LibreOffice
$(if
$(filter TRUE
,$(ENABLE_RELEASE_BUILD
)),,_Dev
)_SDK
/archive
/install/en-US
/LibreOffice
*_archive_sdk.zip
116 mv
$(DEVINSTALLDIR
)/LibreOffice
*_archive_sdk
/LibreOffice
*_SDK
/sdk \
117 $(DEVINSTALLDIR
)/opt
/
118 rmdir
$(DEVINSTALLDIR
)/LibreOffice
*_archive_sdk
/LibreOffice
*_SDK
119 rmdir
$(DEVINSTALLDIR
)/LibreOffice
*_archive_sdk
121 else # LIBO_DEV_INSTALL
122 $(call instsetoo_native_install_command
,openoffice
,$(if
$(filter WNT
,$(OS
)),$(instsetoo_native_WITH_LANG
),en-US
),,,$(PKGFORMAT
))
123 ifeq (ODK
,$(filter ODK
,$(BUILD_TYPE
)))
124 $(call instsetoo_native_install_command
,sdkoo
,en-US
,_SDK
,,$(PKGFORMAT
))
126 ifeq (,$(filter WNT MACOSX
,$(OS
)))
127 $(call instsetoo_native_install_command
,not-used
,en-US
,_Test
,,$(PKGFORMAT
))
129 ifeq (HELP
,$(filter HELP
,$(BUILD_TYPE
))$(filter MACOSX
,$(OS
)))
130 $(foreach lang
,$(gb_HELP_LANGS
),\
131 $(call instsetoo_native_install_command
,ooohelppack
,$(lang
),,-helppack
,$(PKGFORMAT
)))
134 $(foreach lang
,$(instsetoo_native_WITH_LANG
),\
135 $(call instsetoo_native_install_command
,ooolangpack
,$(lang
),,-languagepack
,$(PKGFORMAT
)))
137 endif # LIBO_DEV_INSTALL
139 # vim: set noet sw=4 ts=4: