VirtualBox

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

Last change on this file since 104454 was 104454, checked in by vboxsync, 7 months ago

Windows host installer: Upgraded to WIX v4 (4.0.5). This is a massive change that accumulates the transition from WIX v3 -> v4 where the WIX XML scheme as well as the build system has changed. See comments for details [SCM fixes]. ​bugref:10644

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