VirtualBox

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

Last change on this file since 71879 was 70729, checked in by vboxsync, 7 years ago

Installer/win/Makefile.kmk: fix building of MSM packages (got accidentally broken as part of the parallel build fix, MSM packages have no common.cab), and also clean up the variable checking of VBOX_WITH_COMBINED_PACKAGE and VBOX_WITH_MSM_INSTALL to check consistently if it is defined.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 38.9 KB
Line 
1# $Id: Makefile.kmk 70729 2018-01-24 16:27:15Z vboxsync $
2## @file
3# Makefile for the Windows installer.
4#
5
6#
7# Copyright (C) 2006-2017 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
31ifeq ($(KBUILD_TARGET_ARCH),x86)
32 include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
33 include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
34endif
35
36include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
37ifdef VBOX_WITH_MSI_HACK
38 include $(PATH_SUB_CURRENT)/MsiHack/Makefile.kmk
39endif
40
41
42
43#
44# Globals.
45#
46# Tip: Use VBOX_CAB_COMPRESSION_LEVEL=none on the kmk command line when working
47# on the installer.
48#
49VBOX_WIN_INST_MAKEFILE_DEP := $(MAKEFILE_CURRENT)
50VBOX_CAB_COMPRESSION_LEVEL := high
51
52VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
53VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
54
55# Note: en_US *must* come first for the dependency file generation.
56ifndef VBOX_INSTALLER_LANGUAGES
57 VBOX_INSTALLER_LANGUAGES = en_US de_DE fr_FR it_IT zh_TW
58 VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
59endif
60
61
62#
63# List of merge modules to use.
64#
65VBOX_INSTALLER_MERGE_MODULES = App USB NetAdp NetFlt NetAdp6 NetLwf Python
66ifeq ($(KBUILD_TARGET_ARCH),amd64)
67 VBOX_INSTALLER_MERGE_MODULES += COM32On64
68endif
69
70# We only ship the merge modules in locale en_US for the moment.
71ifdef VBOX_WITH_MSM_INSTALL
72 VBOX_INSTALLER_LANGUAGES := en_US
73 VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES)
74endif
75
76#
77# Language IDs.
78#
79VBOX_BRAND_en_US_LANG_ID ?= 1033
80VBOX_BRAND_de_DE_LANG_ID ?= 1031
81VBOX_BRAND_fr_FR_LANG_ID ?= 1036
82VBOX_BRAND_it_IT_LANG_ID ?= 1040
83VBOX_BRAND_zh_TW_LANG_ID ?= 1028
84
85# Standard language names (in the native language), to be extended as we go.
86# VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs
87# in either VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES.
88VBOX_BRAND_fr_FR_LANG_NAME := Français
89
90
91#
92# We don't have the license text in another language than English yet,
93# so just define the branding targets to use the English one for now.
94# The installer generation assumes that there is a translation for each
95# of VBOX_INSTALLER_LANGUAGES.
96#
97$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
98 $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)))
99
100#
101# Set the codepage for all languages to 1252, covers most cases.
102#
103$(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \
104 $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
105# Exceptions:
106VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
107
108
109
110#
111# If we want to build a combined package, we separate all common stuff
112# (that is all 100% identical content between 32-/64-bit builds)
113# into an own .cab file to save space. This .cab file then gets included
114# and used by the 32-/64-bit installers.
115#
116ifdef VBOX_WITH_COMBINED_PACKAGE
117 VBOX_INSTALLER_COMMON_DISKID := 2
118else
119 VBOX_INSTALLER_COMMON_DISKID := 1
120endif
121
122## @todo VBOX_ prefixes!
123PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
124PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
125PACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi
126
127ifdef VBOX_WITH_COMBINED_PACKAGE
128 PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
129 PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
130 PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
131 PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
132 PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
133 PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
134 PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
135 # Always take the common.cab from the amd64 build, as it
136 # might contain certain files for x86 compatibility such
137 # as our 32-on-64-bit COM stuff.
138 PACKAGE_NAME_MULTIARCH_COMMONCAB := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/obj/Installer/win/common.cab
139
140 BLDDIRS += $(PATH_MULTIARCH_TEMP)
141 PACKING += $(PACKAGE_NAME_FINAL)
142 ifeq ($(KBUILD_TARGET_ARCH),x86)
143 PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
144 endif
145else
146 PACKING += $(PACKAGE_NAME_FINAL)
147endif
148BLDDIRS += \
149 $(VBOX_WIN_INST_OUT_DIR) \
150 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/) \
151 $(VBOX_WIN_INST_OUT_DIR)/NLS/
152
153OTHER_CLEAN += \
154 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
155 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
156 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
157 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi \
158 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_ProxyStub.wxi \
159 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
160 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
161 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
162 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
163 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
164 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
165 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
166 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
167 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
168 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
169 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep )\
170 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
171 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
172 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
173 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
174 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
175 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
176
177ifdef VBOX_WITH_COMBINED_PACKAGE
178 ifeq ($(KBUILD_TARGET_ARCH),x86)
179 OTHER_CLEAN += \
180 $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
181 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86)
182 endif
183 ifndef VBOX_WITH_MSM_INSTALL
184 OTHER_CLEAN += \
185 $(VBOX_WIN_INST_OUT_DIR)/common.cab
186 endif
187else
188 OTHER_CLEAN += \
189 $(PACKAGE_NAME_FINAL)
190endif
191
192ifdef VBOX_WITH_MSM_INSTALL
193 OTHER_CLEAN += \
194 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
195 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
196 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep \
197 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm \
198 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
199 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb))
200endif
201
202#
203# Suppress/skip the following ICE (Internal Consistency Evaluators):
204# - ICE64: Checks that new directories in the user profile are removed correctly in roaming scenarios.
205# -> We don't want to remove system folders (like "Microsoft/Internet Explorer/Quick Launch").
206# - ICE69: Checks if file references are within the same component.
207# -> We reference to files within different components, but these components are installed using
208# the same feature, so that's fine.
209#
210VBOX_MSI_ICE_IGNORE := \
211 -ice:64 \
212 -ice:69
213
214#
215# Create intermediate XML file for languages (needed for .MSI linking).
216#
217# Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
218# to escape the expansion of the $(eval ) argument and then the definition of the
219# rule. The statement is finally expanded during second dependency expansion, which
220# takes place after all makefiles has been loaded and with the @ variable defined.
221#
222define def_vbox_lang_xml
223$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@)
224 $$(call MSG_GENERATE,,$$@,$$<)
225 $(QUIET)$(INSTALL) -m 0644 $$< $$@
226endef
227
228$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
229 $(eval $(def_vbox_lang_xml)))
230
231#
232# Create intermediate XML file for licenses (needed for .MSI linking).
233# These files are created from the original .RTF files in the /docs directory.
234#
235# Note: The redirect command below will open $$@ as stdout in append+text mode
236# and then exec cat, thus appending the license file to the result file.
237#
238# Note: The license_file variable has to be created before def_vbox_license_xml
239# is expanded by the 2nd eval because we rely on the that expansion
240# replacing all $(license_file) (and $(lang)) references before evaluation.
241#
242# Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
243# between the tag and the RTF license text.
244#
245define def_vbox_license_xml
246$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(VBOX_WIN_INST_MAKEFILE_DEP) | $$$$(dir $$$$@)
247 $$(call MSG_GENERATE,,$$@,$$<)
248 $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
249 $(APPEND) $$@ '<WixLocalization xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="$(VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE)" Culture="$(lang)">'
250
251 $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id="LicenseText">'
252 $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\&lt;|g" -e "s|>|\&gt;|g" $(license_file)
253 $(APPEND) $$@ '</String>'
254
255 $(APPEND) $$@ '<String Id="LicenseFile">$(license_file)</String>'
256 $(APPEND) $$@ '<String Id="LicenseInstallFileLong">License_$(lang).rtf</String>'
257 $(APPEND) $$@ '<String Id="LicenseInstallFileShort">L_$(lang).rtf</String>'
258
259 $(APPEND) $$@ '</WixLocalization>'
260endef
261
262$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
263 $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
264 $(eval $(def_vbox_license_xml)))
265
266#
267# Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
268# This file includes all language-specific files (PDFs, CHMs, ...) to install.
269#
270# Note: When using the -n switch, append will append a new line after each
271# argument. The -t switch makes it truncate the file.
272#
273$(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
274 $(call MSG_GENERATE,,$@,$<)
275 $(APPEND) -t $@ '<?xml version="1.0" ?>'
276 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
277ifdef VBOX_WITH_DOCS_PACKING
278 $(APPEND) $@ ' <File Id="file_VirtualBox.chm" Name="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/VirtualBox.chm"></File>'
279 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
280 ' <File Id="file_VirtualBox_$(lang).chm" Name="VirtualBox_$(lang).chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/VirtualBox_$(lang).chm"></File>')
281endif
282 $(APPEND) $@ '</Include>'
283
284$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
285 $(call MSG_GENERATE,,$@,$<)
286 $(APPEND) -t $@ '<?xml version="1.0" ?>'
287 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
288ifdef VBOX_WITH_DOCS_PACKING
289 $(APPEND) $@ ' <File Id="file_UserManual.pdf" Name="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual.pdf">'
290 $(APPEND) $@ ' </File>'
291 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
292 ' <File Id="file_UserManual_$(lang).pdf" Name="UserManual_$(lang).pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual_$(lang).pdf">' \
293 ' </File>')
294endif
295 $(APPEND) $@ '</Include>'
296
297$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
298 $(call MSG_GENERATE,,$@,$<)
299 $(APPEND) -t $@ '<?xml version="1.0" ?>'
300 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
301 $(APPEND) $@ ' <File Id="file_License_en_US.rtf" Name="License_en_US.rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_LICENSE_RTF)">' \
302 ' </File>'
303 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
304 ' <File Id="file_License_$(lang).rtf" Name="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_$(lang)_LICENSE_RTF)">' \
305 ' </File>')
306 $(APPEND) $@ '</Include>'
307
308$(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) $(PATH_SUB_CURRENT)/../Config.kmk | $$(dir $$@)
309 $(call MSG_GENERATE,,$@,$<)
310 $(QUIET)$(APPEND) -nt "$@" \
311 '<?xml version="1.0" ?>' \
312 '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
313ifdef VBOX_WITH_DTRACE
314 $(QUIET)$(APPEND) -n "$@" \
315 '<Directory Id="dir_DTrace" Name="dtrace">' \
316 ' <Directory Id="dir_DTrace_lib" Name="lib">' \
317 ' <Directory Id="dir_DTrace_lib_arch" Name="$(KBUILD_TARGET_ARCH)">' \
318 ' <Component Id="cp_dir_DTrace_lib_arch" Guid="7476CDF6-4157-2E17-5CCC-FF92528D2854" Win64="$$(var.Property_Win64)">' \
319 $(foreach file, $(VBOXINST_DTRACE_LIB_ARCH_FILES) \
320 , ' <File Id="file_dtrace_lib_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
321 ' Source="$(PATH_STAGE_BIN)/dtrace/lib/$(KBUILD_TARGET_ARCH)/$(file)" />' ) \
322 ' </Component>' \
323 ' </Directory>' \
324 ' </Directory>' \
325 $(if $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
326 ' <Directory Id="dir_DTrace_testcase" Name="testcase">' \
327 ' <Directory Id="dir_DTrace_testcase_arch" Name="$(KBUILD_TARGET_ARCH)">' \
328 ' <Component Id="cp_dir_DTrace_testcase_arch" Guid="45DF7014-4431-6C40-6DB0-35AF7C690EE1" Win64="$$(var.Property_Win64)">' \
329 $(foreach file, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES) \
330 , ' <File Id="file_dtrace_testcase_arch_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
331 ' Source="$(PATH_STAGE_BIN)/dtrace/testcase/$(KBUILD_TARGET_ARCH)/$(file)" />' ) \
332 ' </Component>' \
333 ' </Directory>' \
334 ' </Directory>') \
335 $(if $(VBOXINST_DTRACE_SCRIPTS_FILES), \
336 ' <Directory Id="dir_DTrace_scripts" Name="scripts">' \
337 ' <Component Id="cp_dir_DTrace_scripts" Guid="AE07F9D5-4FD9-ACC7-C760-E9923CE01E16" Win64="$$(var.Property_Win64)">' \
338 $(foreach file, $(VBOXINST_DTRACE_SCRIPTS_FILES) \
339 , ' <File Id="file_dtrace_scripts_$(subst -,_,$(file))" Name="$(file)" Vital="yes" ' \
340 ' Source="$(PATH_STAGE_BIN)/dtrace/scripts/$(file)" />' ) \
341 ' </Component>' \
342 ' </Directory>') \
343 '</Directory>'
344endif
345 $(QUIET)$(APPEND) "$@" '</Include>'
346
347
348$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
349 $(call MSG_GENERATE,,$@,$<)
350 $(APPEND) -t $@ '<?xml version="1.0" ?>'
351 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
352 #
353 # Documentation (PDF/CHM)
354 #
355ifdef VBOX_WITH_DOCS_PACKING
356 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualCHM_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, English)" Description="!(loc.StartMenu_UserManual)"' \
357 ' Target="[INSTALLDIR]\VirtualBox.chm" WorkingDirectory="dir_Documents" Advertise="no"/>'
358 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
359 ' <Shortcut Id="sc_StartMenu_ManualCHM_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
360 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\VirtualBox_$(lang).chm" WorkingDirectory="dir_Documents"/>')
361endif
362 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
363 ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_Documents" Advertise="no"/>'
364 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
365 ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
366 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_Documents"/>')
367 #
368 # License(s) (RTF)
369 #
370 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
371 ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
372 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
373 ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
374 ' Description="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
375 $(APPEND) $@ '</Include>'
376
377#
378# .MSI linking of the main installer (en_US).
379#
380# Note: This will clean up any previous .msi and .wixpdb files to prevent dep
381# build boxes from filling up with old files.
382#
383define def_vbox_link_msi
384$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
385$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \
386 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
387 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
388 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
389 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
390 $(VBOX_SVN_REV_KMK) \
391 $(VBOX_WIN_INST_MAKEFILE_DEP) \
392 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
393 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
394 | $$$$(dir $$$$@)
395 $$(call MSG_L1,Linking installer $$@)
396 $(QUIET)$(RM) -f $$(wildcard $$(@D)/$(PACKAGE_BASE)-r*_$(lang).msi $$(@D)/$(PACKAGE_BASE)-r*_$(lang).wixpdb)
397 kmk_time $(VBOX_PATH_WIX)/light.exe -v -nologo \
398 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
399 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
400 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
401 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
402 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
403 $(VBOX_MSI_ICE_IGNORE) \
404 -out $$@ \
405 $$< \
406 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
407if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL)
408 $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab
409endif
410endef
411
412$(foreach lang, en_US, $(eval $(def_vbox_link_msi)))
413
414
415#
416# Merge module linking (all languages).
417#
418# Note: This will clean up any previous .msm to prevent dep build boxes from
419# filling up with old files.
420#
421define def_vbox_link_msm
422$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm: \
423 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
424 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
425 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
426 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
427 $(VBOX_SVN_REV_KMK) \
428 $(VBOX_WIN_INST_MAKEFILE_DEP) \
429 | $$$$(dir $$$$@)
430 $$(call MSG_L1,Linking installer $$@)
431 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
432 $(VBOX_PATH_WIX)/light.exe -v -nologo \
433 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
434 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
435 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
436 $(VBOX_MSI_ICE_IGNORE) \
437 -out $$@ \
438 $$< \
439 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
440 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
441 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
442endef
443
444$(if-expr defined(VBOX_WITH_MSM_INSTALL), \
445 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
446 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
447 $(eval $(def_vbox_link_msm)))),)
448
449
450#
451# Add dependencies that makes sure necessary bits gets built.
452# For combined packages we always use the .ISO from the amd64 build.
453#
454ifdef VBOX_WITH_COMBINED_PACKAGE
455 VBOX_MSI_DEPENDENCIES := \
456 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
457else
458 VBOX_MSI_DEPENDENCIES := \
459 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
460endif
461
462#
463# A few manual dependencies to make sure everything is rebuilt when they should.
464#
465$(PATH_SUB_CURRENT)/VirtualBox.wxs: \
466 $(PATH_SUB_CURRENT)/Properties.wxi \
467 $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
468
469$(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
470 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
471 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
472 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
473 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
474 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
475 $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
476 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
477 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
478
479#
480# MSI compile.
481#
482define def_vbox_compile_wixobj
483includedep $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep
484$(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj: \
485 $(PATH_SUB_CURRENT)/VirtualBox.wxs \
486 $(PATH_SUB_CURRENT)/UserInterface.wxi \
487 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
488 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
489 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm), \
490 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
491 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
492 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
493 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
494 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
495 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
496 $(VBOX_MSI_DEPENDENCIES)) \
497 $(VBOX_VERSION_STAMP) \
498 | $$$$(dir $$$$@)
499 $(QUIET)$(RM) -f $@
500 $(REDIRECT) \
501 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
502 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
503 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
504 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
505 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
506 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
507 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
508 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
509 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
510 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
511 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
512 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
513 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
514 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
515 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
516 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
517 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
518 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
519 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
520 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
521 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(if-expr $(lang) == "en_US",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
522 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(if-expr $(lang) == "en_US" && $(KBUILD_TARGET_ARCH) == "amd64",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
523 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
524 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
525 $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
526 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
527 -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm'),) \
528 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
529 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
530 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
531 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
532 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
533 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
534 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
535 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
536 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
537 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
538 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
539 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
540 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
541 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
542 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
543 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
544 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
545 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
546 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
547 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
548 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
549 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
550 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
551 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
552 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
553 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
554 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
555 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
556 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
557 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
558 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
559 -- \
560 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
561 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
562 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
563 -out $$@
564# Generate wxi dependencies based on the sourceLineNumber references in the output.
565 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
566 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
567 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
568 $(QUIET)$(APPEND) -n '[email protected]' '' ''
569endef
570
571$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
572 $(eval $(def_vbox_compile_wixobj)))
573
574#
575# MSM (merge module) compile.
576#
577define def_vbox_compile_msm
578includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj
579$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj: \
580 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
581 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
582 $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
583 $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
584 $(PATH_SUB_CURRENT)/UserInterface.wxi \
585 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
586 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
587 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
588 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
589 $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
590 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
591 $(VBOX_MSI_DEPENDENCIES) \
592 $(VBOX_VERSION_STAMP) \
593 | $$$$(dir $$$$@)
594 $(QUIET)$(RM) -f $@
595 $(REDIRECT) \
596 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
597 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
598 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
599 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
600 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
601 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
602 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
603 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
604 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
605 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
606 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
607 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
608 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
609 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
610 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
611 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
612 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
613 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
614 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
615 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
616 -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
617 -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \
618 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
619 -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
620 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
621 -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
622 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
623 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
624 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
625 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
626 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
627 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
628 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
629 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
630 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
631 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
632 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
633 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
634 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
635 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
636 -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
637 -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
638 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
639 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
640 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
641 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
642 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
643 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
644 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
645 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
646 -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
647 -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
648 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
649 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
650 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
651 -- \
652 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
653 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
654 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
655 -out $$@
656# Generate wxi dependencies based on the sourceLineNumber references in the output.
657 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
658 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
659 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
660 $(QUIET)$(APPEND) -n '[email protected]' '' ''
661endef
662
663$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
664 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
665 $(eval $(def_vbox_compile_msm))))
666
667#
668# VirtualBox Type Library definition.
669#
670$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
671 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
672 $(VBOX_XIDL_FILE) \
673 $(MAKEFILE) \
674 | $$(dir $$@)
675 $(VBOX_XSLTPROC) \
676 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
677 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
678 -o $@ $< $(VBOX_XIDL_FILE)
679
680$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
681 $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
682 $(VBOX_XIDL_FILE) \
683 | $$(dir $$@)
684 $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \
685 $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
686 $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
687 -o $@ $< $(VBOX_XIDL_FILE)
688
689#
690# Construct the list of GUI translations.
691# ('-t' -- truncate file; '-n' -- new line between arguments)
692#
693include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
694$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
695$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
696 $(APPEND) -t $@ '<?xml version="1.0" ?>'
697 $(APPEND) $@ '<Include>'
698 $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
699 ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
700 ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
701 $(APPEND) $@ '</Include>'
702
703#
704# Edit the version stored in the registry.
705#
706$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
707$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
708 $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
709 -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
710 --output $@ $<
711
712#
713# Generate the list of unattended template script files.
714#
715$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
716$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
717 $(APPEND) -t -n $@ \
718 '<?xml version="1.0" ?>' \
719 '<Include>'
720ifdef VBOX_UNATTENDED_TEMPLATES
721 $(APPEND) -n $@ \
722 ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
723 ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Win64="$$(var.Property_Win64)">' \
724 $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
725 ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
726 ' </Component>' \
727 ' </Directory>'
728endif
729 $(APPEND) $@ '</Include>'
730
731
732#
733# Build the multi-language version of the .MSI installer (final installer).
734#
735# This is done by creating binary .MST diffs of all the language-specific installers
736# against the en_US one, and then merging the diffs into the en_US one using tools
737# from the MS Installer SDK.
738#
739define def_vbox_create_mst
740$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst: \
741 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
742 $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \
743 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
744 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
745 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
746 $(VBOX_SVN_REV_KMK) \
747 $(VBOX_WIN_INST_MAKEFILE_DEP) \
748 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
749 $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
750 | $$$$(dir $$$$@)
751 $(call MSG_L1,Creating language diff for $(lang))
752 kmk_time $(VBOX_PATH_WIX)/light.exe -v -nologo \
753 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
754 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
755 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
756 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
757 $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
758 $(VBOX_MSI_ICE_IGNORE) \
759 -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
760 $$(@D)/VirtualBox_$(lang).wixobj \
761 $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib
762 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
763 $(RM) -f -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
764 $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
765 $$(@D)/common.cab
766
767endef
768
769$(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
770 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
771 $(eval $(def_vbox_create_mst)))
772
773
774# Create WISUMINFO argument.
775VBOX_INS_PROD_ARCH.amd64 = x64
776VBOX_INS_PROD_ARCH.x86 = Intel
777VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
778$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
779VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
780$(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
781 , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
782VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
783
784# The multilingual installer rule.
785$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi: \
786 $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
787 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
788 $(call MSG_L1,Creating final multilingual MSI)
789 $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi)
790 $(CP) -f -- "$<" "$@"
791
792 $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
793 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
794 $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
795
796 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
797 $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
798 $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
799
800# Copy multilingual installer to bin.
801$(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
802 $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
803 $(INSTALL_STAGING) -- $< $@
804
805
806if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
807#
808# Make the multi-architecture installer by calling our stub builder
809# with both platform installers (x86 and amd64) + common cab. The common
810# cab only is needed when we don't use merge modules. We only
811# need to do this once; so do it on x86 only.
812#
813$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL): \
814 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
815 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
816 $(PATH_STAGE_BIN)/VBoxStub.exe \
817 $$(VBoxStubBld_1_TARGET)
818 $(call MSG_L1,Building Windows combined package)
819 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
820 $(REDIRECT) -C $(@D) -- \
821 $(VBoxStubBld_1_TARGET) -out $@ \
822 -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
823 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
824 $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
825 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
826 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
827 $(call VBOX_SIGN_FILE_FN,$@)
828endif
829
830
831include $(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