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