Makefile.kmk revision 32c2812cebede5503d639923fb8b4340cf514e4e
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Makefile for the Windows installer.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Copyright (C) 2006-2012 Oracle Corporation
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# This file is part of VirtualBox Open Source Edition (OSE), as
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# available from http://www.virtualbox.org. This file is free software;
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# you can redistribute it and/or modify it under the terms of the GNU
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# General Public License (GPL) as published by the Free Software
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Foundation, in version 2 as it comes in the "COPYING" file of the
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwSUB_DEPTH = ../../../..
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinclude $(KBUILD_PATH)/subheader.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifneq ($(KBUILD_HOST),win)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(error "The Windows installer can only be built on Windows!")
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Include Sub-Makefiles.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinclude $(PATH_SUB_CURRENT)/InstallHelper/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_BUNDLED_INSTALLER
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifeq ($(KBUILD_TARGET_ARCH),x86)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw include $(PATH_SUB_CURRENT)/BundleMachine/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifeq ($(KBUILD_TARGET_ARCH),x86)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifdef VBOX_BRAND_WIN_AS_MENU
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw include $(PATH_SUB_CURRENT)/AutoStartMenu/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinclude $(PATH_SUB_CURRENT)/Resources/Makefile.kmk
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Globals and targets.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_INSTALLER_LANGUAGES = de_DE en_US fr_FR it_IT zh_TW
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# We don't have the license text in another language than English yet,
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# so just define the branding targets to use the English one for now.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF)) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252))
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Some languages need another codepage than 1252. Override them here.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# If we want to build a combined package, we separate all common stuff
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# (that is all 100% identical content between 32-/64-bit builds)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# into an own .cab file to save space. This .cab file then gets included
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# and used by the 32-/64-bit installers.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_COMBINED_PACKAGE
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_INSTALLER_COMMON_DISKID := 2
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_INSTALLER_COMMON_DISKID := 1
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw## @todo VBOX_ prefixes!
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwPACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwPACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwPACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_COMBINED_PACKAGE
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH))
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKAGE_NAME_MULTIARCH_COMMONCAB := common.cab
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw BLDDIRS += $(PATH_MULTIARCH_TEMP)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKING += $(PACKAGE_NAME_FINAL)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifeq ($(KBUILD_TARGET_ARCH),x86)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKING += $(PACKAGE_NAME_FINAL)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwBLDDIRS += \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/NLS/
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwOTHER_CLEAN += \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/NLS/$(lang).mst \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_$(lang).wixobj \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_COMBINED_PACKAGE
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifeq ($(KBUILD_TARGET_ARCH),x86)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw OTHER_CLEAN += \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.am64) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_MULTIARCH_COMMONCAB)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw # Nothing to do here yet.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw OTHER_CLEAN += \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(PACKAGE_NAME_FINAL)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_BUNDLED_INSTALLER
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifeq ($(KBUILD_TARGET),darwin)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_TMP_DIR ?= /VBox
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_TMP_DIR ?= c:\Temp
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ifndef VBOX_PATH_PACK_TMP
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_PATH_PACK_TMP := $(VBOX_WIN_INST_OUT_DIR)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_PATH_PACK_BUNDLE_TMP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_PATH_PACK_BUNDLE_ZIP = $(PATH_STAGE_BIN)/VBoxWinBundleInstaller-$(KBUILD_TARGET_ARCH).zip
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_BRAND_WIN_INST_NAME.x86 = $(PACKAGE_BASE)-Win_x86$(VBOX_BRAND_WIN_INST_EXT).msi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw VBOX_BRAND_WIN_INST_NAME.amd64 = $(PACKAGE_BASE)-Win_amd64$(VBOX_BRAND_WIN_INST_EXT).msi
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw PACKING.win += $(VBOX_PATH_PACK_BUNDLE_ZIP)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Surpress/skip the following ICE (internal consistency evaluators):
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# - ICE64: Checks that new directories in the user profile are removed correctly in roaming scenarios.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# -> We don't want to remove system folders (like "Microsoft/Internet Explorer/Quick Launch").
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwVBOX_MSI_ICE_IGNORE := \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Create intermediate XML file for languages (needed for .MSI linking).
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# to escape the expansion of the $(eval ) argument and then the definition of the
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# rule. The statement is finally expanded during second dependency expansion, which
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# takes place after all makefiles has been loaded and with the @ variable defined.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwdefine def_vbox_lang_xml
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $$(call MSG_GENERATE,,$$@,$$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(QUIET)$(INSTALL) -m 0644 $$< $$@
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(foreach lang,$(VBOX_INSTALLER_LANGUAGES),$(eval $(def_vbox_lang_xml)))
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Create intermediate XML file for licenses (needed for .MSI linking).
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# These files are created from the original .RTF files in the /docs directory.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Note: The redirect command below will open $$@ as stdout in append+text mode
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# and then exec cat, thus appending the license file to the result file.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Note: The license_file variable has to be created before def_vbox_license_xml
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# is expanded by the 2nd eval because we rely on the that expansion
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# replacing all $(license_file) (and $(lang)) references before evaluation.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# between the tag and the RTF license text.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwdefine def_vbox_license_xml
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $$(call MSG_GENERATE,,$$@,$$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -t $$@ '<?xml version="1.0" encoding="utf-8"?>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '<WixLocalization xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="$(VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE)" Culture="$(lang)">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '<String Id=\"LicenseText\">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\<|g" -e "s|>|\>|g" $(license_file)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '</String>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '<String Id="LicenseFile">$(license_file)</String>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '<String Id="LicenseInstallFileLong">License_$(lang).rtf</String>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '<String Id="LicenseInstallFileShort">L_$(lang).rtf</String>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $$@ '</WixLocalization>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(eval $(def_vbox_license_xml)))
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling).
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# This file includes all language-specific files (PDFs, CHMs, ...) to install.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Note: When using the -n switch, append will append a new line after each
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# argument. The -t switch makes it truncate the file.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(call MSG_GENERATE,,$@,$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -t $@ '<?xml version="1.0" ?>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_DOCS_CHM
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <File Id="file_VirtualBox.chm" Name="VirtualBox.chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/VirtualBox.chm"></File>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <File Id="file_VirtualBox_$(lang).chm" Name="VirtualBox_$(lang).chm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/VirtualBox_$(lang).chm"></File>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '</Include>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(call MSG_GENERATE,,$@,$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -t $@ '<?xml version="1.0" ?>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <File Id="file_UserManual.pdf" Name="UserManual.pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual.pdf">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' </File>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <File Id="file_UserManual_$(lang).pdf" Name="UserManual_$(lang).pdf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(PATH_STAGE_BIN)/UserManual_$(lang).pdf">' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' </File>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '</Include>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(call MSG_GENERATE,,$@,$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -t $@ '<?xml version="1.0" ?>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <File Id="file_License_en_US.rtf" Name="License_en_US.rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_LICENSE_RTF)">' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' </File>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <File Id="file_License_$(lang).rtf" Name="License_$(lang).rtf" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$(VBOX_BRAND_$(lang)_LICENSE_RTF)"/>' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' </File>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '</Include>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(MAKEFILE_CURRENT) | $$(dir $$@)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(call MSG_GENERATE,,$@,$<)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -t $@ '<?xml version="1.0" ?>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw # Documentation (PDF/CHM)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwifdef VBOX_WITH_DOCS_CHM
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualCHM_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (CHM, English)" Description="!(loc.StartMenu_UserManual)"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Target="[INSTALLDIR]\VirtualBox.chm" WorkingDirectory="dir_Documents" Advertise="no"/>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <Shortcut Id="sc_StartMenu_ManualCHM_$(lang)" Directory="dir_StartMenuVBox" Name="$!(loc.StartMenu_UserManual) (CHM, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Description="$!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\VirtualBox_$(lang).chm" WorkingDirectory="dir_Documents"/>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_ManualPDF_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_UserManual) (PDF, English)" Description="!(loc.StartMenu_UserManual)"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Target="[INSTALLDIR]\doc\UserManual.pdf" WorkingDirectory="dir_Documents" Advertise="no"/>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <Shortcut Id="sc_StartMenu_ManualPDF_$(lang)" Directory="dir_StartMenuVBox" Name="$!(loc.StartMenu_UserManual) (PDF, $(VBOX_BRAND_$(lang)_LANG_NAME))"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Description="$!(loc.StartMenu_UserManual) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="[INSTALLDIR]\doc\UserManual_$(lang).pdf" WorkingDirectory="dir_Documents"/>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw # License(s) (RTF)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ ' <Shortcut Id="sc_StartMenu_License_en_US" Directory="dir_StartMenuVBox" Name="!(loc.StartMenu_License) (English)" Description="!(loc.StartMenu_License)"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Target="[INSTALLDIR]License_en_US.rtf" WorkingDirectory="INSTALLDIR" Advertise="no"/>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' <Shortcut Id="sc_StartMenu_License_$(lang)" Directory="dir_StartMenuVBox" Name="$!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))"' \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw ' Description="$!(loc.StartMenu_License) ($(VBOX_BRAND_$(lang)_LANG_NAME))" Target="License_$(lang).rtf" WorkingDirectory="INSTALLDIR"/>')
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw $(APPEND) $@ '</Include>'
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# .MSI link (all languages).
# Note: Disable parallel jobs here because of shared common.cab access issues.
$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
$(PATH_STAGE_BIN)/VBoxInstallHelper.dll \
$(VBOX_PATH_WIX)/light.exe -nologo \
-loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \
-loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \
-ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
-ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
$(VBOX_PATH_WIX)/difxapp_x86.wixlib, \
$(VBOX_PATH_WIX)/difxapp_x64.wixlib)
$(call VBOX_SIGN_FILE_FN,$$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)))
-include $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep
VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/VBoxDbg3.dll, $(VBOX_MSI_DEPENDENCIES))
$(PATH_OUT)/bin/msvcr100.dll \
$(PATH_OUT)/bin/msvcp100.dll \
$(PATH_OUT)/bin/msvcr110.dll \
$(PATH_OUT)/bin/msvcp110.dll \
$(PATH_OUT)/bin/VirtualBox.exe \
$(PATH_OUT)/bin/VBoxTestOGL.exe \
$(PATH_OUT)/bin/QtCoreVBox4.dll \
$(PATH_OUT)/bin/QtGuiVBox4.dll \
$(PATH_OUT)/bin/QtNetworkVBox4.dll \
$(PATH_OUT)/bin/QtOpenGLVBox4.dll \
$(PATH_OUT)/bin/accessible/qtaccessiblewidgets4.dll \
$(PATH_OUT)/bin/sdk/installer/vboxapisetup.py \
$(PATH_OUT)/bin/sdk/installer/vboxapi/VirtualBox_constants.py \
$(PATH_OUT)/bin/VBoxOGLhostcrutil.dll \
$(PATH_OUT)/bin/VBoxOGLhosterrorspu.dll \
$(PATH_OUT)/bin/VBoxOGLrenderspu.dll \
$(PATH_OUT)/bin/VBoxSharedCrOpenGL.dll \
VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/SDL_ttf.dll, $(VBOX_MSI_DEPENDENCIES))
VBOX_MSI_DEPENDENCIES := $(filer-out $(PATH_OUT)/bin/vboxwebsrv.exe, $(VBOX_MSI_DEPENDENCIES))
$(PATH_OUT)/bin/VBoxREM2.rel \
$(PATH_OUT)/bin/VBoxREM32.dll \
$(PATH_OUT)/bin/VBoxREM64.dll \
VBOX_MSI_DEPENDENCIES := $(filter-out $(PATH_OUT)/bin/VBoxVRDP$(VBOX_SUFF_DLL), $(VBOX_MSI_DEPENDENCIES))
VBOX_MSI_DEPENDENCIES := $(filter-out %/VBoxGuestAdditions.iso, $(VBOX_MSI_DEPENDENCIES))
$(if $(VBOX_WITH_ADDITIONS_PACKING),$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
$(if $(VBOX_WITH_ADDITIONS_PACKING),$(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso)
$(PATH_SUB_CURRENT)/VirtualBox.wxs \
$(PATH_SUB_CURRENT)/UserInterface.wxi \
$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \
$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \
$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi \
-E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \
-E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \
$(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \
-ext $(VBOX_PATH_WIX)/WixUIExtension.dll \
-ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \
$(APPEND) -t $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep 'VBOX_MSI_DEPENDENCIES = \'
$(SED) -f $(VBOX_PATH_WIN_INST_SRC)/dep.sed \
--append $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \
$(VBOX_PATH_WIN_INST_SRC)/VirtualBox.wxs \
$(VBOX_PATH_WIN_INST_SRC)/UserInterface.wxi \
$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi
$(APPEND) $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep ''
$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \
$(PATH_SUB_CURRENT)/VirtualBox_TypeLib.xsl \
include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk $(MAKEFILE_CURRENT) | $$(dir $$@)
' <File Id="nlsqt${lang}" Name="qt_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\qt_${lang}.qm" />' \
' <File Id="nlsgui${lang}" Name="VirtualBox_${lang}.qm" DiskId="$(VBOX_INSTALLER_COMMON_DISKID)" Vital="yes" Source="$$(env.PATH_OUT)\bin\nls\VirtualBox_${lang}.qm" />')
$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@)
$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi \
$(REDIRECT) -C $$(@D) -- $(VBOX_PATH_MSITRAN) -g $$< $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst
$(REDIRECT) -C $$(@D) -- wscript.exe $(VBOX_PATH_WISUBSTG) $$< $(lang).mst $(lang_id)
# Create all xxx_<Lang>.msi installers and prepare the final xxx_MultiLang.msi installer.
## @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
# where en_US.msi is created, it shouldn't be changed after that (if possible). Also, document the path length issue.
VBOX_INS_PROD_ARCH.amd64 = x64
VBOX_INS_PROD_ARCH.x86 = Intel
$(foreach lang, $(VBOX_INSTALLER_ADD_LANGUAGES), $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID)))
$(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \
$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \
$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \
$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \
$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_$(lang).msi) \
wscript.exe $(VBOX_PATH_WISUMINFO) $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $(VBOX_INS_PROD_LANG)
$(CP) -f $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG)_en_US.msi $@
$(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
$(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64)
-target-x86 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) \
-target-amd64 $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.amd64) \
-stub $(PATH_STAGE_BIN)/VBoxStub.exe
$(PATH_STAGE_BIN)/VBoxBundleMachine.exe \
$(if $(VBOX_BRAND_WIN_AS_MENU), $(PATH_STAGE_BIN)/AutoStartMenu.exe) \
$(CP) $(PACKAGE_NAME_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(VBOX_BRAND_WIN_INST_NAME.$(KBUILD_TARGET_ARCH))
$(CP) $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) $(VBOX_PATH_PACK_BUNDLE_TMP)/$(PACKAGE_NAME_MULTIARCH_FINAL)
$(CP) $(PATH_STAGE_BIN)/VBoxBundleMachine.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
$(CP) $(PATH_STAGE_BIN)/AutoStartMenu.exe $(VBOX_PATH_PACK_BUNDLE_TMP)/
$(MKDIR) -p $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
$(CP) $(VBOX_BRAND_WIN_AS_MENU_CONTENT_GFX) $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/Graphics/
$(SED) -e 's/VBOXEXE/$(PACKAGE_NAME_MULTIARCH_FINAL)/g' \
--output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
$(VBOX_BRAND_WIN_AS_MENU)/index_combined.html
--output $(VBOX_PATH_PACK_BUNDLE_TMP)/Menu/index.html \
$(VBOX_BRAND_WIN_AS_MENU)/index.html