1 | # $Id: Makefile.kmk 104517 2024-05-04 19:43:17Z 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 de_DE
|
---|
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_WEBSERVICES :=
|
---|
74 | VBOX_WITH_UNATTENDED :=
|
---|
75 | VBOX_WITH_DOCS_PACKING :=
|
---|
76 | VBOX_WITH_QTGUI :=
|
---|
77 | VBOX_WITH_USB :=
|
---|
78 | VBOX_WITH_VBOX_IMG :=
|
---|
79 | VBOX_WITH_VBOXSDL :=
|
---|
80 | VBOX_CAB_COMPRESSION_LEVEL := none
|
---|
81 | endif
|
---|
82 |
|
---|
83 | #
|
---|
84 | # Globals.
|
---|
85 | #
|
---|
86 | # Tip: Use VBOX_CAB_COMPRESSION_LEVEL=none on the kmk command line when working
|
---|
87 | # on the installer.
|
---|
88 | #
|
---|
89 | VBOX_WIN_INST_MAKEFILE_DEP := $(MAKEFILE_CURRENT)
|
---|
90 | ifndef VBOX_CAB_COMPRESSION_LEVEL
|
---|
91 | VBOX_CAB_COMPRESSION_LEVEL := high
|
---|
92 | endif
|
---|
93 |
|
---|
94 | VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
95 | VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
|
---|
96 | VBOX_WIN_INST_REPACK_DIR := $(PATH_OUT)/repack
|
---|
97 |
|
---|
98 | # Note: en_US *must* come first for the dependency file generation.
|
---|
99 | ifndef VBOX_INSTALLER_LANGUAGES
|
---|
100 | VBOX_INSTALLER_LANGUAGES = en_US de_DE el_GR fr_FR it_IT tr_TR zh_TW zh_CN
|
---|
101 | VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
|
---|
102 | endif
|
---|
103 |
|
---|
104 | # Aliases for VBOX_SIGN_FILE_FN that allows better control of the MSI and MSM signing.
|
---|
105 | VBOX_SIGN_MSI_FN ?= $(VBOX_SIGN_FILE_FN)
|
---|
106 | VBOX_SIGN_MSM_FN ?= $(VBOX_SIGN_FILE_FN)
|
---|
107 | VBOX_SIGN_CAB_FN ?= $(VBOX_SIGN_FILE_FN)
|
---|
108 |
|
---|
109 | #
|
---|
110 | # List of merge modules to use.
|
---|
111 | #
|
---|
112 | ifndef VBOX_INSTALLER_MERGE_MODULES
|
---|
113 | VBOX_INSTALLER_MERGE_MODULES = App
|
---|
114 | ifdef VBOX_WITH_NETADP
|
---|
115 | VBOX_INSTALLER_MERGE_MODULES += NetAdp NetAdp6
|
---|
116 | endif
|
---|
117 | ifdef VBOX_WITH_NETFLT
|
---|
118 | VBOX_INSTALLER_MERGE_MODULES += NetLwf NetFlt
|
---|
119 | endif
|
---|
120 | ifdef VBOX_WITH_USB
|
---|
121 | VBOX_INSTALLER_MERGE_MODULES += USB
|
---|
122 | endif
|
---|
123 | ifdef VBOX_WITH_PYTHON
|
---|
124 | VBOX_INSTALLER_MERGE_MODULES += Python
|
---|
125 | endif
|
---|
126 | endif
|
---|
127 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
128 | VBOX_INSTALLER_MERGE_MODULES += COM32On64
|
---|
129 | endif
|
---|
130 |
|
---|
131 | # We only ship the merge modules in locale en_US for the moment.
|
---|
132 | ifdef VBOX_WITH_MSM_INSTALL
|
---|
133 | VBOX_INSTALLER_LANGUAGES := en_US
|
---|
134 | VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES)
|
---|
135 | endif
|
---|
136 |
|
---|
137 | #
|
---|
138 | # Language IDs (LCID, decimal)
|
---|
139 | #
|
---|
140 | VBOX_BRAND_en_US_LANG_ID ?= 1033
|
---|
141 | VBOX_BRAND_de_DE_LANG_ID ?= 1031
|
---|
142 | VBOX_BRAND_el_GR_LANG_ID ?= 1032
|
---|
143 | VBOX_BRAND_fa_IR_LANG_ID ?= 1065
|
---|
144 | VBOX_BRAND_fr_FR_LANG_ID ?= 1036
|
---|
145 | VBOX_BRAND_it_IT_LANG_ID ?= 1040
|
---|
146 | VBOX_BRAND_tr_TR_LANG_ID ?= 1055
|
---|
147 | VBOX_BRAND_zh_TW_LANG_ID ?= 1028
|
---|
148 | VBOX_BRAND_zh_CN_LANG_ID ?= 2052
|
---|
149 |
|
---|
150 | # Standard language names (in the native language), to be extended as we go.
|
---|
151 | # VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs
|
---|
152 | # in either VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES.
|
---|
153 | VBOX_BRAND_en_US_LANG_NAME := English
|
---|
154 | VBOX_BRAND_de_DE_LANG_NAME := Deutsch
|
---|
155 | VBOX_BRAND_el_GR_LANG_NAME := Ελληνικά
|
---|
156 | VBOX_BRAND_fr_FR_LANG_NAME := Français
|
---|
157 | VBOX_BRAND_it_IT_LANG_NAME := Italiano
|
---|
158 | VBOX_BRAND_tr_TR_LANG_NAME := Türkçe
|
---|
159 | VBOX_BRAND_zh_TW_LANG_NAME := 正體中文
|
---|
160 | VBOX_BRAND_zh_CN_LANG_NAME := 简体中文
|
---|
161 |
|
---|
162 |
|
---|
163 | #
|
---|
164 | # We don't have the license text in another language than English yet,
|
---|
165 | # so just define the branding targets to use the English one for now.
|
---|
166 | # The installer generation assumes that there is a translation for each
|
---|
167 | # of VBOX_INSTALLER_LANGUAGES.
|
---|
168 | #
|
---|
169 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
170 | $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)))
|
---|
171 |
|
---|
172 | #
|
---|
173 | # Set the codepage for all languages to 1252, covers most cases.
|
---|
174 | #
|
---|
175 | $(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \
|
---|
176 | $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
|
---|
177 | # Exceptions:
|
---|
178 | VBOX_BRAND_el_GR_LANGUAGE_CODEPAGE := 1253
|
---|
179 | VBOX_BRAND_fa_IR_LANGUAGE_CODEPAGE := 1256
|
---|
180 | VBOX_BRAND_tr_TR_LANGUAGE_CODEPAGE := 1254
|
---|
181 | VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
|
---|
182 | VBOX_BRAND_zh_CN_LANGUAGE_CODEPAGE := 936
|
---|
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.wix \
|
---|
234 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox.wix \
|
---|
235 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.msi.dep \
|
---|
236 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
237 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi \
|
---|
238 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_ProxyStub.wxi \
|
---|
239 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
240 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
241 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
242 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
243 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
244 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
245 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
|
---|
246 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \
|
---|
247 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
248 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \
|
---|
249 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).msi.dep \
|
---|
250 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix \
|
---|
251 | $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files \
|
---|
252 | $(VBOX_WIN_INST_REPACK_DIR)/1-build-$(PACKAGE_NAME_LANG).cmd \
|
---|
253 | $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/Language_$(lang).wxl \
|
---|
254 | $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/License_$(lang).wxl ) \
|
---|
255 | $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
|
---|
256 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
|
---|
257 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
258 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
|
---|
259 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
260 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
|
---|
261 | $(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_NAME_LANG).cmd \
|
---|
262 | $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
|
---|
263 |
|
---|
264 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
265 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
266 | OTHER_CLEAN += \
|
---|
267 | $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd \
|
---|
268 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86)
|
---|
269 | endif
|
---|
270 | ifndef VBOX_WITH_MSM_INSTALL
|
---|
271 | OTHER_CLEAN += \
|
---|
272 | $(VBOX_WIN_INST_OUT_DIR)/common.cab
|
---|
273 | endif
|
---|
274 | else
|
---|
275 | OTHER_CLEAN += \
|
---|
276 | $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd \
|
---|
277 | $(PACKAGE_NAME_FINAL)
|
---|
278 | endif
|
---|
279 |
|
---|
280 | ifdef VBOX_WITH_MSM_INSTALL
|
---|
281 | OTHER_CLEAN += \
|
---|
282 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
283 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
284 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm \
|
---|
285 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).msm.dep \
|
---|
286 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb \
|
---|
287 | $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix \
|
---|
288 | $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files)
|
---|
289 | BLDDIRS += $foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
290 | $(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/)
|
---|
291 | endif
|
---|
292 |
|
---|
293 | #
|
---|
294 | # Defines the WIX binary we're going to use.
|
---|
295 | #
|
---|
296 | # For WIX v4 there only is one single binary which can do all the required steps
|
---|
297 | # (compiling, linking, ...).
|
---|
298 | #
|
---|
299 | VBOX_TOOLS_WIN_WIX_BIN := $(VBOX_PATH_WIX)/tools/net472/x86/wix.exe
|
---|
300 | # Defines the path to the WIX extension DLLs. Might differ for other (major) WIX versions.
|
---|
301 | VBOX_TOOLS_WIN_WIXEXT_DIR := $(VBOX_PATH_WIX)/wixext4/
|
---|
302 |
|
---|
303 | #
|
---|
304 | # Defines the extension DLL we use for building an installer.
|
---|
305 | #
|
---|
306 | VBOX_TOOLS_WIN_WIX_EXT := \
|
---|
307 | -lib $(VBOX_TOOLS_WIN_WIXEXT_DIR)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib \
|
---|
308 | $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
309 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Ui.wixext.dll \
|
---|
310 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
|
---|
311 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll
|
---|
312 |
|
---|
313 | #
|
---|
314 | # Create intermediate XML file for languages (needed for .MSI linking).
|
---|
315 | #
|
---|
316 | # Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
|
---|
317 | # to escape the expansion of the $(eval ) argument and then the definition of the
|
---|
318 | # rule. The statement is finally expanded during second dependency expansion, which
|
---|
319 | # takes place after all makefiles has been loaded and with the @ variable defined.
|
---|
320 | #
|
---|
321 | define def_vbox_lang_xml
|
---|
322 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@)
|
---|
323 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
324 | $(QUIET)$(INSTALL) -m 0644 $$< $$@
|
---|
325 | endef
|
---|
326 |
|
---|
327 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
328 | $(eval $(def_vbox_lang_xml)))
|
---|
329 |
|
---|
330 | #
|
---|
331 | # Create intermediate XML file for licenses (needed for .MSI building).
|
---|
332 | # These files are created from the original .RTF files in the /docs directory.
|
---|
333 | #
|
---|
334 | # Note: The redirect command below will open $$@ as stdout in append+text mode
|
---|
335 | # and then exec cat, thus appending the license file to the result file.
|
---|
336 | #
|
---|
337 | # Note: The license_file variable has to be created before def_vbox_license_xml
|
---|
338 | # is expanded by the 2nd eval because we rely on the that expansion
|
---|
339 | # replacing all $(license_file) (and $(lang)) references before evaluation.
|
---|
340 | #
|
---|
341 | # Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
|
---|
342 | # between the tag and the RTF license text.
|
---|
343 | #
|
---|
344 | define def_vbox_license_xml
|
---|
345 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(VBOX_WIN_INST_MAKEFILE_DEP) | $$$$(dir $$$$@)
|
---|
346 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
347 | $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
|
---|
348 | $(APPEND) $$@ '<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Codepage="$(VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE)" Culture="$(lang)">'
|
---|
349 |
|
---|
350 | $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id="LicenseText" Value="'
|
---|
351 | $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\<|g" -e "s|>|\>|g" $(license_file)
|
---|
352 | $(APPEND) $$@ '" />'
|
---|
353 |
|
---|
354 | $(APPEND) $$@ '<String Id="LicenseFile" Value="$(license_file)" />'
|
---|
355 | $(APPEND) $$@ '<String Id="LicenseInstallFileLong" Value="License_$(lang).rtf" />'
|
---|
356 | $(APPEND) $$@ '<String Id="LicenseInstallFileShort" Value="L_$(lang).rtf" />'
|
---|
357 |
|
---|
358 | $(APPEND) $$@ '</WixLocalization>'
|
---|
359 | endef
|
---|
360 |
|
---|
361 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
362 | $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
|
---|
363 | $(eval $(def_vbox_license_xml)))
|
---|
364 |
|
---|
365 | #
|
---|
366 | # Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
|
---|
367 | # This file includes all language-specific files (PDFs, CHMs, ...) to install.
|
---|
368 | #
|
---|
369 | # Note: When using the -n switch, append will append a new line after each
|
---|
370 | # argument. The -t switch makes it truncate the file.
|
---|
371 | #
|
---|
372 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@)
|
---|
373 | $(call MSG_GENERATE,,$@,$<)
|
---|
374 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
375 | $(APPEND) $@ '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">'
|
---|
376 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
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://wixtoolset.org/schemas/v4/wxs">'
|
---|
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://wixtoolset.org/schemas/v4/wxs">">'
|
---|
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://wixtoolset.org/schemas/v4/wxs">'
|
---|
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" Bitness="$$(var.Property_Bitness)">' \
|
---|
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" Bitness="$$(var.Property_Bitness)">' \
|
---|
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" Bitness="$$(var.Property_Bitness)">' \
|
---|
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://wixtoolset.org/schemas/v4/wxs">'
|
---|
455 | #
|
---|
456 | # Documentation (PDF/CHM)
|
---|
457 | #
|
---|
458 | ifdef VBOX_WITH_DOCS_PACKING
|
---|
459 | $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
|
---|
460 | ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_StartMenuVBox" Advertise="no"/>'
|
---|
461 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
462 | ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
|
---|
463 | ' Description="!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_StartMenuVBox"/>')
|
---|
464 | endif
|
---|
465 | #
|
---|
466 | # License(s) (RTF)
|
---|
467 | #
|
---|
468 | $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
|
---|
469 | ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
|
---|
470 | $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \
|
---|
471 | ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
|
---|
472 | ' Description="!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
|
---|
473 | $(APPEND) $@ '</Include>'
|
---|
474 |
|
---|
475 | VBOX_WIN_INST_ENV := \
|
---|
476 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
477 | -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
478 | -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
|
---|
479 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
480 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
481 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
482 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
483 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
484 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
485 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
486 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
487 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
488 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
489 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
490 | -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
|
---|
491 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
492 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
493 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
494 | -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
|
---|
495 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
496 | -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
|
---|
497 | -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
|
---|
498 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
499 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
500 | -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \
|
---|
501 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
502 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
503 | -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
|
---|
504 | -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
|
---|
505 | -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \
|
---|
506 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
507 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
508 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
509 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
510 | -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
|
---|
511 | -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
|
---|
512 | -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
|
---|
513 | -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
|
---|
514 | -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
|
---|
515 | -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \
|
---|
516 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
517 | -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
|
---|
518 | -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
|
---|
519 | -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
|
---|
520 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
521 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
522 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
523 | -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
|
---|
524 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
525 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
526 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
527 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
528 | -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
|
---|
529 | -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
|
---|
530 | -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
|
---|
531 | -E 'VBOX_WITH_USB=$(if $(VBOX_WITH_USB),yes,no)' \
|
---|
532 | -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),yes,no)' \
|
---|
533 | -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
|
---|
534 | -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
|
---|
535 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
536 | -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
537 | -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
538 | -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
|
---|
539 | -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
|
---|
540 | -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
|
---|
541 | -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)'
|
---|
542 |
|
---|
543 | #
|
---|
544 | # Building the main installer (en_US).
|
---|
545 | #
|
---|
546 | # Since WIX v4 we don't need to do compilation + linking as separate steps,
|
---|
547 | # as the WIX binary all now does this internally with its "build" command.
|
---|
548 | #
|
---|
549 | # Note: This will clean up any previous .msi and .wixpdb files to prevent dep
|
---|
550 | # build boxes from filling up with old files.
|
---|
551 | #
|
---|
552 | define def_vbox_build_msi
|
---|
553 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
554 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \
|
---|
555 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
|
---|
556 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
557 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
558 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
559 | $(VBOX_SVN_REV_KMK) \
|
---|
560 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
561 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
|
---|
562 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
563 | | $$$$(dir $$$$@)
|
---|
564 | $$(call MSG_L1,Building installer $$@)
|
---|
565 | $(QUIET)$(RM) -f $$(wildcard $$(subst r$$(VBOX_SVN_REV),r*,\
|
---|
566 | $$@ \
|
---|
567 | $$(basename $$@).wixpdb \
|
---|
568 | $$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd ))
|
---|
569 | kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
|
---|
570 | -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
|
---|
571 | -intermediatefolder $$(@D)/wix-temp/ \
|
---|
572 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
573 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
574 | -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
|
---|
575 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
|
---|
576 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
|
---|
577 | -pdbtype none \
|
---|
578 | -out $$@
|
---|
579 | if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL)
|
---|
580 | $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab
|
---|
581 | endif
|
---|
582 | ifeq ($(lang),en_US)
|
---|
583 | $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl" "$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl" \
|
---|
584 | "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/"
|
---|
585 | # Create repack script for this step.
|
---|
586 | $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/1-compile-$$(PACKAGE_NAME_LANG).cmd" \
|
---|
587 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
588 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
589 | '$(VBOX_TOOLS_WIN_WIX_BIN) build ^' \
|
---|
590 | ' files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
|
---|
591 | ' files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
|
---|
592 | ' -lib VirtualBox_en_US.wixlib ^' \
|
---|
593 | ' -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll ^' \
|
---|
594 | ' -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll ^' \
|
---|
595 | ' -pdbtype none ^' \
|
---|
596 | ' -out $$(@F) ^' \
|
---|
597 | ' || exit /b1' \
|
---|
598 | ) \
|
---|
599 | '@echo Created MSI installer: $$(@F)' \
|
---|
600 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL),'@echo Created: common.cab',)
|
---|
601 |
|
---|
602 | endif
|
---|
603 | $(RM) -Rf -- $$(@D)/wix-temp/
|
---|
604 | endef
|
---|
605 |
|
---|
606 | $(foreach lang, en_US, $(eval $(def_vbox_build_msi)))
|
---|
607 |
|
---|
608 |
|
---|
609 | #
|
---|
610 | # Merge module building (all languages).
|
---|
611 | #
|
---|
612 | # This takes the existing merge module WIX library (.wixlib) as input and builds a MSI merge
|
---|
613 | # module (.msm) out of it.
|
---|
614 | #
|
---|
615 | # Note: This will clean up any previous .msm to prevent dep build boxes from
|
---|
616 | # filling up with old files.
|
---|
617 | #
|
---|
618 | define def_vbox_build_msm
|
---|
619 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm: \
|
---|
620 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
|
---|
621 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
622 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
623 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
624 | $(VBOX_SVN_REV_KMK) \
|
---|
625 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
626 | | $$$$(dir $$$$@)
|
---|
627 | $$(call MSG_L1,Building merge module $$@)
|
---|
628 | $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
|
---|
629 | kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
|
---|
630 | -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
|
---|
631 | -intermediatefolder $$(@D)/wix-temp/ \
|
---|
632 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
633 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
634 | -lib $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
|
---|
635 | -pdbtype none \
|
---|
636 | -out $$@
|
---|
637 | $(RM) -Rf -- \
|
---|
638 | $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst \
|
---|
639 | $$(@D)/wix-temp/
|
---|
640 | $(call VBOX_SIGN_MSM_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
|
---|
641 | # Create repack script for this step.
|
---|
642 | $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/1-build-VBoxMerge$(module)_$(lang).cmd" \
|
---|
643 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
644 | $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
645 | '$(VBOX_TOOLS_WIN_WIX_BIN) build ^' \
|
---|
646 | ' files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \
|
---|
647 | ' files-VirtualBox_$(lang)/License_$(lang).wxl ^' \
|
---|
648 | ' $(VBOX_TOOLS_WIN_WIX_EXT) ^' \
|
---|
649 | ' -out $$(@F) ^' \
|
---|
650 | ' || exit /b1' \
|
---|
651 | 'call sign-sha1.cmd $$(@F) || exit /b1' \
|
---|
652 | ) \
|
---|
653 | '@echo Created MSM module: $$(@F)'
|
---|
654 | endef
|
---|
655 |
|
---|
656 | ifdef VBOX_WITH_MSM_INSTALL
|
---|
657 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
658 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
659 | $(eval $(def_vbox_build_msm))))
|
---|
660 | endif
|
---|
661 |
|
---|
662 |
|
---|
663 | #
|
---|
664 | # Add dependencies that makes sure necessary bits gets built.
|
---|
665 | # For combined packages we always use the .ISO from the amd64 build.
|
---|
666 | #
|
---|
667 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
668 | VBOX_MSI_DEPENDENCIES := \
|
---|
669 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
|
---|
670 | else
|
---|
671 | VBOX_MSI_DEPENDENCIES := \
|
---|
672 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
|
---|
673 | endif
|
---|
674 |
|
---|
675 | #
|
---|
676 | # A few manual dependencies to make sure everything is rebuilt when they should.
|
---|
677 | #
|
---|
678 | $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
|
---|
679 | $(PATH_SUB_CURRENT)/CommonProperties.wxi \
|
---|
680 | $(PATH_SUB_CURRENT)/Defines.wxi \
|
---|
681 | $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi
|
---|
682 |
|
---|
683 | $(PATH_SUB_CURRENT)/VBoxMergeApp.wxi $(PATH_SUB_CURRENT)/VirtualBox.wxs: \
|
---|
684 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
685 | $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \
|
---|
686 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
|
---|
687 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
|
---|
688 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
689 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
|
---|
690 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
691 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi
|
---|
692 |
|
---|
693 | #
|
---|
694 | # Building a WIX library object (.wixlib).
|
---|
695 | # We've separated the final building from the WIX library building for repacking reasons.
|
---|
696 | #
|
---|
697 | define def_vbox_build_wixlib
|
---|
698 | includedep $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixlib.dep
|
---|
699 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib \
|
---|
700 | $(if-expr "$(lang)" != "en_US",, \
|
---|
701 | + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files ): \
|
---|
702 | $(PATH_SUB_CURRENT)/VirtualBox.wxs \
|
---|
703 | $(PATH_SUB_CURRENT)/UserInterface.wxi \
|
---|
704 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
705 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
706 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm), \
|
---|
707 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
708 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
709 | $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
|
---|
710 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
711 | $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \
|
---|
712 | $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \
|
---|
713 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
714 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
715 | $(VBOX_MSI_DEPENDENCIES)) \
|
---|
716 | $(VBOX_VERSION_STAMP) \
|
---|
717 | | $$$$(dir $$$$@) $(if-expr "$(lang)" != "en_US",, \
|
---|
718 | $(VBOX_WIN_INST_REPACK_DIR)/ $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )
|
---|
719 | $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib" "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wixlib"
|
---|
720 | $(REDIRECT) \
|
---|
721 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
722 | -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
723 | -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
|
---|
724 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
725 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
726 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
727 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
728 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
729 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
730 | -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
|
---|
731 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
732 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
733 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
734 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
735 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
736 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
737 | -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
|
---|
738 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
739 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
740 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
741 | -E 'VBOX_CAB_COMPRESSION_LEVEL=$(if-expr $(lang) == "en_US",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
|
---|
742 | -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(if-expr $(lang) == "en_US" && $(KBUILD_TARGET_ARCH) == "amd64",$(VBOX_CAB_COMPRESSION_LEVEL),none)' \
|
---|
743 | -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
|
---|
744 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
745 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
746 | -E 'VBOX_WIN_INST_MERGE_$(toupper $(module))=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm')),) \
|
---|
747 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
748 | -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
|
---|
749 | -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
|
---|
750 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
751 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
752 | -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \
|
---|
753 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
754 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
755 | -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
|
---|
756 | -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
|
---|
757 | -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \
|
---|
758 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
759 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
760 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
761 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
762 | -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
|
---|
763 | -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
|
---|
764 | -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
|
---|
765 | -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
|
---|
766 | -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
|
---|
767 | -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \
|
---|
768 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
769 | -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
|
---|
770 | -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
|
---|
771 | -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
|
---|
772 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
773 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
774 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
775 | -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
|
---|
776 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
777 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
778 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
779 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
780 | -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
|
---|
781 | -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
|
---|
782 | -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
|
---|
783 | -E 'VBOX_WITH_USB=$(if $(VBOX_WITH_USB),yes,no)' \
|
---|
784 | -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),yes,no)' \
|
---|
785 | -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
|
---|
786 | -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
|
---|
787 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
788 | -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
789 | -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
790 | -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
|
---|
791 | -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
|
---|
792 | -- \
|
---|
793 | $(VBOX_TOOLS_WIN_WIX_BIN) build $(filter-out $(VBOX_VERSION_STAMP),$$<) \
|
---|
794 | -intermediatefolder $$(@D)/wix-temp/ \
|
---|
795 | $(VBOX_TOOLS_WIN_WIX_EXT) \
|
---|
796 | -outputtype library \
|
---|
797 | -out $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib
|
---|
798 | ifeq ($(lang),en_US)
|
---|
799 | # Copy over the .wixlib into the repack directory, so that it can be used later when
|
---|
800 | # doing the repacking via the shell scripts.
|
---|
801 | $(CP) $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
802 |
|
---|
803 | endif
|
---|
804 | $(RM) -Rf -- $$(@D)/wix-temp/
|
---|
805 |
|
---|
806 | $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VirtualBox_$(lang)))
|
---|
807 | endef
|
---|
808 |
|
---|
809 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
810 | $(eval $(def_vbox_build_wixlib)))
|
---|
811 |
|
---|
812 | #
|
---|
813 | # MSM (merge module) building as a WIX library (.wixlib).
|
---|
814 | #
|
---|
815 | define def_vbox_build_msm_wixlib
|
---|
816 | includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib.dep
|
---|
817 | $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib \
|
---|
818 | $(if-expr "$(lang)" != "en_US",, \
|
---|
819 | + $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wixlib): \
|
---|
820 | $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \
|
---|
821 | $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \
|
---|
822 | $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \
|
---|
823 | $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \
|
---|
824 | $(PATH_SUB_CURRENT)/UserInterface.wxi \
|
---|
825 | $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
|
---|
826 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
827 | $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \
|
---|
828 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
829 | $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \
|
---|
830 | $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \
|
---|
831 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \
|
---|
832 | $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \
|
---|
833 | $(VBOX_MSI_DEPENDENCIES) \
|
---|
834 | $(VBOX_VERSION_STAMP) \
|
---|
835 | | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
836 | $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix"
|
---|
837 | $(REDIRECT) \
|
---|
838 | -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \
|
---|
839 | -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
840 | -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \
|
---|
841 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
842 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
843 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
844 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
845 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
846 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
847 | -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
|
---|
848 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
849 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
850 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
851 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
852 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
853 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
854 | -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \
|
---|
855 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
856 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
857 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
858 | -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \
|
---|
859 | -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \
|
---|
860 | -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \
|
---|
861 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
862 | -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \
|
---|
863 | -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \
|
---|
864 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
865 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
866 | -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \
|
---|
867 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
868 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
869 | -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \
|
---|
870 | -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \
|
---|
871 | -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \
|
---|
872 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
873 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
874 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
875 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
876 | -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \
|
---|
877 | -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \
|
---|
878 | -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \
|
---|
879 | -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \
|
---|
880 | -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \
|
---|
881 | -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \
|
---|
882 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
883 | -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \
|
---|
884 | -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \
|
---|
885 | -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \
|
---|
886 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
887 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
888 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
889 | -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \
|
---|
890 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
891 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
892 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
893 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
894 | -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \
|
---|
895 | -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \
|
---|
896 | -E 'VBOX_WITH_UNATTENDED_TEMPLATES=$(if $(VBOX_UNATTENDED_TEMPLATES),yes,no)' \
|
---|
897 | -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG),yes,no)' \
|
---|
898 | -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \
|
---|
899 | -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \
|
---|
900 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
901 | -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
902 | -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
903 | -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \
|
---|
904 | -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \
|
---|
905 | -- \
|
---|
906 | $(VBOX_TOOLS_WIN_WIX_BIN) build $(filter-out $(VBOX_VERSION_STAMP),$$<) \
|
---|
907 | -intermediatefolder $$(@D)/wix-temp/ \
|
---|
908 | $(VBOX_TOOLS_WIN_WIX_EXT) \
|
---|
909 | -outputtype library \
|
---|
910 | -out $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib
|
---|
911 | $(RM) -Rf -- $$(@D)/wix-temp/
|
---|
912 | ifeq ($(lang),en_US)
|
---|
913 | # Copy over the .wixlib into the repack directory, so that it can be used later when
|
---|
914 | # doing the repacking via the shell scripts.
|
---|
915 | $(CP) $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixlib $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
916 | $(MKDIR) -p -- "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"
|
---|
917 | endif
|
---|
918 | $(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)))
|
---|
919 | endef
|
---|
920 |
|
---|
921 | $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \
|
---|
922 | $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \
|
---|
923 | $(eval $(def_vbox_build_msm_wixlib))))
|
---|
924 |
|
---|
925 | #
|
---|
926 | # VirtualBox Type Library definition.
|
---|
927 | #
|
---|
928 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
|
---|
929 | $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
|
---|
930 | $(VBOX_XIDL_FILE) \
|
---|
931 | $(MAKEFILE) \
|
---|
932 | | $$(dir $$@)
|
---|
933 | $(VBOX_XSLTPROC) \
|
---|
934 | $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
|
---|
935 | $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
|
---|
936 | -o $@ $< $(VBOX_XIDL_FILE)
|
---|
937 |
|
---|
938 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \
|
---|
939 | $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \
|
---|
940 | $(VBOX_XIDL_FILE) \
|
---|
941 | | $$(dir $$@)
|
---|
942 | $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \
|
---|
943 | $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \
|
---|
944 | $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \
|
---|
945 | -o $@ $< $(VBOX_XIDL_FILE)
|
---|
946 |
|
---|
947 | #
|
---|
948 | # Construct the list of GUI translations.
|
---|
949 | # ('-t' -- truncate file; '-n' -- new line between arguments)
|
---|
950 | #
|
---|
951 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
952 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi)
|
---|
953 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@)
|
---|
954 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
955 | $(APPEND) $@ '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">'
|
---|
956 | $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
|
---|
957 | ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
|
---|
958 | ' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
|
---|
959 | $(APPEND) $@ '</Include>'
|
---|
960 |
|
---|
961 | #
|
---|
962 | # Edit the version stored in the registry.
|
---|
963 | #
|
---|
964 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi)
|
---|
965 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
966 | $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \
|
---|
967 | -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \
|
---|
968 | --output $@ $<
|
---|
969 |
|
---|
970 | #
|
---|
971 | # Generate the list of CRT DLLs.
|
---|
972 | #
|
---|
973 | ifndef TOOL_$(VBOX_VCC_TOOL)
|
---|
974 | include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk
|
---|
975 | endif
|
---|
976 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi)
|
---|
977 | $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi: | $$(dir $$@)
|
---|
978 | $(APPEND) -t -n $@ \
|
---|
979 | '<?xml version="1.0" ?>' \
|
---|
980 | '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">' \
|
---|
981 | $(foreach dll \
|
---|
982 | ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
|
---|
983 | ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
|
---|
984 | ,$(TOOL_$(VBOX_VCC_TOOL)_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL)_REDIST_CPP_DLLS))) \
|
---|
985 | $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-x86_64.dll,) \
|
---|
986 | ,' <File Id="file_$(translate $(dll),-,_)" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\$(dll)" />') \
|
---|
987 | '</Include>'
|
---|
988 |
|
---|
989 | #
|
---|
990 | # Generate the list of 32-bit CRT DLLs.
|
---|
991 | #
|
---|
992 | ifndef TOOL_$(VBOX_VCC_TOOL_STEM)X86
|
---|
993 | include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)X86.kmk
|
---|
994 | endif
|
---|
995 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi)
|
---|
996 | $(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi: | $$(dir $$@)
|
---|
997 | $(APPEND) -t -n $@ \
|
---|
998 | '<?xml version="1.0" ?>' \
|
---|
999 | '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">' \
|
---|
1000 | $(foreach dll \
|
---|
1001 | ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \
|
---|
1002 | ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \
|
---|
1003 | ,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CPP_DLLS))) \
|
---|
1004 | $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-i386.dll,) \
|
---|
1005 | ,' <File Id="file_$(translate $(dll),-,_)_x86" Name="$(dll)" Source="$$(env.PATH_OUT)\bin\x86\$(dll)" DiskId="$$(var.Property_DiskIdCommon)" />') \
|
---|
1006 | '</Include>'
|
---|
1007 | #
|
---|
1008 | # Generate the list of unattended template script files.
|
---|
1009 | #
|
---|
1010 | $(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi)
|
---|
1011 | $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@)
|
---|
1012 | $(APPEND) -t -n $@ \
|
---|
1013 | '<?xml version="1.0" ?>' \
|
---|
1014 | '<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">'
|
---|
1015 | ifdef VBOX_UNATTENDED_TEMPLATES
|
---|
1016 | $(APPEND) -n $@ \
|
---|
1017 | ' <Directory Id="dir_VBoxUnattendedTemplates" Name="UnattendedTemplates">' \
|
---|
1018 | ' <Component Id="cp_UnattendedTemplates" Guid="0571550d-aaa5-4723-c17b-5ddcc29f5686" Bitness="$$(var.Property_Bitness)">' \
|
---|
1019 | $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \
|
---|
1020 | ' <File Id="$(file)" Name="$(file)" Source="$$(env.PATH_OUT)\bin\UnattendedTemplates\$(file)" />') \
|
---|
1021 | ' </Component>' \
|
---|
1022 | ' </Directory>'
|
---|
1023 | endif
|
---|
1024 | $(APPEND) $@ '</Include>'
|
---|
1025 |
|
---|
1026 |
|
---|
1027 | #
|
---|
1028 | # Build the multi-language version of the .MSI installer (final installer).
|
---|
1029 | #
|
---|
1030 | # This is done by creating binary .MST diffs of all the language-specific installers
|
---|
1031 | # against the en_US one, and then merging the diffs into the en_US one using tools
|
---|
1032 | # from the MS Installer SDK.
|
---|
1033 | #
|
---|
1034 | # Only contains the minimal set of stuff to get a language-specific .msi built.
|
---|
1035 | #
|
---|
1036 | define def_vbox_create_mst
|
---|
1037 | $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \
|
---|
1038 | + $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \
|
---|
1039 | $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
|
---|
1040 | $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
1041 | $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
1042 | $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
|
---|
1043 | $(VBOX_SVN_REV_KMK) \
|
---|
1044 | $(VBOX_WIN_INST_MAKEFILE_DEP) \
|
---|
1045 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \
|
---|
1046 | $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \
|
---|
1047 | | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/
|
---|
1048 | $(call MSG_L1,Creating language diff for $(lang))
|
---|
1049 | kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' $(VBOX_WIN_INST_ENV) \
|
---|
1050 | -- $(VBOX_TOOLS_WIN_WIX_BIN) build \
|
---|
1051 | -intermediatefolder $$(@D)/wix-temp/ \
|
---|
1052 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
|
---|
1053 | -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
|
---|
1054 | -lib $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_en_US.wixlib \
|
---|
1055 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.Util.wixext.dll \
|
---|
1056 | -ext $(VBOX_TOOLS_WIN_WIXEXT_DIR)/WixToolset.DifxApp.wixext.dll \
|
---|
1057 | -pdbtype none \
|
---|
1058 | -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi
|
---|
1059 | $(REDIRECT) -C $$(@D) -- $$(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
|
---|
1060 | $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst"
|
---|
1061 | $(RM) -Rf -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
1062 | $$(@D)/wix-temp/ \
|
---|
1063 | $$(@D)/common.cab
|
---|
1064 |
|
---|
1065 | endef
|
---|
1066 |
|
---|
1067 | $(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \
|
---|
1068 | $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
|
---|
1069 | $(eval $(def_vbox_create_mst)))
|
---|
1070 |
|
---|
1071 |
|
---|
1072 | # Create WISUMINFO argument.
|
---|
1073 | VBOX_INS_PROD_ARCH.amd64 = x64
|
---|
1074 | VBOX_INS_PROD_ARCH.x86 = Intel
|
---|
1075 | VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
|
---|
1076 | ifeq ($(VBOX_INS_PROD_ARCH),)
|
---|
1077 | $(error VBOX_INS_PROD_ARCH is empty!)
|
---|
1078 | endif
|
---|
1079 | VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
|
---|
1080 | $(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\
|
---|
1081 | , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
|
---|
1082 | VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
|
---|
1083 |
|
---|
1084 | # The multilingual installer rule.
|
---|
1085 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \
|
---|
1086 | + $(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_NAME_LANG).cmd: \
|
---|
1087 | $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \
|
---|
1088 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst)
|
---|
1089 | $(call MSG_L1,Creating final multilingual MSI)
|
---|
1090 | $(QUIET)$(RM) -f -- \
|
---|
1091 | $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_BASE)-r*.cmd )
|
---|
1092 | $(CP) -f -- "$<" "$@"
|
---|
1093 |
|
---|
1094 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
|
---|
1095 | $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \
|
---|
1096 | $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) )
|
---|
1097 |
|
---|
1098 | $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F)
|
---|
1099 | $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG)
|
---|
1100 | $(call VBOX_SIGN_MSI_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing)
|
---|
1101 |
|
---|
1102 | # Create repack script for this step.
|
---|
1103 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/2-multilingual-$(PACKAGE_NAME_LANG).cmd" \
|
---|
1104 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
1105 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
|
---|
1106 | 'copy /y "$(<F)" "$(@F)" || exit /b1' \
|
---|
1107 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\
|
---|
1108 | $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \
|
---|
1109 | '$(VBOX_PATH_MSIDB) -d $(@F) -r $(lang).mst || exit /b1' \
|
---|
1110 | 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) || exit /b1') \
|
---|
1111 | 'cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) || exit /b1' \
|
---|
1112 | 'cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $(@F) $(VBOX_INS_PROD_LANG) || exit /b1' \
|
---|
1113 | 'call sign-sha1.cmd $(@F) || exit /b1' \
|
---|
1114 | ) ) \
|
---|
1115 | $(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),'copy /y "$(@F)" "$(notdir $(PACKAGE_NAME_FINAL))" || exit /b1',) \
|
---|
1116 | '@echo Created multilanguage MSI: $(notdir $(PACKAGE_NAME_FINAL))'
|
---|
1117 |
|
---|
1118 | # Copy multilingual installer to bin.
|
---|
1119 | $(PACKAGE_NAME_FINAL): $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi | $$(dir $$@)
|
---|
1120 | $(QUIET)$(RM) -f $(wildcard $(@D)/$(PACKAGE_BASE)-r*$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),_$(KBUILD_TARGET_ARCH),).msi)
|
---|
1121 | $(INSTALL_STAGING) -- $< $@
|
---|
1122 |
|
---|
1123 |
|
---|
1124 | if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1125 | #
|
---|
1126 | # Make the multi-architecture installer by calling our stub builder
|
---|
1127 | # with both platform installers (x86 and amd64) + common cab. The common
|
---|
1128 | # cab only is needed when we don't use merge modules. We only
|
---|
1129 | # need to do this once; so do it on x86 only.
|
---|
1130 | #
|
---|
1131 | $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
|
---|
1132 | + $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
|
---|
1133 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
1134 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
|
---|
1135 | $(PATH_STAGE_BIN)/VBoxStub.exe \
|
---|
1136 | $$(VBoxStubBld_1_TARGET)
|
---|
1137 | $(call MSG_L1,Building Windows combined package)
|
---|
1138 | $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
|
---|
1139 | $@ \
|
---|
1140 | $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
|
---|
1141 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),,$(call VBOX_SIGN_CAB_FN,$(PACKAGE_NAME_MULTIARCH_COMMONCAB)))
|
---|
1142 | $(REDIRECT) -C $(@D) -- \
|
---|
1143 | $(VBoxStubBld_1_TARGET) -out $@ \
|
---|
1144 | -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
1145 | -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
|
---|
1146 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),,-target-all $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) \
|
---|
1147 | -stub $(PATH_STAGE_BIN)/VBoxStub.exe
|
---|
1148 | $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
|
---|
1149 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
1150 | # Create repack script for this step.
|
---|
1151 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(@F).cmd" \
|
---|
1152 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
1153 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
|
---|
1154 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1155 | $(if-expr defined(VBOX_WITH_MSM_INSTALL), \
|
---|
1156 | ,'call sign-dual.cmd ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) || exit /b1') \
|
---|
1157 | '..\bin\VBoxStubBld.exe ^' \
|
---|
1158 | ' -out $(@F) ^' \
|
---|
1159 | ' -target-x86 $(PACKAGE_NAME_MULTIARCH.x86) ^' \
|
---|
1160 | ' -target-amd64 ../../../win.amd64/$(KBUILD_TYPE)/repack/$(PACKAGE_NAME_MULTIARCH.amd64) ^' \
|
---|
1161 | $(if-expr defined(VBOX_WITH_MSM_INSTALL),\
|
---|
1162 | ,' -target-all ../../../win.amd64/$(KBUILD_TYPE)/repack/$(notdir $(PACKAGE_NAME_MULTIARCH_COMMONCAB)) ^' ) \
|
---|
1163 | ' -stub ../bin/VBoxStub.exe || exit /b1' \
|
---|
1164 | '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
|
---|
1165 | 'call sign-dual.cmd $(@F) || exit /b1' \
|
---|
1166 | ) ) \
|
---|
1167 | '@echo Created multiarch EXE: $(@F)'
|
---|
1168 | else
|
---|
1169 | #
|
---|
1170 | # We still do the installer stub thing even if we only ship 64-bit, because we've
|
---|
1171 | # gotten used to having it around to install the certificate and such.
|
---|
1172 | #
|
---|
1173 | $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
|
---|
1174 | + $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd: \
|
---|
1175 | $(PACKAGE_NAME_FINAL) \
|
---|
1176 | $(PATH_STAGE_BIN)/VBoxStub.exe \
|
---|
1177 | $$(VBoxStubBld_1_TARGET)
|
---|
1178 | $(call MSG_L1,Building Windows package w/ installer stub)
|
---|
1179 | $(QUIET)$(RM) -f -- $(wildcard $(subst r$(VBOX_SVN_REV),r*, \
|
---|
1180 | $@ \
|
---|
1181 | $(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd ) )
|
---|
1182 | $(REDIRECT) -C "$(@D)" -- \
|
---|
1183 | $(VBoxStubBld_1_TARGET) -out $@ \
|
---|
1184 | -target-$(KBUILD_TARGET_ARCH) $(PACKAGE_NAME_FINAL) \
|
---|
1185 | -stub $(PATH_STAGE_BIN)/VBoxStub.exe
|
---|
1186 | $(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $@
|
---|
1187 | $(call VBOX_SIGN_FILE_FN,$@,,,,,,timed)
|
---|
1188 | # Create repack script for this step.
|
---|
1189 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multiarch-$(@F).cmd" \
|
---|
1190 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \
|
---|
1191 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \
|
---|
1192 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1193 | '..\bin\VBoxStubBld.exe ^' \
|
---|
1194 | ' -out $(@F) ^' \
|
---|
1195 | ' -target-$(KBUILD_TARGET_ARCH) $(notdir $(PACKAGE_NAME_FINAL)) ^' \
|
---|
1196 | ' -stub ../bin/VBoxStub.exe || exit /b1' \
|
---|
1197 | '$(VBOX_VCC_EDITBIN) /IntegrityCheck:NO $(@F) || exit /b1' \
|
---|
1198 | 'call sign-dual.cmd $(@F) || exit /b1' \
|
---|
1199 | ) ) \
|
---|
1200 | '@echo Created multiarch EXE: $(@F)'
|
---|
1201 | ifdef VBOX_WIN_ATTESTATION_SIGNING
|
---|
1202 | echo "Repacking HERE"
|
---|
1203 | cd $(VBOX_WIN_INST_REPACK_DIR)
|
---|
1204 | $(RM) -f -- \
|
---|
1205 | "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab" \
|
---|
1206 | "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab.ddf" \
|
---|
1207 | "$(VBOX_WIN_INST_REPACK_DIR)/PackDriversForSubmission_internal.cmd"
|
---|
1208 | cd $(VBOX_WIN_INST_REPACK_DIR) && ls -la
|
---|
1209 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/PackDriversForSubmission_internal.cmd" \
|
---|
1210 | "SET KBUILD_BIN_PATH=$(KBUILD_BIN_PATH)" \
|
---|
1211 | "call PackDriversForSubmission.cmd -b $(PATH_STAGE_BIN) -a $(KBUILD_TARGET_ARCH) \
|
---|
1212 | -x -n --no-extpack -o $(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab"
|
---|
1213 |
|
---|
1214 | $(TIME_EXT) $(REDIRECT_EXT) -C "$(VBOX_WIN_INST_REPACK_DIR)" -- $(EXEC_X86_WIN32) cmd.exe /c PackDriversForSubmission_internal.cmd
|
---|
1215 | $(TIME_EXT) $(REDIRECT_EXT) -C "$(VBOX_WIN_INST_REPACK_DIR)" -- $(VBOX_RETRY) $(VBOX_WIN_ATTESTATION_SIGNING_EXE) "Oracle VM VirtualBox Base drivers $(KBUILD_TARGET_ARCH) $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)r$(VBOX_SVN_REV)" "$(KBUILD_TARGET_ARCH)" "r$(VBOX_SVN_REV)" "$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab"
|
---|
1216 |
|
---|
1217 | $(RM) -f -- "$(VBOX_WIN_INST_REPACK_DIR)/Single-3-Repack_internal.cmd"
|
---|
1218 | $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/Single-3-Repack_internal.cmd" \
|
---|
1219 | "SET KBUILD_BIN_PATH=$(KBUILD_BIN_PATH)" \
|
---|
1220 | "SET KBUILD_DEVTOOLS=$(KBUILD_DEVTOOLS)" \
|
---|
1221 | "call Single-3-Repack.cmd --no-extpack --signed "$(PACKAGE_NAME_LANG)-$(KBUILD_TARGET_ARCH).cab.Signed.zip"
|
---|
1222 | $(TIME_EXT) $(REDIRECT_EXT) -C "$(VBOX_WIN_INST_REPACK_DIR)" -- $(EXEC_X86_WIN32) cmd.exe /c Single-3-Repack_internal.cmd
|
---|
1223 |
|
---|
1224 | $(RM) -f -- \
|
---|
1225 | "$(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)" \
|
---|
1226 | "$(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi"
|
---|
1227 | $(CP) -- "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_MULTIARCH_FINAL)" "$(PATH_STAGE_BIN)/"
|
---|
1228 | $(CP) -- "$(VBOX_WIN_INST_REPACK_DIR)/$(PACKAGE_NAME_LANG).msi" "$(PATH_STAGE_BIN)/"
|
---|
1229 | endif
|
---|
1230 | endif
|
---|
1231 |
|
---|
1232 | #
|
---|
1233 | # Repackaging scripts and files.
|
---|
1234 | #
|
---|
1235 | INSTALLS += RePackScripts
|
---|
1236 | RePackScripts_TEMPLATE = DUMMY
|
---|
1237 | RePackScripts_INST = repack/
|
---|
1238 | RePackScripts_INSTTYPE = stage
|
---|
1239 | RePackScripts_SOURCES = \
|
---|
1240 | Scripts/UnpackBlessedDrivers.cmd \
|
---|
1241 | $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
|
---|
1242 | $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
|
---|
1243 | $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
|
---|
1244 | $(if-expr defined(VBOX_SIGN_EV_FILE_FN),$(RePackScripts_0_OUTDIR)/sign-ev.cmd,) \
|
---|
1245 | $(RePackScripts_0_OUTDIR)/VMMR0.inf \
|
---|
1246 | $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
|
---|
1247 | if !defined(VBOX_WITH_COMBINED_PACKAGE) || "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1248 | RePackScripts_SOURCES += \
|
---|
1249 | $(RePackScripts_0_OUTDIR)/RepackExtPack.cmd
|
---|
1250 | endif
|
---|
1251 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
1252 | if "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
1253 | RePackScripts_SOURCES += \
|
---|
1254 | $(RePackScripts_0_OUTDIR)/Combined-1-Prepare.cmd \
|
---|
1255 | $(RePackScripts_0_OUTDIR)/Combined-3-Repack.cmd \
|
---|
1256 | $(RePackScripts_0_OUTDIR)/Combined-3-RepackAdditions.cmd
|
---|
1257 | endif
|
---|
1258 | else
|
---|
1259 | RePackScripts_SOURCES += \
|
---|
1260 | $(RePackScripts_0_OUTDIR)/Single-1-Prepare.cmd \
|
---|
1261 | $(RePackScripts_0_OUTDIR)/Single-3-Repack.cmd
|
---|
1262 |
|
---|
1263 | ifndef VBOX_OSE
|
---|
1264 | RePackScripts_SOURCES += \
|
---|
1265 | $(RePackScripts_0_OUTDIR)/Single-0-All.cmd
|
---|
1266 | endif
|
---|
1267 |
|
---|
1268 | endif
|
---|
1269 | RePackScripts_CLEAN = \
|
---|
1270 | $(RePackScripts_0_OUTDIR)/PackDriversForSubmission.cmd \
|
---|
1271 | $(RePackScripts_0_OUTDIR)/sign-dual.cmd \
|
---|
1272 | $(RePackScripts_0_OUTDIR)/sign-sha1.cmd \
|
---|
1273 | $(RePackScripts_0_OUTDIR)/sign-ev.cmd \
|
---|
1274 | $(RePackScripts_0_OUTDIR)/VMMR0.inf \
|
---|
1275 | $(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf
|
---|
1276 |
|
---|
1277 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/PackDriversForSubmission.cmd,PackDriversForSubmission.cmd)
|
---|
1278 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/RepackExtPack.cmd,RepackExtPack.cmd)
|
---|
1279 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
1280 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-1-Prepare.cmd,Combined-1-Prepare.cmd)
|
---|
1281 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-Repack.cmd,Combined-3-Repack.cmd)
|
---|
1282 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Combined-3-RepackAdditions.cmd,Combined-3-RepackAdditions.cmd)
|
---|
1283 | else
|
---|
1284 | ifndef VBOX_OSE
|
---|
1285 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-0-All.cmd,Single-0-All.cmd)
|
---|
1286 | endif
|
---|
1287 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-1-Prepare.cmd,Single-1-Prepare.cmd)
|
---|
1288 | $(call VBOX_EDIT_VERSION_AND_BUILD_RULE_FN,RePackScripts,Scripts/Single-3-Repack.cmd,Single-3-Repack.cmd)
|
---|
1289 | endif
|
---|
1290 |
|
---|
1291 | $$(RePackScripts_0_OUTDIR)/sign-dual.cmd: | $$(dir $$@)
|
---|
1292 | $(APPEND) -nt "$@" \
|
---|
1293 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1294 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1295 | 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
|
---|
1296 | $(subst /win-6.1/,/win-rel/,$(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1297 | '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,,&&) ) || exit /b1' \
|
---|
1298 | ) ) )
|
---|
1299 |
|
---|
1300 | $$(RePackScripts_0_OUTDIR)/sign-sha1.cmd: | $$(dir $$@)
|
---|
1301 | $(APPEND) -nt "$@" \
|
---|
1302 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1303 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1304 | 'if ".%1" == "." (echo No .cat file specified & exit /b 1)' \
|
---|
1305 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1306 | '( $(call VBOX_SIGN_FILE_FN,%1,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing,&&) ) || exit /b1' \
|
---|
1307 | ) )
|
---|
1308 |
|
---|
1309 | # The %~dp1\ oddity is working around otherwise ending with \" during
|
---|
1310 | # expansion of the CCS command line which for a reason I cannot immediately
|
---|
1311 | # understand appends a " to the path.
|
---|
1312 | $$(RePackScripts_0_OUTDIR)/sign-ev.cmd: | $$(dir $$@)
|
---|
1313 | $(APPEND) -nt "$@" \
|
---|
1314 | 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b 1)' \
|
---|
1315 | 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b 1)' \
|
---|
1316 | 'if ".%1" == "." (echo No .cab file specified & exit /b 1)' \
|
---|
1317 | $(subst $(KBUILD_BIN_PATH),%KBUILD_BIN_PATH%,$(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%, \
|
---|
1318 | '( $(call VBOX_SIGN_EV_FILE_FN,%1,%~dp1\) ) || exit /b1' \
|
---|
1319 | ) )
|
---|
1320 |
|
---|
1321 | $$(RePackScripts_0_OUTDIR)/VMMR0.inf: $(PATH_SUB_CURRENT)/Scripts/VMMR0.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
1322 | $(call MSG_GENERATE,RePackScripts,$@,$<)
|
---|
1323 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
1324 |
|
---|
1325 | $$(RePackScripts_0_OUTDIR)/VBoxExtPackPuel.inf: $(PATH_SUB_CURRENT)/Scripts/VBoxExtPackPuel.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
1326 | $(call MSG_GENERATE,RePackScripts,$@,$<)
|
---|
1327 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
1328 |
|
---|
1329 |
|
---|
1330 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|