VirtualBox

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

Last change on this file since 40403 was 40043, checked in by vboxsync, 13 years ago

FE/Qt: 6072: Create rich-text QLabel analog: Initial implementation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 35.0 KB
Line 
1# $Id: Makefile.kmk 40043 2012-02-09 08:32:22Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Globals.
23#
24VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
25VBOX_VIRTUALBOX4_OUT_DIR := $(PATH_TARGET)/VirtualBox/misc
26
27# Show the update notifier dialog during startup. If this setting is disabled
28# the user can still update using the menu if desired.
29ifndef VBOX_OSE
30VBOX_WITH_UPDATE_REQUEST := 1
31endif
32
33#
34# The targets.
35#
36ifdef VBOX_WITH_HARDENING
37PROGRAMS += VirtualBoxHardened
38DLLS += VirtualBox
39else
40PROGRAMS += VirtualBox
41endif
42
43INSTALLS += VirtualBox.nls
44
45
46#
47# Include the language lists.
48#
49include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
50
51
52#
53# Hardened VirtualBox.
54#
55VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
56VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
57VirtualBoxHardened_NAME = VirtualBox
58VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
59
60
61#
62# Include Qt project file, we'll use FORMS and TRANSLATIONS in
63# the VirtualBox setup below.
64#
65SAVED_TEMPLATE := $(TEMPLATE)
66include $(PATH_SUB_CURRENT)/VBoxUI.pro
67
68
69#
70# VirtualBox - The GUI program.
71#
72USES += qt4
73VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
74VirtualBox_NAME = VirtualBox
75ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
76 VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
77endif
78VirtualBox_SDKS.win = WINPSDK DXSDK
79if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd os2) # X11 + os2 ## @todo solaris
80 VirtualBox_SDKS += LIBSDL
81endif
82
83VirtualBox_DEFS =
84VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
85VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE
86ifndef VBOX_WITH_COCOA_QT
87VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
88endif
89VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
90VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
91VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
92VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
93VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
94VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
95ifdef VBOX_WITH_ICHAT_THEATER
96 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
97endif
98ifneq ($(KBUILD_TYPE),release)
99 # non-release builds has some extra features.
100 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
101endif
102VirtualBox_DEFS += \
103 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
104 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
105 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
106 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
107 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
108 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
109 $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
110 $(if $(VBOX_WITH_UDPTUNNEL),VBOX_WITH_UDPTUNNEL) \
111 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK) \
112 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI) \
113 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP) \
114 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI) \
115 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
116 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM) \
117 $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL) \
118 $(if $(VBOX_GUI_WITH_PIDFILE),VBOX_GUI_WITH_PIDFILE) \
119 $(if $(VBOX_GUI_WITH_KEYS_RESET_HANDLER),VBOX_GUI_WITH_KEYS_RESET_HANDLER) \
120 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1)
121ifdef VBOX_WITH_DEBUGGER_GUI
122 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
123 if "$(KBUILD_TYPE)" != "release"
124 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
125 endif
126endif
127ifdef VBOX_WITH_VIDEOHWACCEL
128 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
129 VBOX_GUI_USE_QGL
130else ifdef VBOX_GUI_USE_QGL
131 VirtualBox_DEFS += VBOX_GUI_USE_QGL
132endif
133ifdef VBOX_BLEEDING_EDGE
134VirtualBox_src/selector/UISelectorWindow.cpp_DEFS += \
135 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
136VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \
137 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
138VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
139 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
140VirtualBox_src/main.cpp_DEFS += \
141 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
142endif
143
144
145VBOX_GUI_INC_DIRS = \
146 ./src \
147 ./src/extensions \
148 ./src/globals \
149 ./src/net \
150 ./src/platform \
151 ./src/platform/darwin \
152 ./src/platform/win \
153 ./src/platform/x11 \
154 ./src/runtime \
155 ./src/runtime/fullscreen \
156 ./src/runtime/normal \
157 ./src/runtime/scale \
158 ./src/runtime/seamless \
159 ./src/selector \
160 ./src/settings \
161 ./src/settings/global \
162 ./src/settings/machine \
163 ./src/widgets \
164 ./src/wizards/clonevm \
165 ./src/wizards/exportappliance \
166 ./src/wizards/firstrun \
167 ./src/wizards/importappliance \
168 ./src/wizards/newhd \
169 ./src/wizards/newvm
170
171VirtualBox_INCS = \
172 $(VBOX_GUI_INC_DIRS) \
173 $(VirtualBox_0_OUTDIR)/include
174
175# Necessary for the hdd backend enumeration
176VirtualBox_LIBS = $(LIB_DDU)
177
178# This library is required for multi-monitor support
179VirtualBox_LIBS.linux += Xinerama
180VirtualBox_LIBS.solaris += Xinerama
181VirtualBox_LIBS.freebsd += Xinerama
182
183ifneq ($(KBUILD_TARGET),win)
184VirtualBox_CXXFLAGS += -Wno-switch
185endif
186
187ifdef VBOX_WITH_VIDEOHWACCEL
188# Necessary for save state support
189VirtualBox_LIBS += $(LIB_VMM)
190endif
191ifeq ($(KBUILD_TYPE),release)
192 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
193else
194 VirtualBox_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
195 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
196endif
197
198# delay loading causes VM process crashes due to the misbehave of the current QtOpenGLVBox4.dll we use
199# (i.e. it does not create the ogl context properly when loaded this way)
200#
201# @todo: investigate a better work-around and enable back delay loading since it is needed to avoid
202# crashes caused by buggy ogl drivers for the case 2D is not used (i.e. no ogl stuff loaded)
203#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
204# VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
205#endif
206
207VirtualBox_LDFLAGS.darwin = \
208 -framework AppKit -framework Carbon \
209 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
210ifdef VBOX_WITH_ICHAT_THEATER
211 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
212endif
213
214VirtualBox_LIBS.win = \
215 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
216 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
217 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
218if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
219 VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
220endif
221
222if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
223 VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
224 VirtualBox_LIBS.solaris += GL
225 VirtualBox_LIBS.linux += GL
226 VirtualBox_LIBS.freebsd += GL
227 VirtualBox_LDFLAGS.darwin += -framework OpenGL
228endif
229
230# Headers containing definitions of classes that use the Q_OBJECT macro.
231VirtualBox_QT_MOCHDRS = \
232 src/UIMediumTypeChangeDialog.h \
233 src/VBoxAboutDlg.h \
234 src/VBoxGlobalSettings.h \
235 src/VBoxLicenseViewer.h \
236 src/VBoxMediaManagerDlg.h \
237 src/VBoxSnapshotDetailsDlg.h \
238 src/VBoxTakeSnapshotDlg.h \
239 src/VBoxVMInformationDlg.h \
240 src/UIVMLogViewer.h \
241 src/extensions/QIAdvancedSlider.h \
242 src/extensions/QIArrowButtonPress.h \
243 src/extensions/QIArrowButtonSwitch.h \
244 src/extensions/QIArrowSplitter.h \
245 src/extensions/QIDialog.h \
246 src/extensions/QIFileDialog.h \
247 src/extensions/QILabel.h \
248 src/extensions/QILabelSeparator.h \
249 src/extensions/QIListView.h \
250 src/extensions/QIMainDialog.h \
251 src/extensions/QIMessageBox.h \
252 src/extensions/QIRichTextLabel.h \
253 src/extensions/QIRichToolButton.h \
254 src/extensions/QISplitter.h \
255 src/extensions/QIStateIndicator.h \
256 src/extensions/QIStatusBar.h \
257 src/extensions/QITabWidget.h \
258 src/extensions/QITableView.h \
259 src/extensions/QIToolButton.h \
260 src/extensions/QITextEdit.h \
261 src/extensions/QITreeView.h \
262 src/extensions/QITreeWidget.h \
263 src/extensions/QIWidgetValidator.h \
264 src/extensions/QIWizard.h \
265 src/globals/UIActionPool.h \
266 src/globals/UIExtraDataEventHandler.h \
267 src/globals/UIMainEventListener.h \
268 src/globals/UIMessageCenter.h \
269 src/globals/VBoxGlobal.h \
270 src/globals/VBoxUtils.h \
271 src/net/UIDownloader.h \
272 src/net/UIDownloaderAdditions.h \
273 src/net/UIDownloaderExtensionPack.h \
274 src/net/UIDownloaderUserManual.h \
275 src/net/UINetworkManager.h \
276 src/net/UIUpdateManager.h \
277 src/net/UINetworkCustomer.h \
278 src/runtime/UIActionPoolRuntime.h \
279 src/runtime/UIConsoleEventHandler.h \
280 src/runtime/UIIndicatorsPool.h \
281 src/runtime/UIKeyboardHandler.h \
282 src/runtime/UIMachine.h \
283 src/runtime/UIMachineLogic.h \
284 src/runtime/UIMachineView.h \
285 src/runtime/UIMouseHandler.h \
286 src/runtime/UIMultiScreenLayout.h \
287 src/runtime/UISession.h \
288 src/runtime/UIVMCloseDialog.h \
289 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h \
290 src/runtime/fullscreen/UIMachineLogicFullscreen.h \
291 src/runtime/fullscreen/UIMachineViewFullscreen.h \
292 src/runtime/fullscreen/UIMachineWindowFullscreen.h \
293 src/runtime/normal/UIKeyboardHandlerNormal.h \
294 src/runtime/normal/UIMachineLogicNormal.h \
295 src/runtime/normal/UIMachineViewNormal.h \
296 src/runtime/normal/UIMachineWindowNormal.h \
297 src/runtime/scale/UIKeyboardHandlerScale.h \
298 src/runtime/scale/UIMachineLogicScale.h \
299 src/runtime/scale/UIMachineViewScale.h \
300 src/runtime/scale/UIMachineWindowScale.h \
301 src/runtime/seamless/UIKeyboardHandlerSeamless.h \
302 src/runtime/seamless/UIMachineLogicSeamless.h \
303 src/runtime/seamless/UIMachineViewSeamless.h \
304 src/runtime/seamless/UIMachineWindowSeamless.h \
305 src/selector/UIActionPoolSelector.h \
306 src/selector/UIVMDesktop.h \
307 src/selector/UIVMItem.h \
308 src/selector/UIVMListView.h \
309 src/selector/UIVMPreviewWindow.h \
310 src/selector/UIVirtualBoxEventHandler.h \
311 src/selector/UISelectorWindow.h \
312 src/selector/VBoxSnapshotsWgt.h \
313 src/settings/UISettingsDialog.h \
314 src/settings/UISettingsDialogSpecific.h \
315 src/settings/UISettingsPage.h \
316 src/settings/VBoxSettingsSelector.h \
317 src/settings/global/UIGlobalSettingsExtension.h \
318 src/settings/global/UIGlobalSettingsGeneral.h \
319 src/settings/global/UIGlobalSettingsInput.h \
320 src/settings/global/UIGlobalSettingsLanguage.h \
321 src/settings/global/UIGlobalSettingsDisplay.h \
322 src/settings/global/UIGlobalSettingsNetwork.h \
323 src/settings/global/UIGlobalSettingsNetworkDetails.h \
324 src/settings/global/UIGlobalSettingsProxy.h \
325 src/settings/global/UIGlobalSettingsUpdate.h \
326 src/settings/machine/UIMachineSettingsAudio.h \
327 src/settings/machine/UIMachineSettingsDisplay.h \
328 src/settings/machine/UIMachineSettingsGeneral.h \
329 src/settings/machine/UIMachineSettingsNetwork.h \
330 src/settings/machine/UIMachineSettingsParallel.h \
331 src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
332 src/settings/machine/UIMachineSettingsSF.h \
333 src/settings/machine/UIMachineSettingsSFDetails.h \
334 src/settings/machine/UIMachineSettingsSerial.h \
335 src/settings/machine/UIMachineSettingsStorage.h \
336 src/settings/machine/UIMachineSettingsSystem.h \
337 src/settings/machine/UIMachineSettingsUSB.h \
338 src/settings/machine/UIMachineSettingsUSBFilterDetails.h \
339 src/widgets/UIApplianceEditorWidget.h \
340 src/widgets/UIApplianceExportEditorWidget.h \
341 src/widgets/UIApplianceImportEditorWidget.h \
342 src/widgets/UIBar.h \
343 src/widgets/UIBootTable.h \
344 src/widgets/UIHotKeyEditor.h \
345 src/widgets/UILineTextEdit.h \
346 src/widgets/UIPopupBox.h \
347 src/widgets/UIProgressDialog.h \
348 src/widgets/UISpacerWidgets.h \
349 src/widgets/UISpecialControls.h \
350 src/widgets/VBoxFilePathSelectorWidget.h \
351 src/widgets/VBoxMediaComboBox.h \
352 src/widgets/VBoxMiniToolBar.h \
353 src/widgets/VBoxOSTypeSelectorButton.h \
354 src/widgets/VBoxOSTypeSelectorWidget.h \
355 src/widgets/VBoxWarningPane.h \
356 src/wizards/clonevm/UICloneVMWizard.h \
357 src/wizards/exportappliance/UIExportApplianceWzd.h \
358 src/wizards/firstrun/UIFirstRunWzd.h \
359 src/wizards/importappliance/UIImportApplianceWzd.h \
360 src/wizards/newhd/UINewHDWizard.h \
361 src/wizards/newvm/UINewVMWzd.h
362
363VirtualBox_QT_MOCHDRS.darwin += \
364 src/platform/darwin/UIWindowMenuManager.h
365
366# Sources containing local definitions of classes that use the Q_OBJECT macro.
367VirtualBox_QT_MOCSRCS = \
368 src/VBoxMediaManagerDlg.cpp \
369 src/UIVMLogViewer.cpp \
370 src/extensions/QISplitter.cpp \
371 src/globals/UIActionPool.cpp \
372 src/globals/UIExtraDataEventHandler.cpp \
373 src/net/UINetworkManager.cpp \
374 src/net/UIUpdateManager.cpp \
375 src/runtime/UIActionPoolRuntime.cpp \
376 src/runtime/UIIndicatorsPool.cpp \
377 src/runtime/UIMachine.cpp \
378 src/runtime/UIMachineMenuBar.cpp \
379 src/selector/UIActionPoolSelector.cpp \
380 src/selector/UIVMDesktop.cpp \
381 src/settings/UISettingsDialogSpecific.cpp \
382 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
383 src/settings/machine/UIMachineSettingsStorage.cpp \
384 src/wizards/newhd/UINewHDWizard.cpp
385
386VirtualBox_QT_MOCSRCS.darwin += \
387 src/platform/darwin/UIWindowMenuManager.cpp
388VirtualBox_QT_MOCSRCS.win += \
389 src/extensions/QIFileDialog.cpp
390
391ifdef VBOX_WITH_XPCOM
392 VirtualBox_QT_MOCSRCS += \
393 src/globals/COMDefs.cpp
394endif
395
396VirtualBox_SOURCES = \
397 src/UIMediumTypeChangeDialog.cpp \
398 src/VBoxAboutDlg.cpp \
399 src/VBoxGlobalSettings.cpp \
400 src/VBoxLicenseViewer.cpp \
401 src/VBoxMediaManagerDlg.cpp \
402 src/VBoxMedium.cpp \
403 src/VBoxSnapshotDetailsDlg.cpp \
404 src/VBoxTakeSnapshotDlg.cpp \
405 src/VBoxVMInformationDlg.cpp \
406 src/UIVMLogViewer.cpp \
407 src/extensions/QIAdvancedSlider.cpp \
408 src/extensions/QIArrowButtonPress.cpp \
409 src/extensions/QIArrowButtonSwitch.cpp \
410 src/extensions/QIArrowSplitter.cpp \
411 src/extensions/QIDialog.cpp \
412 src/extensions/QIDialogButtonBox.cpp \
413 src/extensions/QIFileDialog.cpp \
414 src/extensions/QILabel.cpp \
415 src/extensions/QILabelSeparator.cpp \
416 src/extensions/QILineEdit.cpp \
417 src/extensions/QIListView.cpp \
418 src/extensions/QIMainDialog.cpp \
419 src/extensions/QIMessageBox.cpp \
420 src/extensions/QIRichTextLabel.cpp \
421 src/extensions/QIRichToolButton.cpp \
422 src/extensions/QISplitter.cpp \
423 src/extensions/QIStateIndicator.cpp \
424 src/extensions/QIStatusBar.cpp \
425 src/extensions/QITableView.cpp \
426 src/extensions/QITextEdit.cpp \
427 src/extensions/QITreeView.cpp \
428 src/extensions/QITreeWidget.cpp \
429 src/extensions/QIWidgetValidator.cpp \
430 src/extensions/QIWizard.cpp \
431 src/globals/COMDefs.cpp \
432 src/globals/UIActionPool.cpp \
433 src/globals/UIExtraDataEventHandler.cpp \
434 src/globals/UIIconPool.cpp \
435 src/globals/UIImageTools.cpp \
436 src/globals/UIMainEventListener.cpp \
437 src/globals/UIMessageCenter.cpp \
438 src/globals/VBoxDefs.cpp \
439 src/globals/VBoxGlobal.cpp \
440 src/main.cpp \
441 src/net/UIDownloader.cpp \
442 src/net/UIDownloaderAdditions.cpp \
443 src/net/UIDownloaderExtensionPack.cpp \
444 src/net/UIDownloaderUserManual.cpp \
445 src/net/UINetworkManager.cpp \
446 src/net/UIUpdateDefs.cpp \
447 src/net/UIUpdateManager.cpp \
448 src/net/UINetworkCustomer.cpp \
449 src/runtime/UIActionPoolRuntime.cpp \
450 src/runtime/UIConsoleEventHandler.cpp \
451 src/runtime/UIFrameBuffer.cpp \
452 src/runtime/UIFrameBufferQGL.cpp \
453 src/runtime/UIFrameBufferQImage.cpp \
454 src/runtime/UIFrameBufferSDL.cpp \
455 src/runtime/UIIndicatorsPool.cpp \
456 src/runtime/UIKeyboardHandler.cpp \
457 src/runtime/UIMachine.cpp \
458 src/runtime/UIMachineLogic.cpp \
459 src/runtime/UIMachineMenuBar.cpp \
460 src/runtime/UIMachineShortcuts.cpp \
461 src/runtime/UIMachineView.cpp \
462 src/runtime/UIMachineWindow.cpp \
463 src/runtime/UIMouseHandler.cpp \
464 src/runtime/UIMultiScreenLayout.cpp \
465 src/runtime/UISession.cpp \
466 src/runtime/UIVMCloseDialog.cpp \
467 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp \
468 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
469 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \
470 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
471 src/runtime/normal/UIKeyboardHandlerNormal.cpp \
472 src/runtime/normal/UIMachineLogicNormal.cpp \
473 src/runtime/normal/UIMachineViewNormal.cpp \
474 src/runtime/normal/UIMachineWindowNormal.cpp \
475 src/runtime/scale/UIKeyboardHandlerScale.cpp \
476 src/runtime/scale/UIMachineLogicScale.cpp \
477 src/runtime/scale/UIMachineViewScale.cpp \
478 src/runtime/scale/UIMachineWindowScale.cpp \
479 src/runtime/seamless/UIKeyboardHandlerSeamless.cpp \
480 src/runtime/seamless/UIMachineLogicSeamless.cpp \
481 src/runtime/seamless/UIMachineViewSeamless.cpp \
482 src/runtime/seamless/UIMachineWindowSeamless.cpp \
483 src/selector/UIActionPoolSelector.cpp \
484 src/selector/UISelectorShortcuts.cpp \
485 src/selector/UIVMDesktop.cpp \
486 src/selector/UIVMItem.cpp \
487 src/selector/UIVMListView.cpp \
488 src/selector/UIVMPreviewWindow.cpp \
489 src/selector/UIVirtualBoxEventHandler.cpp \
490 src/selector/UISelectorWindow.cpp \
491 src/selector/VBoxSnapshotsWgt.cpp \
492 src/settings/UISettingsDefs.cpp \
493 src/settings/UISettingsDialog.cpp \
494 src/settings/UISettingsDialogSpecific.cpp \
495 src/settings/UISettingsPage.cpp \
496 src/settings/VBoxSettingsSelector.cpp \
497 src/settings/global/UIGlobalSettingsExtension.cpp \
498 src/settings/global/UIGlobalSettingsGeneral.cpp \
499 src/settings/global/UIGlobalSettingsInput.cpp \
500 src/settings/global/UIGlobalSettingsLanguage.cpp \
501 src/settings/global/UIGlobalSettingsDisplay.cpp \
502 src/settings/global/UIGlobalSettingsNetwork.cpp \
503 src/settings/global/UIGlobalSettingsNetworkDetails.cpp \
504 src/settings/global/UIGlobalSettingsProxy.cpp \
505 src/settings/global/UIGlobalSettingsUpdate.cpp \
506 src/settings/machine/UIMachineSettingsAudio.cpp \
507 src/settings/machine/UIMachineSettingsDisplay.cpp \
508 src/settings/machine/UIMachineSettingsGeneral.cpp \
509 src/settings/machine/UIMachineSettingsNetwork.cpp \
510 src/settings/machine/UIMachineSettingsParallel.cpp \
511 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
512 src/settings/machine/UIMachineSettingsSF.cpp \
513 src/settings/machine/UIMachineSettingsSFDetails.cpp \
514 src/settings/machine/UIMachineSettingsSerial.cpp \
515 src/settings/machine/UIMachineSettingsStorage.cpp \
516 src/settings/machine/UIMachineSettingsSystem.cpp \
517 src/settings/machine/UIMachineSettingsUSB.cpp \
518 src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp \
519 src/widgets/UIApplianceEditorWidget.cpp \
520 src/widgets/UIApplianceExportEditorWidget.cpp \
521 src/widgets/UIApplianceImportEditorWidget.cpp \
522 src/widgets/UIBar.cpp \
523 src/widgets/UIBootTable.cpp \
524 src/widgets/UIHotKeyEditor.cpp \
525 src/widgets/UILineTextEdit.cpp \
526 src/widgets/UIPopupBox.cpp \
527 src/widgets/UIProgressDialog.cpp \
528 src/widgets/UISpecialControls.cpp \
529 src/widgets/UIToolBar.cpp \
530 src/widgets/VBoxFilePathSelectorWidget.cpp \
531 src/widgets/VBoxGuestRAMSlider.cpp \
532 src/widgets/VBoxMediaComboBox.cpp \
533 src/widgets/VBoxMiniToolBar.cpp \
534 src/widgets/VBoxOSTypeSelectorButton.cpp \
535 src/widgets/VBoxOSTypeSelectorWidget.cpp \
536 src/widgets/VBoxWarningPane.cpp \
537 src/wizards/clonevm/UICloneVMWizard.cpp \
538 src/wizards/exportappliance/UIExportApplianceWzd.cpp \
539 src/wizards/firstrun/UIFirstRunWzd.cpp \
540 src/wizards/importappliance/UIImportApplianceWzd.cpp \
541 src/wizards/newhd/UINewHDWizard.cpp \
542 src/wizards/newvm/UINewVMWzd.cpp
543
544VirtualBox_SOURCES.win += \
545 src/runtime/UIFrameBufferDirectDraw.cpp
546VirtualBox_SOURCES.darwin += \
547 src/platform/darwin/UIAbstractDockIconPreview.cpp \
548 src/platform/darwin/UICocoaDockIconPreview.mm \
549 src/platform/darwin/UIWindowMenuManager.cpp \
550 src/runtime/UIFrameBufferQuartz2D.cpp
551
552if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
553 VirtualBox_SOURCES += \
554 src/platform/x11/UIDesktopServices_x11.cpp \
555 src/platform/x11/VBoxX11Helper.cpp \
556 src/platform/x11/XKeyboard-new.cpp
557endif
558
559VirtualBox_SOURCES.win += \
560 src/platform/win/VirtualBox.rc \
561 src/platform/win/UIDesktopServices_win.cpp \
562 src/platform/win/VBoxUtils-win.cpp
563
564VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
565VirtualBox_SOURCES.darwin += \
566 src/platform/darwin/CocoaEventHelper.mm \
567 src/platform/darwin/DarwinKeyboard.cpp \
568 src/platform/darwin/UICocoaApplication.mm \
569 src/platform/darwin/UICocoaSpecialControls.mm \
570 src/platform/darwin/UIDesktopServices_darwin.cpp \
571 src/platform/darwin/UIDesktopServices_darwin_cocoa.mm \
572 src/platform/darwin/VBoxUtils-darwin-cocoa.mm \
573 src/platform/darwin/VBoxUtils-darwin.cpp
574VirtualBox_QT_MOCHDRS.darwin += \
575 src/platform/darwin/UICocoaSpecialControls.h
576
577ifdef VBOX_WITH_ICHAT_THEATER
578 VirtualBox_SOURCES.darwin += \
579 src/platform/darwin/VBoxIChatTheaterWrapper.m
580endif
581
582ifdef VBOX_GUI_WITH_SYSTRAY
583 VirtualBox_DEFS += VBOX_GUI_WITH_SYSTRAY
584 VirtualBox_QT_MOCHDRS += \
585 src/selector/VBoxTrayIcon.h
586 VirtualBox_SOURCES += \
587 src/selector/VBoxTrayIcon.cpp
588endif
589
590if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
591 VirtualBox_SOURCES += \
592 src/VBoxFBOverlay.cpp \
593 src/VBoxFBQGL.cpp \
594 src/VBoxGLSupportInfo.cpp
595endif
596
597ifdef VBOX_WITH_DRAG_AND_DROP
598 VirtualBox_SOURCES += \
599 src/runtime/UIDnDHandler.cpp
600 VirtualBox_QT_MOCSRCS += \
601 src/runtime/UIDnDHandler.cpp
602endif
603
604# The Qt modules we're using.
605# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
606VirtualBox_QT_MODULES = Core Gui Network
607if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
608 VirtualBox_QT_MODULES += OpenGL
609endif
610
611# Pull in the ui files
612$(eval VirtualBox_SOURCES += $(FORMS))
613
614# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
615VirtualBox_SOURCES += VirtualBox1.qrc
616VirtualBox1.qrc_RCCFLAGS = -name BASIC1
617VirtualBox_SOURCES += VirtualBox2.qrc
618VirtualBox2.qrc_RCCFLAGS = -name BASIC2
619ifeq ($(KBUILD_TARGET),darwin)
620 VirtualBox_SOURCES += VirtualBoxMac.qrc
621 VirtualBoxMac.qrc_RCCFLAGS = -name MAC
622else
623 VirtualBox_SOURCES += VirtualBoxOther.qrc
624 VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
625endif
626VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
627$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
628if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
629 VirtualBox_SOURCES += VirtualBoxShaders.qrc
630 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
631endif
632
633# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
634VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
635 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
636# Compress the translation units.
637VirtualBox_LRCFLAGS = -silent
638# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
639VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
640
641
642## @todo how to detect what tool is used?
643## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
644# more generic -Wno-extra
645# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
646ifdef VBOX_WITH_XPCOM
647 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
648endif
649
650
651#
652# Generate the COM wrappers.
653#
654## @todo This needs some cleaning up perhaps...
655## @todo kBuild: Non-existing +| targets should be tried remade or what?
656VirtualBox_BLDDIRS += $(VirtualBox_0_OUTDIR)/include
657VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.h
658VirtualBox_CLEAN += \
659 $(VirtualBox_0_OUTDIR)/include/COMWrappers \
660 $(VirtualBox_0_OUTDIR)/include/COMWrappers.tmp \
661 $(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
662 $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
663VirtualBox_SOURCES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
664
665$$(VirtualBox_0_OUTDIR)/include/COMWrappers \
666+| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
667+| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp: \
668 $(VBOX_XIDL_FILE) \
669 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
670 | $$(dir $$@)
671 $(call MSG_GENERATE,VirtualBox,$<,$@)
672 $(QUIET)$(RM) -f $@ [email protected] [email protected] [email protected]
673 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
674
675 $(QUIET)$(SED) -e '1,/\/\/ wrapper definitions/ !d' \
676 --output [email protected] $@
677 $(QUIET)$(CP) --changed [email protected] [email protected]
678
679 $(QUIET)$(APPEND) -t -n [email protected] \
680 '/*' \
681 ' * DO NOT EDIT! This is a generated file, see COMWrappers.h for details.' \
682 ' */' \
683 '' \
684 '#include "VBoxGlobal.h"' \
685 ''
686 $(QUIET)$(SED) -e '/\/\/ wrapper definitions/,9999999 !d' \
687 -e 's/^inline //' \
688 --append [email protected] $@
689 $(QUIET)$(CP) --changed [email protected] [email protected]
690 $(QUIET)$(RM) -f [email protected]
691
692
693# alias for generating the COM Wrappers file.
694testwrappers:: $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h
695
696
697#
698# Generate qrc file with branded icons.
699#
700VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
701VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
702$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
703 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
704 | $$(dir $$@)
705 $(call MSG_GENERATE,VirtualBox,$<,$@)
706 $(QUIET)$(SED) \
707 -e 's;@VBOX_ABOUT_PNG@;$(VBOX_BRAND_GUI_ABOUT_PNG);g' \
708 -e 's;@VBOX_ABOUT_16PX_PNG@;$(VBOX_BRAND_GUI_ABOUT_16PX_PNG);g' \
709 -e 's;@VBOX_VBOX_16PX_PNG@;$(VBOX_BRAND_GUI_VBOX_16PX_PNG);g' \
710 -e 's;@VBOX_VBOX_20PX_PNG@;$(VBOX_BRAND_GUI_VBOX_20PX_PNG);g' \
711 -e 's;@VBOX_VBOX_32PX_PNG@;$(VBOX_BRAND_GUI_VBOX_32PX_PNG);g' \
712 -e 's;@VBOX_VBOX_40PX_PNG@;$(VBOX_BRAND_GUI_VBOX_40PX_PNG);g' \
713 -e 's;@VBOX_VBOX_48PX_PNG@;$(VBOX_BRAND_GUI_VBOX_48PX_PNG);g' \
714 -e 's;@VBOX_VBOX_64PX_PNG@;$(VBOX_BRAND_GUI_VBOX_64PX_PNG);g' \
715 -e 's;@VBOX_CUBE_42PX_PNG@;$(VBOX_BRAND_GUI_CUBE_42PX_PNG);g' \
716 --output $@ \
717 $<
718
719
720#
721# Precompiled header - non-functional atm.
722#
723ifdef VBOX_WITH_PRECOMPILED_HEADERS
724VirtualBox_INCS <= $(VirtualBox_0_OUTDIR)/include
725VirtualBox_DEFS += VBOX_WITH_PRECOMPILED_HEADERS
726VirtualBox_CXXFLAGS += -Winvalid-pch -fpch-preprocess
727VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
728
729tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
730
731$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
732 $(PATH_SUB_CURRENT)/src/precomp.h \
733 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
734 $$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
735 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
736 | $$(dir $$@)
737 time 'g++-4.0' \
738 '-c' \
739 '-g' \
740 $(if-expr "$(KBUILD_TYPE)" == "debug", , -O2 ) \
741 '-pipe' \
742 '-Wall' \
743 '-Wextra' \
744 '-Wno-missing-field-initializers' \
745 '-Wno-trigraphs' \
746 '-frtti' \
747 '-fno-exceptions' \
748 '-Wno-non-virtual-dtor' \
749 '-Wno-long-long' \
750 \
751 '-fshort-wchar' \
752 '-fno-strict-aliasing' \
753 '-fvisibility=hidden' \
754 '-DVBOX_HAVE_VISIBILITY_HIDDEN' \
755 '-DRT_USE_VISIBILITY_DEFAULT' \
756 '-fvisibility-inlines-hidden' \
757 '-Winvalid-pch' \
758 '-fpch-preprocess' \
759 \
760 '-F$(PATH_SDK_QT4)/Frameworks' \
761 '-mmacosx-version-min=10.5' \
762 '-isysroot' \
763 '/Developer/SDKs/MacOSX10.5.sdk' \
764 '-m32' \
765 \
766 $(foreach inc,$(VirtualBox_INCS),\$(NL)$(TAB)-I$(inc)) \
767 '-I$(PATH_ROOT)/include' \
768 '-I$(PATH_OUT)' \
769 '-DVBOX' \
770 '-DVBOX_WITH_DEBUGGER' \
771 '-DVBOX_WITH_64_BITS_GUESTS' \
772 $(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
773 '-DRT_OS_DARWIN' \
774 '-D__DARWIN__' \
775 '-DRT_ARCH_X86' \
776 '-D__X86__' \
777 '-DIN_RING3' \
778 '-DQT_NO_DEBUG' \
779 '-DQT_THREAD_SUPPORT' \
780 '-DQT_SHARED' \
781 '-DHAVE_CONFIG_H' \
782 '-DHC_ARCH_BITS=32' \
783 '-DGC_ARCH_BITS=64' \
784 '-DVBOX_WITH_XPCOM' \
785 '-DVBOX_WITH_UPDATE_REQUEST' \
786 '-DVBOX_WITH_ALSA' \
787 '-DVBOX_WITH_PULSE' \
788 '-DVBOX_WITH_E1000' \
789 '-DVBOX_WITH_NETFLT' \
790 '-DVBOX_WITH_DEBUGGER_GUI' \
791 $(if-expr "$(KBUILD_TYPE)" != "release", '-DVBOX_WITH_DEBUGGER_GUI_MENU', ) \
792 '-DVBOX_WITH_VIDEOHWACCEL' \
793 '-DVBOX_GUI_USE_QGL' \
794 '-DVBOX_WITH_VIRTIO' \
795 '-DVBOX_WITH_PRECOMPILED_HEADERS' \
796 '-DVBOX_DARWIN_USE_NATIVE_CONTROLS' \
797 '-DQT_CORE_LIB' \
798 '-DQT_GUI_LIB' \
799 '-DQT_NETWORK_LIB' \
800 '-DQT_OPENGL_LIB' \
801 '-DMAC_OS_X_VERSION_MIN_REQUIRED=1050' \
802 '-DMAC_OS_X_VERSION_MAX_ALLOWED=1050' \
803 '-DVBOX_GUI_USE_QUARTZ2D' \
804 '-DVBOX_GUI_USE_QIMAGE' \
805 '-o' $@ $<
806endif
807
808ifeq ($(KBUILD_TARGET),win)
809#
810# On Windows we'll have to generate/edit part of the resource file.
811# The IDI_ICON1 name is Qt specific.
812#
813src/platform/win/VirtualBox.rc_INCS = $(VirtualBox_0_OUTDIR)
814src/platform/win/VirtualBox.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
815src/platform/win/VirtualBox.rc_CLEAN = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
816
817$$(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
818 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
819
820endif # win
821
822
823ifeq ($(KBUILD_TARGET),darwin)
824#
825# Create directories for each approved language or the application
826# menu won't be translated.
827#
828INSTALLS += VirtualBox.lproj
829VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
830VirtualBox.lproj_MODE = 755
831VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
832
833#
834# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
835# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
836#
837INSTALLS += VirtualBox.app
838VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
839VirtualBox.app_MODE = 644
840VirtualBox.app_SOURCES = \
841 src/platform/darwin/PkgInfo \
842 $(VirtualBox.app_0_OUTDIR)/Info.plist \
843 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
844 $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
845 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
846 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
847 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
848 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
849 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
850 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vmdk.icns=>Resources/virtualbox-vmdk.icns \
851 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vhd.icns=>Resources/virtualbox-vhd.icns \
852 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-hdd.icns=>Resources/virtualbox-hdd.icns
853
854$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
855 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
856 $(QUIET)$(RM) -f $@
857 $(QUIET)$(SED) \
858 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
859 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
860 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
861 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
862 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
863 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
864 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
865 $< > $@
866
867INSTALLS += VirtualBoxVM.app
868VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
869VirtualBoxVM.app_MODE = 644
870VirtualBoxVM.app_SOURCES = \
871 src/platform/darwin/VM-PkgInfo=>PkgInfo \
872 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist
873VirtualBoxVM.app_SYMLINKS = \
874 MacOS=>../../../MacOS/ \
875 Resources=>../../../Resources/
876
877$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
878 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
879 $(QUIET)$(RM) -f $@
880 $(QUIET)$(SED) \
881 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
882 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
883 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
884 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
885 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
886 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
887 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
888 --output $@ $<
889
890PROGRAMS += vmstarter
891vmstarter_TEMPLATE = VBOXR3EXE
892vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
893vmstarter_LDFLAGS += -framework AppKit
894vmstarter_INST = $(INST_BIN)vmstarter
895
896INSTALLS += vmstarter.app
897vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
898vmstarter.app_MODE = 644
899vmstarter.app_SOURCES = \
900 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
901 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist
902vmstarter.app_SYMLINKS = \
903 MacOS=>../../../MacOS \
904 Resources=>../../../Resources
905
906$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
907 $(call MSG_GENERATE,vmstarter.app,$<,$@)
908 $(QUIET)$(RM) -f $@
909 $(QUIET)$(SED) \
910 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
911 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
912 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
913 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
914 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
915 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
916 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
917 --output $@ $<
918endif # darwin
919
920#
921# App for testing GL support
922#
923if defined(VBOX_WITH_VIDEOHWACCEL)
924 if1of ($(KBUILD_TARGET), win linux freebsd)
925 LIBRARIES += VBoxOGL2D
926 VBoxOGL2D_TEMPLATE = VBOXR3STATIC
927 VBoxOGL2D_USES = qt4
928 VBoxOGL2D_SDKS = QT4
929 VBoxOGL2D_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS) VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
930 VBoxOGL2D_QT_MODULES += OpenGL
931 VBoxOGL2D_SOURCES = \
932 src/VBoxGLSupportInfo.cpp
933 VBoxOGL2D_INCS = include
934 endif
935endif
936
937#
938# Testcase for the darwin keyboard routines.
939#
940ifdef VBOX_WITH_TESTCASES
941PROGRAMS.darwin += tstDarwinKeyboard
942tstDarwinKeyboard_NAME = tstDarwinKeyboard
943tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
944tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
945tstDarwinKeyboard_INCS = include
946tstDarwinKeyboard_SOURCES = \
947 src/platform/darwin/tstDarwinKeyboard.cpp \
948 src/platform/darwin/DarwinKeyboard.cpp
949tstDarwinKeyboard_SOURCES.amd64 = \
950 src/platform/darwin/CocoaEventHelper.mm
951tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
952tstDarwinKeyboard_LIBS = \
953 $(LIB_RUNTIME)
954endif
955
956
957# Unset everything that was loaded from VBoxUI.pro.
958TEMPLATE := $(SAVED_TEMPLATE)
959SAVED_TEMPLATE :=
960LANGUAGE :=
961FORMS :=
962TRANSLATIONS :=
963IMAGES :=
964
965
966# Commit the magic.
967# (note: before custom rules that make usage of generated variables!).
968include $(KBUILD_PATH)/subfooter.kmk
969
970#
971# Update all known NLS translation (.ts) files in the nls/ subdirectory.
972#
973# NOTE: This target is intended to be run only by the GUI maintainer shortly
974# before a new product release. VirtualBox_xx_YY.ts is a template for new
975# languages and should never be actually translated or installed.
976#
977# Use the checknls target for checking again common mistakes done by the
978# translators.
979#
980# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
981# lupdate call
982#
983#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
984checknls::
985 # Check for missing :/ in image paths
986 grep -i "src=[^:%]" $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))
987
988updatenls:: makeallnls nls/VirtualBox_en.ts
989
990makeallnls:: \
991 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
992 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
993 $(call MSG_L1,lupdate all languages (nls/*.ts))
994 $(QUIET)$(TOOL_QT4_LUPDATE) \
995 $^ \
996 -ts \
997 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
998 nls/VirtualBox_xx_YY.ts
999
1000# Create the English translation file. This is something special cause it will
1001# contain the plural forms only.
1002nls/VirtualBox_en.ts: \
1003 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1004 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1005 $(call MSG_L1,lupdate $@)
1006 $(QUIET)$(TOOL_QT4_LUPDATE) \
1007 $^ \
1008 -ts \
1009 $@
1010 $(QUIET)$(SED) -n -i -e \
1011 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
1012 $@
1013
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