Makefile.kmk revision 84f97073b14e8769ac3480ce53fe23ed959ecd80
# $Id$
## @file
# Makefile for the VirtualBox Qt GUI.
#
#
# Copyright (C) 2006-2007 Sun Microsystems, Inc.
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
#
# Globals.
#
VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox4/misc
VBOX_WITH_REGISTRATION := 1
# Ask the user to register at Sun. If this setting is disabled the user can
# still register using the menu if desired.
VBOX_WITH_REGISTRATION_REQUEST := 1
# Show the update notifier dialog during startup. If this setting is disabled
# the user can still update using the menu if desired.
VBOX_WITH_UPDATE_REQUEST := 1
#
# The targets.
#
ifdef VBOX_WITH_HARDENING
PROGRAMS += VirtualBox4Hardened
DLLS += VirtualBox4
else
PROGRAMS += VirtualBox4
endif
ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
DLLS += VBoxKeyboard
## @todo convert to install target.
OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
endif
INSTALLS += VirtualBox4.nls
#
# Include the language lists.
#
include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
#
# VBoxKeyboard - keyboard library for X11.
#
VBoxKeyboard_TEMPLATE = VBOXR3
VBoxKeyboard_SOURCES = \
src/X11/keyboard-new.c
VBoxKeyboard_LIBS = X11
VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
#
# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
# redistributed with usable sources.
#
# This rule will link create a temporary symlink to src/X11/ and tar
# up the selected files into a tarball that is installed into the
# bin directory (probably belongs in /usr/shared/somewhere really,
# but wtf, it's not like we're even trying to be FHS compliant).
#
## @todo this should be tar'ed down into the output directory and installed using an install target.
$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
$(VBoxKeyboard_SOURCES) \
src/X11/COPYING.LIB \
src/X11/keyboard.h \
src/X11/keyboard-layouts.h \
src/X11/keyboard-list.h \
src/X11/keyboard-tables.h \
src/X11/keyboard-types.h \
src/X11/Makefile \
,$(PATH_SUB_CURRENT))
$(call MSG_TOOL,tar/gzip,,$@)
$(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard $@
$(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/X11/ $(PATH_TARGET)/vboxkeyboard
$(QUIET)cd $(PATH_TARGET) \
&& tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
| gzip - > $@
$(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard
OTHER_CLEAN += \
$(PATH_BIN)/vboxkeyboard.tar.gz
#
# Hardened VirtualBox4.
#
VirtualBox4Hardened_TEMPLATE = VBOXR3HARDENEDEXE
VirtualBox4Hardened_SOURCES = src/hardenedmain.cpp
VirtualBox4Hardened_NAME = VirtualBox
ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
#VirtualBox4Hardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
VirtualBox4Hardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
endif
#
# Include Qt project file, we'll use FORMS and TRANSLATIONS in
# the VirtualBox4 setup below.
#
SAVED_TEMPLATE := $(TEMPLATE)
include $(PATH_SUB_CURRENT)/VBoxUI.pro
#
# VirtualBox4 - The GUI program.
#
USES += qt4
VirtualBox4_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
VirtualBox4_NAME = VirtualBox
ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
#VirtualBox4_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
VirtualBox4_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
endif
endif
VirtualBox4_SDKS.win = WINPSDK DXSDK
ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
VirtualBox4_SDKS += LIBSDL
endif
ifdef VBOX_WITH_ICHAT_THEATER
# For testing iChat Theater stuff change the sdk path (HACK ALERT!)
VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
endif
VirtualBox4_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
VirtualBox4_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
VirtualBox4_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
VirtualBox4_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox4_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox4_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox4_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
VirtualBox4_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
VirtualBox4_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
VirtualBox4_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
VirtualBox4_DEFS.darwin += VBOX_WITH_HACKED_QT
ifdef VBOX_WITH_ICHAT_THEATER
VirtualBox4_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
endif
ifneq ($(KBUILD_TYPE),release)
# non-release builds has some extra features.
VirtualBox4_DEFS.win += VBOX_GUI_USE_DDRAW
endif
VirtualBox4_DEFS += \
$(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
$(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
$(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
$(if $(VBOX_OSE),VBOX_OSE) \
$(if $(VBOX_WITH_DEBUGGER_GUI),VBOX_WITH_DEBUGGER_GUI_MENU) \
$(if $(VBOX_WITH_NETFLT),VBOX_WITH_NETFLT)
VirtualBox4_src/main.cpp_DEFS += VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\"
VirtualBox4_src/main.cpp_DEPS += $(VBOX_VERSION_MK)
VirtualBox4_INCS = \
./include \
$(PATH_VirtualBox4)/include
# Necessary for the hdd backend enumeration
VirtualBox4_LIBS = $(LIB_DDU)
ifeq ($(KBUILD_TYPE),release)
VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
else
VirtualBox4_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
ifeq ($(USERNAME),dmik)
VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
else
VirtualBox4_LDFLAGS.win += /SUBSYSTEM:console
endif
endif
# r=bird: what is -lz doing here? it belongs in LIBS.
VirtualBox4_LDFLAGS.darwin = -lz \
-framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon -framework QuickTime \
$(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
ifdef VBOX_WITH_ICHAT_THEATER
VirtualBox4_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
endif
VirtualBox4_LIBS.win = \
$(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
$(PATH_SDK_DXSDK_LIB)/ddraw.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
VirtualBox4_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
endif
# Headers containing definitions of classes that use the Q_OBJECT macro.
VirtualBox4_QT_MOCHDRS = \
include/QIWidgetValidator.h \
include/QIHotKeyEdit.h \
include/QIStatusBar.h \
include/QIStateIndicator.h \
include/QIMessageBox.h \
include/QILabel.h \
include/QILabel_p.h \
include/QILabelSeparator.h \
include/QIAbstractWizard.h \
include/QIListView.h \
include/QITreeWidget.h \
include/QIMainDialog.h \
include/QIHelpButton.h \
include/QIDialog.h \
include/VBoxFilePathSelectorWidget.h \
include/VBoxUtils.h \
include/VBoxGlobalSettings.h \
include/VBoxGlobal.h \
include/VBoxVMListView.h \
include/VBoxMediaComboBox.h \
include/VBoxSelectorWnd.h \
include/VBoxConsoleWnd.h \
include/VBoxConsoleView.h \
include/VBoxProblemReporter.h \
include/VBoxDownloaderWgt.h \
include/VBoxNetworkFramework.h \
include/VBoxAboutDlg.h \
include/VBoxCloseVMDlg.h \
include/VBoxNewVMWzd.h \
include/VBoxNewHDWzd.h \
include/VBoxVMFirstRunWzd.h \
include/VBoxRegistrationDlg.h \
include/VBoxUpdateDlg.h \
include/VBoxSnapshotDetailsDlg.h \
include/VBoxVMInformationDlg.h \
include/VBoxTakeSnapshotDlg.h \
include/VBoxSnapshotsWgt.h \
include/VBoxVMLogViewer.h \
include/VBoxDiskImageManagerDlg.h \
include/VBoxSettingsUtils.h \
include/VBoxVMSettingsGeneral.h \
include/VBoxVMSettingsHD.h \
include/VBoxVMSettingsCD.h \
include/VBoxVMSettingsFD.h \
include/VBoxVMSettingsAudio.h \
include/VBoxVMSettingsNetwork.h \
include/VBoxVMSettingsSerial.h \
include/VBoxVMSettingsParallel.h \
include/VBoxVMSettingsUSB.h \
include/VBoxVMSettingsUSBFilterDetails.h \
include/VBoxVMSettingsSF.h \
include/VBoxVMSettingsSFDetails.h \
include/VBoxVMSettingsVRDP.h \
include/VBoxGLSettingsGeneral.h \
include/VBoxGLSettingsInput.h \
include/VBoxGLSettingsUpdate.h \
include/VBoxGLSettingsLanguage.h \
include/VBoxSettingsDialog.h \
include/VBoxSettingsDialogSpecific.h \
include/VBoxSettingsPage.h \
include/VBoxSettingsSelector.h
# Sources containing local definitions of classes that use the Q_OBJECT macro.
VirtualBox4_QT_MOCSRCS = \
src/VBoxSelectorWnd.cpp \
src/VBoxDiskImageManagerDlg.cpp
ifdef VBOX_WITH_XPCOM
VirtualBox4_QT_MOCSRCS += \
src/COMDefs.cpp
endif
VirtualBox4_SOURCES = \
src/main.cpp \
src/COMDefs.cpp \
src/QIWidgetValidator.cpp \
src/QIHotKeyEdit.cpp \
src/QIStateIndicator.cpp \
src/QIStatusBar.cpp \
src/QIMessageBox.cpp \
src/QILabel.cpp \
src/QILabelSeparator.cpp \
src/QIAbstractWizard.cpp \
src/QIDialog.cpp \
src/QIDialogButtonBox.cpp \
src/QIListView.cpp \
src/QITreeWidget.cpp \
src/QIMainDialog.cpp \
src/QILineEdit.cpp \
src/QIHelpButton.cpp \
src/VBoxFilePathSelectorWidget.cpp \
src/VBoxDefs.cpp \
src/VBoxGlobalSettings.cpp \
src/VBoxGlobal.cpp \
src/VBoxMediaComboBox.cpp \
src/VBoxProblemReporter.cpp \
src/VBoxSelectorWnd.cpp \
src/VBoxConsoleView.cpp \
src/VBoxConsoleWnd.cpp \
src/VBoxDownloaderWgt.cpp \
src/VBoxVMListView.cpp \
src/VBoxFrameBuffer.cpp \
src/HappyHttp.cpp \
src/VBoxNetworkFramework.cpp \
src/VBoxAboutDlg.cpp \
src/VBoxCloseVMDlg.cpp \
src/VBoxNewVMWzd.cpp \
src/VBoxNewHDWzd.cpp \
src/VBoxVMFirstRunWzd.cpp \
src/VBoxRegistrationDlg.cpp \
src/VBoxUpdateDlg.cpp \
src/VBoxSnapshotDetailsDlg.cpp \
src/VBoxVMInformationDlg.cpp \
src/VBoxTakeSnapshotDlg.cpp \
src/VBoxSnapshotsWgt.cpp \
src/VBoxVMLogViewer.cpp \
src/VBoxDiskImageManagerDlg.cpp \
src/VBoxVMSettingsGeneral.cpp \
src/VBoxVMSettingsHD.cpp \
src/VBoxVMSettingsCD.cpp \
src/VBoxVMSettingsFD.cpp \
src/VBoxVMSettingsAudio.cpp \
src/VBoxVMSettingsNetwork.cpp \
src/VBoxVMSettingsSerial.cpp \
src/VBoxVMSettingsParallel.cpp \
src/VBoxVMSettingsUSB.cpp \
src/VBoxVMSettingsUSBFilterDetails.cpp \
src/VBoxVMSettingsSF.cpp \
src/VBoxVMSettingsSFDetails.cpp \
src/VBoxVMSettingsVRDP.cpp \
src/VBoxGLSettingsGeneral.cpp \
src/VBoxGLSettingsInput.cpp \
src/VBoxGLSettingsUpdate.cpp \
src/VBoxGLSettingsLanguage.cpp \
src/VBoxSettingsDialog.cpp \
src/VBoxSettingsDialogSpecific.cpp \
src/VBoxSettingsSelector.cpp
ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
ifndef VBOX_OSE
VirtualBox4_QT_MOCHDRS += \
include/VBoxLicenseViewer.h
VirtualBox4_SOURCES += \
src/VBoxLicenseViewer.cpp
else
VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
include/VBoxLicenseViewer.h \
src/VBoxLicenseViewer.cpp
endif
VirtualBox4_SOURCES += \
src/X11/XKeyboard-new.cpp \
src/VBoxX11Helper.cpp
else
VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
include/VBoxLicenseViewer.h \
src/VBoxLicenseViewer.cpp
endif
VirtualBox4_SOURCES.win += \
src/VBoxFBDDRAW.cpp \
$(PATH_VirtualBox4)/VirtualBox4.rc
VirtualBox4_SOURCES.darwin = \
src/darwin/DarwinKeyboard.cpp \
src/darwin/VBoxUtils-darwin.cpp \
src/VBoxFBQuartz2D.cpp
# src/darwin/VBoxAquaStyle.cpp
ifdef VBOX_WITH_ICHAT_THEATER
VirtualBox4_SOURCES.darwin += \
src/darwin/VBoxIChatTheaterWrapper.m
endif
# The Qt modules we're using.
# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
VirtualBox4_QT_MODULES = Core Gui
# Import QDesigner UI sources and translations from VBoxUI.pro.
ifndef VBOX_WITH_REGISTRATION
FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
endif
$(eval VirtualBox4_SOURCES += $(FORMS))
# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
VirtualBox4_SOURCES += VirtualBox.qrc
VirtualBox4_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \
$(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
# Compress the translation units.
VirtualBox4_LRCFLAGS = -compress
# Where to install the translations (a separate install target, VirtualBox4-nls-inst is created).
VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
# Some flag hacks (should go away).
ifneq ($(KBUILD_TARGET),win)
VirtualBox4_src/HappyHttp.cpp_CXXFLAGS += -fexceptions
VirtualBox4_src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
VirtualBox4_src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
endif
VirtualBox4_src/HappyHttp.cpp_CXXFLAGS.linux += -O2
## @todo how to detect what tool is used?
## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
# more generic -Wno-extra
# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
ifdef VBOX_WITH_XPCOM
VirtualBox4_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
endif
#
# Generate the COM wrappers.
#
VirtualBox4_BLDDIRS += $(PATH_VirtualBox4)/include
VirtualBox4_INTERMEDIATES += $(PATH_VirtualBox4)/include/COMWrappers.h
VirtualBox4_CLEAN += $(PATH_VirtualBox4)/include/COMWrappers.h
$$(PATH_VirtualBox4)/include/COMWrappers.h: \
$(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
$(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
| $$(dir $$@)
$(call MSG_GENERATE,VirtualBox4,$<,$@)
$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
#
# Generate qrc file with branded icons.
#
VirtualBox4_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
VirtualBox4_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
if "$(KBUILD_HOST)" == "win" ## @todo remove when kBuild ticket #52 has been fixed and deployed.
VBOX_DRIVE_HACK := $(firstword $(subst :, ,$(PATH_ROOT))):
else
VBOX_DRIVE_HACK :=
endif
$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
$(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
| $$(dir $$@)
$(call MSG_GENERATE,VirtualBox4,$<,$@)
$(QUIET)$(SED) \
-e 's;@VBOX_ABOUT_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_PNG));g' \
-e 's;@VBOX_ABOUT_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_16PX_PNG));g' \
-e 's;@VBOX_VBOX_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_16PX_PNG));g' \
-e 's;@VBOX_VBOX_20PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_20PX_PNG));g' \
-e 's;@VBOX_VBOX_32PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_32PX_PNG));g' \
-e 's;@VBOX_VBOX_40PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_40PX_PNG));g' \
-e 's;@VBOX_VBOX_48PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_48PX_PNG));g' \
-e 's;@VBOX_VBOX_64PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_64PX_PNG));g' \
-e 's;@VBOX_CUBE_42PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_CUBE_42PX_PNG));g' \
--output $@ \
$<
# alias for generating the COM Wrappers file.
testwrappers:: $(VBOX_WRAPPERS_FILE4)
ifeq ($(KBUILD_TARGET),win)
#
# On Windows we'll have to generate/edit the resource file.
# The IDI_ICON1 name is Qt specific.
#
$$(PATH_VirtualBox4)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
$(RM) -f $@
$(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
VirtualBox4_CLEAN.win += $$(PATH_VirtualBox4)/VirtualBox4.rc
endif # win
ifeq ($(KBUILD_TARGET),darwin)
#
# Create directories for each approved language or the application
# menu won't be translated.
#
INSTALLS += VirtualBox4.lproj
VirtualBox4.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
VirtualBox4.lproj_MODE = 755
VirtualBox4.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES_ALL))
#
# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
#
INSTALLS += VirtualBox4.app
VirtualBox4.app_INST = $(INST_VIRTUALBOX)Contents/
VirtualBox4.app_MODE = 644
VirtualBox4.app_SOURCES = \
src/darwin/PkgInfo \
$(PATH_VirtualBox4.app)/Info.plist \
$(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
$$(PATH_VirtualBox4.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
$(call MSG_GENERATE,VirtualBox4.app,$<,$@)
$(QUIET)$(RM) -f $@
$(QUIET)$(SED) \
-e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
-e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
-e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
-e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
$< > $@
INSTALLS += VirtualBox4VM.app
VirtualBox4VM.app_INST = $(VirtualBox4.app_INST)Resources/VirtualBoxVM.app/Contents/
VirtualBox4VM.app_MODE = 644
VirtualBox4VM.app_SOURCES = \
src/darwin/VM-PkgInfo=>PkgInfo \
$(PATH_VirtualBox4VM.app)/VM-Info.plist=>Info.plist
VirtualBox4VM.app_SYMLINKS = \
MacOS=>../../../MacOS/ \
Resources=>../../../Resources/
$$(PATH_VirtualBox4VM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
$(call MSG_GENERATE,VirtualBox4VM.app,$<,$@)
$(QUIET)$(RM) -f $@
$(QUIET)$(SED) \
-e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
-e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
-e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
-e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
--output $@ $<
endif # darwin
#
# Testcase for the darwin keyboard routines.
#
ifdef VBOX_WITH_TESTCASES
PROGRAMS.darwin += tstDarwinKeyboard4
tstDarwinKeyboard4_NAME = tstDarwinKeyboard
tstDarwinKeyboard4_TEMPLATE = VBOXR3TSTEXE
tstDarwinKeyboard4_INCS = include
tstDarwinKeyboard4_SOURCES = \
src/darwin/tstDarwinKeyboard.cpp \
src/darwin/DarwinKeyboard.cpp
tstDarwinKeyboard4_LDFLAGS = -framework IOKit -framework Carbon
tstDarwinKeyboard4_LIBS = \
$(LIB_RUNTIME)
endif
# Unset everything that was loaded from VBoxUI.pro.
TEMPLATE := $(SAVED_TEMPLATE)
SAVED_TEMPLATE :=
LANGUAGE :=
FORMS :=
TRANSLATIONS :=
IMAGES :=
# Commit the magic.
# (note: before custom rules that make usage of generated variables!).
include $(KBUILD_PATH)/subfooter.kmk
#
# Update all known NLS translation (.ts) files in the nls/ subdirectory.
#
# NOTE: This target is intended to be run only by the GUI maintainer shortly
# before a new product release. VirtualBox_xx_YY.ts is a template for new
# languages and should never be actually translated or installed.
#
updatenls:: \
$(filter-out %.qrc,$(VirtualBox4_SOURCES) $(VirtualBox4_VBOX_EXTRA_NLS_SOURCES)) \
$(wildcard include/*.h)
$(call MSG_L1,lupdate all languages (nls/*.ts))
$(QUIET)$(TOOL_QT4_LUPDATE) \
$^ \
-ts \
$(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \
nls/VirtualBox_xx_YY.ts