VirtualBox

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

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

Artwork,Installer/win,Fe/QT: Corrections to r139867 and the Windows 10 start menu icons. bugref:9641

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