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