VirtualBox

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

Last change on this file since 106360 was 106321, checked in by vboxsync, 7 weeks ago

Windows installers: Big revamp for removing all DIFxApp-related / DIFxApi-related code and build dependencies for the host and guest installers. bugref:10762

This implements an own framework (VBoxWinDrvInst and VBoxWinDrvStore) for installing Windows drivers and querying / handling the Windows driver store,
along with testcases for the Windows guest and host installers.

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