VirtualBox

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

Last change on this file since 69206 was 69111, checked in by vboxsync, 7 years ago

(C) year

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