1 | # $Id: Makefile.kmk 35166 2010-12-16 10:10:51Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows installer.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2010 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 | ifdef VBOX_WITH_BUNDLED_INSTALLER
|
---|
32 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
33 | include $(PATH_SUB_CURRENT)/BundleMachine/Makefile.kmk
|
---|
34 | endif
|
---|
35 | endif
|
---|
36 |
|
---|
37 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
38 | include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
|
---|
39 | include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
|
---|
40 | ifdef VBOX_BRAND_WIN_AS_MENU
|
---|
41 | include $(PATH_SUB_CURRENT)/AutoStartMenu/Makefile.kmk
|
---|
42 | endif
|
---|
43 | endif
|
---|
44 |
|
---|
45 | include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # Globals and targets.
|
---|
50 | #
|
---|
51 | VBOX_INSTALLER_LANGUAGES = en_US
|
---|
52 | VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
|
---|
53 |
|
---|
54 | VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
|
---|
55 | VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
|
---|
56 |
|
---|
57 | #
|
---|
58 | # If we want to build a combined package, we separate all common stuff
|
---|
59 | # (that is all 100% identical content between 32-/64-bit builds)
|
---|
60 | # into an own .cab file to save space. This .cab file then gets included
|
---|
61 | # and used by the 32-/64-bit installers.
|
---|
62 | #
|
---|
63 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
64 | VBOX_INSTALLER_COMMON_DISKID := 2
|
---|
65 | else
|
---|
66 | VBOX_INSTALLER_COMMON_DISKID := 1
|
---|
67 | endif
|
---|
68 |
|
---|
69 | ## @todo VBOX_ prefixes!
|
---|
70 | PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
|
---|
71 | PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
|
---|
72 | PACKAGE_NAME_FINAL := $(PATH_BIN)/$(PACKAGE_NAME_LANG).msi
|
---|
73 |
|
---|
74 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
75 | PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
|
---|
76 | PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
77 | PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
|
---|
78 | PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
|
---|
79 | PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
|
---|
80 | PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
|
---|
81 | PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
|
---|
82 | PACKAGE_NAME_MULTIARCH_COMMONCAB := common.cab
|
---|
83 |
|
---|
84 | BLDDIRS += $(PATH_MULTIARCH_TEMP)
|
---|
85 | PACKING += $(PACKAGE_NAME_FINAL)
|
---|
86 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
87 | PACKING += $(PATH_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
|
---|
88 | endif
|
---|
89 | else
|
---|
90 | PACKING += $(PACKAGE_NAME_FINAL)
|
---|
91 | endif
|
---|
92 | BLDDIRS += \
|
---|
93 | $(VBOX_WIN_INST_OUT_DIR) \
|
---|
94 | $(VBOX_WIN_INST_OUT_DIR)/Languages/
|
---|
95 |
|
---|
96 | OTHER_CLEAN += \
|
---|
97 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
|
---|
98 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
|
---|
99 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
100 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
|
---|
101 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
102 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
103 | $(VBOX_WIN_INST_OUT_DIR)/Languages/Language_$(lang).wxl \
|
---|
104 | $(VBOX_WIN_INST_OUT_DIR)/Languages/License_$(lang).wxl \
|
---|
105 | $(VBOX_WIN_INST_OUT_DIR)/Languages/$(lang).mst \
|
---|
106 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
|
---|
107 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
|
---|
108 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
109 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi
|
---|
110 |
|
---|
111 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
112 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
113 | OTHER_CLEAN += \
|
---|
114 | $(PATH_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
|
---|
115 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
116 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.am64) \
|
---|
117 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_MULTIARCH_COMMONCAB)
|
---|
118 | else
|
---|
119 | # Nothing to do here yet.
|
---|
120 | endif
|
---|
121 | else
|
---|
122 | OTHER_CLEAN += \
|
---|
123 | $(PACKAGE_NAME_FINAL)
|
---|
124 | endif
|
---|
125 |
|
---|
126 | ifdef VBOX_WITH_BUNDLED_INSTALLER
|
---|
127 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
128 | VBOX_TMP_DIR ?= /VBox
|
---|
129 | ZIP = /usr/bin/zip
|
---|
130 | else
|
---|
131 | VBOX_TMP_DIR ?= c:\Temp
|
---|
132 | ZIP = zip
|
---|
133 | endif
|
---|
134 |
|
---|
135 | ifndef VBOX_PATH_PACK_TMP
|
---|
136 | VBOX_PATH_PACK_TMP := $(VBOX_WIN_INST_OUT_DIR)
|
---|
137 | endif
|
---|
138 |
|
---|
139 | VBOX_PATH_PACK_BUNDLE_TMP = $(PATH_BIN)/VBoxWinBundleInstaller
|
---|
140 | VBOX_PATH_PACK_BUNDLE_ZIP = $(PATH_BIN)/VBoxWinBundleInstaller-$(KBUILD_TARGET_ARCH).zip
|
---|
141 |
|
---|
142 | VBOX_BRAND_WIN_INST_NAME.x86 = $(PACKAGE_BASE)-Win_x86$(VBOX_BRAND_WIN_INST_EXT).msi
|
---|
143 | VBOX_BRAND_WIN_INST_NAME.amd64 = $(PACKAGE_BASE)-Win_amd64$(VBOX_BRAND_WIN_INST_EXT).msi
|
---|
144 |
|
---|
145 | PACKING.win += $(VBOX_PATH_PACK_BUNDLE_ZIP)
|
---|
146 | endif
|
---|
147 |
|
---|
148 |
|
---|
149 | #
|
---|
150 | # Create intermediate XML file for languages (needed for .MSI linking).
|
---|
151 | #
|
---|
152 | # Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
|
---|
153 | # to escape the expansion of the $(eval ) argument and then the definition of the
|
---|
154 | # rule. The statement is finally expanded during second dependency expansion, which
|
---|
155 | # takes place after all makefiles has been loaded and with the @ variable defined.
|
---|
156 | #
|
---|
157 | define def_vbox_lang_xml
|
---|
158 | $(VBOX_WIN_INST_OUT_DIR)/Languages/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/Languages/$(lang).wxl | $$$$(dir $$$$@)
|
---|
159 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
160 | $(QUIET)$(INSTALL) -m 0644 $$< $$@
|
---|
161 | endef
|
---|
162 |
|
---|
163 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES),$(eval $(def_vbox_lang_xml)))
|
---|
164 |
|
---|
165 |
|
---|
166 | #
|
---|
167 | # Create intermediate XML file for licenses (needed for .MSI linking).
|
---|
168 | # These files are created from the original .RTF files in the /docs directory.
|
---|
169 | #
|
---|
170 | # Note: The redirect command below will open $$@ as stdout in append+text mode
|
---|
171 | # and then exec cat, thus appending the license file to the result file.
|
---|
172 | #
|
---|
173 | # Note: The license_file variable has to be created before def_vbox_license_xml
|
---|
174 | # is expanded by the 2nd eval because we rely on the that expansion
|
---|
175 | # replacing all $(license_file) (and $(lang)) references before evaluation.
|
---|
176 | #
|
---|
177 | # Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
|
---|
178 | # between the tag and the RTF license text.
|
---|
179 | #
|
---|
180 | define def_vbox_license_xml
|
---|
181 | $(VBOX_WIN_INST_OUT_DIR)/Languages/License_$(lang).wxl: $(license_file) $(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
|
---|
182 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
183 | $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
|
---|
184 | $(APPEND) $$@ '<WixLocalization xmlns="http://schemas.microsoft.com/wix/2003/11/localization" Codepage="1252">'
|
---|
185 |
|
---|
186 | $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id=\"LicenseText\">'
|
---|
187 | $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\<|g" -e "s|>|\>|g" $(license_file)
|
---|
188 | $(APPEND) $$@ '</String>'
|
---|
189 |
|
---|
190 | $(APPEND) $$@ '<String Id="LicenseFile">$(license_file)</String>'
|
---|
191 | $(APPEND) $$@ '<String Id="LicenseInstallFileLong">License_$(lang).rtf</String>'
|
---|
192 | $(APPEND) $$@ '<String Id="LicenseInstallFileShort">L_$(lang).rtf</String>'
|
---|
193 |
|
---|
194 | $(APPEND) $$@ '</WixLocalization>'
|
---|
195 | endef
|
---|
196 |
|
---|
197 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
198 | $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
|
---|
199 | $(eval $(def_vbox_license_xml)))
|
---|
200 |
|
---|
201 |
|
---|
202 | #
|
---|
203 | # Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
|
---|
204 | # This file includes all language-specific files (PDFs, CHMs, ...) to install.
|
---|
205 | #
|
---|
206 | # Note: When using the -n switch, append will append a new line after each
|
---|
207 | # argument. The -t switch makes it truncate the file.
|
---|
208 | #
|
---|
209 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
210 | $(call MSG_GENERATE,,$@,$<)
|
---|
211 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
212 | $(APPEND) $@ '<Include>'
|
---|
213 | ifdef VBOX_WITH_DOCS_CHM
|
---|
214 | $(APPEND) $@ ' <File Id="VirtualBox.chm" Name="VBox.chm" LongName="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_BIN)/VirtualBox.chm"></File>'
|
---|
215 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
216 | ' <File Id="VirtualBox_$(lang).chm" Name="VB_$(lang).chm" LongName="VirtualBox_$(lang).chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_BIN)/VirtualBox_$(lang).chm"></File>')
|
---|
217 | endif
|
---|
218 | $(APPEND) $@ '</Include>'
|
---|
219 |
|
---|
220 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
221 | $(call MSG_GENERATE,,$@,$<)
|
---|
222 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
223 | $(APPEND) $@ '<Include>'
|
---|
224 | $(APPEND) $@ ' <File Id="UserManual.pdf" Name="Manual.pdf" LongName="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_BIN)/UserManual.pdf">'
|
---|
225 | $(APPEND) $@ ' <Shortcut Id="startmenuManPDF_en_US" Directory="ProgramMenuDir" Name="M_en_US" LongName="$$(loc.StartMenu_UserManual) (English)" WorkingDirectory="INSTALLDIR"/>'
|
---|
226 | $(APPEND) $@ ' </File>'
|
---|
227 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
228 | ' <File Id="UserManual_$(lang).pdf" Name="Mn_$(lang).pdf" LongName="UserManual_$(lang).pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_BIN)/UserManual_$(lang).pdf">' \
|
---|
229 | ' <Shortcut Id="startmenuManPDF_$(lang)" Directory="ProgramMenuDir" Name="M_$(lang)" LongName="$$(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" WorkingDirectory="INSTALLDIR"/>' \
|
---|
230 | ' </File>')
|
---|
231 | $(APPEND) $@ '</Include>'
|
---|
232 |
|
---|
233 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
234 | $(call MSG_GENERATE,,$@,$<)
|
---|
235 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
236 | $(APPEND) $@ '<Include>'
|
---|
237 | $(APPEND) $@ ' <File Id="License_en_US.rtf" Name="Li_en_US.rtf" LongName="License_en_US.rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_LICENSE_RTF)">'
|
---|
238 | $(APPEND) $@ ' <Shortcut Id="startmenuLicRTF_en_US" Directory="ProgramMenuDir" Name="L_en_US" LongName="$$(loc.StartMenu_License) (English)" WorkingDirectory="INSTALLDIR"/>'
|
---|
239 | $(APPEND) $@ ' </File>'
|
---|
240 | $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
|
---|
241 | ' <File Id="License_$(lang).rtf" Name="Li_$(lang).rtf" LongName="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_$(lang)_LICENSE_RTF)">' \
|
---|
242 | ' <Shortcut Id="startmenuLicRTF_$(lang)" Directory="ProgramMenuDir" Name="L_$(lang)" LongName="$$(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" WorkingDirectory="INSTALLDIR"/>' \
|
---|
243 | ' </File>')
|
---|
244 | $(APPEND) $@ '</Include>'
|
---|
245 |
|
---|
246 |
|
---|
247 | #
|
---|
248 | # .MSI link (all languages).
|
---|
249 | #
|
---|
250 | # Note: This will clean up any previous .msi to prevent dep build boxes from
|
---|
251 | # filling up with old files.
|
---|
252 | #
|
---|
253 | define def_vbox_link_msi
|
---|
254 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi: \
|
---|
255 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
|
---|
256 | $(VBOX_WIN_INST_OUT_DIR)/Languages/Language_$(lang).wxl \
|
---|
257 | $(VBOX_WIN_INST_OUT_DIR)/Languages/License_$(lang).wxl \
|
---|
258 | $(PATH_BIN)/VBoxInstallHelper.dll \
|
---|
259 | $(MAKEFILE_CURRENT) \
|
---|
260 | | $$$$(dir $$$$@)
|
---|
261 | $$(call MSG_L1,Linking installer $$@)
|
---|
262 | $(QUIET)$(RM) -f $$(wildcard $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_BASE)-r*_$(lang).msi)
|
---|
263 | $(VBOX_PATH_WIX)/light.exe -nologo \
|
---|
264 | -loc $(VBOX_WIN_INST_OUT_DIR)/Languages/Language_$(lang).wxl \
|
---|
265 | -loc $(VBOX_WIN_INST_OUT_DIR)/Languages/License_$(lang).wxl \
|
---|
266 | -out $$@ \
|
---|
267 | $$< \
|
---|
268 | $(VBOX_PATH_WIX)/wixca.wixlib \
|
---|
269 | $(VBOX_PATH_DIFX)/DIFxApp.wixlib
|
---|
270 | $(RM) -f $(VBOX_WIN_INST_OUT_DIR)/Languages/$(lang).mst
|
---|
271 | $(call VBOX_SIGN_FILE_FN,$$@)
|
---|
272 | endef
|
---|
273 |
|
---|
274 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), $(eval $(def_vbox_link_msi)))
|
---|
275 |
|
---|
276 |
|
---|
277 | #
|
---|
278 | # Load and adjust the MSI compile step dependencies.
|
---|
279 | #
|
---|
280 | -include $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep
|
---|
281 |
|
---|
282 | # Filter out some files depending on build type and compiler.
|
---|
283 | VBOX_MSI_DEPENDENCIES := $(filter-out wixca.dll, $(VBOX_MSI_DEPENDENCIES))
|
---|
284 | ifeq ($(KBUILD_TYPE),release)
|
---|
285 | VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/VBoxDbg3.dll, $(VBOX_MSI_DEPENDENCIES))
|
---|
286 | endif
|
---|
287 | ifndef VBOX_SIGNING_MODE
|
---|
288 | VBOX_MSI_DEPENDENCIES := $(filer-out %.cat, $(VBOX_MSI_DEPENDENCIES))
|
---|
289 | endif
|
---|
290 | ifdef VBOX_USE_VCC80
|
---|
291 | VBOX_MSI_DEPENDENCIES := $(filter-out \
|
---|
292 | $(PATH_OUT)/bin/msvcrt.dll \
|
---|
293 | $(PATH_OUT)/bin/msvcr71.dll \
|
---|
294 | $(PATH_OUT)/bin/msvcp71.dll \
|
---|
295 | $(PATH_OUT)/bin/SDL_ttf.dll \
|
---|
296 | , $(VBOX_MSI_DEPENDENCIES))
|
---|
297 | else
|
---|
298 | VBOX_MSI_DEPENDENCIES := $(filter-out \
|
---|
299 | $(PATH_OUT)/bin/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest \
|
---|
300 | $(PATH_OUT)/bin/Microsoft.VC80.CRT/msvcr80.dll \
|
---|
301 | $(PATH_OUT)/bin/Microsoft.VC80.CRT/msvcp80.dll \
|
---|
302 | $(PATH_OUT)/bin/Microsoft.VC80.CRT/msvcm80.dll \
|
---|
303 | , $(VBOX_MSI_DEPENDENCIES))
|
---|
304 | endif
|
---|
305 | ifneq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
306 | VBOX_MSI_DEPENDENCIES := $(filter-out \
|
---|
307 | $(PATH_OUT)/bin/VBoxREM2.rel \
|
---|
308 | , $(VBOX_MSI_DEPENDENCIES))
|
---|
309 | else
|
---|
310 | VBOX_MSI_DEPENDENCIES := $(filter-out \
|
---|
311 | $(PATH_OUT)/bin/VBoxREM32.dll \
|
---|
312 | $(PATH_OUT)/bin/VBoxREM64.dll \
|
---|
313 | , $(VBOX_MSI_DEPENDENCIES))
|
---|
314 | endif
|
---|
315 |
|
---|
316 | # Add dependencies that makes sure necessary bits gets built since
|
---|
317 | # VBOX_MSI_DEPENDENCIES will be zero the first time around.
|
---|
318 | # For combined packages we always use the .ISO from the amd64 build.
|
---|
319 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
320 | VBOX_MSI_DEPENDENCIES += \
|
---|
321 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
|
---|
322 | else
|
---|
323 | VBOX_MSI_DEPENDENCIES += \
|
---|
324 | $(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso)
|
---|
325 | endif
|
---|
326 |
|
---|
327 | #
|
---|
328 | # MSI compile.
|
---|
329 | #
|
---|
330 | define def_vbox_compile_wixobj
|
---|
331 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj: \
|
---|
332 | $(PATH_SUB_CURRENT)/VirtualBox.wxs \
|
---|
333 | $(PATH_SUB_CURRENT)/UserInterface.wxi \
|
---|
334 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
|
---|
335 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
|
---|
336 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
|
---|
337 | $(VBOX_MSI_DEPENDENCIES) \
|
---|
338 | $(VBOX_VERSION_STAMP) \
|
---|
339 | | $$$$(dir $$$$@)
|
---|
340 | $(QUIET)$(RM) -f $@
|
---|
341 | $(REDIRECT) \
|
---|
342 | -E 'PATH_OUT=$(subst /,\\,$(PATH_OUT))' \
|
---|
343 | -E 'PATH_TARGET=$(subst /,\\,$(VBOX_WIN_INST_OUT_DIR))' \
|
---|
344 | -E 'PATH_ROOT=$(subst /,\\,$(PATH_ROOT))' \
|
---|
345 | -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \
|
---|
346 | -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))' \
|
---|
347 | -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \
|
---|
348 | -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \
|
---|
349 | -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_LICENSE_RTF))' \
|
---|
350 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
351 | -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
|
---|
352 | -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \
|
---|
353 | -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \
|
---|
354 | -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \
|
---|
355 | -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \
|
---|
356 | -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \
|
---|
357 | -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \
|
---|
358 | -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \
|
---|
359 | -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \
|
---|
360 | -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \
|
---|
361 | -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \
|
---|
362 | -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \
|
---|
363 | -E 'VBOX_WITH_COMBINED_PACKAGE=$(if $(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \
|
---|
364 | -E 'VBOX_WITH_CROGL=$(if $(VBOX_WITH_CROGL),yes,no)' \
|
---|
365 | -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
|
---|
366 | -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \
|
---|
367 | -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \
|
---|
368 | -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \
|
---|
369 | -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \
|
---|
370 | -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \
|
---|
371 | -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \
|
---|
372 | -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \
|
---|
373 | -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \
|
---|
374 | -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \
|
---|
375 | -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \
|
---|
376 | -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \
|
---|
377 | -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \
|
---|
378 | -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \
|
---|
379 | -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \
|
---|
380 | -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))' \
|
---|
381 | -E 'BUILD_TYPE=$(KBUILD_TYPE)' \
|
---|
382 | -E 'BUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \
|
---|
383 | -E 'VBOX_USE_VCC80=$(if $(VBOX_USE_VCC80),yes,no)' \
|
---|
384 | -- \
|
---|
385 | $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) -out $$@
|
---|
386 | ifeq ($(lang),en_US)
|
---|
387 | #
|
---|
388 | # Generate dependency file, we share this between all the languages.
|
---|
389 | #
|
---|
390 | $(APPEND) -t $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep 'VBOX_MSI_DEPENDENCIES = \'
|
---|
391 | $(SED) -f $(VBOX_PATH_WIN_INST_SRC)/dep.sed \
|
---|
392 | --append $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
|
---|
393 | $(VBOX_PATH_WIN_INST_SRC)/VirtualBox.wxs \
|
---|
394 | $(VBOX_PATH_WIN_INST_SRC)/UserInterface.wxi \
|
---|
395 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi
|
---|
396 | $(APPEND) $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep ''
|
---|
397 | endif
|
---|
398 | endef
|
---|
399 |
|
---|
400 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
|
---|
401 | $(eval $(def_vbox_compile_wixobj)))
|
---|
402 |
|
---|
403 | #
|
---|
404 | # VirtualBox Type Library definition.
|
---|
405 | #
|
---|
406 | $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
|
---|
407 | $(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
|
---|
408 | $(VBOX_XIDL_FILE) \
|
---|
409 | | $$(dir $$@)
|
---|
410 | $(VBOX_XSLTPROC) -o $@ $< $(VBOX_XIDL_FILE)
|
---|
411 |
|
---|
412 | #
|
---|
413 | # Construct the list of GUI translations.
|
---|
414 | # ('-t' -- truncate file; '-n' -- new line between arguments)
|
---|
415 | #
|
---|
416 | include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
|
---|
417 | $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
418 | $(APPEND) -t $@ '<?xml version="1.0" ?>'
|
---|
419 | $(APPEND) $@ '<Include>'
|
---|
420 | $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \
|
---|
421 | ' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" LongName="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" src="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
|
---|
422 | ' <File Id="nlsgui${lang}" Name="vb_${lang}.qm" LongName="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" src="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
|
---|
423 | $(APPEND) $@ '</Include>'
|
---|
424 |
|
---|
425 | #
|
---|
426 | # Edit the version stored in the registry.
|
---|
427 | #
|
---|
428 | $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
429 | $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING)/' --output $@ $<
|
---|
430 |
|
---|
431 | #
|
---|
432 | # Build the multi-language version of the .MSI installer (final installer).
|
---|
433 | # This is done by creating binary .MST diffs of all the language-specific installers
|
---|
434 | # and then merging the diffs into the existing .MSI using tools from the MS Installer SDK.
|
---|
435 | #
|
---|
436 | # .MSI link (all languages).
|
---|
437 | #
|
---|
438 | # Note: Prereqs of the special .NOTPARALLEL target will be executed with parallel
|
---|
439 | # make jobs temporarily disabled. This is a hack to work around what seems
|
---|
440 | # to be a problem with the sharing mode set by one or more of the three
|
---|
441 | # programs / scripts involved in this step.
|
---|
442 | #
|
---|
443 | define def_vbox_create_mst
|
---|
444 | .NOTPARALLEL: $(VBOX_WIN_INST_OUT_DIR)/Languages/$(lang).mst
|
---|
445 | $(VBOX_WIN_INST_OUT_DIR)/Languages/$(lang).mst: \
|
---|
446 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi \
|
---|
447 | $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi \
|
---|
448 | | $$$$(dir $$$$@)
|
---|
449 | $(call MSG_L1,Integrating language ($(lang)))
|
---|
450 | $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
|
---|
451 | $(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSIDB) -d $$< -r $(lang).mst
|
---|
452 | $(REDIRECT) -C $$(@D) -- wscript.exe $(VBOX_PATH_WISUBSTG) $$< $(lang).mst $(lang_id)
|
---|
453 | endef
|
---|
454 |
|
---|
455 | $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), \
|
---|
456 | $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \
|
---|
457 | $(eval $(def_vbox_create_mst)))
|
---|
458 |
|
---|
459 | #
|
---|
460 | # Create all xxx_<Lang>.msi installers and prepare the final xxx_MultiLang.msi installer.
|
---|
461 | #
|
---|
462 | ## @todo this rule must not modify $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi but a copy of it. def_vbox_compile_wixobj is
|
---|
463 | # where en_US.msi is created, it shouldn't be changed after that (if possible). Also, document the path length issue.
|
---|
464 | VBOX_INS_PROD_ARCH.amd64 = x64
|
---|
465 | VBOX_INS_PROD_ARCH.x86 = Intel
|
---|
466 | VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH))
|
---|
467 | $(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!))
|
---|
468 | VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033
|
---|
469 | $(foreach lang, $(VBOX_INSTALLER_ADD_LANGUAGES), $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
|
---|
470 | VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)"
|
---|
471 |
|
---|
472 | $(PACKAGE_NAME_FINAL): \
|
---|
473 | $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
|
---|
474 | $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
|
---|
475 | $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
|
---|
476 | $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
|
---|
477 | $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/Languages/$(lang).mst) \
|
---|
478 | | $$(dir $$@)
|
---|
479 | $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/$(PACKAGE_BASE)-r*.msi)
|
---|
480 | $(REDIRECT) -C $(@D) -- \
|
---|
481 | wscript.exe $(VBOX_PATH_WISUMINFO) $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $(VBOX_INS_PROD_LANG)
|
---|
482 | $(CP) -f $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $@
|
---|
483 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
484 |
|
---|
485 |
|
---|
486 | if defined(VBOX_WITH_COMBINED_PACKAGE) && "$(KBUILD_TARGET_ARCH)" == "x86"
|
---|
487 | #
|
---|
488 | # Make the multi-architecture installer by calling our stub builder
|
---|
489 | # with both platform installers (x86 and amd64) + common cab. We only
|
---|
490 | # need to do this once; so do it on x86 only.
|
---|
491 | #
|
---|
492 | $(PATH_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL): \
|
---|
493 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
494 | $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64)
|
---|
495 | $(call MSG_L1,Building Windows combined package)
|
---|
496 | $(call VBOX_SIGN_FILE_FN,$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_MULTIARCH_COMMONCAB))
|
---|
497 | $(REDIRECT) -C $(@D) -- \
|
---|
498 | VBoxStubBld -out $@ \
|
---|
499 | -target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
|
---|
500 | -target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
|
---|
501 | -target-all $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_MULTIARCH_COMMONCAB) \
|
---|
502 | -stub $(PATH_BIN)/VBoxStub.exe
|
---|
503 | $(call VBOX_SIGN_FILE_FN,$@)
|
---|
504 | endif
|
---|
505 |
|
---|
506 |
|
---|
507 | #
|
---|
508 | # Make the bundle installer (for retail ISOs) (zip-file).
|
---|
509 | #
|
---|
510 | $(VBOX_PATH_PACK_BUNDLE_ZIP): \
|
---|
511 | $(PACKAGE_NAME_FINAL) \
|
---|
512 | $(if-expr "$(KBUILD_TARGET_ARCH)" == "x86", \
|
---|
513 | $(PATH_BIN)/VBoxBundleMachine.exe \
|
---|
514 | $(if $(VBOX_BRAND_WIN_AS_MENU), $(PATH_BIN)/AutoStartMenu.exe) \
|
---|
515 | $(if $(VBOX_WITH_COMBINED_PACKAGE), $(PATH_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)),)
|
---|
516 | $(RM) -Rf -- $(VBOX_PATH_PACK_BUNDLE_TMP)/
|
---|
517 | $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/
|
---|
518 | ifndef VBOX_WITH_COMBINED_PACKAGE
|
---|
519 | $(CP) $(PACKAGE_NAME_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(VBOX_BRAND_WIN_INST_NAME.$(KBUILD_TARGET_ARCH))
|
---|
520 | endif
|
---|
521 | ifeq ($(KBUILD_TARGET_ARCH),x86)
|
---|
522 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
523 | $(CP) $(PATH_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(PACKAGE_NAME_MULTIARCH_FINAL)
|
---|
524 | endif
|
---|
525 | $(CP) $(PATH_BIN)/VBoxBundleMachine.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
|
---|
526 | $(CP) $(PATH_BIN)/AutoStartMenu.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
|
---|
527 | ifdef VBOX_BRAND_WIN_AS_MENU
|
---|
528 | $(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
|
---|
529 | $(CP) $(VBOX_BRAND_WIN_AS_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/
|
---|
530 | $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/
|
---|
531 | $(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT_GFX) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
|
---|
532 | ifdef VBOX_WITH_COMBINED_PACKAGE
|
---|
533 | $(SED) -e 's/VBOXEXE/$(PACKAGE_NAME_MULTIARCH_FINAL)/g' \
|
---|
534 | --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
|
---|
535 | $(VBOX_BRAND_WIN_AS_MENU)/index_combined.html
|
---|
536 | else
|
---|
537 | $(SED) -e 's/VBOX32EXE/$(VBOX_BRAND_WIN_INST_NAME.x86)/g' \
|
---|
538 | -e 's/VBOX64EXE/$(VBOX_BRAND_WIN_INST_NAME.amd64)/g' \
|
---|
539 | --output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
|
---|
540 | $(VBOX_BRAND_WIN_AS_MENU)/index.html
|
---|
541 | endif
|
---|
542 | endif
|
---|
543 | endif
|
---|
544 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
545 | ifndef VBOX_WITH_COMBINED_PACKAGE
|
---|
546 | # Only needed if *not* combined package -- otherwise the 64-bit build
|
---|
547 | # has nothing to do here since the one and only amd64 .MSI file is already
|
---|
548 | # included in the x86 combined package.
|
---|
549 | $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
|
---|
550 | endif
|
---|
551 | else
|
---|
552 | # Do a bundle .zip in every case on x86. On a combined package this also
|
---|
553 | # will include the amd64 installer we left out in the block above (see comment).
|
---|
554 | $(REDIRECT) -C $(VBOX_PATH_PACK_BUNDLE_TMP) -- $(ZIP) -9r $@ .
|
---|
555 | endif
|
---|
556 |
|
---|
557 | include $(KBUILD_PATH)/subfooter.kmk
|
---|