VirtualBox

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

Last change on this file since 106990 was 106990, checked in by vboxsync, 2 months ago

Installer/win/Makefile.kmk: Combined packing adjustments for win.arm64. jiraref:VBP-1442

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 65.3 KB
Line 
1# $Id: Makefile.kmk 106990 2024-11-13 15:22:25Z 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.amd64/$(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.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
211 PACKAGE_NAME_MULTIARCH.arm64 := $(PACKAGE_NAME_MULTIARCH)_arm64.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),amd64)
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),amd64)
271 OTHER_CLEAN += \
272 $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd \
273 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64)
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_ORACLE_QT=$(if $(VBOX_WITH_ORACLE_QT),yes,no)' \
527 -E 'VBOX_WITH_R0_MODULES=$(if $(VBOX_WITH_R0_MODULES),yes,no)' \
528 -E 'VBOX_WITH_MINIMAL_R0=$(if $(VBOX_WITH_MINIMAL_R0),yes,no)' \
529 -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
530 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
531 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
532 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
533 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
534 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
535 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
536 -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
537 -E 'VBOX_WITH_USB=$(if $(VBOX_WITH_USB),yes,no)' \
538 -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),yes,no)' \
539 -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
540 -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
541 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
542 -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
543 -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
544 -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
545 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
546 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
547 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)'
548
549#
550# Building the main installer (en_US).
551#
552# Since WIX v4 we don't need to do compilation + linking as separate steps,
553# as the WIX binary all now does this internally with its "build" command.
554#
555# Note: This will clean up any previous .msi and .wixpdb files to prevent dep
556# build boxes from filling up with old files.
557#
558define def_vbox_build_msi
559 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
560 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \
561 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
562 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
563 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
564 $(PATH_STAGE_BIN)/VBoxDrvInst.exe \
565 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
566 $(VBOX_SVN_REV_KMK) \
567 $(VBOX_WIN_INST_MAKEFILE_DEP) \
568 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
569 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
570 | $$$$(dir $$$$@)
571 $$(call MSG_L1,Building installer $$@)
572 $(QUIET)$(RM) -f $$(wildcard $$(subst r$$(VBOX_SVN_REV),r*,\
573 $$@ \
574 $$(basename $$@).wixpdb \
575 $$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd ))
576 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
577 -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
578 -intermediatefolder $$(@D)/wix-temp/ \
579 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
580 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
581 -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
582 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
583 -pdbtype none \
584 -out $$@
585 if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL)
586 $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab
587 endif
588 ifeq ($(lang),en_US)
589 $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl" "$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl" \
590 "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"
591 # Create repack script for this step.
592 $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/1-compile-$$(PACKAGE_NAME_LANG).cmd" \
593 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
594 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
595 '$(VBOX_TOOLS_WIN_WIX_BIN) build ^' \
596 ' files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
597 ' files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
598 ' -lib VirtualBox_en_US.wixlib ^' \
599 ' -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll ^' \
600 ' -pdbtype none ^' \
601 ' -out $$(@F) ^' \
602 ' || exit /b1' \
603 ) \
604 '@echo Created MSI installer: $$(@F)' \
605 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL),'@echo Created: common.cab',)
606
607 endif
608 $(RM) -Rf -- $$(@D)/wix-temp/
609endef
610
611$(foreach lang, en_US, $(eval $(def_vbox_build_msi)))
612
613
614#
615# Merge module building (all languages).
616#
617# This takes the existing merge module WIX library (.wixlib) as input and builds a MSI merge
618# module (.msm) out of it.
619#
620# Note: This will clean up any previous .msm to prevent dep build boxes from
621# filling up with old files.
622#
623define def_vbox_build_msm
624 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm: \
625 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
626 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
627 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
628 $(PATH_STAGE_BIN)/VBoxDrvInst.exe \
629 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
630 $(VBOX_SVN_REV_KMK) \
631 $(VBOX_WIN_INST_MAKEFILE_DEP) \
632 | $$$$(dir $$$$@)
633 $$(call MSG_L1,Building merge module $$@)
634 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
635 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
636 -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
637 -intermediatefolder $$(@D)/wix-temp/ \
638 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
639 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
640 -lib $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
641 -pdbtype none \
642 -out $$@
643 $(RM) -Rf -- \
644 $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst \
645 $$(@D)/wix-temp/
646 $(call VBOX_SIGN_MSM_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
647 # Create repack script for this step.
648 $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/1-build-VBoxMerge$(module)_$(lang).cmd" \
649 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
650 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
651 '$(VBOX_TOOLS_WIN_WIX_BIN) build ^' \
652 ' files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
653 ' files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
654 ' $(VBOX_TOOLS_WIN_WIX_EXT) ^' \
655 ' -out $$(@F) ^' \
656 ' || exit /b1' \
657 'call sign-sha1.cmd $$(@F) || exit /b1' \
658 ) \
659 '@echo Created MSM module: $$(@F)'
660endef
661
662ifdef VBOX_WITH_MSM_INSTALL
663 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
664 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
665 $(eval $(def_vbox_build_msm))))
666endif
667
668
669#
670# Add dependencies that makes sure necessary bits gets built.
671# For combined packages we always use the .ISO from the amd64 build.
672#
673ifdef VBOX_WITH_COMBINED_PACKAGE
674 VBOX_MSI_DEPENDENCIES := \
675 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
676else
677 VBOX_MSI_DEPENDENCIES := \
678 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
679endif
680
681#
682# A few manual dependencies to make sure everything is rebuilt when they should.
683#
684$(PATH_SUB_CURRENT)/VirtualBox.wxs: \
685 $(PATH_SUB_CURRENT)/CommonProperties.wxi \
686 $(PATH_SUB_CURRENT)/Defines.wxi \
687 $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
688
689$(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
690 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
691 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
692 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
693 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
694 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
695 $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
696 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
697 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
698
699#
700# Building a WIX library object (.wixlib).
701# We've separated the final building from the WIX library building for repacking reasons.
702#
703define def_vbox_build_wixlib
704 includedep $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixlib.dep
705 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
706 $(if-expr "$(lang)" != "en_US",, \
707 + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files ): \
708 $(PATH_SUB_CURRENT)/VirtualBox.wxs \
709 $(PATH_SUB_CURRENT)/UserInterface.wxi \
710 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
711 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
712 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm), \
713 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
714 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
715 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
716 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
717 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \
718 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \
719 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
720 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
721 $(VBOX_MSI_DEPENDENCIES)) \
722 $(VBOX_VERSION_STAMP) \
723 | $$$$(dir $$$$@) $(if-expr "$(lang)" != "en_US",, \
724 $(VBOX_WIN_INST_REPACK_DIR)/ $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )
725 $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib" "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wixlib"
726## @todo r=bird: Wtf do we duplicate most/all of VBOX_WIN_INST_ENV here?
727 $(REDIRECT) \
728 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
729 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
730 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
731 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
732 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
733 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
734 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
735 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
736 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
737 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
738 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
739 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
740 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
741 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
742 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
743 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
744 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
745 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
746 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
747 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
748 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(if-expr $(lang) == "en_US",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
749 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(if-expr $(lang) == "en_US" && $(KBUILD_TARGET_ARCH) == "amd64",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
750 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
751 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
752 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
753 -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm')),) \
754 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
755 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
756 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
757 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
758 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
759 -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \
760 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
761 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
762 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
763 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
764 -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \
765 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
766 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
767 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
768 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
769 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
770 -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
771 -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
772 -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
773 -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
774 -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \
775 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
776 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
777 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
778 -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
779 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
780 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
781 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
782 -E 'VBOX_WITH_ORACLE_QT=$(if $(VBOX_WITH_ORACLE_QT),yes,no)' \
783 -E 'VBOX_WITH_R0_MODULES=$(if $(VBOX_WITH_R0_MODULES),yes,no)' \
784 -E 'VBOX_WITH_MINIMAL_R0=$(if $(VBOX_WITH_MINIMAL_R0),yes,no)' \
785 -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
786 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
787 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
788 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
789 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
790 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
791 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
792 -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
793 -E 'VBOX_WITH_USB=$(if $(VBOX_WITH_USB),yes,no)' \
794 -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),yes,no)' \
795 -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
796 -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
797 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
798 -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
799 -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
800 -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
801 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
802 -- \
803 $(VBOX_TOOLS_WIN_WIX_BIN) build $(filter-out $(VBOX_VERSION_STAMP),$$<) \
804 -intermediatefolder $$(@D)/wix-temp/ \
805 $(VBOX_TOOLS_WIN_WIX_EXT) \
806 -outputtype library \
807 -out $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib
808 ifeq ($(lang),en_US)
809 # Copy over the .wixlib into the repack directory, so that it can be used later when
810 # doing the repacking via the shell scripts.
811 $(CP) $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/
812
813 endif
814 $(RM) -Rf -- $$(@D)/wix-temp/
815
816 $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VirtualBox_$(lang)))
817endef
818
819$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
820 $(eval $(def_vbox_build_wixlib)))
821
822#
823# MSM (merge module) building as a WIX library (.wixlib).
824#
825define def_vbox_build_msm_wixlib
826 includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib.dep
827 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
828 $(if-expr "$(lang)" != "en_US",, \
829 + $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wixlib): \
830 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
831 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
832 $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
833 $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
834 $(PATH_SUB_CURRENT)/UserInterface.wxi \
835 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
836 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
837 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
838 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
839 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \
840 $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \
841 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
842 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
843 $(VBOX_MSI_DEPENDENCIES) \
844 $(VBOX_VERSION_STAMP) \
845 | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
846 $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
847## @todo r=bird: Wtf do we duplicate most/all of VBOX_WIN_INST_ENV here? This stuff is surely out of sync.
848 $(REDIRECT) \
849 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
850 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
851 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
852 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
853 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
854 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
855 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
856 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
857 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
858 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
859 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
860 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
861 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
862 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
863 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
864 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
865 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
866 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
867 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
868 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
869 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
870 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \
871 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
872 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
873 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
874 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
875 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
876 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
877 -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \
878 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
879 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
880 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
881 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
882 -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \
883 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
884 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
885 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
886 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
887 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
888 -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
889 -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
890 -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
891 -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
892 -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \
893 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
894 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
895 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
896 -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
897 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
898 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
899 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
900 -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
901 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
902 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
903 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
904 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
905 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
906 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
907 -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
908 -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG),yes,no)' \
909 -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
910 -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
911 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
912 -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
913 -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
914 -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
915 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
916 -- \
917 $(VBOX_TOOLS_WIN_WIX_BIN) build $(filter-out $(VBOX_VERSION_STAMP),$$<) \
918 -intermediatefolder $$(@D)/wix-temp/ \
919 $(VBOX_TOOLS_WIN_WIX_EXT) \
920 -outputtype library \
921 -out $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib
922 $(RM) -Rf -- $$(@D)/wix-temp/
923 ifeq ($(lang),en_US)
924 # Copy over the .wixlib into the repack directory, so that it can be used later when
925 # doing the repacking via the shell scripts.
926 $(CP) $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/
927 $(MKDIR) -p -- "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"
928 endif
929 $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)))
930endef
931
932$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
933 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
934 $(eval $(def_vbox_build_msm_wixlib))))
935
936#
937# VirtualBox Type Library definition.
938#
939$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
940 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
941 $(VBOX_XIDL_FILE) \
942 $(MAKEFILE) \
943 | $$(dir $$@)
944 $(VBOX_XSLTPROC) \
945 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
946 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
947 -o $@ $< $(VBOX_XIDL_FILE)
948
949$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
950 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
951 $(VBOX_XIDL_FILE) \
952 | $$(dir $$@)
953 $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \
954 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
955 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
956 -o $@ $< $(VBOX_XIDL_FILE)
957
958#
959# Construct the list of GUI translations.
960# ('-t' -- truncate file; '-n' -- new line between arguments)
961#
962include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
963$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
964$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
965 $(APPEND) -t $@ '<?xml version="1.0" ?>'
966 $(APPEND) $@ '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">'
967 $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
968 ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
969 ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
970 $(APPEND) $@ '</Include>'
971
972#
973# Edit the version stored in the registry.
974#
975$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
976$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
977 $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
978 -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
979 --output $@ $<
980
981#
982# Generate the list of CRT DLLs.
983#
984ifndef TOOL_$(VBOX_VCC_TOOL)
985 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk
986endif
987$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi)
988$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi: | $$(dir $$@)
989 $(APPEND) -t -n $@ \
990 '<?xml version="1.0" ?>' \
991 '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">' \
992 $(foreach dll \
993 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
994 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
995 ,$(TOOL_$(VBOX_VCC_TOOL)_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL)_REDIST_CPP_DLLS))) \
996 $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-x86_64.dll,) \
997 ,' <File Id="file_$(translate $(dll),-,_)" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\$(dll)" />') \
998 '</Include>'
999
1000#
1001# Generate the list of 32-bit CRT DLLs.
1002#
1003ifndef TOOL_$(VBOX_VCC_TOOL_STEM)X86
1004 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)X86.kmk
1005endif
1006$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi)
1007$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi: | $$(dir $$@)
1008 $(APPEND) -t -n $@ \
1009 '<?xml version="1.0" ?>' \
1010 '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">' \
1011 $(foreach dll \
1012 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
1013 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
1014 ,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CPP_DLLS))) \
1015 $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-i386.dll,) \
1016 ,' <File Id="file_$(translate $(dll),-,_)_x86" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\x86\$(dll)" DiskId="$$(var.Property_DiskIdCommon)" />') \
1017 '</Include>'
1018#
1019# Generate the list of unattended template script files.
1020#
1021$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
1022$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
1023 $(APPEND) -t -n $@ \
1024 '<?xml version="1.0" ?>' \
1025 '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">'
1026ifdef VBOX_UNATTENDED_TEMPLATES
1027 $(APPEND) -n $@ \
1028 ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
1029 ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Bitness="$$(var.Property_Bitness)">' \
1030 $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
1031 ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
1032 ' </Component>' \
1033 ' </Directory>'
1034endif
1035 $(APPEND) $@ '</Include>'
1036
1037
1038#
1039# Build the multi-language version of the .MSI installer (final installer).
1040#
1041# This is done by creating binary .MST diffs of all the language-specific installers
1042# against the en_US one, and then merging the diffs into the en_US one using tools
1043# from the MS Installer SDK.
1044#
1045# Only contains the minimal set of stuff to get a language-specific .msi built.
1046#
1047define def_vbox_create_mst
1048 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
1049 + $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \
1050 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1051 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1052 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1053 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
1054 $(VBOX_SVN_REV_KMK) \
1055 $(VBOX_WIN_INST_MAKEFILE_DEP) \
1056 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
1057 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
1058 | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
1059 $(call MSG_L1,Creating language diff for $(lang))
1060 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
1061 -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
1062 -intermediatefolder $$(@D)/wix-temp/ \
1063 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1064 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1065 -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_en_US.wixlib \
1066 -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
1067 -pdbtype none \
1068 -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi
1069 $(REDIRECT) -C $$(@D) -- $$(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
1070 $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst"
1071 $(RM) -Rf -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
1072 $$(@D)/wix-temp/ \
1073 $$(@D)/common.cab
1074
1075endef
1076
1077$(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
1078 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
1079 $(eval $(def_vbox_create_mst)))
1080
1081
1082# Create WISUMINFO argument.
1083VBOX_INS_PROD_ARCH.amd64 = x64
1084VBOX_INS_PROD_ARCH.arm64 = arm64
1085VBOX_INS_PROD_ARCH.x86 = Intel
1086VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
1087ifeq ($(VBOX_INS_PROD_ARCH),)
1088 $(error VBOX_INS_PROD_ARCH is empty!)
1089endif
1090VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
1091$(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
1092 , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
1093VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
1094
1095# The multilingual installer rule.
1096$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
1097+ $(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_NAME_LANG).cmd: \
1098 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1099 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
1100 $(call MSG_L1,Creating final multilingual MSI)
1101 $(QUIET)$(RM) -f -- \
1102 $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_BASE)-r*.cmd )
1103 $(CP) -f -- "$<" "$@"
1104
1105 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1106 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
1107 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
1108
1109 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
1110 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
1111 $(call VBOX_SIGN_MSI_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
1112
1113# Create repack script for this step.
1114 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_NAME_LANG).cmd" \
1115 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1116 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1117 'copy /y "$(<F)" "$(@F)" || exit /b1' \
1118 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
1119 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1120 '$(VBOX_PATH_MSIDB) -d $(@F) -r $(lang).mst || exit /b1' \
1121 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) || exit /b1') \
1122 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) || exit /b1' \
1123 'cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $(@F) $(VBOX_INS_PROD_LANG) || exit /b1' \
1124 'call sign-sha1.cmd $(@F) || exit /b1' \
1125 ) ) \
1126 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),'copy /y "$(@F)" "$(notdir $(PACKAGE_NAME_FINAL))" || exit /b1',) \
1127 '@echo Created multilanguage MSI: $(notdir $(PACKAGE_NAME_FINAL))'
1128
1129# Copy multilingual installer to bin.
1130$(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
1131 $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
1132 $(INSTALL_STAGING) -- $< $@
1133
1134
1135if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "amd64"
1136 #
1137 # Make the multi-architecture installer by calling our stub builder
1138 # with both platform installers (amd64 and arm64) + common cab. The common
1139 # cab only is needed when we don't use merge modules. We only
1140 # need to do this once; so do it on amd64 only.
1141 #
1142 $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1143 + $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1144 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1145 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.arm64) \
1146 $(PATH_STAGE_BIN)/VBoxStub.exe \
1147 $$(VBoxStubBld_1_TARGET)
1148 $(call MSG_L1,Building Windows combined package)
1149 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1150 $@ \
1151 $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1152 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_CAB_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
1153 $(REDIRECT) -C $(@D) -- \
1154 $(VBoxStubBld_1_TARGET) -out $@ \
1155 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1156 -target-arm64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.arm64) \
1157 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
1158 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1159 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1160 $(call VBOX_SIGN_FILE_FN,$@)
1161 # Create repack script for this step.
1162 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(@F).cmd" \
1163 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1164 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1165 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1166 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
1167 ,'call sign-dual.cmd ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) || exit /b1') \
1168 '..\bin\VBoxStubBld.exe ^' \
1169 ' -out $(@F) ^' \
1170 ' -target-amd64 $(PACKAGE_NAME_MULTIARCH.amd64) ^' \
1171 ' -target-arm64 ../../../win.arm64/$(KBUILD_TYPE)/repack/$(PACKAGE_NAME_MULTIARCH.arm64) ^' \
1172 $(if-expr defined(VBOX_WITH_MSM_INSTALL),\
1173 ,' -target-all $(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) ^' ) \
1174 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1175 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1176 'call sign-dual.cmd $(@F) || exit /b1' \
1177 ) ) \
1178 '@echo Created multiarch EXE: $(@F)'
1179else
1180 #
1181 # We still do the installer stub thing even if we only ship 64-bit, because we've
1182 # gotten used to having it around to install the certificate and such.
1183 #
1184 $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1185 + $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1186 $(PACKAGE_NAME_FINAL) \
1187 $(PATH_STAGE_BIN)/VBoxStub.exe \
1188 $$(VBoxStubBld_1_TARGET)
1189 $(call MSG_L1,Building Windows package w/ installer stub)
1190 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1191 $@ \
1192 $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1193 $(REDIRECT) -C "$(@D)" -- \
1194 $(VBoxStubBld_1_TARGET) -out $@ \
1195 -target-$(KBUILD_TARGET_ARCH) $(PACKAGE_NAME_FINAL) \
1196 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1197 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1198 $(call VBOX_SIGN_FILE_FN,$@,,,,,,timed)
1199 # Create repack script for this step.
1200 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(@F).cmd" \
1201 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1202 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1203 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1204 '..\bin\VBoxStubBld.exe ^' \
1205 ' -out $(@F) ^' \
1206 ' -target-$(KBUILD_TARGET_ARCH) $(notdir $(PACKAGE_NAME_FINAL)) ^' \
1207 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1208 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1209 'call sign-dual.cmd $(@F) || exit /b1' \
1210 ) ) \
1211 '@echo Created multiarch EXE: $(@F)'
1212 ifdef VBOX_WIN_ATTESTATION_SIGNING
1213 echo "Repacking HERE"
1214 cd $(VBOX_WIN_INST_REPACK_DIR)
1215 $(RM) -f -- \
1216 "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab" \
1217 "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab.ddf" \
1218 "$(VBOX_WIN_INST_REPACK_DIR)/PackDriversForSubmission_internal.cmd"
1219 cd $(VBOX_WIN_INST_REPACK_DIR) && ls -la
1220 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/PackDriversForSubmission_internal.cmd" \
1221 "SET KBUILD_BIN_PATH=$(KBUILD_BIN_PATH)" \
1222 "call PackDriversForSubmission.cmd -b $(PATH_STAGE_BIN) -a $(KBUILD_TARGET_ARCH) \
1223 -x -n --no-extpack -o $(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab"
1224
1225 $(TIME_EXT) $(REDIRECT_EXT) -C "$(VBOX_WIN_INST_REPACK_DIR)" -- $(EXEC_X86_WIN32) cmd.exe /c PackDriversForSubmission_internal.cmd
1226 $(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"
1227
1228 $(RM) -f -- "$(VBOX_WIN_INST_REPACK_DIR)/Single-3-Repack_internal.cmd"
1229 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/Single-3-Repack_internal.cmd" \
1230 "SET KBUILD_BIN_PATH=$(KBUILD_BIN_PATH)" \
1231 "SET KBUILD_DEVTOOLS=$(KBUILD_DEVTOOLS)" \
1232 "call Single-3-Repack.cmd --no-extpack --signed "$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab.Signed.zip"
1233 $(TIME_EXT) $(REDIRECT_EXT) -C "$(VBOX_WIN_INST_REPACK_DIR)" -- $(EXEC_X86_WIN32) cmd.exe /c Single-3-Repack_internal.cmd
1234
1235 $(RM) -f -- \
1236 "$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)" \
1237 "$(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi"
1238 $(CP) -- "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_MULTIARCH_FINAL)" "$(PATH_STAGE_BIN)/"
1239 $(CP) -- "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG).msi" "$(PATH_STAGE_BIN)/"
1240 endif
1241endif
1242
1243#
1244# Repackaging scripts and files.
1245#
1246INSTALLS += RePackScripts
1247RePackScripts_TEMPLATE = DUMMY
1248RePackScripts_INST = repack/
1249RePackScripts_INSTTYPE = stage
1250RePackScripts_SOURCES = \
1251 Scripts/UnpackBlessedDrivers.cmd \
1252 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1253 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1254 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1255 $(if-expr defined(VBOX_SIGN_EV_FILE_FN),$(RePackScripts_0_OUTDIR)/sign-ev.cmd,) \
1256 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1257 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1258if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "amd64"
1259 RePackScripts_SOURCES += \
1260 $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
1261endif
1262ifdef VBOX_WITH_COMBINED_PACKAGE
1263 if "$(KBUILD_TARGET_ARCH)" == "amd64"
1264 RePackScripts_SOURCES += \
1265 $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
1266 $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd \
1267 $(RePackScripts_0_OUTDIR)/Combined-3-RepackAdditions.cmd
1268 endif
1269else
1270 RePackScripts_SOURCES += \
1271 $(RePackScripts_0_OUTDIR)/Single-1-Prepare.cmd \
1272 $(RePackScripts_0_OUTDIR)/Single-3-Repack.cmd
1273
1274 ifndef VBOX_OSE
1275 RePackScripts_SOURCES += \
1276 $(RePackScripts_0_OUTDIR)/Single-0-All.cmd
1277 endif
1278
1279endif
1280RePackScripts_CLEAN = \
1281 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1282 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1283 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1284 $(RePackScripts_0_OUTDIR)/sign-ev.cmd \
1285 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1286 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1287
1288$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
1289$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
1290ifdef VBOX_WITH_COMBINED_PACKAGE
1291 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
1292 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
1293 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-RepackAdditions.cmd,Combined-3-RepackAdditions.cmd)
1294else
1295 ifndef VBOX_OSE
1296 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-0-All.cmd,Single-0-All.cmd)
1297 endif
1298 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-1-Prepare.cmd,Single-1-Prepare.cmd)
1299 $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-3-Repack.cmd,Single-3-Repack.cmd)
1300endif
1301
1302$$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
1303 $(APPEND) -nt "$@" \
1304 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1305 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1306 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1307 $(subst /win-6.1/,/win-rel/,$(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1308 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,,&&) ) || exit /b1' \
1309 ) ) )
1310
1311$$(RePackScripts_0_OUTDIR)/sign-sha1.cmd: | $$(dir $$@)
1312 $(APPEND) -nt "$@" \
1313 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1314 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1315 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1316 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1317 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing,&&) ) || exit /b1' \
1318 ) )
1319
1320# The %~dp1\ oddity is working around otherwise ending with \" during
1321# expansion of the CCS command line which for a reason I cannot immediately
1322# understand appends a " to the path.
1323$$(RePackScripts_0_OUTDIR)/sign-ev.cmd: | $$(dir $$@)
1324 $(APPEND) -nt "$@" \
1325 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1326 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1327 'if ".%1" == "." (echo No .cab file specified & exit /b 1)' \
1328 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1329 '( $(call VBOX_SIGN_EV_FILE_FN,%1,%~dp1\) ) || exit /b1' \
1330 ) )
1331
1332$$(RePackScripts_0_OUTDIR)/VMMR0.inf: $(PATH_SUB_CURRENT)/Scripts/VMMR0.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1333 $(call MSG_GENERATE,RePackScripts,$@,$<)
1334 $(call VBOX_EDIT_INF_FN,$<,$@)
1335
1336$$(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf: $(PATH_SUB_CURRENT)/Scripts/VBoxExtPackPuel.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1337 $(call MSG_GENERATE,RePackScripts,$@,$<)
1338 $(call VBOX_EDIT_INF_FN,$<,$@)
1339
1340
1341include $(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