VirtualBox

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

Last change on this file since 76882 was 76818, checked in by vboxsync, 6 years ago

Config.kmk, HostDrivers/Support, Main, FE/Qt, Installer: bugref:9049: Wipe out VBOX_GUI_WITH_SHARED_LIBRARY, leaving split GUI build as the only possible.

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