VirtualBox

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

Last change on this file since 93340 was 93332, checked in by vboxsync, 3 years ago

Installer/win: Fixed packing of ASAN DLLs. bugref:8489 bugref:9841

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