1 | # $Id: Makefile.kmk 79439 2019-07-01 14:51:04Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows installer.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2019 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifneq ($(KBUILD_HOST),win)
|
---|
22 | $(error "The Windows installer can only be built on Windows!")
|
---|
23 | endif
|
---|
24 |
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Include Sub-Makefiles.
|
---|
28 | #
|
---|
29 | include $(PATH_SUB_CURRENT)/InstallHelper/Makefile.kmk
|
---|
30 |
|
---|
31 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
32 | include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
|
---|
33 | include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
|
---|
34 | endif
|
---|
35 |
|
---|
36 | include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
|
---|
37 | ifdef VBOX_WITH_MSI_HACK
|
---|
38 | include $(PATH_SUB_CURRENT)/MsiHack/Makefile.kmk
|
---|
39 | endif
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | #
|
---|
44 | # Globals.
|
---|
45 | #
|
---|
46 | # Tip: Use VBOX_CAB_COMPRESSION_LEVEL=none on the kmk command line when working
|
---|
47 | # on the installer.
|
---|
48 | #
|
---|
49 | VBOX_WIN_INST_MAKEFILE_DEP := $(MAKEFILE_CURRENT)
|
---|
50 | VBOX_CAB_COMPRESSION_LEVEL := high
|
---|
51 |
|
---|
52 | VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
53 | VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
|
---|
54 | VBOX_WIN_INST_REPACK_DIR := $(PATH_OUT)/repack
|
---|
55 |
|
---|
56 | # Note: en_US *must* come first for the dependency file generation.
|
---|
57 | ifndef VBOX_INSTALLER_LANGUAGES
|
---|
58 | VBOX_INSTALLER_LANGUAGES = en_US de_DE el_GR fr_FR it_IT tr_TR zh_TW zh_CN
|
---|
59 | VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
|
---|
60 | endif
|
---|
61 |
|
---|
62 |
|
---|
63 | #
|
---|
64 | # List of merge modules to use.
|
---|
65 | #
|
---|
66 | VBOX_INSTALLER_MERGE_MODULES = App USB NetAdp NetFlt NetAdp6 NetLwf Python
|
---|
67 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
68 | VBOX_INSTALLER_MERGE_MODULES += COM32On64
|
---|
69 | endif
|
---|
70 |
|
---|
71 | # We only ship the merge modules in locale en_US for the moment.
|
---|
72 | ifdef VBOX_WITH_MSM_INSTALL
|
---|
73 | VBOX_INSTALLER_LANGUAGES := en_US
|
---|
74 | VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES)
|
---|
75 | endif
|
---|
76 |
|
---|
77 | #
|
---|
78 | # Language IDs (LCID, decimal)
|
---|
79 | #
|
---|
80 | VBOX_BRAND_en_US_LANG_ID ?= 1033
|
---|
81 | VBOX_BRAND_de_DE_LANG_ID ?= 1031
|
---|
82 | VBOX_BRAND_el_GR_LANG_ID ?= 1032
|
---|
83 | VBOX_BRAND_fa_IR_LANG_ID ?= 1065
|
---|
84 | VBOX_BRAND_fr_FR_LANG_ID ?= 1036
|
---|
85 | VBOX_BRAND_it_IT_LANG_ID ?= 1040
|
---|
86 | VBOX_BRAND_tr_TR_LANG_ID ?= 1055
|
---|
87 | VBOX_BRAND_zh_TW_LANG_ID ?= 1028
|
---|
88 | VBOX_BRAND_zh_CN_LANG_ID ?= 2052
|
---|
89 |
|
---|
90 | # Standard language names (in the native language), to be extended as we go.
|
---|
91 | # VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs
|
---|
92 | # in either VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES.
|
---|
93 | VBOX_BRAND_en_US_LANG_NAME := English
|
---|
94 | VBOX_BRAND_de_DE_LANG_NAME := Deutsch
|
---|
95 | VBOX_BRAND_el_GR_LANG_NAME := Ελληνικά
|
---|
96 | VBOX_BRAND_fr_FR_LANG_NAME := Français
|
---|
97 | VBOX_BRAND_it_IT_LANG_NAME := Italiano
|
---|
98 | VBOX_BRAND_tr_TR_LANG_NAME := Türkçe
|
---|
99 | VBOX_BRAND_zh_TW_LANG_NAME := 正體中文
|
---|
100 | VBOX_BRAND_zh_CN_LANG_NAME := 简体中文
|
---|
101 |
|
---|
102 |
|
---|
103 | #
|
---|
104 | # We don't have the license text in another language than English yet,
|
---|
105 | # so just define the branding targets to use the English one for now.
|
---|
106 | # The installer generation assumes that there is a translation for each
|
---|
107 | # of VBOX_INSTALLER_LANGUAGES.
|
---|
108 | #
|
---|
109 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
110 | $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)))
|
---|
111 |
|
---|
112 | #
|
---|
113 | # Set the codepage for all languages to 1252, covers most cases.
|
---|
114 | #
|
---|
115 | $(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \
|
---|
116 | $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
|
---|
117 | # Exceptions:
|
---|
118 | VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
|
---|
119 | VBOX_BRAND_zh_CN_LANGUAGE_CODEPAGE := 936
|
---|
120 | VBOX_BRAND_fa_IR_LANGUAGE_CODEPAGE := 1256
|
---|
121 | VBOX_BRAND_tr_TR_LANGUAGE_CODEPAGE := 1254
|
---|
122 |
|
---|
123 | #
|
---|
124 | # If we want to build a combined package, we separate all common stuff
|
---|
125 | # (that is all 100% identical content between 32-/64-bit builds)
|
---|
126 | # into an own .cab file to save space. This .cab file then gets included
|
---|
127 | # and used by the 32-/64-bit installers.
|
---|
128 | #
|
---|
129 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
130 | VBOX_INSTALLER_COMMON_DISKID := 2
|
---|
131 | else
|
---|
132 | VBOX_INSTALLER_COMMON_DISKID := 1
|
---|
133 | endif
|
---|
134 |
|
---|
135 | ## @todo VBOX_ prefixes!
|
---|
136 | PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
|
---|
137 | PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
|
---|
138 | PACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi
|
---|
139 |
|
---|
140 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
141 | PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
|
---|
142 | PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
143 | PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
|
---|
144 | PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
|
---|
145 | PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
|
---|
146 | PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
|
---|
147 | PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
|
---|
148 | # Always take the common.cab from the amd64 build, as it
|
---|
149 | # might contain certain files for x86 compatibility such
|
---|
150 | # as our 32-on-64-bit COM stuff.
|
---|
151 | PACKAGE_NAME_MULTIARCH_COMMONCAB := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/obj/Installer/win/common.cab
|
---|
152 |
|
---|
153 | BLDDIRS += $(PATH_MULTIARCH_TEMP)
|
---|
154 | PACKING += $(PACKAGE_NAME_FINAL)
|
---|
155 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
156 | PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
|
---|
157 | endif
|
---|
158 | else
|
---|
159 | PACKING += $(PACKAGE_NAME_FINAL)
|
---|
160 | endif
|
---|
161 | BLDDIRS += \
|
---|
162 | $(VBOX_WIN_INST_OUT_DIR) \
|
---|
163 | $(VBOX_WIN_INST_REPACK_DIR)/ \
|
---|
164 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
165 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/ \
|
---|
166 | $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )\
|
---|
167 | $(VBOX_WIN_INST_OUT_DIR)/NLS/
|
---|
168 |
|
---|
169 | OTHER_CLEAN += \
|
---|
170 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
|
---|
171 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wix \
|
---|
172 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox.wix \
|
---|
173 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
|
---|
174 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
175 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi \
|
---|
176 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_ProxyStub.wxi \
|
---|
177 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
178 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
179 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
180 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
181 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
182 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
183 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
|
---|
184 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
|
---|
185 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
186 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
|
---|
187 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
|
---|
188 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep \
|
---|
189 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix \
|
---|
190 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files \
|
---|
191 | $(VBOX_WIN_INST_REPACK_DIR)/2-link-$(PACKAGE_NAME_LANG).cmd \
|
---|
192 | $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/Language_$(lang).wxl \
|
---|
193 | $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/License_$(lang).wxl )\
|
---|
194 | $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
|
---|
195 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
|
---|
196 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
197 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
|
---|
198 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
199 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
|
---|
200 | $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd
|
---|
201 |
|
---|
202 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
203 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
204 | OTHER_CLEAN += \
|
---|
205 | $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
|
---|
206 | $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd \
|
---|
207 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86)
|
---|
208 | endif
|
---|
209 | ifndef VBOX_WITH_MSM_INSTALL
|
---|
210 | OTHER_CLEAN += \
|
---|
211 | $(VBOX_WIN_INST_OUT_DIR)/common.cab
|
---|
212 | endif
|
---|
213 | else
|
---|
214 | OTHER_CLEAN += \
|
---|
215 | $(PACKAGE_NAME_FINAL)
|
---|
216 | endif
|
---|
217 |
|
---|
218 | ifdef VBOX_WITH_MSM_INSTALL
|
---|
219 | OTHER_CLEAN += \
|
---|
220 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
221 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
222 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm \
|
---|
223 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
|
---|
224 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj.dep \
|
---|
225 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb \
|
---|
226 | $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix \
|
---|
227 | $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files)
|
---|
228 | BLDDIRS += $foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
229 | $(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/)
|
---|
230 | endif
|
---|
231 |
|
---|
232 | #
|
---|
233 | # Suppress/skip the following ICE (Internal Consistency Evaluators):
|
---|
234 | # - ICE64: Checks that new directories in the user profile are removed correctly in roaming scenarios.
|
---|
235 | # -> We don't want to remove system folders (like "Microsoft/Internet Explorer/Quick Launch").
|
---|
236 | # - ICE69: Checks if file references are within the same component.
|
---|
237 | # -> We reference to files within different components, but these components are installed using
|
---|
238 | # the same feature, so that's fine.
|
---|
239 | #
|
---|
240 | VBOX_MSI_ICE_IGNORE := \
|
---|
241 | -ice:64 \
|
---|
242 | -ice:69
|
---|
243 |
|
---|
244 | #
|
---|
245 | # Create intermediate XML file for languages (needed for .MSI linking).
|
---|
246 | #
|
---|
247 | # Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
|
---|
248 | # to escape the expansion of the $(eval ) argument and then the definition of the
|
---|
249 | # rule. The statement is finally expanded during second dependency expansion, which
|
---|
250 | # takes place after all makefiles has been loaded and with the @ variable defined.
|
---|
251 | #
|
---|
252 | define def_vbox_lang_xml
|
---|
253 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@)
|
---|
254 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
255 | $(QUIET)$(INSTALL) -m 0644 $$< $$@
|
---|
256 | endef
|
---|
257 |
|
---|
258 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
259 | $(eval $(def_vbox_lang_xml)))
|
---|
260 |
|
---|
261 | #
|
---|
262 | # Create intermediate XML file for licenses (needed for .MSI linking).
|
---|
263 | # These files are created from the original .RTF files in the /docs directory.
|
---|
264 | #
|
---|
265 | # Note: The redirect command below will open $$@ as stdout in append+text mode
|
---|
266 | # and then exec cat, thus appending the license file to the result file.
|
---|
267 | #
|
---|
268 | # Note: The license_file variable has to be created before def_vbox_license_xml
|
---|
269 | # is expanded by the 2nd eval because we rely on the that expansion
|
---|
270 | # replacing all $(license_file) (and $(lang)) references before evaluation.
|
---|
271 | #
|
---|
272 | # Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
|
---|
273 | # between the tag and the RTF license text.
|
---|
274 | #
|
---|
275 | define def_vbox_license_xml
|
---|
276 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(VBOX_WIN_INST_MAKEFILE_DEP) | $$$$(dir $$$$@)
|
---|
277 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
278 | $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
|
---|
279 | $(APPEND) $$@ '<WixLocalization xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="$(VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE)" Culture="$(lang)">'
|
---|
280 |
|
---|
281 | $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id="LicenseText">'
|
---|
282 | $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\<|g" -e "s|>|\>|g" $(license_file)
|
---|
283 | $(APPEND) $$@ '</String>'
|
---|
284 |
|
---|
285 | $(APPEND) $$@ '<String Id="LicenseFile">$(license_file)</String>'
|
---|
286 | $(APPEND) $$@ '<String Id="LicenseInstallFileLong">License_$(lang).rtf</String>'
|
---|
287 | $(APPEND) $$@ '<String Id="LicenseInstallFileShort">L_$(lang).rtf</String>'
|
---|
288 |
|
---|
289 | $(APPEND) $$@ '</WixLocalization>'
|
---|
290 | endef
|
---|
291 |
|
---|
292 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
293 | $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
|
---|
294 | $(eval $(def_vbox_license_xml)))
|
---|
295 |
|
---|
296 | #
|
---|
297 | # Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
|
---|
298 | # This file includes all language-specific files (PDFs, CHMs, ...) to install.
|
---|
299 | #
|
---|
300 | # Note: When using the -n switch, append will append a new line after each
|
---|
301 | # argument. The -t switch makes it truncate the file.
|
---|
302 | #
|
---|
303 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
|
---|
304 | $(call MSG_GENERATE,,$@,$<)
|
---|
305 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
306 | $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
|
---|
307 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
308 | $(APPEND) $@ ' <File Id="file_VirtualBox.chm" Name="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/VirtualBox.chm)"></File>'
|
---|
309 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
310 | ' <File Id="file_VirtualBox_$(lang).chm" Name="VirtualBox_$(lang).chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/VirtualBox_$(lang).chm)"></File>')
|
---|
311 | endif
|
---|
312 | $(APPEND) $@ '</Include>'
|
---|
313 |
|
---|
314 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
|
---|
315 | $(call MSG_GENERATE,,$@,$<)
|
---|
316 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
317 | $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
|
---|
318 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
319 | $(APPEND) $@ ' <File Id="file_UserManual.pdf" Name="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/UserManual.pdf)">'
|
---|
320 | $(APPEND) $@ ' </File>'
|
---|
321 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
322 | ' <File Id="file_UserManual_$(lang).pdf" Name="UserManual_$(lang).pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/UserManual_$(lang).pdf)">' \
|
---|
323 | ' </File>')
|
---|
324 | endif
|
---|
325 | $(APPEND) $@ '</Include>'
|
---|
326 |
|
---|
327 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
|
---|
328 | $(call MSG_GENERATE,,$@,$<)
|
---|
329 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
330 | $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
|
---|
331 | $(APPEND) $@ ' <File Id="file_License_en_US.rtf" Name="License_en_US.rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))">' \
|
---|
332 | ' </File>'
|
---|
333 | $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
|
---|
334 | ' <File Id="file_License_$(lang).rtf" Name="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(VBOX_BRAND_$(lang)_LICENSE_RTF))">' \
|
---|
335 | ' </File>')
|
---|
336 | $(APPEND) $@ '</Include>'
|
---|
337 |
|
---|
338 | $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) $(PATH_SUB_CURRENT)/../Config.kmk | $$(dir $$@)
|
---|
339 | $(call MSG_GENERATE,,$@,$<)
|
---|
340 | $(QUIET)$(APPEND) -nt "$@" \
|
---|
341 | '<?xml version="1.0" ?>' \
|
---|
342 | '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
|
---|
343 | ifdef VBOX_WITH_DTRACE
|
---|
344 | $(QUIET)$(APPEND) -n "$@" \
|
---|
345 | '<Directory Id="dir_DTrace" Name="dtrace">' \
|
---|
346 | ' <Directory Id="dir_DTrace_lib" Name="lib">' \
|
---|
347 | ' <Directory Id="dir_DTrace_lib_arch" Name="$(KBUILD_TARGET_ARCH)">' \
|
---|
348 | ' <Component Id="cp_dir_DTrace_lib_arch" Guid="7476CDF6-4157-2E17-5CCC-FF92528D2854" Win64="$$(var.Property_Win64)">' \
|
---|
349 | $(foreach file, $(VBOXINST_DTRACE_LIB_ARCH_FILES) \
|
---|
350 | , ' <File Id="file_dtrace_lib_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
|
---|
351 | ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/lib/$(KBUILD_TARGET_ARCH)/$(file))" />' ) \
|
---|
352 | ' </Component>' \
|
---|
353 | ' </Directory>' \
|
---|
354 | ' </Directory>' \
|
---|
355 | $(if $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
|
---|
356 | ' <Directory Id="dir_DTrace_testcase" Name="testcase">' \
|
---|
357 | ' <Directory Id="dir_DTrace_testcase_arch" Name="$(KBUILD_TARGET_ARCH)">' \
|
---|
358 | ' <Component Id="cp_dir_DTrace_testcase_arch" Guid="45DF7014-4431-6C40-6DB0-35AF7C690EE1" Win64="$$(var.Property_Win64)">' \
|
---|
359 | $(foreach file, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES) \
|
---|
360 | , ' <File Id="file_dtrace_testcase_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
|
---|
361 | ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/testcase/$(KBUILD_TARGET_ARCH)/$(file))" />' ) \
|
---|
362 | ' </Component>' \
|
---|
363 | ' </Directory>' \
|
---|
364 | ' </Directory>') \
|
---|
365 | $(if $(VBOXINST_DTRACE_SCRIPTS_FILES), \
|
---|
366 | ' <Directory Id="dir_DTrace_scripts" Name="scripts">' \
|
---|
367 | ' <Component Id="cp_dir_DTrace_scripts" Guid="AE07F9D5-4FD9-ACC7-C760-E9923CE01E16" Win64="$$(var.Property_Win64)">' \
|
---|
368 | $(foreach file, $(VBOXINST_DTRACE_SCRIPTS_FILES) \
|
---|
369 | , ' <File Id="file_dtrace_scripts_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
|
---|
370 | ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/scripts/$(file))" />' ) \
|
---|
371 | ' </Component>' \
|
---|
372 | ' </Directory>') \
|
---|
373 | '</Directory>'
|
---|
374 | endif
|
---|
375 | $(QUIET)$(APPEND) "$@" '</Include>'
|
---|
376 |
|
---|
377 |
|
---|
378 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
|
---|
379 | $(call MSG_GENERATE,,$@,$<)
|
---|
380 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
381 | $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
|
---|
382 | #
|
---|
383 | # Documentation (PDF/CHM)
|
---|
384 | #
|
---|
385 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
386 | $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualCHM_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, English)" Description="!(loc.StartMenu_UserManual)"' \
|
---|
387 | ' Target="[INSTALLDIR]\VirtualBox.chm" WorkingDirectory="dir_Documents" Advertise="no"/>'
|
---|
388 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
389 | ' <Shortcut Id="sc_StartMenu_ManualCHM_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
|
---|
390 | ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\VirtualBox_$(lang).chm" WorkingDirectory="dir_Documents"/>')
|
---|
391 | endif
|
---|
392 | $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
|
---|
393 | ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_Documents" Advertise="no"/>'
|
---|
394 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
395 | ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
|
---|
396 | ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_Documents"/>')
|
---|
397 | #
|
---|
398 | # License(s) (RTF)
|
---|
399 | #
|
---|
400 | $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
|
---|
401 | ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
|
---|
402 | $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
|
---|
403 | ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
|
---|
404 | ' Description="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
|
---|
405 | $(APPEND) $@ '</Include>'
|
---|
406 |
|
---|
407 | #
|
---|
408 | # .MSI linking of the main installer (en_US).
|
---|
409 | #
|
---|
410 | # Note: This will clean up any previous .msi and .wixpdb files to prevent dep
|
---|
411 | # build boxes from filling up with old files.
|
---|
412 | #
|
---|
413 | define def_vbox_link_msi
|
---|
414 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
415 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \
|
---|
416 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
|
---|
417 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
418 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
419 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
420 | $(VBOX_SVN_REV_KMK) \
|
---|
421 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
422 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
|
---|
423 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
424 | | $$$$(dir $$$$@)
|
---|
425 | $$(call MSG_L1,Linking installer $$@)
|
---|
426 | $(QUIET)$(RM) -f $$(wildcard $$(subst r$$(VBOX_SVN_REV),r*,\
|
---|
427 | $$@ \
|
---|
428 | $$(basename $$@).wixpdb \
|
---|
429 | $$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd ))
|
---|
430 | kmk_time $(VBOX_PATH_WIX)/light.exe -v -nologo \
|
---|
431 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
432 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
433 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
434 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
435 | $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
436 | $(VBOX_MSI_ICE_IGNORE) \
|
---|
437 | -out $$@ \
|
---|
438 | $$< \
|
---|
439 | $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
|
---|
440 | if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL)
|
---|
441 | $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab
|
---|
442 | endif
|
---|
443 | ifeq ($(lang),en_US)
|
---|
444 | $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl" "$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl" \
|
---|
445 | "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"
|
---|
446 | # Create repack script for this step.
|
---|
447 | $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd" \
|
---|
448 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
449 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
450 | '$(VBOX_PATH_WIX)/light.exe -v -nologo ^' \
|
---|
451 | ' -loc files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
|
---|
452 | ' -loc files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
|
---|
453 | ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^' \
|
---|
454 | ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
|
---|
455 | $(if-expr defined(VBOX_WITH_MSI_HACK),'-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll ^',) \
|
---|
456 | ' $(VBOX_MSI_ICE_IGNORE) ^' \
|
---|
457 | ' -out $$(@F) ^' \
|
---|
458 | ' $$(<F) ^' \
|
---|
459 | ' $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib ^' \
|
---|
460 | ' || exit /b1' \
|
---|
461 | ) \
|
---|
462 | '@echo Created MSI installer: $$(@F)' \
|
---|
463 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL),'@echo Created: common.cab',)
|
---|
464 |
|
---|
465 | endif
|
---|
466 | endef
|
---|
467 |
|
---|
468 | $(foreach lang, en_US, $(eval $(def_vbox_link_msi)))
|
---|
469 |
|
---|
470 |
|
---|
471 | #
|
---|
472 | # Merge module linking (all languages).
|
---|
473 | #
|
---|
474 | # Note: This will clean up any previous .msm to prevent dep build boxes from
|
---|
475 | # filling up with old files.
|
---|
476 | #
|
---|
477 | define def_vbox_link_msm
|
---|
478 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm: \
|
---|
479 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
|
---|
480 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
481 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
482 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
483 | $(VBOX_SVN_REV_KMK) \
|
---|
484 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
485 | | $$$$(dir $$$$@)
|
---|
486 | $$(call MSG_L1,Linking installer $$@)
|
---|
487 | $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
|
---|
488 | $(VBOX_PATH_WIX)/light.exe -v -nologo \
|
---|
489 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
490 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
491 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
492 | $(VBOX_MSI_ICE_IGNORE) \
|
---|
493 | -out $$@ \
|
---|
494 | $$< \
|
---|
495 | $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
|
---|
496 | $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
|
---|
497 | $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
|
---|
498 | # Create repack script for this step.
|
---|
499 | $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/2-link-VBoxMerge$(module)_$(lang).cmd" \
|
---|
500 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
501 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
502 | '$(VBOX_PATH_WIX)/light.exe -v -nologo ^' \
|
---|
503 | ' -loc files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
|
---|
504 | ' -loc files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
|
---|
505 | ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
|
---|
506 | ' $(VBOX_MSI_ICE_IGNORE) ^' \
|
---|
507 | ' -out $$(@F) ^' \
|
---|
508 | ' $$(<F) ^' \
|
---|
509 | ' $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib ^' \
|
---|
510 | ' || exit /b1' \
|
---|
511 | 'call sign-sha1.cmd $$(@F) || exit /b1' \
|
---|
512 | ) \
|
---|
513 | '@echo Created MSM module: $$(@F)'
|
---|
514 | endef
|
---|
515 |
|
---|
516 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
517 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
518 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
519 | $(eval $(def_vbox_link_msm)))),)
|
---|
520 |
|
---|
521 |
|
---|
522 | #
|
---|
523 | # Add dependencies that makes sure necessary bits gets built.
|
---|
524 | # For combined packages we always use the .ISO from the amd64 build.
|
---|
525 | #
|
---|
526 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
527 | VBOX_MSI_DEPENDENCIES := \
|
---|
528 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
|
---|
529 | else
|
---|
530 | VBOX_MSI_DEPENDENCIES := \
|
---|
531 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
|
---|
532 | endif
|
---|
533 |
|
---|
534 | #
|
---|
535 | # A few manual dependencies to make sure everything is rebuilt when they should.
|
---|
536 | #
|
---|
537 | $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
|
---|
538 | $(PATH_SUB_CURRENT)/CommonProperties.wxi \
|
---|
539 | $(PATH_SUB_CURRENT)/Defines.wxi \
|
---|
540 | $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
|
---|
541 |
|
---|
542 | $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
|
---|
543 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
544 | $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
|
---|
545 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
|
---|
546 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
|
---|
547 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
548 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
|
---|
549 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
550 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
|
---|
551 |
|
---|
552 | #
|
---|
553 | # MSI compile.
|
---|
554 | # We've separated the processing from the compilation for repacking reasons.
|
---|
555 | #
|
---|
556 | define def_vbox_compile_wixobj
|
---|
557 | includedep $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep
|
---|
558 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
|
---|
559 | + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
|
---|
560 | $(if-expr "$(lang)" != "en_US",, \
|
---|
561 | + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files ): \
|
---|
562 | $(PATH_SUB_CURRENT)/VirtualBox.wxs \
|
---|
563 | $(PATH_SUB_CURRENT)/UserInterface.wxi \
|
---|
564 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
565 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
566 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm), \
|
---|
567 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
568 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
569 | $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
|
---|
570 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
571 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
572 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
573 | $(VBOX_MSI_DEPENDENCIES)) \
|
---|
574 | $(VBOX_VERSION_STAMP) \
|
---|
575 | | $$$$(dir $$$$@) $(if-expr "$(lang)" != "en_US",, \
|
---|
576 | $(VBOX_WIN_INST_REPACK_DIR)/ $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )
|
---|
577 | $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix"
|
---|
578 | $(REDIRECT) \
|
---|
579 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
580 | -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
581 | -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
|
---|
582 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
583 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
584 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
585 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
586 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
587 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
588 | -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
|
---|
589 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
590 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
591 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
592 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
593 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
594 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
595 | -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
|
---|
596 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
597 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
598 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
599 | -E 'VBOX_CAB_COMPRESSION_LEVEL=$(if-expr $(lang) == "en_US",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
|
---|
600 | -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(if-expr $(lang) == "en_US" && $(KBUILD_TARGET_ARCH) == "amd64",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
|
---|
601 | -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
|
---|
602 | -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
|
---|
603 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
604 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
605 | -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm')),) \
|
---|
606 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
607 | -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
|
---|
608 | -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
|
---|
609 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
610 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
611 | -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
|
---|
612 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
613 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
614 | -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
|
---|
615 | -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
|
---|
616 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
617 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
618 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
619 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
620 | -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
|
---|
621 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
622 | -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
|
---|
623 | -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
|
---|
624 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
625 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
626 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
627 | -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
|
---|
628 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
629 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
630 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
631 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
632 | -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
|
---|
633 | -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
|
---|
634 | -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
635 | -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
636 | -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
|
---|
637 | -- \
|
---|
638 | $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
|
---|
639 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
640 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
641 | -p$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix
|
---|
642 | $(VBOX_PATH_WIX)/candle.exe $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
|
---|
643 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
644 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
645 | -out $$@
|
---|
646 | ifeq ($(lang),en_US)
|
---|
647 | # Copy preprocessed wix and change source paths to be relative. Stuff not in ../bin needs copying.
|
---|
648 | $(SED) -e 's,$(subst /,\\,$(PATH_OUT))\\bin,..\\bin,g' \
|
---|
649 | -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.amd64\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.amd64\\$(KBUILD_TYPE)\\bin,g' \
|
---|
650 | -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.x86\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.x86\\$(KBUILD_TYPE)\\bin,g' \
|
---|
651 | \
|
---|
652 | -e 's,$(subst /,\\,$(PATH_ROOT))\\doc\\,files-VirtualBox_$(lang)\\,g' \
|
---|
653 | -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\Binary\\,files-VirtualBox_$(lang)\\,g' \
|
---|
654 | -e 's,$(subst /,\\,$(VBOX_WIN_INST_OUT_DIR))\\,,g' \
|
---|
655 | -e 's,$(subst /,\\,$(dir $(VBOX_WINDOWS_ICON_FILE))),files-VirtualBox_$(lang)\\,g' \
|
---|
656 | --output "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix" \
|
---|
657 | "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix"
|
---|
658 | $(SED) -n \
|
---|
659 | -e '/<\?ln /d' \
|
---|
660 | -e '/$(subst /,\\,$(PATH_ROOT))/p' \
|
---|
661 | -e '/$(subst /,\\,$(PATH_ROOT))/q2' \
|
---|
662 | "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix"
|
---|
663 | $(SED) -n \
|
---|
664 | -e '/<\?ln /d' \
|
---|
665 | -e 's/\\/\//g' \
|
---|
666 | -e 's,^.*"\($(PATH_ROOT)/doc/[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
667 | -e 's,^.*"\($(VBOX_PATH_WIN_INST_SRC)/Binary/[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
668 | -e 's,^.*"\($(dir $(VBOX_WINDOWS_ICON_FILE))[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
669 | --output "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" \
|
---|
670 | "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix"
|
---|
671 | set -xe && for file in `$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files"`; \
|
---|
672 | do $(CP_EXT) -f -- "$$(DOLLAR){file}" "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"; done
|
---|
673 | # Create repack script for this step.
|
---|
674 | $(APPEND) -tn "$(VBOX_WIN_INST_REPACK_DIR)/1-compile-VirtualBox_$(lang).cmd" \
|
---|
675 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
676 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
677 | '$(VBOX_PATH_WIX)/candle.exe VirtualBox_$(lang).wix ^' \
|
---|
678 | ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^' \
|
---|
679 | ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
|
---|
680 | ' -out $$(@F) || exit /b1' \
|
---|
681 | ) \
|
---|
682 | '@echo Created: $$(@F)'
|
---|
683 | endif
|
---|
684 | # Generate wxi dependencies based on the sourceLineNumber references in the output. Add repack file list for cleanup.
|
---|
685 | $(QUIET)$(APPEND) -t '$$@.dep' '$$@: \'
|
---|
686 | $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "$$@.dep"
|
---|
687 | $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep"
|
---|
688 | $(QUIET)$(APPEND) -n '$$@.dep' '' ''
|
---|
689 | ifeq ($(lang),en_US)
|
---|
690 | $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VirtualBox_$(lang)'
|
---|
691 | $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" >> '$$@.dep'
|
---|
692 | $(QUIET)$(APPEND) -n '$$@.dep' '' 'endef'
|
---|
693 | endif
|
---|
694 |
|
---|
695 | $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VirtualBox_$(lang)))
|
---|
696 | endef
|
---|
697 |
|
---|
698 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
699 | $(eval $(def_vbox_compile_wixobj)))
|
---|
700 |
|
---|
701 | #
|
---|
702 | # MSM (merge module) compile.
|
---|
703 | #
|
---|
704 | define def_vbox_compile_msm
|
---|
705 | includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj.dep
|
---|
706 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
|
---|
707 | + $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \
|
---|
708 | $(if-expr "$(lang)" != "en_US",, \
|
---|
709 | + $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix): \
|
---|
710 | $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
|
---|
711 | $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
|
---|
712 | $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
|
---|
713 | $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
|
---|
714 | $(PATH_SUB_CURRENT)/UserInterface.wxi \
|
---|
715 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
716 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
717 | $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
|
---|
718 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
719 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
720 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
721 | $(VBOX_MSI_DEPENDENCIES) \
|
---|
722 | $(VBOX_VERSION_STAMP) \
|
---|
723 | | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
724 | $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
|
---|
725 | $(REDIRECT) \
|
---|
726 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
727 | -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
728 | -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
|
---|
729 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
730 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
731 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
732 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
733 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
734 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
735 | -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
|
---|
736 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
737 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
738 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
739 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
740 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
741 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
742 | -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
|
---|
743 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
744 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
745 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
746 | -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
|
---|
747 | -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \
|
---|
748 | -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
|
---|
749 | -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
|
---|
750 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
751 | -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
|
---|
752 | -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
|
---|
753 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
754 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
755 | -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
|
---|
756 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
757 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
758 | -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
|
---|
759 | -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
|
---|
760 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
761 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
762 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
763 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
764 | -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
|
---|
765 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
766 | -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
|
---|
767 | -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
|
---|
768 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
769 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
770 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
771 | -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
|
---|
772 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
773 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
774 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
775 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
776 | -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
|
---|
777 | -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
|
---|
778 | -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
779 | -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
780 | -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
|
---|
781 | -- \
|
---|
782 | $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
|
---|
783 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
784 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
785 | -p$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix
|
---|
786 | $(VBOX_PATH_WIX)/candle.exe $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \
|
---|
787 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
788 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
789 | -out $$@
|
---|
790 | ifeq ($(lang),en_US)
|
---|
791 | # Copy preprocessed wix and change source paths to be relative. Stuff not in ../bin needs copying.
|
---|
792 | $(SED) -e 's,$(subst /,\\,$(PATH_OUT))\\bin,..\\bin,g' \
|
---|
793 | -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.amd64\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.amd64\\$(KBUILD_TYPE)\\bin,g' \
|
---|
794 | -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.x86\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.x86\\$(KBUILD_TYPE)\\bin,g' \
|
---|
795 | -e 's,$(subst /,\\,$(PATH_ROOT))\\doc\\,files-VBoxMerge$(module)_$(lang)\\,g' \
|
---|
796 | -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\Binary\\,files-VBoxMerge$(module)_$(lang)\\,g' \
|
---|
797 | -e 's,$(subst /,\\,$(dir $(VBOX_WINDOWS_ICON_FILE))),files-VBoxMerge$(module)_$(lang)\\,g' \
|
---|
798 | -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\,,g' \
|
---|
799 | --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix" \
|
---|
800 | "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix"
|
---|
801 | $(SED) -n \
|
---|
802 | -e '/<\?ln /d' \
|
---|
803 | -e '/$(subst /,\\,$(PATH_ROOT))/p' \
|
---|
804 | -e '/$(subst /,\\,$(PATH_ROOT))/q2' \
|
---|
805 | "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
|
---|
806 | $(SED) -n \
|
---|
807 | -e '/<\?ln /d' \
|
---|
808 | -e 's/\\/\//g' \
|
---|
809 | -e 's,^.*"\($(PATH_ROOT)/doc/[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
810 | -e 's,^.*"\($(VBOX_PATH_WIN_INST_SRC)/Binary/[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
811 | -e 's,^.*"\($(dir $(VBOX_WINDOWS_ICON_FILE))[^"]*\)".*$$(DOLLAR),\1,p' \
|
---|
812 | --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" \
|
---|
813 | "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix"
|
---|
814 | $(MKDIR) -p -- "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"
|
---|
815 | set -xe && for file in `$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files"`; \
|
---|
816 | do $(CP_EXT) -f -- "$$(DOLLAR){file}" "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"; done
|
---|
817 | # Create repack script for this step.
|
---|
818 | $(APPEND) -tn "$(VBOX_WIN_INST_REPACK_DIR)/1-compile-VBoxMerge$(module)_$(lang).cmd" \
|
---|
819 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
820 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
821 | '$(VBOX_PATH_WIX)/candle.exe VBoxMerge$(module)_$(lang).wix ^' \
|
---|
822 | ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^'\
|
---|
823 | ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
|
---|
824 | ' -out $$(@F) || exit /b1' \
|
---|
825 | ) \
|
---|
826 | '@echo Created: $$(@F)'
|
---|
827 | endif
|
---|
828 | # Generate wxi dependencies based on the sourceLineNumber references in the output. Add repack file list for cleanup.
|
---|
829 | $(QUIET)$(APPEND) -t '$$@.dep' '$$@: \'
|
---|
830 | $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "$$@.dep"
|
---|
831 | $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep"
|
---|
832 | $(QUIET)$(APPEND) -n '$$@.dep' '' ''
|
---|
833 | ifeq ($(lang),en_US)
|
---|
834 | $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)'
|
---|
835 | $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" >> '$$@.dep'
|
---|
836 | $(QUIET)$(APPEND) -n '$$@.dep' '' 'endef'
|
---|
837 | endif
|
---|
838 |
|
---|
839 | $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)))
|
---|
840 | endef
|
---|
841 |
|
---|
842 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
843 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
844 | $(eval $(def_vbox_compile_msm))))
|
---|
845 |
|
---|
846 | #
|
---|
847 | # VirtualBox Type Library definition.
|
---|
848 | #
|
---|
849 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
|
---|
850 | $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
|
---|
851 | $(VBOX_XIDL_FILE) \
|
---|
852 | $(MAKEFILE) \
|
---|
853 | | $$(dir $$@)
|
---|
854 | $(VBOX_XSLTPROC) \
|
---|
855 | $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
|
---|
856 | $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
|
---|
857 | -o $@ $< $(VBOX_XIDL_FILE)
|
---|
858 |
|
---|
859 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
|
---|
860 | $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
|
---|
861 | $(VBOX_XIDL_FILE) \
|
---|
862 | | $$(dir $$@)
|
---|
863 | $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \
|
---|
864 | $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
|
---|
865 | $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
|
---|
866 | -o $@ $< $(VBOX_XIDL_FILE)
|
---|
867 |
|
---|
868 | #
|
---|
869 | # Construct the list of GUI translations.
|
---|
870 | # ('-t' -- truncate file; '-n' -- new line between arguments)
|
---|
871 | #
|
---|
872 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
873 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
|
---|
874 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
|
---|
875 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
876 | $(APPEND) $@ '<Include>'
|
---|
877 | $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
|
---|
878 | ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
|
---|
879 | ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
|
---|
880 | $(APPEND) $@ '</Include>'
|
---|
881 |
|
---|
882 | #
|
---|
883 | # Edit the version stored in the registry.
|
---|
884 | #
|
---|
885 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
|
---|
886 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
887 | $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
|
---|
888 | -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
|
---|
889 | --output $@ $<
|
---|
890 |
|
---|
891 | #
|
---|
892 | # Generate the list of unattended template script files.
|
---|
893 | #
|
---|
894 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
|
---|
895 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
|
---|
896 | $(APPEND) -t -n $@ \
|
---|
897 | '<?xml version="1.0" ?>' \
|
---|
898 | '<Include>'
|
---|
899 | ifdef VBOX_UNATTENDED_TEMPLATES
|
---|
900 | $(APPEND) -n $@ \
|
---|
901 | ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
|
---|
902 | ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Win64="$$(var.Property_Win64)">' \
|
---|
903 | $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
|
---|
904 | ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
|
---|
905 | ' </Component>' \
|
---|
906 | ' </Directory>'
|
---|
907 | endif
|
---|
908 | $(APPEND) $@ '</Include>'
|
---|
909 |
|
---|
910 |
|
---|
911 | #
|
---|
912 | # Build the multi-language version of the .MSI installer (final installer).
|
---|
913 | #
|
---|
914 | # This is done by creating binary .MST diffs of all the language-specific installers
|
---|
915 | # against the en_US one, and then merging the diffs into the en_US one using tools
|
---|
916 | # from the MS Installer SDK.
|
---|
917 | #
|
---|
918 | define def_vbox_create_mst
|
---|
919 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
|
---|
920 | + $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \
|
---|
921 | $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
|
---|
922 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
|
---|
923 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
924 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
925 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
926 | $(VBOX_SVN_REV_KMK) \
|
---|
927 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
928 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
|
---|
929 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
930 | | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
931 | $(call MSG_L1,Creating language diff for $(lang))
|
---|
932 | kmk_time $(VBOX_PATH_WIX)/light.exe -v -nologo \
|
---|
933 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
934 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
935 | -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
|
---|
936 | -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
|
---|
937 | $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
938 | $(VBOX_MSI_ICE_IGNORE) \
|
---|
939 | -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
940 | $$(@D)/VirtualBox_$(lang).wixobj \
|
---|
941 | $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
|
---|
942 | $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
|
---|
943 | $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst"
|
---|
944 | $(RM) -f -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
945 | $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
|
---|
946 | $$(@D)/common.cab
|
---|
947 |
|
---|
948 | endef
|
---|
949 |
|
---|
950 | $(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
|
---|
951 | $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
|
---|
952 | $(eval $(def_vbox_create_mst)))
|
---|
953 |
|
---|
954 |
|
---|
955 | # Create WISUMINFO argument.
|
---|
956 | VBOX_INS_PROD_ARCH.amd64 = x64
|
---|
957 | VBOX_INS_PROD_ARCH.x86 = Intel
|
---|
958 | VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
|
---|
959 | $(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
|
---|
960 | VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
|
---|
961 | $(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
|
---|
962 | , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
|
---|
963 | VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
|
---|
964 |
|
---|
965 | # The multilingual installer rule.
|
---|
966 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
|
---|
967 | + $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd: \
|
---|
968 | $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
|
---|
969 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
|
---|
970 | $(call MSG_L1,Creating final multilingual MSI)
|
---|
971 | $(QUIET)$(RM) -f -- \
|
---|
972 | $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_BASE)-r*.cmd )
|
---|
973 | $(CP) -f -- "$<" "$@"
|
---|
974 |
|
---|
975 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
|
---|
976 | $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
|
---|
977 | $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
|
---|
978 |
|
---|
979 | $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
|
---|
980 | $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
|
---|
981 | $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
|
---|
982 |
|
---|
983 | # Create repack script for this step.
|
---|
984 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd" \
|
---|
985 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
986 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
|
---|
987 | 'copy /y "$(<F)" "$(@F)" || exit /b1' \
|
---|
988 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
989 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
|
---|
990 | '$(VBOX_PATH_MSIDB) -d $(@F) -r $(lang).mst || exit /b1' \
|
---|
991 | 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) || exit /b1') \
|
---|
992 | 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) || exit /b1' \
|
---|
993 | 'cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $(@F) $(VBOX_INS_PROD_LANG) || exit /b1' \
|
---|
994 | 'call sign-sha1.cmd $(@F) || exit /b1' \
|
---|
995 | ) ) \
|
---|
996 | 'copy /y "$(@F)" "$(notdir $(PACKAGE_NAME_FINAL))" || exit /b1' \
|
---|
997 | '@echo Create multilanguage MSI: $(notdir $(PACKAGE_NAME_FINAL))'
|
---|
998 |
|
---|
999 | # Copy multilingual installer to bin.
|
---|
1000 | $(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
|
---|
1001 | $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
|
---|
1002 | $(INSTALL_STAGING) -- $< $@
|
---|
1003 |
|
---|
1004 |
|
---|
1005 | if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1006 | #
|
---|
1007 | # Make the multi-architecture installer by calling our stub builder
|
---|
1008 | # with both platform installers (x86 and amd64) + common cab. The common
|
---|
1009 | # cab only is needed when we don't use merge modules. We only
|
---|
1010 | # need to do this once; so do it on x86 only.
|
---|
1011 | #
|
---|
1012 | $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
|
---|
1013 | + $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
|
---|
1014 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
1015 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
|
---|
1016 | $(PATH_STAGE_BIN)/VBoxStub.exe \
|
---|
1017 | $$(VBoxStubBld_1_TARGET)
|
---|
1018 | $(call MSG_L1,Building Windows combined package)
|
---|
1019 | $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
|
---|
1020 | $@ \
|
---|
1021 | $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
|
---|
1022 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
|
---|
1023 | $(REDIRECT) -C $(@D) -- \
|
---|
1024 | $(VBoxStubBld_1_TARGET) -out $@ \
|
---|
1025 | -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
1026 | -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
|
---|
1027 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
|
---|
1028 | -stub $(PATH_STAGE_BIN)/VBoxStub.exe
|
---|
1029 | $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
|
---|
1030 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
1031 | # Create repack script for this step.
|
---|
1032 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd" \
|
---|
1033 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
1034 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
|
---|
1035 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1036 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
1037 | ,'call sign-dual.cmd ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) || exit /b1') \
|
---|
1038 | '..\bin\VBoxStubBld.exe ^' \
|
---|
1039 | ' -out $(@F) ^' \
|
---|
1040 | ' -target-x86 $(PACKAGE_NAME_MULTIARCH.x86) ^' \
|
---|
1041 | ' -target-amd64 ../../../win.amd64/$(KBUILD_TYPE)/repack/$(PACKAGE_NAME_MULTIARCH.amd64) ^' \
|
---|
1042 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),\
|
---|
1043 | ,' -target-all ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) ^' ) \
|
---|
1044 | ' -stub ../bin/VBoxStub.exe || exit /b1' \
|
---|
1045 | '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
|
---|
1046 | 'call sign-dual.cmd $(@F) || exit /b1' \
|
---|
1047 | ) ) \
|
---|
1048 | '@echo Create multiarch EXE: $(@F)'
|
---|
1049 | endif
|
---|
1050 |
|
---|
1051 | #
|
---|
1052 | # Repackaging scripts and files.
|
---|
1053 | #
|
---|
1054 | INSTALLS += RePackScripts
|
---|
1055 | RePackScripts_TEMPLATE = DUMMY
|
---|
1056 | RePackScripts_INST = repack/
|
---|
1057 | RePackScripts_INSTTYPE = stage
|
---|
1058 | RePackScripts_SOURCES = \
|
---|
1059 | Scripts/UnpackBlessedDrivers.cmd \
|
---|
1060 | $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
|
---|
1061 | $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
|
---|
1062 | $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
|
---|
1063 | $(if-expr defined(VBOX_SIGN_EV_FILE_FN),$(RePackScripts_0_OUTDIR)/sign-ev.cmd,) \
|
---|
1064 | $(RePackScripts_0_OUTDIR)/VMMR0.inf \
|
---|
1065 | $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
|
---|
1066 | if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1067 | RePackScripts_SOURCES += \
|
---|
1068 | $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
|
---|
1069 | endif
|
---|
1070 | if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1071 | RePackScripts_SOURCES += \
|
---|
1072 | $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
|
---|
1073 | $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd
|
---|
1074 | endif
|
---|
1075 | RePackScripts_CLEAN = \
|
---|
1076 | $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
|
---|
1077 | $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
|
---|
1078 | $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
|
---|
1079 | $(RePackScripts_0_OUTDIR)/sign-ev.cmd \
|
---|
1080 | $(RePackScripts_0_OUTDIR)/VMMR0.inf \
|
---|
1081 | $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
|
---|
1082 |
|
---|
1083 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
|
---|
1084 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
|
---|
1085 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
|
---|
1086 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
|
---|
1087 |
|
---|
1088 | $$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
|
---|
1089 | $(APPEND) -nt "$@" \
|
---|
1090 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1091 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1092 | 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
|
---|
1093 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1094 | '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,,&&) ) || exit /b1' \
|
---|
1095 | ) )
|
---|
1096 |
|
---|
1097 | $$(RePackScripts_0_OUTDIR)/sign-sha1.cmd: | $$(dir $$@)
|
---|
1098 | $(APPEND) -nt "$@" \
|
---|
1099 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1100 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1101 | 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
|
---|
1102 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1103 | '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing,&&) ) || exit /b1' \
|
---|
1104 | ) )
|
---|
1105 |
|
---|
1106 | $$(RePackScripts_0_OUTDIR)/sign-ev.cmd: | $$(dir $$@)
|
---|
1107 | $(APPEND) -nt "$@" \
|
---|
1108 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1109 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1110 | 'if ".%1" == "." (echo No .cab file specified & exit /b 1)' \
|
---|
1111 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1112 | '( $(call VBOX_SIGN_EV_FILE_FN,%1) ) || exit /b1' \
|
---|
1113 | ) )
|
---|
1114 |
|
---|
1115 | $$(RePackScripts_0_OUTDIR)/VMMR0.inf: $(PATH_SUB_CURRENT)/Scripts/VMMR0.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
1116 | $(call MSG_GENERATE,RePackScripts,$@,$<)
|
---|
1117 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
1118 |
|
---|
1119 | $$(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf: $(PATH_SUB_CURRENT)/Scripts/VBoxExtPackPuel.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
1120 | $(call MSG_GENERATE,RePackScripts,$@,$<)
|
---|
1121 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
1122 |
|
---|
1123 |
|
---|
1124 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|