VirtualBox

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

Last change on this file since 83702 was 83702, checked in by vboxsync, 5 years ago

Repack scripts: Excluding Single-0-All and sign-attestation from being used in build for OSE

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