VirtualBox

source: vbox/trunk/src/VBox/Installer/win/Makefile.kmk@ 98911

Last change on this file since 98911 was 98911, checked in by vboxsync, 21 months ago

Attesttaion signing. Switching from Jenkins based to app based signing in trunk. Backport of r156229

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette