VirtualBox

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

Last change on this file since 58160 was 56729, checked in by vboxsync, 9 years ago

Installer/win: do not create directories with components which contain no files (VBOXINST_DTRACE_SCRIPTS_FILES is currently empty, and the change also prepares for empty VBOXINST_DTRACE_TESTCASE_ARCH_FILES, but assumes that VBOXINST_DTRACE_LIB_ARCH_FILES is never empty when the dtrace feature is enabled), as this makes newer Wix tools error out. Relevant for MSM packages, where we have no control over the tools.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 37.7 KB
Line 
1# $Id: Makefile.kmk 56729 2015-07-01 10:10:35Z vboxsync $
2## @file
3# Makefile for the Windows installer.
4#
5
6#
7# Copyright (C) 2006-2015 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
31ifdef VBOX_WITH_BUNDLED_INSTALLER
32 ifeq ($(KBUILD_TARGET_ARCH),x86)
33 include $(PATH_SUB_CURRENT)/BundleMachine/Makefile.kmk
34 endif
35endif
36
37ifeq ($(KBUILD_TARGET_ARCH),x86)
38 include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
39 include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
40 ifdef VBOX_BRAND_WIN_AS_MENU
41 include $(PATH_SUB_CURRENT)/AutoStartMenu/Makefile.kmk
42 endif
43endif
44
45include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
46
47
48#
49# Globals and targets.
50# Note: en_US *must* come first for the dependency file generation.
51#
52ifndef VBOX_INSTALLER_LANGUAGES
53 VBOX_INSTALLER_LANGUAGES = en_US de_DE fr_FR it_IT zh_TW
54 VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
55endif
56
57#
58# List of merge modules to use.
59#
60VBOX_INSTALLER_MERGE_MODULES = App USB NetAdp NetFlt NetAdp6 NetLwf Python
61ifeq ($(KBUILD_TARGET_ARCH),amd64)
62 VBOX_INSTALLER_MERGE_MODULES += COM32On64
63endif
64
65# We only ship the merge modules in locale en_US for the moment.
66ifdef VBOX_WITH_MSM_INSTALL
67 VBOX_INSTALLER_LANGUAGES := en_US
68 VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES)
69endif
70
71#
72# We don't have the license text in another language than English yet,
73# so just define the branding targets to use the English one for now.
74# The installer generation assumes that there is a translation for each
75# of VBOX_INSTALLER_LANGUAGES.
76#
77$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
78 $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)))
79
80# Set the codepage for all languages to 1252, covers most cases.
81$(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \
82 $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
83
84# Some languages need another codepage than 1252. Override them here.
85VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
86
87# Standard language names (in the native language), to be extended as we go.
88# VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs
89# in either # VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES.
90VBOX_BRAND_fr_FR_LANG_NAME := Français
91
92VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
93VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
94
95#
96# If we want to build a combined package, we separate all common stuff
97# (that is all 100% identical content between 32-/64-bit builds)
98# into an own .cab file to save space. This .cab file then gets included
99# and used by the 32-/64-bit installers.
100#
101ifdef VBOX_WITH_COMBINED_PACKAGE
102 VBOX_INSTALLER_COMMON_DISKID := 2
103else
104 VBOX_INSTALLER_COMMON_DISKID := 1
105endif
106
107## @todo VBOX_ prefixes!
108PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
109PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
110PACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi
111
112ifdef VBOX_WITH_COMBINED_PACKAGE
113 PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
114 PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
115 PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
116 PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
117 PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
118 PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
119 PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
120 # Always take the common.cab from the amd64 build, as it
121 # might contain certain files for x86 compatibility such
122 # as our 32-on-64-bit COM stuff.
123 PACKAGE_NAME_MULTIARCH_COMMONCAB := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/obj/Installer/win/common.cab
124
125 BLDDIRS += $(PATH_MULTIARCH_TEMP)
126 PACKING += $(PACKAGE_NAME_FINAL)
127 ifeq ($(KBUILD_TARGET_ARCH),x86)
128 PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
129 endif
130else
131 PACKING += $(PACKAGE_NAME_FINAL)
132endif
133BLDDIRS += \
134 $(VBOX_WIN_INST_OUT_DIR) \
135 $(VBOX_WIN_INST_OUT_DIR)/NLS/
136
137OTHER_CLEAN += \
138 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
139 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
140 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
141 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
142 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
143 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
144 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
145 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
146 $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst \
147 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
148 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
149 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
150 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
151 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
152 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
153 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi
154
155ifdef VBOX_WITH_COMBINED_PACKAGE
156 ifeq ($(KBUILD_TARGET_ARCH),x86)
157 OTHER_CLEAN += \
158 $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
159 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
160 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.am64) \
161 $(PACKAGE_NAME_MULTIARCH_COMMONCAB)
162 else
163 # Nothing to do here yet.
164 endif
165else
166 OTHER_CLEAN += \
167 $(PACKAGE_NAME_FINAL)
168endif
169
170ifdef VBOX_WITH_MSM_INSTALL
171 OTHER_CLEAN += \
172 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
173 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
174 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep \
175 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm \
176 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
177 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb))
178endif
179
180ifdef VBOX_WITH_BUNDLED_INSTALLER
181 ifeq ($(KBUILD_TARGET),darwin)
182 VBOX_TMP_DIR ?= /VBox
183 ZIP = /usr/bin/zip
184 else
185 VBOX_TMP_DIR ?= c:\Temp
186 ZIP = zip
187 endif
188
189 ifndef VBOX_PATH_PACK_TMP
190 VBOX_PATH_PACK_TMP := $(VBOX_WIN_INST_OUT_DIR)
191 endif
192
193 VBOX_PATH_PACK_BUNDLE_TMP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller
194 VBOX_PATH_PACK_BUNDLE_ZIP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller-$(KBUILD_TARGET_ARCH).zip
195
196 VBOX_BRAND_WIN_INST_NAME.x86 = $(PACKAGE_BASE)-Win_x86$(VBOX_BRAND_WIN_INST_EXT).msi
197 VBOX_BRAND_WIN_INST_NAME.amd64 = $(PACKAGE_BASE)-Win_amd64$(VBOX_BRAND_WIN_INST_EXT).msi
198
199 PACKING.win += $(VBOX_PATH_PACK_BUNDLE_ZIP)
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) $(MAKEFILE_CURRENT) | $$$$(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: $(MAKEFILE_CURRENT) | $$(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: $(MAKEFILE_CURRENT) | $$(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: $(MAKEFILE_CURRENT) | $$(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: $(MAKEFILE_CURRENT) $(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: $(MAKEFILE_CURRENT) | $$(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 link (all languages).
379#
380# Note: This will clean up any previous .msi to prevent dep build boxes from
381# filling up with old files.
382#
383# Note: Disable parallel jobs here because of shared common.cab access issues.
384#
385define def_vbox_link_msi
386.NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi
387$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi: \
388 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
389 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
390 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
391 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
392 $(VBOX_SVN_REV_KMK) \
393 $(MAKEFILE_CURRENT) \
394 | $$$$(dir $$$$@)
395 $$(call MSG_L1,Linking installer $$@)
396 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
397 $(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 $(VBOX_MSI_ICE_IGNORE) \
403 -out $$@ \
404 $$< \
405 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
406 $(VBOX_PATH_WIX)/difxapp_x86.wixlib, \
407 $(VBOX_PATH_WIX)/difxapp_x64.wixlib)
408 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
409 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)))
410endef
411
412$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
413 $(eval $(def_vbox_link_msi)))
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 $(MAKEFILE_CURRENT) \
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 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
440 $(VBOX_PATH_WIX)/difxapp_x86.wixlib, \
441 $(VBOX_PATH_WIX)/difxapp_x64.wixlib)
442 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
443 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)))
444endef
445
446$(if $(VBOX_WITH_MSM_INSTALL), \
447 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
448 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
449 $(eval $(def_vbox_link_msm)))),)
450
451
452#
453# Add dependencies that makes sure necessary bits gets built.
454# For combined packages we always use the .ISO from the amd64 build.
455#
456ifdef VBOX_WITH_COMBINED_PACKAGE
457 VBOX_MSI_DEPENDENCIES := \
458 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
459else
460 VBOX_MSI_DEPENDENCIES := \
461 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
462endif
463
464#
465# A few manual dependencies to make sure everything is rebuilt when they should.
466#
467$(PATH_SUB_CURRENT)/VirtualBox.wxs: \
468 $(PATH_SUB_CURRENT)/Properties.wxi \
469 $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
470
471$(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
472 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
473 $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
474 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
475 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
476 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
477 $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
478 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi
479
480#
481# MSI compile.
482#
483define def_vbox_compile_wixobj
484includedep $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj.dep
485$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj: \
486 $(PATH_SUB_CURRENT)/VirtualBox.wxs \
487 $(PATH_SUB_CURRENT)/UserInterface.wxi \
488 $(if $(VBOX_WITH_MSM_INSTALL), \
489 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
490 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm), \
491 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
492 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
493 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
494 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.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_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
522 $(if $(VBOX_WITH_MSM_INSTALL), \
523 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
524 -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm'),) \
525 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
526 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
527 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if $(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
528 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
529 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
530 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
531 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
532 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
533 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
534 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
535 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
536 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
537 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
538 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
539 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
540 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
541 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
542 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
543 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
544 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
545 -E 'VBOX_WITH_MSM_INSTALL=$(if $(VBOX_WITH_MSM_INSTALL),yes,no)' \
546 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
547 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
548 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
549 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
550 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
551 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
552 -- \
553 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
554 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
555 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
556 -out $$@
557# Generate wxi dependencies based on the sourceLineNumber references in the output.
558 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
559 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
560 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
561 $(QUIET)$(APPEND) -n '[email protected]' '' ''
562endef
563
564$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
565 $(eval $(def_vbox_compile_wixobj)))
566
567#
568# MSM (merge module) compile.
569#
570define def_vbox_compile_msm
571includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj
572$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj: \
573 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
574 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
575 $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
576 $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
577 $(PATH_SUB_CURRENT)/UserInterface.wxi \
578 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
579 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
580 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
581 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
582 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
583 $(VBOX_MSI_DEPENDENCIES) \
584 $(VBOX_VERSION_STAMP) \
585 | $$$$(dir $$$$@)
586 $(QUIET)$(RM) -f $@
587 $(REDIRECT) \
588 -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
589 -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
590 -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
591 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
592 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
593 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
594 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
595 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
596 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
597 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
598 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
599 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
600 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
601 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
602 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
603 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
604 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
605 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
606 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
607 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
608 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
609 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
610 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
611 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if $(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
612 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
613 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
614 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
615 -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
616 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
617 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
618 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
619 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
620 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
621 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
622 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
623 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
624 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
625 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
626 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
627 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
628 -E 'VBOX_WITH_MSM_INSTALL=$(if $(VBOX_WITH_MSM_INSTALL),yes,no)' \
629 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
630 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
631 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
632 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
633 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
634 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
635 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
636 -- \
637 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
638 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
639 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
640 -out $$@
641# Generate wxi dependencies based on the sourceLineNumber references in the output.
642 $(QUIET)$(APPEND) -t '[email protected]' '$$@: \'
643 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "[email protected]"
644 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "[email protected]"
645 $(QUIET)$(APPEND) -n '[email protected]' '' ''
646endef
647
648$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
649 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
650 $(eval $(def_vbox_compile_msm))))
651
652#
653# VirtualBox Type Library definition.
654#
655$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
656 $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
657 $(VBOX_XIDL_FILE) \
658 | $$(dir $$@)
659 $(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
660
661$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
662 $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
663 $(VBOX_XIDL_FILE) \
664 | $$(dir $$@)
665 $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" -o [email protected] $< $(VBOX_XIDL_FILE)
666 $(SED) -e 's/VBoxC/VBoxClient_x86/g' --output $@ [email protected]
667 $(RM) -f [email protected]
668
669#
670# Construct the list of GUI translations.
671# ('-t' -- truncate file; '-n' -- new line between arguments)
672#
673include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
674$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk $(MAKEFILE_CURRENT) | $$(dir $$@)
675 $(APPEND) -t $@ '<?xml version="1.0" ?>'
676 $(APPEND) $@ '<Include>'
677 $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
678 ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
679 ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
680 $(APPEND) $@ '</Include>'
681
682#
683# Edit the version stored in the registry.
684#
685$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
686 $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
687 -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
688 --output $@ $<
689
690#
691# Build the multi-language version of the .MSI installer (final installer).
692# This is done by creating binary .MST diffs of all the language-specific installers
693# and then merging the diffs into the existing .MSI using tools from the MS Installer SDK.
694#
695# .MSI link (all languages).
696#
697# Note: Prereqs of the special .NOTPARALLEL target will be executed with parallel
698# make jobs temporarily disabled. This is a hack to work around what seems
699# to be a problem with the sharing mode set by one or more of the three
700# programs / scripts involved in this step.
701#
702define def_vbox_create_mst
703.NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
704$(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst: \
705 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi \
706 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi \
707 | $$$$(dir $$$$@)
708 $(call MSG_L1,Integrating language ($(lang)))
709 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
710 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSIDB) -d $$< -r $(lang).mst
711 $(REDIRECT) -C $$(@D) -- wscript.exe $(VBOX_PATH_WISUBSTG) $$< $(lang).mst $(lang_id)
712endef
713
714$(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), \
715 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
716 $(eval $(def_vbox_create_mst)))
717
718#
719# Create all xxx_<Lang>.msi installers and prepare the final xxx_MultiLang.msi installer.
720#
721## @todo this rule must not modify $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi but a copy of it. def_vbox_compile_wixobj is
722# where en_US.msi is created, it shouldn't be changed after that (if possible). Also, document the path length issue.
723VBOX_INS_PROD_ARCH.amd64 = x64
724VBOX_INS_PROD_ARCH.x86 = Intel
725VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
726$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
727VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
728$(foreach lang, $(VBOX_INSTALLER_ADD_LANGUAGES), $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
729VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
730
731$(PACKAGE_NAME_FINAL): \
732 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
733 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
734 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
735 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
736 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
737 $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst) \
738 $(VBOX_SVN_REV_KMK) \
739 | $$(dir $$@)
740 $(QUIET)$(RM) -f $(wildcard $(PATH_STAGE_BIN)/$(PACKAGE_BASE)-r*.msi)
741 $(REDIRECT) -C $(@D) -- \
742 wscript.exe $(VBOX_PATH_WISUMINFO) $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $(VBOX_INS_PROD_LANG)
743 $(CP) -f $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $@
744 $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV))
745
746
747if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
748#
749# Make the multi-architecture installer by calling our stub builder
750# with both platform installers (x86 and amd64) + common cab. The common
751# cab only is needed when we don't use merge modules. We only
752# need to do this once; so do it on x86 only.
753#
754$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL): \
755 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
756 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
757 $(PATH_STAGE_BIN)/VBoxStub.exe \
758 $$(VBoxStubBld_1_TARGET)
759 $(call MSG_L1,Building Windows combined package)
760 $(if $(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
761 $(REDIRECT) -C $(@D) -- \
762 $(VBoxStubBld_1_TARGET) -out $@ \
763 -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
764 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
765 $(if $(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
766 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
767 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
768 $(call VBOX_SIGN_FILE_FN,$@)
769endif
770
771
772#
773# Make the bundle installer (for retail ISOs) (zip-file).
774#
775$(VBOX_PATH_PACK_BUNDLE_ZIP): \
776 $(PACKAGE_NAME_FINAL) \
777 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
778 $(PATH_STAGE_BIN)/VBoxBundleMachine.exe \
779 $(if $(VBOX_BRAND_WIN_AS_MENU), $(PATH_STAGE_BIN)/AutoStartMenu.exe) \
780 $(if $(VBOX_WITH_COMBINED_PACKAGE), $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)),)
781 $(RM) -Rf -- $(VBOX_PATH_PACK_BUNDLE_TMP)/
782 $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/
783ifndef VBOX_WITH_COMBINED_PACKAGE
784 $(CP) $(PACKAGE_NAME_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(VBOX_BRAND_WIN_INST_NAME.$(KBUILD_TARGET_ARCH))
785endif
786ifeq ($(KBUILD_TARGET_ARCH),x86)
787 ifdef VBOX_WITH_COMBINED_PACKAGE
788 $(CP) $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(PACKAGE_NAME_MULTIARCH_FINAL)
789 endif
790 $(CP) $(PATH_STAGE_BIN)/VBoxBundleMachine.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
791 $(CP) $(PATH_STAGE_BIN)/AutoStartMenu.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
792 ifdef VBOX_BRAND_WIN_AS_MENU
793 $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
794 $(CP) $(VBOX_BRAND_WIN_AS_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/
795 $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/
796 $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT_GFX) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
797 ifdef VBOX_WITH_COMBINED_PACKAGE
798 $(SED) -e 's/VBOXEXE/$(PACKAGE_NAME_MULTIARCH_FINAL)/g' \
799 --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
800 $(VBOX_BRAND_WIN_AS_MENU)/index_combined.html
801 else
802 $(SED) -e 's/VBOX32EXE/$(VBOX_BRAND_WIN_INST_NAME.x86)/g' \
803 -e 's/VBOX64EXE/$(VBOX_BRAND_WIN_INST_NAME.amd64)/g' \
804 --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
805 $(VBOX_BRAND_WIN_AS_MENU)/index.html
806 endif
807 endif
808endif
809ifeq ($(KBUILD_TARGET_ARCH),amd64)
810 ifndef VBOX_WITH_COMBINED_PACKAGE
811 # Only needed if *not* combined package -- otherwise the 64-bit build
812 # has nothing to do here since the one and only amd64 .MSI file is already
813 # included in the x86 combined package.
814 $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
815 endif
816else
817 # Do a bundle .zip in every case on x86. On a combined package this also
818 # will include the amd64 installer we left out in the block above (see comment).
819 $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
820endif
821
822include $(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