VirtualBox

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

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

Installer/win: Dummy INF files for ring-0 bits. bugref:8691

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