VirtualBox

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

Last change on this file since 86766 was 86766, checked in by vboxsync, 4 years ago

Windows host installer: Respect / handle VBOX_WITH_FE_BALLOONCTRL, VBOX_WITH_FE_BUGREPORT and VBOX_WITH_FE_AUTOSTART. Also, only include VBoxTestOGL if VBOX_WITH_QTGUI *and* VBOX_WITH_VMSVGA3D / VBOX_WITH_VIDEOHWACCEL is set.

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