VirtualBox

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

Last change on this file since 95025 was 94376, checked in by vboxsync, 3 years ago

Installer/win: Added a comment for VBOX_INSTALLER_QUICK.

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