VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk@ 16694

Last change on this file since 16694 was 16693, checked in by vboxsync, 16 years ago

qt/darwin: Don't use HID for right hand modifier keys when Qt is Cocoa based. The HID stuff is *very* slow.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 19.3 KB
Line 
1# $Id: Makefile.kmk 16693 2009-02-11 20:26:17Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Globals.
27#
28VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
29VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
30
31VBOX_WITH_REGISTRATION := 1
32
33# Ask the user to register at Sun. If this setting is disabled the user can
34# still register using the menu if desired.
35VBOX_WITH_REGISTRATION_REQUEST := 1
36
37# Show the update notifier dialog during startup. If this setting is disabled
38# the user can still update using the menu if desired.
39VBOX_WITH_UPDATE_REQUEST := 1
40
41
42#
43# The targets.
44#
45ifdef VBOX_WITH_HARDENING
46PROGRAMS += VirtualBoxHardened
47DLLS += VirtualBox
48else
49PROGRAMS += VirtualBox
50endif
51
52ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
53 DLLS += VBoxKeyboard
54 ## @todo convert to install target.
55 OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
56 CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
57endif
58INSTALLS += VirtualBox.nls
59
60
61#
62# Include the language lists.
63#
64include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
65
66
67#
68# VBoxKeyboard - keyboard library for X11.
69#
70VBoxKeyboard_TEMPLATE = VBOXR3
71VBoxKeyboard_SOURCES = \
72 src/X11/keyboard-new.c
73VBoxKeyboard_LIBS = X11
74VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
75
76
77#
78# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
79# redistributed with usable sources.
80#
81# This rule will link create a temporary symlink to src/X11/ and tar
82# up the selected files into a tarball that is installed into the
83# bin directory (probably belongs in /usr/shared/somewhere really,
84# but wtf, it's not like we're even trying to be FHS compliant).
85#
86## @todo this should be tar'ed down into the output directory and installed using an install target.
87$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
88 $(VBoxKeyboard_SOURCES) \
89 src/X11/COPYING.LIB \
90 src/X11/keyboard.h \
91 src/X11/keyboard-layouts.h \
92 src/X11/keyboard-list.h \
93 src/X11/keyboard-tables.h \
94 src/X11/keyboard-types.h \
95 src/X11/Makefile \
96 ,$(PATH_SUB_CURRENT)) | $(PATH_TARGET)/VBoxKeyboard/
97 $(call MSG_TOOL,tar/gzip,,$@)
98 $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard $@
99 $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/X11/ $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
100 $(QUIET)cd $(PATH_TARGET)/VBoxKeyboard \
101 && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
102 | gzip - > $@
103 $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
104
105OTHER_CLEAN += \
106 $(PATH_BIN)/vboxkeyboard.tar.gz
107
108
109#
110# Hardened VirtualBox.
111#
112VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
113VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
114VirtualBoxHardened_NAME = VirtualBox
115ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
116 #VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
117 VirtualBoxHardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
118endif
119
120
121#
122# Include Qt project file, we'll use FORMS and TRANSLATIONS in
123# the VirtualBox setup below.
124#
125SAVED_TEMPLATE := $(TEMPLATE)
126include $(PATH_SUB_CURRENT)/VBoxUI.pro
127
128
129#
130# VirtualBox - The GUI program.
131#
132USES += qt4
133VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
134VirtualBox_NAME = VirtualBox
135ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
136 ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
137 #VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
138 VirtualBox_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
139 endif
140endif
141VirtualBox_SDKS.win = WINPSDK DXSDK
142ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
143 VirtualBox_SDKS += LIBSDL
144endif
145
146ifdef VBOX_WITH_ICHAT_THEATER
147 # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
148 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
149endif
150
151VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
152VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
153VirtualBox_DEFS.darwin = VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
154VirtualBox_DEFS.darwin.x86= VBOX_GUI_USE_QUARTZ2D
155VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
156VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
157VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
158VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
159VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
160VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
161VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
162## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
163VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT
164ifdef VBOX_WITH_ICHAT_THEATER
165 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
166endif
167ifneq ($(KBUILD_TYPE),release)
168 # non-release builds has some extra features.
169 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
170endif
171VirtualBox_DEFS += \
172 $(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
173 $(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
174 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
175 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
176 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
177 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
178 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT)
179ifdef VBOX_WITH_DEBUGGER_GUI
180 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
181 if "$(KBUILD_TYPE)" != "release"
182 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
183 endif
184endif
185
186VirtualBox_src/main.cpp_DEFS += VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\"
187VirtualBox_src/main.cpp_DEPS += $(VBOX_VERSION_MK)
188
189VirtualBox_INCS = \
190 ./include \
191 $(PATH_VirtualBox)/include
192
193# Necessary for the hdd backend enumeration
194VirtualBox_LIBS = $(LIB_DDU)
195
196ifeq ($(KBUILD_TYPE),release)
197 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
198else
199 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
200 ifeq ($(USERNAME),dmik)
201 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
202 else
203 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
204 endif
205endif
206# r=bird: what is -lz doing here? it belongs in LIBS.
207VirtualBox_LDFLAGS.darwin = -lz \
208 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
209 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
210VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime
211ifdef VBOX_WITH_ICHAT_THEATER
212 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
213endif
214VirtualBox_LIBS.win = \
215 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
216 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
217 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
218ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
219 VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
220endif
221
222# Headers containing definitions of classes that use the Q_OBJECT macro.
223VirtualBox_QT_MOCHDRS = \
224 include/QIHttp.h \
225 include/QIWidgetValidator.h \
226 include/QIHotKeyEdit.h \
227 include/QIStatusBar.h \
228 include/QIStateIndicator.h \
229 include/QIMessageBox.h \
230 include/QILabel.h \
231 include/QILabel_p.h \
232 include/QILabelSeparator.h \
233 include/QIAbstractWizard.h \
234 include/QIListView.h \
235 include/QITreeWidget.h \
236 include/QIMainDialog.h \
237 include/QIHelpButton.h \
238 include/QIDialog.h \
239 include/VBoxFilePathSelectorWidget.h \
240 include/VBoxOSTypeSelectorWidget.h \
241 include/VBoxUtils.h \
242 include/VBoxGlobalSettings.h \
243 include/VBoxGlobal.h \
244 include/VBoxVMListView.h \
245 include/VBoxMediaComboBox.h \
246 include/VBoxSelectorWnd.h \
247 include/VBoxConsoleWnd.h \
248 include/VBoxConsoleView.h \
249 include/VBoxProblemReporter.h \
250 include/VBoxDownloaderWgt.h \
251 include/VBoxAboutDlg.h \
252 include/VBoxCloseVMDlg.h \
253 include/VBoxNewVMWzd.h \
254 include/VBoxNewHDWzd.h \
255 include/VBoxVMFirstRunWzd.h \
256 include/VBoxRegistrationDlg.h \
257 include/VBoxUpdateDlg.h \
258 include/VBoxSnapshotDetailsDlg.h \
259 include/VBoxVMInformationDlg.h \
260 include/VBoxTakeSnapshotDlg.h \
261 include/VBoxSnapshotsWgt.h \
262 include/VBoxVMLogViewer.h \
263 include/VBoxMediaManagerDlg.h \
264 include/VBoxSettingsUtils.h \
265 include/VBoxVMSettingsGeneral.h \
266 include/VBoxVMSettingsHD.h \
267 include/VBoxVMSettingsCD.h \
268 include/VBoxVMSettingsFD.h \
269 include/VBoxVMSettingsAudio.h \
270 include/VBoxVMSettingsNetwork.h \
271 include/VBoxVMSettingsSerial.h \
272 include/VBoxVMSettingsParallel.h \
273 include/VBoxVMSettingsUSB.h \
274 include/VBoxVMSettingsUSBFilterDetails.h \
275 include/VBoxVMSettingsSF.h \
276 include/VBoxVMSettingsSFDetails.h \
277 include/VBoxVMSettingsVRDP.h \
278 include/VBoxGLSettingsGeneral.h \
279 include/VBoxGLSettingsInput.h \
280 include/VBoxGLSettingsUpdate.h \
281 include/VBoxGLSettingsLanguage.h \
282 include/VBoxSettingsDialog.h \
283 include/VBoxSettingsDialogSpecific.h \
284 include/VBoxSettingsPage.h \
285 include/VBoxSettingsSelector.h \
286 include/VBoxImportAppliance.h
287
288# Sources containing local definitions of classes that use the Q_OBJECT macro.
289VirtualBox_QT_MOCSRCS = \
290 src/VBoxSelectorWnd.cpp \
291 src/VBoxConsoleWnd.cpp \
292 src/VBoxMediaManagerDlg.cpp
293ifdef VBOX_WITH_XPCOM
294 VirtualBox_QT_MOCSRCS += \
295 src/COMDefs.cpp
296endif
297
298VirtualBox_SOURCES = \
299 src/main.cpp \
300 src/COMDefs.cpp \
301 src/QIWidgetValidator.cpp \
302 src/QIHotKeyEdit.cpp \
303 src/QIStateIndicator.cpp \
304 src/QIStatusBar.cpp \
305 src/QIMessageBox.cpp \
306 src/QILabel.cpp \
307 src/QILabelSeparator.cpp \
308 src/QIAbstractWizard.cpp \
309 src/QIDialog.cpp \
310 src/QIDialogButtonBox.cpp \
311 src/QIListView.cpp \
312 src/QITreeWidget.cpp \
313 src/QIMainDialog.cpp \
314 src/QILineEdit.cpp \
315 src/QIHelpButton.cpp \
316 src/VBoxFilePathSelectorWidget.cpp \
317 src/VBoxOSTypeSelectorWidget.cpp \
318 src/VBoxDefs.cpp \
319 src/VBoxGlobalSettings.cpp \
320 src/VBoxGlobal.cpp \
321 src/VBoxMediaComboBox.cpp \
322 src/VBoxProblemReporter.cpp \
323 src/VBoxSelectorWnd.cpp \
324 src/VBoxConsoleView.cpp \
325 src/VBoxConsoleWnd.cpp \
326 src/VBoxDownloaderWgt.cpp \
327 src/VBoxVMListView.cpp \
328 src/VBoxFrameBuffer.cpp \
329 src/VBoxAboutDlg.cpp \
330 src/VBoxCloseVMDlg.cpp \
331 src/VBoxNewVMWzd.cpp \
332 src/VBoxNewHDWzd.cpp \
333 src/VBoxVMFirstRunWzd.cpp \
334 src/VBoxRegistrationDlg.cpp \
335 src/VBoxUpdateDlg.cpp \
336 src/VBoxSnapshotDetailsDlg.cpp \
337 src/VBoxVMInformationDlg.cpp \
338 src/VBoxTakeSnapshotDlg.cpp \
339 src/VBoxSnapshotsWgt.cpp \
340 src/VBoxVMLogViewer.cpp \
341 src/VBoxVMSettingsGeneral.cpp \
342 src/VBoxVMSettingsHD.cpp \
343 src/VBoxVMSettingsCD.cpp \
344 src/VBoxVMSettingsFD.cpp \
345 src/VBoxVMSettingsAudio.cpp \
346 src/VBoxVMSettingsNetwork.cpp \
347 src/VBoxVMSettingsSerial.cpp \
348 src/VBoxVMSettingsParallel.cpp \
349 src/VBoxVMSettingsUSB.cpp \
350 src/VBoxVMSettingsUSBFilterDetails.cpp \
351 src/VBoxVMSettingsSF.cpp \
352 src/VBoxVMSettingsSFDetails.cpp \
353 src/VBoxVMSettingsVRDP.cpp \
354 src/VBoxGLSettingsGeneral.cpp \
355 src/VBoxGLSettingsInput.cpp \
356 src/VBoxGLSettingsUpdate.cpp \
357 src/VBoxGLSettingsLanguage.cpp \
358 src/VBoxSettingsDialog.cpp \
359 src/VBoxSettingsDialogSpecific.cpp \
360 src/VBoxSettingsSelector.cpp \
361 src/VBoxMediaManagerDlg.cpp \
362 src/VBoxImportAppliance.cpp
363
364ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
365 ifndef VBOX_OSE
366 VirtualBox_QT_MOCHDRS += \
367 include/VBoxLicenseViewer.h
368 VirtualBox_SOURCES += \
369 src/VBoxLicenseViewer.cpp
370 else
371 VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
372 include/VBoxLicenseViewer.h \
373 src/VBoxLicenseViewer.cpp
374 endif
375 VirtualBox_SOURCES += \
376 src/X11/XKeyboard-new.cpp \
377 src/VBoxX11Helper.cpp
378else
379 VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
380 include/VBoxLicenseViewer.h \
381 src/VBoxLicenseViewer.cpp
382endif
383
384VirtualBox_SOURCES.win += \
385 src/VBoxFBDDRAW.cpp \
386 $(PATH_VirtualBox)/VirtualBox.rc
387
388VirtualBox_SOURCES.darwin = \
389 src/darwin/DarwinKeyboard.cpp \
390 src/darwin/VBoxUtils-darwin.cpp \
391 src/darwin/VBoxDockIconPreview.cpp \
392 src/VBoxFBQuartz2D.cpp
393
394ifdef VBOX_WITH_ICHAT_THEATER
395 VirtualBox_SOURCES.darwin += \
396 src/darwin/VBoxIChatTheaterWrapper.m
397endif
398
399VirtualBox_SOURCES.darwin.amd64 += \
400 src/darwin/VBoxCocoaApplication.m
401
402# The Qt modules we're using.
403# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
404VirtualBox_QT_MODULES = Core Gui Network
405
406# Import QDesigner UI sources and translations from VBoxUI.pro.
407ifndef VBOX_WITH_REGISTRATION
408 FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
409endif
410$(eval VirtualBox_SOURCES += $(FORMS))
411
412# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
413VirtualBox_SOURCES += VirtualBox.qrc
414VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
415$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
416
417# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
418VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
419 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
420# Compress the translation units.
421VirtualBox_LRCFLAGS = -silent
422# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
423VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
424
425
426## @todo how to detect what tool is used?
427## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
428# more generic -Wno-extra
429# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
430ifdef VBOX_WITH_XPCOM
431 VirtualBox_src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
432endif
433
434
435#
436# Generate the COM wrappers.
437#
438VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
439VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
440VirtualBox_CLEAN += $(PATH_VirtualBox)/include/COMWrappers.h
441
442$$(PATH_VirtualBox)/include/COMWrappers.h: \
443 $(VBOX_XIDL_FILE) \
444 $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
445 | $$(dir $$@)
446 $(call MSG_GENERATE,VirtualBox,$<,$@)
447 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
448
449# alias for generating the COM Wrappers file.
450testwrappers:: $$(PATH_VirtualBox)/include/COMWrappers.h
451
452
453#
454# Generate qrc file with branded icons.
455#
456VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
457VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
458if "$(KBUILD_HOST)" == "win" ## @todo remove when kBuild ticket #52 has been fixed and deployed.
459 VBOX_DRIVE_HACK := $(firstword $(subst :, ,$(PATH_ROOT))):
460else
461 VBOX_DRIVE_HACK :=
462endif
463$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
464 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
465 | $$(dir $$@)
466 $(call MSG_GENERATE,VirtualBox,$<,$@)
467 $(QUIET)$(SED) \
468 -e 's;@VBOX_ABOUT_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_PNG));g' \
469 -e 's;@VBOX_ABOUT_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_16PX_PNG));g' \
470 -e 's;@VBOX_VBOX_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_16PX_PNG));g' \
471 -e 's;@VBOX_VBOX_20PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_20PX_PNG));g' \
472 -e 's;@VBOX_VBOX_32PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_32PX_PNG));g' \
473 -e 's;@VBOX_VBOX_40PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_40PX_PNG));g' \
474 -e 's;@VBOX_VBOX_48PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_48PX_PNG));g' \
475 -e 's;@VBOX_VBOX_64PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_64PX_PNG));g' \
476 -e 's;@VBOX_CUBE_42PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_CUBE_42PX_PNG));g' \
477 --output $@ \
478 $<
479
480
481ifeq ($(KBUILD_TARGET),win)
482#
483# On Windows we'll have to generate/edit the resource file.
484# The IDI_ICON1 name is Qt specific.
485#
486$$(PATH_VirtualBox)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
487 $(RM) -f $@
488 $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
489
490VirtualBox_CLEAN.win += $$(PATH_VirtualBox)/VirtualBox.rc
491endif # win
492
493
494ifeq ($(KBUILD_TARGET),darwin)
495#
496# Create directories for each approved language or the application
497# menu won't be translated.
498#
499INSTALLS += VirtualBox.lproj
500VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
501VirtualBox.lproj_MODE = 755
502VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES_ALL))
503
504#
505# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
506# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
507#
508INSTALLS += VirtualBox.app
509VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
510VirtualBox.app_MODE = 644
511VirtualBox.app_SOURCES = \
512 src/darwin/PkgInfo \
513 $(PATH_VirtualBox.app)/Info.plist \
514 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
515
516$$(PATH_VirtualBox.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
517 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
518 $(QUIET)$(RM) -f $@
519 $(QUIET)$(SED) \
520 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
521 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
522 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
523 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
524 $< > $@
525
526INSTALLS += VirtualBoxVM.app
527VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
528VirtualBoxVM.app_MODE = 644
529VirtualBoxVM.app_SOURCES = \
530 src/darwin/VM-PkgInfo=>PkgInfo \
531 $(PATH_VirtualBoxVM.app)/VM-Info.plist=>Info.plist
532VirtualBoxVM.app_SYMLINKS = \
533 MacOS=>../../../MacOS/ \
534 Resources=>../../../Resources/
535
536$$(PATH_VirtualBoxVM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
537 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
538 $(QUIET)$(RM) -f $@
539 $(QUIET)$(SED) \
540 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
541 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
542 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
543 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
544 --output $@ $<
545endif # darwin
546
547
548#
549# Testcase for the darwin keyboard routines.
550#
551ifdef VBOX_WITH_TESTCASES
552PROGRAMS.darwin += tstDarwinKeyboard4
553tstDarwinKeyboard4_NAME = tstDarwinKeyboard
554tstDarwinKeyboard4_TEMPLATE = VBOXR3TSTEXE
555tstDarwinKeyboard4_INCS = include
556tstDarwinKeyboard4_SOURCES = \
557 src/darwin/tstDarwinKeyboard.cpp \
558 src/darwin/DarwinKeyboard.cpp \
559 src/darwin/VBoxCocoaApplication.m
560tstDarwinKeyboard4_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
561tstDarwinKeyboard4_LIBS = \
562 $(LIB_RUNTIME)
563endif
564
565
566# Unset everything that was loaded from VBoxUI.pro.
567TEMPLATE := $(SAVED_TEMPLATE)
568SAVED_TEMPLATE :=
569LANGUAGE :=
570FORMS :=
571TRANSLATIONS :=
572IMAGES :=
573
574
575# Commit the magic.
576# (note: before custom rules that make usage of generated variables!).
577include $(KBUILD_PATH)/subfooter.kmk
578
579#
580# Update all known NLS translation (.ts) files in the nls/ subdirectory.
581#
582# NOTE: This target is intended to be run only by the GUI maintainer shortly
583# before a new product release. VirtualBox_xx_YY.ts is a template for new
584# languages and should never be actually translated or installed.
585#
586updatenls:: \
587 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES)) \
588 $(wildcard include/*.h)
589 $(call MSG_L1,lupdate all languages (nls/*.ts))
590 $(QUIET)$(TOOL_QT4_LUPDATE) \
591 $^ \
592 -ts \
593 $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
594 nls/VirtualBox_xx_YY.ts
595
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