VirtualBox

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

Last change on this file since 90434 was 89669, checked in by vboxsync, 3 years ago

Audio/ValKit: More guest/host installer tweaking for shipping VKAT (now as VBoxAudioTest, to not clutter up files / naming conventions). bugref:10008

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 63.2 KB
Line 
1# $Id: Makefile.kmk 89669 2021-06-14 08:57:18Z vboxsync $
2## @file
3# Makefile for the Windows installer.
4#
5
6#
7# Copyright (C) 2006-2020 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21ifneq ($(KBUILD_HOST),win)
22 $(error "The Windows installer can only be built on Windows!")
23endif
24
25
26#
27# Include Sub-Makefiles.
28#
29include $(PATH_SUB_CURRENT)/InstallHelper/Makefile.kmk
30
31include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
32include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
33include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
34ifdef VBOX_WITH_MSI_HACK
35 include $(PATH_SUB_CURRENT)/MsiHack/Makefile.kmk
36endif
37
38#
39# Profile for quickly testing the actual mechanisms of our installer.
40# This leaves out most of the optional stuff to make compilation / linking much
41# faster for development cycles. Tweak to your likings if needed.
42#
43ifdef VBOX_INSTALLER_QUICK
44 VBOX_INSTALLER_LANGUAGES := en_US
45 VBOX_WITH_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 '$$@.dep' '$$@: \'
752 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "$$@.dep"
753 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep"
754 $(QUIET)$(APPEND) -n '$$@.dep' '' ''
755 ifeq ($(lang),en_US)
756 $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VirtualBox_$(lang)'
757 $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" >> '$$@.dep'
758 $(QUIET)$(APPEND) -n '$$@.dep' '' '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 '$$@.dep' '$$@: \'
912 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "$$@.dep"
913 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep"
914 $(QUIET)$(APPEND) -n '$$@.dep' '' ''
915 ifeq ($(lang),en_US)
916 $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)'
917 $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" >> '$$@.dep'
918 $(QUIET)$(APPEND) -n '$$@.dep' '' '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 ,' <File Id="file_$(dll)" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\$(dll)" />') \
989 '</Include>'
990
991#
992# Generate the list of 32-bit CRT DLLs.
993#
994ifndef TOOL_$(VBOX_VCC_TOOL_STEM)X86
995 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)X86.kmk
996endif
997$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi)
998$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi: | $$(dir $$@)
999 $(APPEND) -t -n $@ \
1000 '<?xml version="1.0" ?>' \
1001 '<Include>' \
1002 $(foreach dll \
1003 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
1004 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
1005 ,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CPP_DLLS))) \
1006 ,' <File Id="file_$(dll)_x86" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\x86\$(dll)" DiskId="$$(var.Property_DiskIdCommon)" />') \
1007 '</Include>'
1008#
1009# Generate the list of unattended template script files.
1010#
1011$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
1012$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
1013 $(APPEND) -t -n $@ \
1014 '<?xml version="1.0" ?>' \
1015 '<Include>'
1016ifdef VBOX_UNATTENDED_TEMPLATES
1017 $(APPEND) -n $@ \
1018 ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
1019 ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Win64="$$(var.Property_Win64)">' \
1020 $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
1021 ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
1022 ' </Component>' \
1023 ' </Directory>'
1024endif
1025 $(APPEND) $@ '</Include>'
1026
1027
1028#
1029# Build the multi-language version of the .MSI installer (final installer).
1030#
1031# This is done by creating binary .MST diffs of all the language-specific installers
1032# against the en_US one, and then merging the diffs into the en_US one using tools
1033# from the MS Installer SDK.
1034#
1035define def_vbox_create_mst
1036$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
1037+ $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \
1038 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1039 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
1040 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1041 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1042 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
1043 $(VBOX_SVN_REV_KMK) \
1044 $(VBOX_WIN_INST_MAKEFILE_DEP) \
1045 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
1046 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
1047 | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
1048 $(call MSG_L1,Creating language diff for $(lang))
1049 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \
1050 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1051 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1052 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
1053 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
1054 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
1055 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
1056 $(VBOX_MSI_ICE_IGNORE) \
1057 -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
1058 $$(@D)/VirtualBox_$(lang).wixobj \
1059 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
1060 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
1061 $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst"
1062 $(RM) -f -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
1063 $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
1064 $$(@D)/common.cab
1065
1066endef
1067
1068$(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
1069 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
1070 $(eval $(def_vbox_create_mst)))
1071
1072
1073# Create WISUMINFO argument.
1074VBOX_INS_PROD_ARCH.amd64 = x64
1075VBOX_INS_PROD_ARCH.x86 = Intel
1076VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
1077$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
1078VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
1079$(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
1080 , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
1081VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
1082
1083# The multilingual installer rule.
1084$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
1085+ $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd: \
1086 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1087 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
1088 $(call MSG_L1,Creating final multilingual MSI)
1089 $(QUIET)$(RM) -f -- \
1090 $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_BASE)-r*.cmd )
1091 $(CP) -f -- "$<" "$@"
1092
1093 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1094 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
1095 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
1096
1097 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
1098 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
1099 $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
1100
1101# Create repack script for this step.
1102 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd" \
1103 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1104 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1105 'copy /y "$(<F)" "$(@F)" || exit /b1' \
1106 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
1107 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1108 '$(VBOX_PATH_MSIDB) -d $(@F) -r $(lang).mst || exit /b1' \
1109 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) || exit /b1') \
1110 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) || exit /b1' \
1111 'cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $(@F) $(VBOX_INS_PROD_LANG) || exit /b1' \
1112 'call sign-sha1.cmd $(@F) || exit /b1' \
1113 ) ) \
1114 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),'copy /y "$(@F)" "$(notdir $(PACKAGE_NAME_FINAL))" || exit /b1',) \
1115 '@echo Created multilanguage MSI: $(notdir $(PACKAGE_NAME_FINAL))'
1116
1117# Copy multilingual installer to bin.
1118$(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
1119 $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
1120 $(INSTALL_STAGING) -- $< $@
1121
1122
1123if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
1124#
1125# Make the multi-architecture installer by calling our stub builder
1126# with both platform installers (x86 and amd64) + common cab. The common
1127# cab only is needed when we don't use merge modules. We only
1128# need to do this once; so do it on x86 only.
1129#
1130$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1131+ $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1132 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
1133 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1134 $(PATH_STAGE_BIN)/VBoxStub.exe \
1135 $$(VBoxStubBld_1_TARGET)
1136 $(call MSG_L1,Building Windows combined package)
1137 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1138 $@ \
1139 $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1140 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
1141 $(REDIRECT) -C $(@D) -- \
1142 $(VBoxStubBld_1_TARGET) -out $@ \
1143 -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
1144 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1145 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
1146 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1147 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1148 $(call VBOX_SIGN_FILE_FN,$@)
1149# Create repack script for this step.
1150 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd" \
1151 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1152 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1153 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1154 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
1155 ,'call sign-dual.cmd ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) || exit /b1') \
1156 '..\bin\VBoxStubBld.exe ^' \
1157 ' -out $(@F) ^' \
1158 ' -target-x86 $(PACKAGE_NAME_MULTIARCH.x86) ^' \
1159 ' -target-amd64 ../../../win.amd64/$(KBUILD_TYPE)/repack/$(PACKAGE_NAME_MULTIARCH.amd64) ^' \
1160 $(if-expr defined(VBOX_WITH_MSM_INSTALL),\
1161 ,' -target-all ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) ^' ) \
1162 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1163 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1164 'call sign-dual.cmd $(@F) || exit /b1' \
1165 ) ) \
1166 '@echo Created multiarch EXE: $(@F)'
1167else
1168#
1169# We still do the installer stub thing even if we only ship 64-bit, because we've
1170# gotten used to having it around to install the certificate and such.
1171#
1172$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1173+ $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1174 $(PACKAGE_NAME_FINAL) \
1175 $(PATH_STAGE_BIN)/VBoxStub.exe \
1176 $$(VBoxStubBld_1_TARGET)
1177 $(call MSG_L1,Building Windows package w/ installer stub)
1178 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1179 $@ \
1180 $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1181 $(REDIRECT) -C $(@D) -- \
1182 $(VBoxStubBld_1_TARGET) -out $@ \
1183 -target-$(KBUILD_TARGET_ARCH) $(PACKAGE_NAME_FINAL) \
1184 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1185 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1186 $(call VBOX_SIGN_FILE_FN,$@)
1187# Create repack script for this step.
1188 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd" \
1189 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1190 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1191 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1192 '..\bin\VBoxStubBld.exe ^' \
1193 ' -out $(@F) ^' \
1194 ' -target-$(KBUILD_TARGET_ARCH) $(notdir $(PACKAGE_NAME_FINAL)) ^' \
1195 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1196 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1197 'call sign-dual.cmd $(@F) || exit /b1' \
1198 ) ) \
1199 '@echo Created multiarch EXE: $(@F)'
1200endif
1201
1202#
1203# Repackaging scripts and files.
1204#
1205INSTALLS += RePackScripts
1206RePackScripts_TEMPLATE = DUMMY
1207RePackScripts_INST = repack/
1208RePackScripts_INSTTYPE = stage
1209RePackScripts_SOURCES = \
1210 Scripts/UnpackBlessedDrivers.cmd \
1211 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1212 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1213 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1214 $(if-expr defined(VBOX_SIGN_EV_FILE_FN),$(RePackScripts_0_OUTDIR)/sign-ev.cmd,) \
1215 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1216 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1217if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86"
1218 RePackScripts_SOURCES += \
1219 $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
1220endif
1221ifdef VBOX_WITH_COMBINED_PACKAGE
1222 if "$(KBUILD_TARGET_ARCH)" == "x86"
1223 RePackScripts_SOURCES += \
1224 $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
1225 $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd \
1226 $(RePackScripts_0_OUTDIR)/Combined-3-RepackAdditions.cmd
1227 endif
1228else
1229 RePackScripts_SOURCES += \
1230 $(RePackScripts_0_OUTDIR)/Single-1-Prepare.cmd \
1231 $(RePackScripts_0_OUTDIR)/Single-3-Repack.cmd
1232
1233ifndef VBOX_OSE
1234 RePackScripts_SOURCES += \
1235 $(RePackScripts_0_OUTDIR)/Single-0-All.cmd \
1236 Scripts/sign-attestation.sh
1237endif
1238
1239endif
1240RePackScripts_CLEAN = \
1241 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1242 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1243 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1244 $(RePackScripts_0_OUTDIR)/sign-ev.cmd \
1245 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1246 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1247
1248$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
1249$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
1250ifdef VBOX_WITH_COMBINED_PACKAGE
1251$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
1252$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
1253$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-RepackAdditions.cmd,Combined-3-RepackAdditions.cmd)
1254else
1255ifndef VBOX_OSE
1256$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-0-All.cmd,Single-0-All.cmd)
1257endif
1258$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-1-Prepare.cmd,Single-1-Prepare.cmd)
1259$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-3-Repack.cmd,Single-3-Repack.cmd)
1260endif
1261
1262$$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
1263 $(APPEND) -nt "$@" \
1264 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1265 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1266 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1267 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1268 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,,&&) ) || exit /b1' \
1269 ) )
1270
1271$$(RePackScripts_0_OUTDIR)/sign-sha1.cmd: | $$(dir $$@)
1272 $(APPEND) -nt "$@" \
1273 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1274 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1275 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1276 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1277 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing,&&) ) || exit /b1' \
1278 ) )
1279
1280# The %~dp1\ oddity is working around otherwise ending with \" during
1281# expansion of the CCS command line which for a reason I cannot immediately
1282# understand appends a " to the path.
1283$$(RePackScripts_0_OUTDIR)/sign-ev.cmd: | $$(dir $$@)
1284 $(APPEND) -nt "$@" \
1285 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1286 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1287 'if ".%1" == "." (echo No .cab file specified & exit /b 1)' \
1288 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1289 '( $(call VBOX_SIGN_EV_FILE_FN,%1,%~dp1\) ) || exit /b1' \
1290 ) )
1291
1292$$(RePackScripts_0_OUTDIR)/VMMR0.inf: $(PATH_SUB_CURRENT)/Scripts/VMMR0.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1293 $(call MSG_GENERATE,RePackScripts,$@,$<)
1294 $(call VBOX_EDIT_INF_FN,$<,$@)
1295
1296$$(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf: $(PATH_SUB_CURRENT)/Scripts/VBoxExtPackPuel.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1297 $(call MSG_GENERATE,RePackScripts,$@,$<)
1298 $(call VBOX_EDIT_INF_FN,$<,$@)
1299
1300
1301include $(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