VirtualBox

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

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

/Config.kmk, /Makefile.kmk, Installer/win/Makefile.kmk: Start phasing out the .chm documentation including kchmviewer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 62.9 KB
Line 
1# $Id: Makefile.kmk 88303 2021-03-26 18:27:19Z 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 $(APPEND) $@ ' <File Id="file_VirtualBox.chm" Name="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/VirtualBox.chm)"></File>'
350 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
351 ' <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>')
352endif
353 $(APPEND) $@ '</Include>'
354
355$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
356 $(call MSG_GENERATE,,$@,$<)
357 $(APPEND) -t $@ '<?xml version="1.0" ?>'
358 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
359ifdef VBOX_WITH_DOCS_PACKING
360 $(APPEND) $@ ' <File Id="file_UserManual.pdf" Name="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(PATH_STAGE_BIN)/UserManual.pdf)">'
361 $(APPEND) $@ ' </File>'
362 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
363 ' <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)">' \
364 ' </File>')
365endif
366 $(APPEND) $@ '</Include>'
367
368$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
369 $(call MSG_GENERATE,,$@,$<)
370 $(APPEND) -t $@ '<?xml version="1.0" ?>'
371 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
372 $(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))">' \
373 ' </File>'
374 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
375 ' <File Id="file_License_$(lang).rtf" Name="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(subst /,\,$(VBOX_BRAND_$(lang)_LICENSE_RTF))">' \
376 ' </File>')
377 $(APPEND) $@ '</Include>'
378
379$(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) $(PATH_SUB_CURRENT)/../Config.kmk | $$(dir $$@)
380 $(call MSG_GENERATE,,$@,$<)
381 $(QUIET)$(APPEND) -nt "$@" \
382 '<?xml version="1.0" ?>' \
383 '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
384ifdef VBOX_WITH_DTRACE
385 $(QUIET)$(APPEND) -n "$@" \
386 '<Directory Id="dir_DTrace" Name="dtrace">' \
387 ' <Directory Id="dir_DTrace_lib" Name="lib">' \
388 ' <Directory Id="dir_DTrace_lib_arch" Name="$(KBUILD_TARGET_ARCH)">' \
389 ' <Component Id="cp_dir_DTrace_lib_arch" Guid="7476CDF6-4157-2E17-5CCC-FF92528D2854" Win64="$$(var.Property_Win64)">' \
390 $(foreach file, $(VBOXINST_DTRACE_LIB_ARCH_FILES) \
391 , ' <File Id="file_dtrace_lib_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
392 ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/lib/$(KBUILD_TARGET_ARCH)/$(file))" />' ) \
393 ' </Component>' \
394 ' </Directory>' \
395 ' </Directory>' \
396 $(if $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
397 ' <Directory Id="dir_DTrace_testcase" Name="testcase">' \
398 ' <Directory Id="dir_DTrace_testcase_arch" Name="$(KBUILD_TARGET_ARCH)">' \
399 ' <Component Id="cp_dir_DTrace_testcase_arch" Guid="45DF7014-4431-6C40-6DB0-35AF7C690EE1" Win64="$$(var.Property_Win64)">' \
400 $(foreach file, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES) \
401 , ' <File Id="file_dtrace_testcase_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
402 ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/testcase/$(KBUILD_TARGET_ARCH)/$(file))" />' ) \
403 ' </Component>' \
404 ' </Directory>' \
405 ' </Directory>') \
406 $(if $(VBOXINST_DTRACE_SCRIPTS_FILES), \
407 ' <Directory Id="dir_DTrace_scripts" Name="scripts">' \
408 ' <Component Id="cp_dir_DTrace_scripts" Guid="AE07F9D5-4FD9-ACC7-C760-E9923CE01E16" Win64="$$(var.Property_Win64)">' \
409 $(foreach file, $(VBOXINST_DTRACE_SCRIPTS_FILES) \
410 , ' <File Id="file_dtrace_scripts_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
411 ' Source="$(subst /,\,$(PATH_STAGE_BIN)/dtrace/scripts/$(file))" />' ) \
412 ' </Component>' \
413 ' </Directory>') \
414 '</Directory>'
415endif
416 $(QUIET)$(APPEND) "$@" '</Include>'
417
418
419$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
420 $(call MSG_GENERATE,,$@,$<)
421 $(APPEND) -t $@ '<?xml version="1.0" ?>'
422 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
423 #
424 # Documentation (PDF/CHM)
425 #
426ifdef VBOX_WITH_DOCS_PACKING
427 ifdef VBOX_WITH_DOCS_CHM_PACKING
428 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualCHM_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, English)" Description="!(loc.StartMenu_UserManual)"' \
429 ' Target="[INSTALLDIR]\VirtualBox.chm" WorkingDirectory="dir_Documents" Advertise="no"/>'
430 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
431 ' <Shortcut Id="sc_StartMenu_ManualCHM_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
432 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\VirtualBox_$(lang).chm" WorkingDirectory="dir_Documents"/>')
433 endif
434 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
435 ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_Documents" Advertise="no"/>'
436 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
437 ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
438 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_Documents"/>')
439endif
440 #
441 # License(s) (RTF)
442 #
443 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
444 ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
445 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
446 ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
447 ' Description="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
448 $(APPEND) $@ '</Include>'
449
450#
451# .MSI linking of the main installer (en_US).
452#
453# Note: This will clean up any previous .msi and .wixpdb files to prevent dep
454# build boxes from filling up with old files.
455#
456define def_vbox_link_msi
457$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
458$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \
459 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
460 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
461 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
462 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
463 $(VBOX_SVN_REV_KMK) \
464 $(VBOX_WIN_INST_MAKEFILE_DEP) \
465 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
466 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
467 | $$$$(dir $$$$@)
468 $$(call MSG_L1,Linking installer $$@)
469 $(QUIET)$(RM) -f $$(wildcard $$(subst r$$(VBOX_SVN_REV),r*,\
470 $$@ \
471 $$(basename $$@).wixpdb \
472 $$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd ))
473 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \
474 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
475 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
476 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
477 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
478 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
479 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
480 $(VBOX_MSI_ICE_IGNORE) \
481 -out $$@ \
482 $$< \
483 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
484if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL)
485 $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab
486endif
487ifeq ($(lang),en_US)
488 $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl" "$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl" \
489 "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"
490# Create repack script for this step.
491 $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd" \
492 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
493 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
494 '$(VBOX_PATH_WIX)/light.exe -v -nologo ^' \
495 ' -loc files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
496 ' -loc files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
497 ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^' \
498 ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
499 ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \
500 $(if-expr defined(VBOX_WITH_MSI_HACK),'-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll ^',) \
501 ' $(VBOX_MSI_ICE_IGNORE) ^' \
502 ' -out $$(@F) ^' \
503 ' $$(<F) ^' \
504 ' $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib ^' \
505 ' || exit /b1' \
506 ) \
507 '@echo Created MSI installer: $$(@F)' \
508 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL),'@echo Created: common.cab',)
509
510endif
511endef
512
513$(foreach lang, en_US, $(eval $(def_vbox_link_msi)))
514
515
516#
517# Merge module linking (all languages).
518#
519# Note: This will clean up any previous .msm to prevent dep build boxes from
520# filling up with old files.
521#
522define def_vbox_link_msm
523$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm: \
524 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
525 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
526 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
527 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
528 $(VBOX_SVN_REV_KMK) \
529 $(VBOX_WIN_INST_MAKEFILE_DEP) \
530 | $$$$(dir $$$$@)
531 $$(call MSG_L1,Linking installer $$@)
532 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
533 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \
534 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
535 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
536 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
537 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
538 $(VBOX_MSI_ICE_IGNORE) \
539 -out $$@ \
540 $$< \
541 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
542 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
543 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
544# Create repack script for this step.
545 $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/2-link-VBoxMerge$(module)_$(lang).cmd" \
546 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
547 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
548 '$(VBOX_PATH_WIX)/light.exe -v -nologo ^' \
549 ' -loc files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
550 ' -loc files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
551 ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
552 ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \
553 ' $(VBOX_MSI_ICE_IGNORE) ^' \
554 ' -out $$(@F) ^' \
555 ' $$(<F) ^' \
556 ' $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib ^' \
557 ' || exit /b1' \
558 'call sign-sha1.cmd $$(@F) || exit /b1' \
559 ) \
560 '@echo Created MSM module: $$(@F)'
561endef
562
563$(if-expr defined(VBOX_WITH_MSM_INSTALL), \
564 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
565 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
566 $(eval $(def_vbox_link_msm)))),)
567
568
569#
570# Add dependencies that makes sure necessary bits gets built.
571# For combined packages we always use the .ISO from the amd64 build.
572#
573ifdef VBOX_WITH_COMBINED_PACKAGE
574 VBOX_MSI_DEPENDENCIES := \
575 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
576else
577 VBOX_MSI_DEPENDENCIES := \
578 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
579endif
580
581#
582# A few manual dependencies to make sure everything is rebuilt when they should.
583#
584$(PATH_SUB_CURRENT)/VirtualBox.wxs: \
585 $(PATH_SUB_CURRENT)/CommonProperties.wxi \
586 $(PATH_SUB_CURRENT)/Defines.wxi \
587 $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
588
589$(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
590 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
591 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
592 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
593 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
594 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
595 $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
596 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
597 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
598
599#
600# MSI compile.
601# We've separated the processing from the compilation for repacking reasons.
602#
603define def_vbox_compile_wixobj
604includedep $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep
605$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
606+ $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
607$(if-expr "$(lang)" != "en_US",, \
608+ $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files ): \
609 $(PATH_SUB_CURRENT)/VirtualBox.wxs \
610 $(PATH_SUB_CURRENT)/UserInterface.wxi \
611 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
612 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
613 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm), \
614 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
615 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
616 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
617 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
618 $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi \
619 $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi \
620 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
621 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
622 $(VBOX_MSI_DEPENDENCIES)) \
623 $(VBOX_VERSION_STAMP) \
624 | $$$$(dir $$$$@) $(if-expr "$(lang)" != "en_US",, \
625 $(VBOX_WIN_INST_REPACK_DIR)/ $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )
626 $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix"
627 $(REDIRECT) \
628 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
629 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
630 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
631 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
632 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
633 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
634 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
635 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
636 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
637 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
638 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
639 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
640 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
641 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
642 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
643 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
644 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
645 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
646 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
647 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
648 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(if-expr $(lang) == "en_US",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
649 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(if-expr $(lang) == "en_US" && $(KBUILD_TARGET_ARCH) == "amd64",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
650 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
651 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
652 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
653 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
654 -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm')),) \
655 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
656 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
657 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
658 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
659 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
660 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
661 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
662 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
663 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
664 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
665 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
666 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
667 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
668 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
669 -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
670 -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
671 -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
672 -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
673 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
674 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
675 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
676 -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
677 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
678 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
679 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
680 -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
681 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
682 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
683 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
684 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
685 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
686 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
687 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
688 -E 'VBOX_WITH_USB=$(if $(VBOX_WITH_USB),yes,no)' \
689 -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),yes,no)' \
690 -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
691 -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
692 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
693 -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
694 -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
695 -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
696 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
697 -- \
698 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
699 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
700 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
701 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
702 -p$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix
703 $(VBOX_PATH_WIX)/candle.exe $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
704 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
705 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
706 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
707 -out $$@
708 ifeq ($(lang),en_US)
709# Copy preprocessed wix and change source paths to be relative. Stuff not in ../bin needs copying.
710 $(SED) -e 's,$(subst /,\\,$(PATH_OUT))\\bin,..\\bin,g' \
711 -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.amd64\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.amd64\\$(KBUILD_TYPE)\\bin,g' \
712 -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.x86\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.x86\\$(KBUILD_TYPE)\\bin,g' \
713 \
714 -e 's,$(subst /,\\,$(PATH_ROOT))\\doc\\,files-VirtualBox_$(lang)\\,g' \
715 -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\Binary\\,files-VirtualBox_$(lang)\\,g' \
716 -e 's,$(subst /,\\,$(VBOX_WIN_INST_OUT_DIR))\\,,g' \
717 -e 's,$(subst /,\\,$(dir $(VBOX_WINDOWS_ICON_FILE))),files-VirtualBox_$(lang)\\,g' \
718 --output "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix" \
719 "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix"
720 $(SED) -n \
721 -e '/<\?ln /d' \
722 -e '/$(subst /,\\,$(PATH_ROOT))/p' \
723 -e '/$(subst /,\\,$(PATH_ROOT))/q2' \
724 "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix"
725 $(SED) -n \
726 -e '/<\?ln /d' \
727 -e 's/\\/\//g' \
728 -e 's,^.*"\($(PATH_ROOT)/doc/[^"]*\)".*$$(DOLLAR),\1,p' \
729 -e 's,^.*"\($(VBOX_PATH_WIN_INST_SRC)/Binary/[^"]*\)".*$$(DOLLAR),\1,p' \
730 -e 's,^.*"\($(dir $(VBOX_WINDOWS_ICON_FILE))[^"]*\)".*$$(DOLLAR),\1,p' \
731 --output "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" \
732 "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix"
733 set -xe && for file in `$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files"`; \
734 do $(CP_EXT) -f -- "$$(DOLLAR){file}" "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"; done
735# Create repack script for this step.
736 $(APPEND) -tn "$(VBOX_WIN_INST_REPACK_DIR)/1-compile-VirtualBox_$(lang).cmd" \
737 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
738 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
739 '$(VBOX_PATH_WIX)/candle.exe VirtualBox_$(lang).wix ^' \
740 ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^' \
741 ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
742 ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \
743 ' -out $$(@F) || exit /b1' \
744 ) \
745 '@echo Created: $$(@F)'
746 endif
747# Generate wxi dependencies based on the sourceLineNumber references in the output. Add repack file list for cleanup.
748 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
749 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
750 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
751 $(QUIET)$(APPEND) -n '[email protected]' '' ''
752 ifeq ($(lang),en_US)
753 $(QUIET)$(APPEND) -n '[email protected]' 'define VBOX_REPACK_FILES_VirtualBox_$(lang)'
754 $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" >> '[email protected]'
755 $(QUIET)$(APPEND) -n '[email protected]' '' 'endef'
756 endif
757
758$(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VirtualBox_$(lang)))
759endef
760
761$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
762 $(eval $(def_vbox_compile_wixobj)))
763
764#
765# MSM (merge module) compile.
766#
767define def_vbox_compile_msm
768includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj.dep
769$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
770+ $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \
771$(if-expr "$(lang)" != "en_US",, \
772+ $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix): \
773 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
774 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
775 $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
776 $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
777 $(PATH_SUB_CURRENT)/UserInterface.wxi \
778 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
779 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
780 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
781 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
782 $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi \
783 $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi \
784 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
785 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
786 $(VBOX_MSI_DEPENDENCIES) \
787 $(VBOX_VERSION_STAMP) \
788 | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
789 $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
790 $(REDIRECT) \
791 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
792 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
793 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
794 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
795 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
796 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
797 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
798 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
799 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
800 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
801 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
802 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
803 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
804 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
805 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
806 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
807 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
808 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
809 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
810 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
811 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
812 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \
813 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
814 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
815 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
816 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
817 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
818 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
819 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
820 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
821 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
822 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
823 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
824 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
825 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
826 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
827 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
828 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
829 -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
830 -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
831 -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
832 -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
833 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
834 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
835 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
836 -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
837 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
838 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
839 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
840 -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
841 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
842 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
843 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
844 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
845 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
846 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
847 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
848 -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG),yes,no)' \
849 -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
850 -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
851 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
852 -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
853 -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
854 -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
855 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
856 -- \
857 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
858 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
859 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
860 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
861 -p$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix
862 $(VBOX_PATH_WIX)/candle.exe $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \
863 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
864 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
865 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
866 -out $$@
867 ifeq ($(lang),en_US)
868# Copy preprocessed wix and change source paths to be relative. Stuff not in ../bin needs copying.
869 $(SED) -e 's,$(subst /,\\,$(PATH_OUT))\\bin,..\\bin,g' \
870 -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.amd64\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.amd64\\$(KBUILD_TYPE)\\bin,g' \
871 -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.x86\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.x86\\$(KBUILD_TYPE)\\bin,g' \
872 -e 's,$(subst /,\\,$(PATH_ROOT))\\doc\\,files-VBoxMerge$(module)_$(lang)\\,g' \
873 -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\Binary\\,files-VBoxMerge$(module)_$(lang)\\,g' \
874 -e 's,$(subst /,\\,$(dir $(VBOX_WINDOWS_ICON_FILE))),files-VBoxMerge$(module)_$(lang)\\,g' \
875 -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\,,g' \
876 --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix" \
877 "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix"
878 $(SED) -n \
879 -e '/<\?ln /d' \
880 -e '/$(subst /,\\,$(PATH_ROOT))/p' \
881 -e '/$(subst /,\\,$(PATH_ROOT))/q2' \
882 "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
883 $(SED) -n \
884 -e '/<\?ln /d' \
885 -e 's/\\/\//g' \
886 -e 's,^.*"\($(PATH_ROOT)/doc/[^"]*\)".*$$(DOLLAR),\1,p' \
887 -e 's,^.*"\($(VBOX_PATH_WIN_INST_SRC)/Binary/[^"]*\)".*$$(DOLLAR),\1,p' \
888 -e 's,^.*"\($(dir $(VBOX_WINDOWS_ICON_FILE))[^"]*\)".*$$(DOLLAR),\1,p' \
889 --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" \
890 "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix"
891 $(MKDIR) -p -- "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"
892 set -xe && for file in `$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files"`; \
893 do $(CP_EXT) -f -- "$$(DOLLAR){file}" "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"; done
894# Create repack script for this step.
895 $(APPEND) -tn "$(VBOX_WIN_INST_REPACK_DIR)/1-compile-VBoxMerge$(module)_$(lang).cmd" \
896 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
897 $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
898 '$(VBOX_PATH_WIX)/candle.exe VBoxMerge$(module)_$(lang).wix ^' \
899 ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^'\
900 ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \
901 ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \
902 ' -out $$(@F) || exit /b1' \
903 ) \
904 '@echo Created: $$(@F)'
905 endif
906# Generate wxi dependencies based on the sourceLineNumber references in the output. Add repack file list for cleanup.
907 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
908 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
909 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
910 $(QUIET)$(APPEND) -n '[email protected]' '' ''
911 ifeq ($(lang),en_US)
912 $(QUIET)$(APPEND) -n '[email protected]' 'define VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)'
913 $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" >> '[email protected]'
914 $(QUIET)$(APPEND) -n '[email protected]' '' 'endef'
915 endif
916
917$(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)))
918endef
919
920$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
921 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
922 $(eval $(def_vbox_compile_msm))))
923
924#
925# VirtualBox Type Library definition.
926#
927$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
928 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
929 $(VBOX_XIDL_FILE) \
930 $(MAKEFILE) \
931 | $$(dir $$@)
932 $(VBOX_XSLTPROC) \
933 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
934 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
935 -o $@ $< $(VBOX_XIDL_FILE)
936
937$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
938 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
939 $(VBOX_XIDL_FILE) \
940 | $$(dir $$@)
941 $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \
942 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
943 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
944 -o $@ $< $(VBOX_XIDL_FILE)
945
946#
947# Construct the list of GUI translations.
948# ('-t' -- truncate file; '-n' -- new line between arguments)
949#
950include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
951$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
952$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
953 $(APPEND) -t $@ '<?xml version="1.0" ?>'
954 $(APPEND) $@ '<Include>'
955 $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
956 ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
957 ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
958 $(APPEND) $@ '</Include>'
959
960#
961# Edit the version stored in the registry.
962#
963$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
964$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
965 $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
966 -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
967 --output $@ $<
968
969#
970# Generate the list of CRT DLLs.
971#
972ifndef TOOL_$(VBOX_VCC_TOOL)
973 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk
974endif
975$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi)
976$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi: | $$(dir $$@)
977 $(APPEND) -t -n $@ \
978 '<?xml version="1.0" ?>' \
979 '<Include>' \
980 $(foreach dll \
981 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
982 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
983 ,$(TOOL_$(VBOX_VCC_TOOL)_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL)_REDIST_CPP_DLLS))) \
984 ,' <File Id="file_$(dll)" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\$(dll)" />') \
985 '</Include>'
986
987#
988# Generate the list of 32-bit CRT DLLs.
989#
990ifndef TOOL_$(VBOX_VCC_TOOL_STEM)X86
991 include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)X86.kmk
992endif
993$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi)
994$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi: | $$(dir $$@)
995 $(APPEND) -t -n $@ \
996 '<?xml version="1.0" ?>' \
997 '<Include>' \
998 $(foreach dll \
999 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
1000 ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
1001 ,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CPP_DLLS))) \
1002 ,' <File Id="file_$(dll)_x86" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\x86\$(dll)" DiskId="$$(var.Property_DiskIdCommon)" />') \
1003 '</Include>'
1004#
1005# Generate the list of unattended template script files.
1006#
1007$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
1008$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
1009 $(APPEND) -t -n $@ \
1010 '<?xml version="1.0" ?>' \
1011 '<Include>'
1012ifdef VBOX_UNATTENDED_TEMPLATES
1013 $(APPEND) -n $@ \
1014 ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
1015 ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Win64="$$(var.Property_Win64)">' \
1016 $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
1017 ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
1018 ' </Component>' \
1019 ' </Directory>'
1020endif
1021 $(APPEND) $@ '</Include>'
1022
1023
1024#
1025# Build the multi-language version of the .MSI installer (final installer).
1026#
1027# This is done by creating binary .MST diffs of all the language-specific installers
1028# against the en_US one, and then merging the diffs into the en_US one using tools
1029# from the MS Installer SDK.
1030#
1031define def_vbox_create_mst
1032$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
1033+ $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \
1034 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1035 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
1036 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1037 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1038 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
1039 $(VBOX_SVN_REV_KMK) \
1040 $(VBOX_WIN_INST_MAKEFILE_DEP) \
1041 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
1042 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
1043 | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
1044 $(call MSG_L1,Creating language diff for $(lang))
1045 kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \
1046 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
1047 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
1048 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
1049 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
1050 -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \
1051 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
1052 $(VBOX_MSI_ICE_IGNORE) \
1053 -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
1054 $$(@D)/VirtualBox_$(lang).wixobj \
1055 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
1056 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
1057 $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst"
1058 $(RM) -f -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
1059 $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
1060 $$(@D)/common.cab
1061
1062endef
1063
1064$(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
1065 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
1066 $(eval $(def_vbox_create_mst)))
1067
1068
1069# Create WISUMINFO argument.
1070VBOX_INS_PROD_ARCH.amd64 = x64
1071VBOX_INS_PROD_ARCH.x86 = Intel
1072VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
1073$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
1074VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
1075$(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
1076 , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
1077VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
1078
1079# The multilingual installer rule.
1080$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
1081+ $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd: \
1082 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
1083 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
1084 $(call MSG_L1,Creating final multilingual MSI)
1085 $(QUIET)$(RM) -f -- \
1086 $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_BASE)-r*.cmd )
1087 $(CP) -f -- "$<" "$@"
1088
1089 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1090 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
1091 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
1092
1093 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
1094 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
1095 $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
1096
1097# Create repack script for this step.
1098 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd" \
1099 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1100 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1101 'copy /y "$(<F)" "$(@F)" || exit /b1' \
1102 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
1103 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
1104 '$(VBOX_PATH_MSIDB) -d $(@F) -r $(lang).mst || exit /b1' \
1105 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) || exit /b1') \
1106 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) || exit /b1' \
1107 'cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $(@F) $(VBOX_INS_PROD_LANG) || exit /b1' \
1108 'call sign-sha1.cmd $(@F) || exit /b1' \
1109 ) ) \
1110 $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),'copy /y "$(@F)" "$(notdir $(PACKAGE_NAME_FINAL))" || exit /b1',) \
1111 '@echo Created multilanguage MSI: $(notdir $(PACKAGE_NAME_FINAL))'
1112
1113# Copy multilingual installer to bin.
1114$(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
1115 $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
1116 $(INSTALL_STAGING) -- $< $@
1117
1118
1119if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
1120#
1121# Make the multi-architecture installer by calling our stub builder
1122# with both platform installers (x86 and amd64) + common cab. The common
1123# cab only is needed when we don't use merge modules. We only
1124# need to do this once; so do it on x86 only.
1125#
1126$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1127+ $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1128 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
1129 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1130 $(PATH_STAGE_BIN)/VBoxStub.exe \
1131 $$(VBoxStubBld_1_TARGET)
1132 $(call MSG_L1,Building Windows combined package)
1133 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1134 $@ \
1135 $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1136 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
1137 $(REDIRECT) -C $(@D) -- \
1138 $(VBoxStubBld_1_TARGET) -out $@ \
1139 -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
1140 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
1141 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
1142 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1143 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1144 $(call VBOX_SIGN_FILE_FN,$@)
1145# Create repack script for this step.
1146 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd" \
1147 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1148 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1149 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1150 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
1151 ,'call sign-dual.cmd ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) || exit /b1') \
1152 '..\bin\VBoxStubBld.exe ^' \
1153 ' -out $(@F) ^' \
1154 ' -target-x86 $(PACKAGE_NAME_MULTIARCH.x86) ^' \
1155 ' -target-amd64 ../../../win.amd64/$(KBUILD_TYPE)/repack/$(PACKAGE_NAME_MULTIARCH.amd64) ^' \
1156 $(if-expr defined(VBOX_WITH_MSM_INSTALL),\
1157 ,' -target-all ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) ^' ) \
1158 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1159 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1160 'call sign-dual.cmd $(@F) || exit /b1' \
1161 ) ) \
1162 '@echo Created multiarch EXE: $(@F)'
1163else
1164#
1165# We still do the installer stub thing even if we only ship 64-bit, because we've
1166# gotten used to having it around to install the certificate and such.
1167#
1168$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
1169+ $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
1170 $(PACKAGE_NAME_FINAL) \
1171 $(PATH_STAGE_BIN)/VBoxStub.exe \
1172 $$(VBoxStubBld_1_TARGET)
1173 $(call MSG_L1,Building Windows package w/ installer stub)
1174 $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
1175 $@ \
1176 $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
1177 $(REDIRECT) -C $(@D) -- \
1178 $(VBoxStubBld_1_TARGET) -out $@ \
1179 -target-$(KBUILD_TARGET_ARCH) $(PACKAGE_NAME_FINAL) \
1180 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
1181 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
1182 $(call VBOX_SIGN_FILE_FN,$@)
1183# Create repack script for this step.
1184 $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(@F).cmd" \
1185 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
1186 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
1187 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1188 '..\bin\VBoxStubBld.exe ^' \
1189 ' -out $(@F) ^' \
1190 ' -target-$(KBUILD_TARGET_ARCH) $(notdir $(PACKAGE_NAME_FINAL)) ^' \
1191 ' -stub ../bin/VBoxStub.exe || exit /b1' \
1192 '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
1193 'call sign-dual.cmd $(@F) || exit /b1' \
1194 ) ) \
1195 '@echo Created multiarch EXE: $(@F)'
1196endif
1197
1198#
1199# Repackaging scripts and files.
1200#
1201INSTALLS += RePackScripts
1202RePackScripts_TEMPLATE = DUMMY
1203RePackScripts_INST = repack/
1204RePackScripts_INSTTYPE = stage
1205RePackScripts_SOURCES = \
1206 Scripts/UnpackBlessedDrivers.cmd \
1207 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1208 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1209 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1210 $(if-expr defined(VBOX_SIGN_EV_FILE_FN),$(RePackScripts_0_OUTDIR)/sign-ev.cmd,) \
1211 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1212 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1213if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86"
1214 RePackScripts_SOURCES += \
1215 $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
1216endif
1217ifdef VBOX_WITH_COMBINED_PACKAGE
1218 if "$(KBUILD_TARGET_ARCH)" == "x86"
1219 RePackScripts_SOURCES += \
1220 $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
1221 $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd \
1222 $(RePackScripts_0_OUTDIR)/Combined-3-RepackAdditions.cmd
1223 endif
1224else
1225 RePackScripts_SOURCES += \
1226 $(RePackScripts_0_OUTDIR)/Single-1-Prepare.cmd \
1227 $(RePackScripts_0_OUTDIR)/Single-3-Repack.cmd
1228
1229ifndef VBOX_OSE
1230 RePackScripts_SOURCES += \
1231 $(RePackScripts_0_OUTDIR)/Single-0-All.cmd \
1232 Scripts/sign-attestation.sh
1233endif
1234
1235endif
1236RePackScripts_CLEAN = \
1237 $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
1238 $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
1239 $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
1240 $(RePackScripts_0_OUTDIR)/sign-ev.cmd \
1241 $(RePackScripts_0_OUTDIR)/VMMR0.inf \
1242 $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
1243
1244$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
1245$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
1246ifdef VBOX_WITH_COMBINED_PACKAGE
1247$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
1248$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
1249$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-RepackAdditions.cmd,Combined-3-RepackAdditions.cmd)
1250else
1251ifndef VBOX_OSE
1252$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-0-All.cmd,Single-0-All.cmd)
1253endif
1254$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-1-Prepare.cmd,Single-1-Prepare.cmd)
1255$(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-3-Repack.cmd,Single-3-Repack.cmd)
1256endif
1257
1258$$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
1259 $(APPEND) -nt "$@" \
1260 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1261 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1262 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1263 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1264 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,,&&) ) || exit /b1' \
1265 ) )
1266
1267$$(RePackScripts_0_OUTDIR)/sign-sha1.cmd: | $$(dir $$@)
1268 $(APPEND) -nt "$@" \
1269 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1270 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1271 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
1272 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1273 '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing,&&) ) || exit /b1' \
1274 ) )
1275
1276# The %~dp1\ oddity is working around otherwise ending with \" during
1277# expansion of the CCS command line which for a reason I cannot immediately
1278# understand appends a " to the path.
1279$$(RePackScripts_0_OUTDIR)/sign-ev.cmd: | $$(dir $$@)
1280 $(APPEND) -nt "$@" \
1281 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
1282 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
1283 'if ".%1" == "." (echo No .cab file specified & exit /b 1)' \
1284 $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
1285 '( $(call VBOX_SIGN_EV_FILE_FN,%1,%~dp1\) ) || exit /b1' \
1286 ) )
1287
1288$$(RePackScripts_0_OUTDIR)/VMMR0.inf: $(PATH_SUB_CURRENT)/Scripts/VMMR0.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1289 $(call MSG_GENERATE,RePackScripts,$@,$<)
1290 $(call VBOX_EDIT_INF_FN,$<,$@)
1291
1292$$(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf: $(PATH_SUB_CURRENT)/Scripts/VBoxExtPackPuel.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
1293 $(call MSG_GENERATE,RePackScripts,$@,$<)
1294 $(call VBOX_EDIT_INF_FN,$<,$@)
1295
1296
1297include $(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