CppunitTest_sc_tiledrendering2: move to tiledrendering folder
[LibreOffice.git] / instsetoo_native / CustomTarget_install.mk
blob5c2bfd4ce462a46d595c0d3334825bfbdd6dc380
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 \
11 Control \
12 CustomAc \
13 Error \
14 LaunchCo \
15 Property \
16 RadioBut \
17 UIText
19 $(eval $(call gb_CustomTarget_CustomTarget,instsetoo_native/install))
21 $(eval $(call gb_CustomTarget_register_targets,instsetoo_native/install,\
22 install.phony \
23 $(if $(filter TRUE,$(WINDOWS_BUILD_SIGNING)),msi_signing.done) \
24 $(if $(filter-out WNT,$(OS)),\
25 bin/find-requires-gnome.sh \
26 bin/find-requires-x11.sh) \
27 $(foreach ulf,$(instsetoo_ULFLIST),win_ulffiles/$(ulf).ulf) \
30 .PHONY: $(gb_CustomTarget_workdir)/instsetoo_native/install/install.phony
32 $(gb_CustomTarget_workdir)/instsetoo_native/install/bin/find-requires-%.sh: $(SRCDIR)/instsetoo_native/inc_openoffice/unix/find-requires-%.sh
33 cat $< | tr -d "\015" > $@
34 chmod a+x $@
36 $(gb_CustomTarget_workdir)/instsetoo_native/install/win_ulffiles/%.ulf: \
37 | $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
39 $(eval $(call gb_CustomTarget_ulfex_rule,\
40 $(gb_CustomTarget_workdir)/instsetoo_native/install/win_ulffiles/%.ulf,\
41 $(SRCDIR)/instsetoo_native/inc_openoffice/windows/msi_languages/%.ulf,\
42 $(foreach lang,$(gb_TRANS_LANGS),\
43 $(gb_POLOCATION)/$(lang)/instsetoo_native/inc_openoffice/windows/msi_languages.po)))
45 export ENABLE_DOWNLOADSETS ?= TRUE
46 ifeq ($(OS),LINUX)
47 export DONT_REMOVE_PACKAGE := TRUE
48 endif
49 export instsetoo_OUT := $(WORKDIR)/installation
50 export LOCAL_OUT := $(instsetoo_OUT)
51 export LOCAL_COMMON_OUT := $(instsetoo_OUT)
53 ifeq (WNT,$(OS))
54 instsetoo_installer_langs := $(subst $(WHITESPACE),$(COMMA),$(strip en-US $(filter-out en-US,$(gb_WITH_LANG))))
55 else
56 instsetoo_installer_langs := en-US
57 endif
59 # delimiter is U+2027 Hyphenation point - files with colon in their name confuse the heck out of
60 # make and cannot be used as targets or prerequisites. For passing to call_installer.sh it is
61 # substituted by the : so that cut doesn't stumble over the delimiter
62 ifeq (TRUE,$(filter TRUE,$(LIBO_TEST_INSTALL) $(ENABLE_WIX)))
63 instsetoo_installer_targets = openoffice‧en-US‧‧‧archive‧nostrip
64 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
65 instsetoo_installer_targets += sdkoo‧en-US‧_SDK‧‧archive‧nostrip
66 endif
67 else
68 instsetoo_installer_targets := $(foreach pkgformat,$(PKGFORMAT),\
69 openoffice‧$(instsetoo_installer_langs)‧‧‧$(pkgformat)$(if $(filter-out archive,$(pkgformat)),strip,nostrip) \
70 $(if $(filter ODK,$(BUILD_TYPE)),sdkoo‧en-US‧_SDK‧‧$(pkgformat)‧nostrip) \
71 $(if $(and $(filter HELP,$(BUILD_TYPE)),$(filter-out MACOSX,$(OS))), \
72 $(foreach lang,$(gb_HELP_LANGS),ooohelppack‧$(lang)‧‧-helppack‧$(pkgformat)‧nostrip)) \
73 $(if $(filter-out WNT,$(OS)), \
74 $(foreach lang,$(filter-out en-US,$(gb_WITH_LANG)),ooolangpack‧$(lang)‧‧-languagepack‧$(pkgformat)‧nostrip)))
75 endif
77 LIBO_VERSION = $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)
79 instsetoo_wipe:
80 $(call gb_Output_announce,wiping installation output dir,$(true),WPE,6)
81 rm -rf $(instsetoo_OUT)
83 # list both as prerequisites so that make won't treat the $(template) one as intermediate /
84 # won't attempt to delete it after the $(template)/Binary and the rest of the chain was made
85 instsetoo_msi_templates: $(foreach template,openoffice ooohelppack sdkoo,$(addprefix \
86 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_templates/,$(template) $(template)/Binary))
88 # use awk instead of grep to not have to deal with grep exiting with error on files with no comments
89 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_templates/%: $(SRCDIR)/instsetoo_native/inc_%/windows/msi_templates/*.*
90 $(call gb_Output_announce,setting up msi templates for type $(@F),$(true),AWK,4)
91 rm -rf $@ && mkdir -p $@ && cd $@ $(foreach file,$(^F),&& awk '!/^#/{print}' $(<D)/$(file) > $(file))
93 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_templates/%/Binary: $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* \
94 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_templates/%
95 $(call gb_Output_announce,setting up msi templates for type $* - copying binary assets,$(true),CPY,4)
96 rm -rf $@ && mkdir -p $@ && cd $@ && cp $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* ./
98 gb_Make_JobLimiter := $(WORKDIR)/job-limiter.exe
100 $(gb_Make_JobLimiter): $(SRCDIR)/solenv/bin/job-limiter.cpp
101 cd $(WORKDIR) && \
102 $(CXX_FOR_BUILD) $(SOLARINC) -EHsc $^ -link -LIBPATH:$(subst ;, -LIBPATH:,$(ILIB_FOR_BUILD)) || rm -f $@
104 # with all languages the logfile name would be too long when building the windows installation set,
105 # that's the reason for the substitution to multilang below in case more than just en-US is packaged
106 # also for windows msi packaging parallel execution is reduced by the job-limiter. This only has any
107 # effect when building with help and multiple languages, and it also won't affect the real time for
108 # packaging (since packaging the main installer takes longer than packaging sdk and all helppacks
109 # even with the reduced parallelism (the higher the parallelism, the higher the chance for random
110 # failures during the cscript call to WiLangId.vbs)
111 $(instsetoo_installer_targets): $(SRCDIR)/solenv/bin/make_installer.pl \
112 $(foreach ulf,$(instsetoo_ULFLIST),$(gb_CustomTarget_workdir)/instsetoo_native/install/win_ulffiles/$(ulf).ulf) \
113 $(if $(filter-out WNT,$(OS)),\
114 $(addprefix $(gb_CustomTarget_workdir)/instsetoo_native/install/,\
115 bin/find-requires-gnome.sh \
116 bin/find-requires-x11.sh) \
117 ,instsetoo_msi_templates) \
118 $(call gb_Postprocess_get_target,AllModulesButInstsetNative) \
119 | instsetoo_wipe $(if $(filter msi,$(PKGFORMAT)),$(gb_Make_JobLimiter))
120 $(call gb_Output_announce,$(if $(filter en-US$(COMMA)%,$(instsetoo_installer_langs)),$(subst $(instsetoo_installer_langs),multilang,$@),$@),$(true),INS,1)
121 $(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) grab)
122 $(call gb_Trace_StartRange,$@,INSTALLER)
123 $(call gb_Helper_print_on_error, \
124 $(if $(MSYSTEM),export PERLIO=:unix PERL=$(STRAWBERRY_PERL) &&) \
125 $(SRCDIR)/solenv/bin/call_installer.sh $(if $(verbose),-verbose,-quiet) $(subst,:,$@),\
126 $(gb_CustomTarget_workdir)/instsetoo_native/install/$(if $(filter en-US$(COMMA)%,$(instsetoo_installer_langs)),$(subst $(instsetoo_installer_langs),multilang,$@),$@).log)
127 $(if $(filter %msi‧nostrip,$@),$(gb_Make_JobLimiter) release)
128 $(call gb_Trace_EndRange,$@,INSTALLER)
130 $(gb_CustomTarget_workdir)/instsetoo_native/install/install.phony: $(instsetoo_installer_targets)
131 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
132 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
133 $(if $(ENABLE_WIX),$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/msicreator/create_installer.py $(BUILDDIR) $(SRCDIR) $(LIBO_VERSION) $(PRODUCTNAME_WITHOUT_SPACES))
134 ifeq (TRUE,$(LIBO_TEST_INSTALL))
135 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_WITHOUT_SPACES)/archive/install/en-US/LibreOffice*_archive.zip
136 mv $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*/* $(TESTINSTALLDIR)/
137 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*
138 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive
139 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
140 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_WITHOUT_SPACES)_SDK/archive/install/en-US/LibreOffice*_archive_sdk.zip
141 mv $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK/sdk \
142 $(TESTINSTALLDIR)/
143 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK
144 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk
145 endif
146 endif # LIBO_TEST_INSTALL
147 touch $@
148 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
150 TIMESTAMPURL ?= "http://timestamp.globalsign.com/scripts/timestamp.dll"
151 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_signing.done: \
152 $(if $(filter HELP,$(BUILD_TYPE)),$(gb_CustomTarget_workdir)/instsetoo_native/install/msi_helppack_signing.done) \
153 $(if $(filter ODK,$(BUILD_TYPE)),$(gb_CustomTarget_workdir)/instsetoo_native/install/msi_sdk_signing.done) \
154 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_main_signing.done
155 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
156 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
157 touch $@
158 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
160 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_helppack_signing.done \
161 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_sdk_signing.done \
162 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_main_signing.done \
163 : $(SRCDIR)/postprocess/signing/signing.pl $(gb_CustomTarget_workdir)/instsetoo_native/install/install.phony
165 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_main_signing.done:
166 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
167 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
168 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
169 -l $(subst .done,_log.txt,$@) \
170 $(if $(verbose),-v) \
171 $(if $(PFXFILE),-f $(PFXFILE)) \
172 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
173 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
174 -d $(PRODUCTNAME_WITHOUT_SPACES)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH) \
175 $(WORKDIR)/installation/$(PRODUCTNAME_WITHOUT_SPACES)/msi/install/*/*.msi \
176 && touch $@
177 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
179 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_helppack_signing.done:
180 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
181 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
182 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
183 -l $(subst .done,_log.txt,$@) \
184 $(if $(verbose),-v) \
185 $(if $(PFXFILE),-f $(PFXFILE)) \
186 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
187 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
188 -d $(PRODUCTNAME_WITHOUT_SPACES)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\ Helppack \
189 $(WORKDIR)/installation/$(PRODUCTNAME_WITHOUT_SPACES)_helppack/msi/install/*/*.msi \
190 && touch $@
191 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
193 $(gb_CustomTarget_workdir)/instsetoo_native/install/msi_sdk_signing.done:
194 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
195 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
196 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
197 -l $(subst .done,_log.txt,$@) \
198 $(if $(verbose),-v) \
199 $(if $(PFXFILE),-f $(PFXFILE)) \
200 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
201 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
202 -d $(PRODUCTNAME_WITHOUT_SPACES)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\ SDK \
203 $(WORKDIR)/installation/$(PRODUCTNAME_WITHOUT_SPACES)_SDK/msi/install/*/*.msi \
204 && touch $@
205 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
207 # vim: set noet sw=4 ts=4: