VirtualBox

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

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

Windows installer: Use codepage 1256 for fa_IR.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette