VirtualBox

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

Last change on this file since 51845 was 51845, checked in by vboxsync, 10 years ago

The 2010 linker does not grok /IntegrityCheck:NO, but it seems editbin does. (W2k8 installer exec failure problem.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 38.2 KB
Line 
1# $Id: Makefile.kmk 51845 2014-07-03 13:04:09Z vboxsync $
2## @file
3# Makefile for the Windows installer.
4#
5
6#
7# Copyright (C) 2006-2014 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#
52VBOX_INSTALLER_LANGUAGES = en_US de_DE fr_FR it_IT zh_TW
53VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
54
55#
56# Use merge modules if we're not doing an official release.
57# This will increase the overall installer size significantly because
58# merge modules are not able to use a common .cab file to reduce their
59# size.
60#
61ifneq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
62 VBOX_WITH_MSM_INSTALL := 1
63 VBOX_INSTALLER_LANGUAGES = en_US
64endif
65
66ifeq ($(USERNAME),andy)
67 VBOX_WITH_MSM_INSTALL := 1
68 VBOX_INSTALLER_LANGUAGES = en_US
69endif
70
71#
72# List of merge modules to use.
73#
74VBOX_INSTALLER_MERGE_MODULES = App USB NetAdp NetFlt Python
75ifeq ($(KBUILD_TARGET_ARCH),amd64)
76 VBOX_INSTALLER_MERGE_MODULES += COM32On64
77endif
78
79# We only ship the merge modules in locale en_US for the moment.
80VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES)
81
82#
83# We don't have the license text in another language than English yet,
84# so just define the branding targets to use the English one for now.
85# The installer generation assumes that there is a translation for each
86# of VBOX_LICENSE_ADD_LANGUAGES.
87#
88$(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
89 $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)))
90
91# Set the codepage for all languages to 1252, covers most cases.
92$(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \
93 $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
94
95# Some languages need another codepage than 1252. Override them here.
96VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
97
98# Standard language names (in the native language), to be extended as we go.
99# VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs
100# in either # VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES.
101VBOX_BRAND_fr_FR_LANG_NAME := Français
102
103VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
104VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
105
106#
107# If we want to build a combined package, we separate all common stuff
108# (that is all 100% identical content between 32-/64-bit builds)
109# into an own .cab file to save space. This .cab file then gets included
110# and used by the 32-/64-bit installers.
111#
112ifdef VBOX_WITH_COMBINED_PACKAGE
113 VBOX_INSTALLER_COMMON_DISKID := 2
114else
115 VBOX_INSTALLER_COMMON_DISKID := 1
116endif
117
118## @todo VBOX_ prefixes!
119PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
120PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
121PACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi
122
123ifdef VBOX_WITH_COMBINED_PACKAGE
124 PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
125 PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
126 PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
127 PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
128 PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
129 PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
130 PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
131 # Always take the common.cab from the amd64 build, as it
132 # might contain certain files for x86 compatibility such
133 # as our 32-on-64-bit COM stuff.
134 PACKAGE_NAME_MULTIARCH_COMMONCAB := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/obj/Installer/win/common.cab
135
136 BLDDIRS += $(PATH_MULTIARCH_TEMP)
137 PACKING += $(PACKAGE_NAME_FINAL)
138 ifeq ($(KBUILD_TARGET_ARCH),x86)
139 PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
140 endif
141else
142 PACKING += $(PACKAGE_NAME_FINAL)
143endif
144BLDDIRS += \
145 $(VBOX_WIN_INST_OUT_DIR) \
146 $(VBOX_WIN_INST_OUT_DIR)/NLS/
147
148OTHER_CLEAN += \
149 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
150 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
151 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
152 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
153 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
154 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
155 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
156 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
157 $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst \
158 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
159 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
160 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
161 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
162 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
163 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi
164
165ifdef VBOX_WITH_COMBINED_PACKAGE
166 ifeq ($(KBUILD_TARGET_ARCH),x86)
167 OTHER_CLEAN += \
168 $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
169 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
170 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.am64) \
171 $(PACKAGE_NAME_MULTIARCH_COMMONCAB)
172 else
173 # Nothing to do here yet.
174 endif
175else
176 OTHER_CLEAN += \
177 $(PACKAGE_NAME_FINAL)
178endif
179
180ifdef VBOX_WITH_MSM_INSTALL
181 OTHER_CLEAN += \
182 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
183 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
184 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep \
185 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm \
186 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
187 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb))
188endif
189
190ifdef VBOX_WITH_BUNDLED_INSTALLER
191 ifeq ($(KBUILD_TARGET),darwin)
192 VBOX_TMP_DIR ?= /VBox
193 ZIP = /usr/bin/zip
194 else
195 VBOX_TMP_DIR ?= c:\Temp
196 ZIP = zip
197 endif
198
199 ifndef VBOX_PATH_PACK_TMP
200 VBOX_PATH_PACK_TMP := $(VBOX_WIN_INST_OUT_DIR)
201 endif
202
203 VBOX_PATH_PACK_BUNDLE_TMP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller
204 VBOX_PATH_PACK_BUNDLE_ZIP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller-$(KBUILD_TARGET_ARCH).zip
205
206 VBOX_BRAND_WIN_INST_NAME.x86 = $(PACKAGE_BASE)-Win_x86$(VBOX_BRAND_WIN_INST_EXT).msi
207 VBOX_BRAND_WIN_INST_NAME.amd64 = $(PACKAGE_BASE)-Win_amd64$(VBOX_BRAND_WIN_INST_EXT).msi
208
209 PACKING.win += $(VBOX_PATH_PACK_BUNDLE_ZIP)
210endif
211
212#
213# Suppress/skip the following ICE (Internal Consistency Evaluators):
214# - ICE64: Checks that new directories in the user profile are removed correctly in roaming scenarios.
215# -> We don't want to remove system folders (like "Microsoft/Internet Explorer/Quick Launch").
216# - ICE69: Checks if file references are within the same component.
217# -> We reference to files within different components, but these components are installed using
218# the same feature, so that's fine.
219#
220VBOX_MSI_ICE_IGNORE := \
221 -ice:64 \
222 -ice:69
223
224#
225# Create intermediate XML file for languages (needed for .MSI linking).
226#
227# Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
228# to escape the expansion of the $(eval ) argument and then the definition of the
229# rule. The statement is finally expanded during second dependency expansion, which
230# takes place after all makefiles has been loaded and with the @ variable defined.
231#
232define def_vbox_lang_xml
233$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@)
234 $$(call MSG_GENERATE,,$$@,$$<)
235 $(QUIET)$(INSTALL) -m 0644 $$< $$@
236endef
237
238$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
239 $(eval $(def_vbox_lang_xml)))
240
241#
242# Create intermediate XML file for licenses (needed for .MSI linking).
243# These files are created from the original .RTF files in the /docs directory.
244#
245# Note: The redirect command below will open $$@ as stdout in append+text mode
246# and then exec cat, thus appending the license file to the result file.
247#
248# Note: The license_file variable has to be created before def_vbox_license_xml
249# is expanded by the 2nd eval because we rely on the that expansion
250# replacing all $(license_file) (and $(lang)) references before evaluation.
251#
252# Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
253# between the tag and the RTF license text.
254#
255define def_vbox_license_xml
256$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
257 $$(call MSG_GENERATE,,$$@,$$<)
258 $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
259 $(APPEND) $$@ '<WixLocalization xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="$(VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE)" Culture="$(lang)">'
260
261 $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id="LicenseText">'
262 $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\&lt;|g" -e "s|>|\&gt;|g" $(license_file)
263 $(APPEND) $$@ '</String>'
264
265 $(APPEND) $$@ '<String Id="LicenseFile">$(license_file)</String>'
266 $(APPEND) $$@ '<String Id="LicenseInstallFileLong">License_$(lang).rtf</String>'
267 $(APPEND) $$@ '<String Id="LicenseInstallFileShort">L_$(lang).rtf</String>'
268
269 $(APPEND) $$@ '</WixLocalization>'
270endef
271
272$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
273 $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
274 $(eval $(def_vbox_license_xml)))
275
276#
277# Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
278# This file includes all language-specific files (PDFs, CHMs, ...) to install.
279#
280# Note: When using the -n switch, append will append a new line after each
281# argument. The -t switch makes it truncate the file.
282#
283$(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
284 $(call MSG_GENERATE,,$@,$<)
285 $(APPEND) -t $@ '<?xml version="1.0" ?>'
286 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
287ifdef VBOX_WITH_DOCS_PACKING
288 $(APPEND) $@ ' <File Id="file_VirtualBox.chm" Name="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/VirtualBox.chm"></File>'
289 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
290 ' <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>')
291endif
292 $(APPEND) $@ '</Include>'
293
294$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
295 $(call MSG_GENERATE,,$@,$<)
296 $(APPEND) -t $@ '<?xml version="1.0" ?>'
297 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
298ifdef VBOX_WITH_DOCS_PACKING
299 $(APPEND) $@ ' <File Id="file_UserManual.pdf" Name="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual.pdf">'
300 $(APPEND) $@ ' </File>'
301 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
302 ' <File Id="file_UserManual_$(lang).pdf" Name="UserManual_$(lang).pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual_$(lang).pdf">' \
303 ' </File>')
304endif
305 $(APPEND) $@ '</Include>'
306
307$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
308 $(call MSG_GENERATE,,$@,$<)
309 $(APPEND) -t $@ '<?xml version="1.0" ?>'
310 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
311 $(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)">' \
312 ' </File>'
313 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
314 ' <File Id="file_License_$(lang).rtf" Name="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_$(lang)_LICENSE_RTF)">' \
315 ' </File>')
316 $(APPEND) $@ '</Include>'
317
318$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
319 $(call MSG_GENERATE,,$@,$<)
320 $(APPEND) -t $@ '<?xml version="1.0" ?>'
321 $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
322 #
323 # Documentation (PDF/CHM)
324 #
325ifdef VBOX_WITH_DOCS_PACKING
326 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualCHM_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, English)" Description="!(loc.StartMenu_UserManual)"' \
327 ' Target="[INSTALLDIR]\VirtualBox.chm" WorkingDirectory="dir_Documents" Advertise="no"/>'
328 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
329 ' <Shortcut Id="sc_StartMenu_ManualCHM_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
330 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\VirtualBox_$(lang).chm" WorkingDirectory="dir_Documents"/>')
331endif
332 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
333 ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_Documents" Advertise="no"/>'
334 $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
335 ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
336 ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_Documents"/>')
337 #
338 # License(s) (RTF)
339 #
340 $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
341 ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
342 $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
343 ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
344 ' Description="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
345 $(APPEND) $@ '</Include>'
346
347#
348# .MSI link (all languages).
349#
350# Note: This will clean up any previous .msi to prevent dep build boxes from
351# filling up with old files.
352#
353# Note: Disable parallel jobs here because of shared common.cab access issues.
354#
355define def_vbox_link_msi
356.NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi
357$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi: \
358 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
359 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
360 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
361 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
362 $(VBOX_SVN_REV_KMK) \
363 $(MAKEFILE_CURRENT) \
364 | $$$$(dir $$$$@)
365 $$(call MSG_L1,Linking installer $$@)
366 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
367 $(VBOX_PATH_WIX)/light.exe -v -nologo \
368 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
369 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
370 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
371 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
372 $(VBOX_MSI_ICE_IGNORE) \
373 -out $$@ \
374 $$< \
375 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
376 $(VBOX_PATH_WIX)/difxapp_x86.wixlib, \
377 $(VBOX_PATH_WIX)/difxapp_x64.wixlib)
378 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
379 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)))
380endef
381
382$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
383 $(eval $(def_vbox_link_msi)))
384
385#
386# Merge module linking (all languages).
387#
388# Note: This will clean up any previous .msm to prevent dep build boxes from
389# filling up with old files.
390#
391# Note: Disable parallel jobs here because of shared common.cab access issues.
392#
393define def_vbox_link_msm
394.NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm
395$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm: \
396 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \
397 $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
398 $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
399 $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
400 $(VBOX_SVN_REV_KMK) \
401 $(MAKEFILE_CURRENT) \
402 | $$$$(dir $$$$@)
403 $$(call MSG_L1,Linking installer $$@)
404 $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
405 $(VBOX_PATH_WIX)/light.exe -v -nologo \
406 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
407 -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
408 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
409 $(VBOX_MSI_ICE_IGNORE) \
410 -out $$@ \
411 $$< \
412 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
413 $(VBOX_PATH_WIX)/difxapp_x86.wixlib, \
414 $(VBOX_PATH_WIX)/difxapp_x64.wixlib)
415 $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
416 $(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)))
417endef
418
419$(if $(VBOX_WITH_MSM_INSTALL), \
420 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
421 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
422 $(eval $(def_vbox_link_msm)))),)
423
424#
425# Load and adjust the MSI compile step dependencies.
426#
427-include $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep
428
429# Filter out some files depending on build type and compiler.
430ifeq ($(KBUILD_TYPE),release)
431 VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/VBoxDbg3.dll, $(VBOX_MSI_DEPENDENCIES))
432endif
433ifndef VBOX_SIGNING_MODE
434 VBOX_MSI_DEPENDENCIES := $(filer-out %.cat, $(VBOX_MSI_DEPENDENCIES))
435endif
436ifdef VBOX_USE_VCC110
437 VBOX_MSI_DEPENDENCIES := $(filter-out \
438 $(PATH_OUT)/bin/msvcr100.dll \
439 $(PATH_OUT)/bin/msvcp100.dll \
440 , $(VBOX_MSI_DEPENDENCIES))
441else # VCC100
442 VBOX_MSI_DEPENDENCIES := $(filter-out \
443 $(PATH_OUT)/bin/msvcr110.dll \
444 $(PATH_OUT)/bin/msvcp110.dll \
445 , $(VBOX_MSI_DEPENDENCIES))
446endif
447# TODO: Add filtering out more dependencies here!
448ifndef VBOX_WITH_QTGUI
449 VBOX_MSI_DEPENDENCIES := $(filter-out \
450 $(PATH_OUT)/bin/VirtualBox.exe \
451 $(PATH_OUT)/bin/VBoxTestOGL.exe \
452 $(PATH_OUT)/bin/QtCoreVBox4.dll \
453 $(PATH_OUT)/bin/QtGuiVBox4.dll \
454 $(PATH_OUT)/bin/QtNetworkVBox4.dll \
455 $(PATH_OUT)/bin/QtOpenGLVBox4.dll \
456 $(PATH_OUT)/bin/accessible/qtaccessiblewidgets4.dll \
457 , $(VBOX_MSI_DEPENDENCIES))
458endif
459ifndef VBOX_WITH_PYTHON
460 VBOX_MSI_DEPENDENCIES := $(filer-out $ \
461 $(PATH_OUT)/bin/sdk/installer/vboxapisetup.py \
462 $(PATH_OUT)/bin/sdk/installer/vboxapi/__init__.py \
463 $(PATH_OUT)/bin/sdk/installer/vboxapi/VirtualBox_constants.py \
464 , $(VBOX_MSI_DEPENDENCIES))
465endif
466ifndef VBOX_WITH_CROGL
467 VBOX_MSI_DEPENDENCIES := $(filer-out $ \
468 $(PATH_OUT)/bin/VBoxOGLhostcrutil.dll \
469 $(PATH_OUT)/bin/VBoxOGLhosterrorspu.dll \
470 $(PATH_OUT)/bin/VBoxOGLrenderspu.dll \
471 $(PATH_OUT)/bin/VBoxSharedCrOpenGL.dll \
472 , $(VBOX_MSI_DEPENDENCIES))
473endif
474ifndef VBOX_WITH_SECURELABEL
475 VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/SDL_ttf.dll, $(VBOX_MSI_DEPENDENCIES))
476endif
477ifndef VBOX_WITH_WEBSERVICES
478 VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/vboxwebsrv.exe, $(VBOX_MSI_DEPENDENCIES))
479endif
480
481ifneq ($(KBUILD_TARGET_ARCH),amd64)
482 VBOX_MSI_DEPENDENCIES := $(filter-out \
483 $(PATH_OUT)/bin/VBoxREM2.rel \
484 , $(VBOX_MSI_DEPENDENCIES))
485else
486 VBOX_MSI_DEPENDENCIES := $(filter-out \
487 $(PATH_OUT)/bin/VBoxREM32.dll \
488 $(PATH_OUT)/bin/VBoxREM64.dll \
489 , $(VBOX_MSI_DEPENDENCIES))
490endif
491ifdef VBOX_WITH_EXTPACK_PUEL
492 VBOX_MSI_DEPENDENCIES := $(filter-out $(PATH_OUT)/bin/VBoxVRDP$(VBOX_SUFF_DLL), $(VBOX_MSI_DEPENDENCIES))
493endif
494
495# Add dependencies that makes sure necessary bits gets built since
496# VBOX_MSI_DEPENDENCIES will be zero the first time around.
497# For combined packages we always use the .ISO from the amd64 build.
498VBOX_MSI_DEPENDENCIES := $(filter-out %/VBoxGuestAdditions.iso, $(VBOX_MSI_DEPENDENCIES))
499ifdef VBOX_WITH_COMBINED_PACKAGE
500 VBOX_MSI_DEPENDENCIES += \
501 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
502else
503 VBOX_MSI_DEPENDENCIES += \
504 $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
505endif
506
507#
508# MSI compile.
509#
510define def_vbox_compile_wixobj
511$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj: \
512 $(PATH_SUB_CURRENT)/VirtualBox.wxs \
513 $(PATH_SUB_CURRENT)/UserInterface.wxi \
514 $(if $(VBOX_WITH_MSM_INSTALL), \
515 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
516 $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm), \
517 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
518 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
519 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
520 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
521 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
522 $(VBOX_MSI_DEPENDENCIES)) \
523 $(VBOX_VERSION_STAMP) \
524 | $$$$(dir $$$$@)
525 $(QUIET)$(RM) -f $@
526 $(REDIRECT) \
527 -E 'PATH_OUT=$(subst /,\\,$(PATH_OUT))' \
528 -E 'PATH_TARGET=$(subst /,\\,$(VBOX_WIN_INST_OUT_DIR))' \
529 -E 'PATH_ROOT=$(subst /,\\,$(PATH_ROOT))' \
530 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
531 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))' \
532 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
533 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
534 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_LICENSE_RTF))' \
535 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
536 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
537 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
538 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
539 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
540 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
541 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
542 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
543 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
544 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
545 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
546 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
547 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
548 $(if $(VBOX_WITH_MSM_INSTALL), \
549 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
550 -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm'),) \
551 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
552 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
553 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if $(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
554 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
555 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
556 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
557 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
558 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
559 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
560 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
561 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
562 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
563 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
564 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
565 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
566 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
567 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
568 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
569 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
570 -E 'VBOX_WITH_MSM_INSTALL=$(if $(VBOX_WITH_MSM_INSTALL),yes,no)' \
571 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
572 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
573 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))' \
574 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
575 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
576 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
577 -- \
578 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
579 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
580 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
581 -out $$@
582ifeq ($(lang),en_US)
583#
584# Generate dependency file, we share this between all the languages.
585#
586 $(APPEND) -t $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep 'VBOX_MSI_DEPENDENCIES = \'
587 $(SED) -f $(VBOX_PATH_WIN_INST_SRC)/dep.sed \
588 --append $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
589 $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
590 $(VBOX_PATH_WIN_INST_SRC)/VBoxMerge$(module).wxi) \
591 $(VBOX_PATH_WIN_INST_SRC)/VirtualBox.wxs \
592 $(VBOX_PATH_WIN_INST_SRC)/UserInterface.wxi \
593 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
594 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,)
595 $(APPEND) $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep ''
596endif
597endef
598
599$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
600 $(eval $(def_vbox_compile_wixobj)))
601
602#
603# MSM (merge module) compile.
604#
605define def_vbox_compile_msm
606$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj: \
607 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
608 $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
609 $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
610 $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
611 $(PATH_SUB_CURRENT)/UserInterface.wxi \
612 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
613 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
614 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
615 $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
616 $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
617 $(VBOX_MSI_DEPENDENCIES) \
618 $(VBOX_VERSION_STAMP) \
619 | $$$$(dir $$$$@)
620 $(QUIET)$(RM) -f $@
621 $(REDIRECT) \
622 -E 'PATH_OUT=$(subst /,\\,$(PATH_OUT))' \
623 -E 'PATH_TARGET=$(subst /,\\,$(VBOX_WIN_INST_OUT_DIR))' \
624 -E 'PATH_ROOT=$(subst /,\\,$(PATH_ROOT))' \
625 -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
626 -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))' \
627 -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
628 -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
629 -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_LICENSE_RTF))' \
630 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
631 -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
632 -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
633 -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
634 -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
635 -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
636 -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
637 -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
638 -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
639 -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
640 -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
641 -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
642 -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
643 -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
644 -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
645 -E 'VBOX_WITH_COMBINED_PACKAGE=$(if $(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
646 -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
647 -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
648 -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
649 -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
650 -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
651 -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
652 -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
653 -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
654 -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
655 -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
656 -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
657 -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
658 -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
659 -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
660 -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
661 -E 'VBOX_WITH_MSM_INSTALL=$(if $(VBOX_WITH_MSM_INSTALL),yes,no)' \
662 -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
663 -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
664 -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
665 -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))' \
666 -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
667 -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
668 -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
669 -- \
670 $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
671 -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
672 -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
673 -out $$@
674ifeq ($(lang),en_US)
675#
676# Generate dependency file, we share this between all the languages.
677#
678 $(APPEND) -t $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep 'VBOX_MSI_DEPENDENCIES = \'
679 $(SED) -f $(VBOX_PATH_WIN_INST_SRC)/dep.sed \
680 --append $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep \
681 $(VBOX_PATH_WIN_INST_SRC)/VBoxMerge$(module).wxi \
682 $(VBOX_PATH_WIN_INST_SRC)/UserInterface.wxi \
683 $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
684 $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,)
685 $(APPEND) $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module).msm.dep ''
686endif
687endef
688
689$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
690 $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
691 $(eval $(def_vbox_compile_msm))))
692
693#
694# VirtualBox Type Library definition.
695#
696$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
697 $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
698 $(VBOX_XIDL_FILE) \
699 | $$(dir $$@)
700 $(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
701
702$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
703 $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
704 $(VBOX_XIDL_FILE) \
705 | $$(dir $$@)
706 $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" -o [email protected] $< $(VBOX_XIDL_FILE)
707 $(SED) -e 's/VBoxC/VBoxClient_x86/g' --output $@ [email protected]
708 $(RM) -f [email protected]
709
710#
711# Construct the list of GUI translations.
712# ('-t' -- truncate file; '-n' -- new line between arguments)
713#
714include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
715$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk $(MAKEFILE_CURRENT) | $$(dir $$@)
716 $(APPEND) -t $@ '<?xml version="1.0" ?>'
717 $(APPEND) $@ '<Include>'
718 $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
719 ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
720 ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
721 $(APPEND) $@ '</Include>'
722
723#
724# Edit the version stored in the registry.
725#
726$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
727 $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' --output $@ $<
728 $(SED) -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' --output $@ $<
729
730#
731# Build the multi-language version of the .MSI installer (final installer).
732# This is done by creating binary .MST diffs of all the language-specific installers
733# and then merging the diffs into the existing .MSI using tools from the MS Installer SDK.
734#
735# .MSI link (all languages).
736#
737# Note: Prereqs of the special .NOTPARALLEL target will be executed with parallel
738# make jobs temporarily disabled. This is a hack to work around what seems
739# to be a problem with the sharing mode set by one or more of the three
740# programs / scripts involved in this step.
741#
742define def_vbox_create_mst
743.NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst
744$(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst: \
745 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi \
746 $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi \
747 | $$$$(dir $$$$@)
748 $(call MSG_L1,Integrating language ($(lang)))
749 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
750 $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSIDB) -d $$< -r $(lang).mst
751 $(REDIRECT) -C $$(@D) -- wscript.exe $(VBOX_PATH_WISUBSTG) $$< $(lang).mst $(lang_id)
752endef
753
754$(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), \
755 $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
756 $(eval $(def_vbox_create_mst)))
757
758#
759# Create all xxx_<Lang>.msi installers and prepare the final xxx_MultiLang.msi installer.
760#
761## @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
762# where en_US.msi is created, it shouldn't be changed after that (if possible). Also, document the path length issue.
763VBOX_INS_PROD_ARCH.amd64 = x64
764VBOX_INS_PROD_ARCH.x86 = Intel
765VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
766$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
767VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
768$(foreach lang, $(VBOX_INSTALLER_ADD_LANGUAGES), $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
769VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
770
771$(PACKAGE_NAME_FINAL): \
772 $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
773 $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
774 $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
775 $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
776 $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
777 $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst) \
778 $(VBOX_SVN_REV_KMK) \
779 | $$(dir $$@)
780 $(QUIET)$(RM) -f $(wildcard $(PATH_STAGE_BIN)/$(PACKAGE_BASE)-r*.msi)
781 $(REDIRECT) -C $(@D) -- \
782 wscript.exe $(VBOX_PATH_WISUMINFO) $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $(VBOX_INS_PROD_LANG)
783 $(CP) -f $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $@
784 $(call VBOX_SIGN_FILE_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV))
785
786
787if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
788#
789# Make the multi-architecture installer by calling our stub builder
790# with both platform installers (x86 and amd64) + common cab. The common
791# cab only is needed when we don't use merge modules. We only
792# need to do this once; so do it on x86 only.
793#
794$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL): \
795 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
796 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
797 $(PATH_STAGE_BIN)/VBoxStub.exe \
798 $$(VBoxStubBld_1_TARGET)
799 $(call MSG_L1,Building Windows combined package)
800 $(if $(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_FILE_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
801 $(REDIRECT) -C $(@D) -- \
802 $(VBoxStubBld_1_TARGET) -out $@ \
803 -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
804 -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
805 $(if $(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
806 -stub $(PATH_STAGE_BIN)/VBoxStub.exe
807 $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
808 $(call VBOX_SIGN_FILE_FN,$@)
809endif
810
811
812#
813# Make the bundle installer (for retail ISOs) (zip-file).
814#
815$(VBOX_PATH_PACK_BUNDLE_ZIP): \
816 $(PACKAGE_NAME_FINAL) \
817 $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
818 $(PATH_STAGE_BIN)/VBoxBundleMachine.exe \
819 $(if $(VBOX_BRAND_WIN_AS_MENU), $(PATH_STAGE_BIN)/AutoStartMenu.exe) \
820 $(if $(VBOX_WITH_COMBINED_PACKAGE), $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)),)
821 $(RM) -Rf -- $(VBOX_PATH_PACK_BUNDLE_TMP)/
822 $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/
823ifndef VBOX_WITH_COMBINED_PACKAGE
824 $(CP) $(PACKAGE_NAME_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(VBOX_BRAND_WIN_INST_NAME.$(KBUILD_TARGET_ARCH))
825endif
826ifeq ($(KBUILD_TARGET_ARCH),x86)
827 ifdef VBOX_WITH_COMBINED_PACKAGE
828 $(CP) $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(PACKAGE_NAME_MULTIARCH_FINAL)
829 endif
830 $(CP) $(PATH_STAGE_BIN)/VBoxBundleMachine.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
831 $(CP) $(PATH_STAGE_BIN)/AutoStartMenu.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
832 ifdef VBOX_BRAND_WIN_AS_MENU
833 $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
834 $(CP) $(VBOX_BRAND_WIN_AS_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/
835 $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/
836 $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT_GFX) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
837 ifdef VBOX_WITH_COMBINED_PACKAGE
838 $(SED) -e 's/VBOXEXE/$(PACKAGE_NAME_MULTIARCH_FINAL)/g' \
839 --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
840 $(VBOX_BRAND_WIN_AS_MENU)/index_combined.html
841 else
842 $(SED) -e 's/VBOX32EXE/$(VBOX_BRAND_WIN_INST_NAME.x86)/g' \
843 -e 's/VBOX64EXE/$(VBOX_BRAND_WIN_INST_NAME.amd64)/g' \
844 --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
845 $(VBOX_BRAND_WIN_AS_MENU)/index.html
846 endif
847 endif
848endif
849ifeq ($(KBUILD_TARGET_ARCH),amd64)
850 ifndef VBOX_WITH_COMBINED_PACKAGE
851 # Only needed if *not* combined package -- otherwise the 64-bit build
852 # has nothing to do here since the one and only amd64 .MSI file is already
853 # included in the x86 combined package.
854 $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
855 endif
856else
857 # Do a bundle .zip in every case on x86. On a combined package this also
858 # will include the amd64 installer we left out in the block above (see comment).
859 $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
860endif
861
862include $(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