VirtualBox

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

Last change on this file since 42206 was 41819, checked in by vboxsync, 13 years ago

FE/Qt: UIConverter template interface supporting various required conversions between different GUI and COM types.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 38.4 KB
Line 
1# $Id: Makefile.kmk 41819 2012-06-18 17:59:30Z 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/converter \
148 ./src/extensions \
149 ./src/globals \
150 ./src/net \
151 ./src/medium \
152 ./src/platform \
153 ./src/platform/darwin \
154 ./src/platform/win \
155 ./src/platform/x11 \
156 ./src/runtime \
157 ./src/runtime/fullscreen \
158 ./src/runtime/normal \
159 ./src/runtime/scale \
160 ./src/runtime/seamless \
161 ./src/selector \
162 ./src/settings \
163 ./src/settings/global \
164 ./src/settings/machine \
165 ./src/widgets \
166 ./src/wizards \
167 ./src/wizards/newvm \
168 ./src/wizards/newvd \
169 ./src/wizards/clonevm \
170 ./src/wizards/clonevd \
171 ./src/wizards/exportappliance \
172 ./src/wizards/importappliance \
173 ./src/wizards/firstrun
174
175VirtualBox_INCS = \
176 $(VBOX_GUI_INC_DIRS) \
177 $(VirtualBox_0_OUTDIR)/include
178
179# Necessary for the hdd backend enumeration
180VirtualBox_LIBS = $(LIB_DDU)
181
182# This library is required for multi-monitor support
183VirtualBox_LIBS.linux += Xinerama
184VirtualBox_LIBS.solaris += Xinerama
185VirtualBox_LIBS.freebsd += Xinerama
186
187ifneq ($(KBUILD_TARGET),win)
188VirtualBox_CXXFLAGS += -Wno-switch
189endif
190
191ifdef VBOX_WITH_VIDEOHWACCEL
192# Necessary for save state support
193VirtualBox_LIBS += $(LIB_VMM)
194endif
195ifeq ($(KBUILD_TYPE),release)
196 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
197else
198 VirtualBox_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
199 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
200endif
201
202# delay loading causes VM process crashes due to the misbehave of the current QtOpenGLVBox4.dll we use
203# (i.e. it does not create the ogl context properly when loaded this way)
204#
205# @todo: investigate a better work-around and enable back delay loading since it is needed to avoid
206# crashes caused by buggy ogl drivers for the case 2D is not used (i.e. no ogl stuff loaded)
207#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
208# VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
209#endif
210
211VirtualBox_LDFLAGS.darwin = \
212 -framework AppKit -framework Carbon \
213 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
214ifdef VBOX_WITH_ICHAT_THEATER
215 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
216endif
217
218VirtualBox_LIBS.win = \
219 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
220 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
221 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
222if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
223 VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
224endif
225
226if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
227 VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
228 VirtualBox_LIBS.solaris += GL
229 VirtualBox_LIBS.linux += GL
230 VirtualBox_LIBS.freebsd += GL
231 VirtualBox_LDFLAGS.darwin += -framework OpenGL
232endif
233ifdef VBOX_WITH_CROGL
234 VirtualBox_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
235endif
236
237
238# Headers containing definitions of classes that use the Q_OBJECT macro.
239VirtualBox_QT_MOCHDRS = \
240 src/UIMediumTypeChangeDialog.h \
241 src/VBoxAboutDlg.h \
242 src/VBoxGlobalSettings.h \
243 src/VBoxLicenseViewer.h \
244 src/VBoxSnapshotDetailsDlg.h \
245 src/VBoxTakeSnapshotDlg.h \
246 src/VBoxVMInformationDlg.h \
247 src/UIVMLogViewer.h \
248 src/extensions/QIAdvancedSlider.h \
249 src/extensions/QIArrowButtonPress.h \
250 src/extensions/QIArrowButtonSwitch.h \
251 src/extensions/QIArrowSplitter.h \
252 src/extensions/QIDialog.h \
253 src/extensions/QIFileDialog.h \
254 src/extensions/QILabel.h \
255 src/extensions/QILabelSeparator.h \
256 src/extensions/QIListView.h \
257 src/extensions/QIMainDialog.h \
258 src/extensions/QIMessageBox.h \
259 src/extensions/QIProcess.h \
260 src/extensions/QIRichTextLabel.h \
261 src/extensions/QIRichToolButton.h \
262 src/extensions/QISplitter.h \
263 src/extensions/QIStateIndicator.h \
264 src/extensions/QIStatusBar.h \
265 src/extensions/QITabWidget.h \
266 src/extensions/QITableView.h \
267 src/extensions/QIToolButton.h \
268 src/extensions/QITextEdit.h \
269 src/extensions/QITreeView.h \
270 src/extensions/QITreeWidget.h \
271 src/extensions/QIWidgetValidator.h \
272 src/globals/UIActionPool.h \
273 src/globals/UIExtraDataEventHandler.h \
274 src/globals/UIMainEventListener.h \
275 src/globals/UIMessageCenter.h \
276 src/globals/VBoxGlobal.h \
277 src/globals/VBoxUtils.h \
278 src/net/UINetworkManager.h \
279 src/net/UINetworkManagerDialog.h \
280 src/net/UINetworkManagerIndicator.h \
281 src/net/UINetworkRequest.h \
282 src/net/UINetworkRequestWidget.h \
283 src/net/UINetworkCustomer.h \
284 src/net/UIUpdateManager.h \
285 src/net/UIDownloader.h \
286 src/net/UIDownloaderAdditions.h \
287 src/net/UIDownloaderExtensionPack.h \
288 src/net/UIDownloaderUserManual.h \
289 src/medium/UIMediumManager.h \
290 src/runtime/UIActionPoolRuntime.h \
291 src/runtime/UIConsoleEventHandler.h \
292 src/runtime/UIIndicatorsPool.h \
293 src/runtime/UIKeyboardHandler.h \
294 src/runtime/UIMachine.h \
295 src/runtime/UIMachineLogic.h \
296 src/runtime/UIMachineWindow.h \
297 src/runtime/UIMachineView.h \
298 src/runtime/UIMouseHandler.h \
299 src/runtime/UIMultiScreenLayout.h \
300 src/runtime/UISession.h \
301 src/runtime/UIVMCloseDialog.h \
302 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h \
303 src/runtime/fullscreen/UIMachineLogicFullscreen.h \
304 src/runtime/fullscreen/UIMachineViewFullscreen.h \
305 src/runtime/fullscreen/UIMachineWindowFullscreen.h \
306 src/runtime/normal/UIKeyboardHandlerNormal.h \
307 src/runtime/normal/UIMachineLogicNormal.h \
308 src/runtime/normal/UIMachineViewNormal.h \
309 src/runtime/normal/UIMachineWindowNormal.h \
310 src/runtime/scale/UIKeyboardHandlerScale.h \
311 src/runtime/scale/UIMachineLogicScale.h \
312 src/runtime/scale/UIMachineViewScale.h \
313 src/runtime/scale/UIMachineWindowScale.h \
314 src/runtime/seamless/UIKeyboardHandlerSeamless.h \
315 src/runtime/seamless/UIMachineLogicSeamless.h \
316 src/runtime/seamless/UIMachineViewSeamless.h \
317 src/runtime/seamless/UIMachineWindowSeamless.h \
318 src/selector/UIActionPoolSelector.h \
319 src/selector/UIVMDesktop.h \
320 src/selector/UIVMItem.h \
321 src/selector/UIVMListView.h \
322 src/selector/UIVMPreviewWindow.h \
323 src/selector/UIVirtualBoxEventHandler.h \
324 src/selector/UISelectorWindow.h \
325 src/selector/VBoxSnapshotsWgt.h \
326 src/settings/UISettingsDialog.h \
327 src/settings/UISettingsDialogSpecific.h \
328 src/settings/UISettingsPage.h \
329 src/settings/VBoxSettingsSelector.h \
330 src/settings/global/UIGlobalSettingsExtension.h \
331 src/settings/global/UIGlobalSettingsGeneral.h \
332 src/settings/global/UIGlobalSettingsInput.h \
333 src/settings/global/UIGlobalSettingsLanguage.h \
334 src/settings/global/UIGlobalSettingsDisplay.h \
335 src/settings/global/UIGlobalSettingsNetwork.h \
336 src/settings/global/UIGlobalSettingsNetworkDetails.h \
337 src/settings/global/UIGlobalSettingsProxy.h \
338 src/settings/global/UIGlobalSettingsUpdate.h \
339 src/settings/machine/UIMachineSettingsAudio.h \
340 src/settings/machine/UIMachineSettingsDisplay.h \
341 src/settings/machine/UIMachineSettingsGeneral.h \
342 src/settings/machine/UIMachineSettingsNetwork.h \
343 src/settings/machine/UIMachineSettingsParallel.h \
344 src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
345 src/settings/machine/UIMachineSettingsSF.h \
346 src/settings/machine/UIMachineSettingsSFDetails.h \
347 src/settings/machine/UIMachineSettingsSerial.h \
348 src/settings/machine/UIMachineSettingsStorage.h \
349 src/settings/machine/UIMachineSettingsSystem.h \
350 src/settings/machine/UIMachineSettingsUSB.h \
351 src/settings/machine/UIMachineSettingsUSBFilterDetails.h \
352 src/widgets/UIApplianceEditorWidget.h \
353 src/widgets/UIApplianceExportEditorWidget.h \
354 src/widgets/UIApplianceImportEditorWidget.h \
355 src/widgets/UIBar.h \
356 src/widgets/UIBootTable.h \
357 src/widgets/UIHotKeyEditor.h \
358 src/widgets/UILineTextEdit.h \
359 src/widgets/UIPopupBox.h \
360 src/widgets/UIProgressDialog.h \
361 src/widgets/UISpacerWidgets.h \
362 src/widgets/UISpecialControls.h \
363 src/widgets/VBoxFilePathSelectorWidget.h \
364 src/widgets/VBoxMediaComboBox.h \
365 src/widgets/VBoxMiniToolBar.h \
366 src/widgets/VBoxOSTypeSelectorButton.h \
367 src/widgets/UINameAndSystemEditor.h \
368 src/widgets/VBoxWarningPane.h \
369 src/wizards/UIWizard.h \
370 src/wizards/UIWizardPage.h \
371 src/wizards/newvm/UIWizardNewVM.h \
372 src/wizards/newvm/UIWizardNewVMPageBasic1.h \
373 src/wizards/newvm/UIWizardNewVMPageBasic2.h \
374 src/wizards/newvm/UIWizardNewVMPageBasic3.h \
375 src/wizards/newvm/UIWizardNewVMPageExpert.h \
376 src/wizards/newvd/UIWizardNewVD.h \
377 src/wizards/newvd/UIWizardNewVDPageBasic1.h \
378 src/wizards/newvd/UIWizardNewVDPageBasic2.h \
379 src/wizards/newvd/UIWizardNewVDPageBasic3.h \
380 src/wizards/newvd/UIWizardNewVDPageExpert.h \
381 src/wizards/clonevm/UIWizardCloneVM.h \
382 src/wizards/clonevm/UIWizardCloneVMPageBasic1.h \
383 src/wizards/clonevm/UIWizardCloneVMPageBasic2.h \
384 src/wizards/clonevm/UIWizardCloneVMPageBasic3.h \
385 src/wizards/clonevm/UIWizardCloneVMPageExpert.h \
386 src/wizards/clonevd/UIWizardCloneVD.h \
387 src/wizards/clonevd/UIWizardCloneVDPageBasic1.h \
388 src/wizards/clonevd/UIWizardCloneVDPageBasic2.h \
389 src/wizards/clonevd/UIWizardCloneVDPageBasic3.h \
390 src/wizards/clonevd/UIWizardCloneVDPageBasic4.h \
391 src/wizards/clonevd/UIWizardCloneVDPageExpert.h \
392 src/wizards/exportappliance/UIWizardExportApp.h \
393 src/wizards/exportappliance/UIWizardExportAppPageBasic1.h \
394 src/wizards/exportappliance/UIWizardExportAppPageBasic2.h \
395 src/wizards/exportappliance/UIWizardExportAppPageBasic3.h \
396 src/wizards/exportappliance/UIWizardExportAppPageBasic4.h \
397 src/wizards/exportappliance/UIWizardExportAppPageExpert.h \
398 src/wizards/importappliance/UIWizardImportApp.h \
399 src/wizards/importappliance/UIWizardImportAppPageBasic1.h \
400 src/wizards/importappliance/UIWizardImportAppPageBasic2.h \
401 src/wizards/importappliance/UIWizardImportAppPageExpert.h \
402 src/wizards/firstrun/UIWizardFirstRun.h \
403 src/wizards/firstrun/UIWizardFirstRunPageBasic.h
404
405VirtualBox_QT_MOCHDRS.darwin += \
406 src/platform/darwin/UIWindowMenuManager.h
407
408# Sources containing local definitions of classes that use the Q_OBJECT macro.
409VirtualBox_QT_MOCSRCS = \
410 src/UIVMLogViewer.cpp \
411 src/extensions/QISplitter.cpp \
412 src/globals/UIActionPool.cpp \
413 src/globals/UIExtraDataEventHandler.cpp \
414 src/medium/UIMediumManager.cpp \
415 src/net/UIUpdateManager.cpp \
416 src/runtime/UIActionPoolRuntime.cpp \
417 src/runtime/UIIndicatorsPool.cpp \
418 src/runtime/UIMachine.cpp \
419 src/runtime/UIMachineMenuBar.cpp \
420 src/selector/UIActionPoolSelector.cpp \
421 src/selector/UIVMDesktop.cpp \
422 src/settings/UISettingsDialogSpecific.cpp \
423 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
424 src/settings/machine/UIMachineSettingsStorage.cpp \
425 src/settings/machine/UIMachineSettingsUSB.cpp \
426 src/wizards/importappliance/UIWizardImportApp.cpp
427
428VirtualBox_QT_MOCSRCS.darwin += \
429 src/platform/darwin/UIWindowMenuManager.cpp
430VirtualBox_QT_MOCSRCS.win += \
431 src/extensions/QIFileDialog.cpp
432
433ifdef VBOX_WITH_XPCOM
434 VirtualBox_QT_MOCSRCS += \
435 src/globals/COMDefs.cpp
436endif
437
438VirtualBox_SOURCES = \
439 src/main.cpp \
440 src/UIMediumTypeChangeDialog.cpp \
441 src/VBoxAboutDlg.cpp \
442 src/VBoxGlobalSettings.cpp \
443 src/VBoxLicenseViewer.cpp \
444 src/VBoxSnapshotDetailsDlg.cpp \
445 src/VBoxTakeSnapshotDlg.cpp \
446 src/VBoxVMInformationDlg.cpp \
447 src/UIVMLogViewer.cpp \
448 src/converter/UIConverter.cpp \
449 src/converter/UIConverterBackendCOM.cpp \
450 src/converter/UIConverterBackendGlobal.cpp \
451 src/extensions/QIAdvancedSlider.cpp \
452 src/extensions/QIArrowButtonPress.cpp \
453 src/extensions/QIArrowButtonSwitch.cpp \
454 src/extensions/QIArrowSplitter.cpp \
455 src/extensions/QIDialog.cpp \
456 src/extensions/QIDialogButtonBox.cpp \
457 src/extensions/QIFileDialog.cpp \
458 src/extensions/QILabel.cpp \
459 src/extensions/QILabelSeparator.cpp \
460 src/extensions/QILineEdit.cpp \
461 src/extensions/QIListView.cpp \
462 src/extensions/QIMainDialog.cpp \
463 src/extensions/QIMessageBox.cpp \
464 src/extensions/QIProcess.cpp \
465 src/extensions/QIRichTextLabel.cpp \
466 src/extensions/QIRichToolButton.cpp \
467 src/extensions/QISplitter.cpp \
468 src/extensions/QIStateIndicator.cpp \
469 src/extensions/QIStatusBar.cpp \
470 src/extensions/QITableView.cpp \
471 src/extensions/QITextEdit.cpp \
472 src/extensions/QITreeView.cpp \
473 src/extensions/QITreeWidget.cpp \
474 src/extensions/QIWidgetValidator.cpp \
475 src/globals/UIDefs.cpp \
476 src/globals/COMDefs.cpp \
477 src/globals/UIActionPool.cpp \
478 src/globals/UIExtraDataEventHandler.cpp \
479 src/globals/UIIconPool.cpp \
480 src/globals/UIImageTools.cpp \
481 src/globals/UIMainEventListener.cpp \
482 src/globals/UIMessageCenter.cpp \
483 src/globals/VBoxGlobal.cpp \
484 src/medium/UIMediumDefs.cpp \
485 src/medium/UIMedium.cpp \
486 src/medium/UIMediumManager.cpp \
487 src/net/UINetworkManager.cpp \
488 src/net/UINetworkManagerDialog.cpp \
489 src/net/UINetworkManagerIndicator.cpp \
490 src/net/UINetworkRequest.cpp \
491 src/net/UINetworkRequestWidget.cpp \
492 src/net/UINetworkCustomer.cpp \
493 src/net/UIDownloader.cpp \
494 src/net/UIDownloaderAdditions.cpp \
495 src/net/UIDownloaderExtensionPack.cpp \
496 src/net/UIDownloaderUserManual.cpp \
497 src/net/UIUpdateDefs.cpp \
498 src/net/UIUpdateManager.cpp \
499 src/runtime/UIActionPoolRuntime.cpp \
500 src/runtime/UIConsoleEventHandler.cpp \
501 src/runtime/UIFrameBuffer.cpp \
502 src/runtime/UIFrameBufferQGL.cpp \
503 src/runtime/UIFrameBufferQImage.cpp \
504 src/runtime/UIFrameBufferSDL.cpp \
505 src/runtime/UIIndicatorsPool.cpp \
506 src/runtime/UIKeyboardHandler.cpp \
507 src/runtime/UIMachine.cpp \
508 src/runtime/UIMachineLogic.cpp \
509 src/runtime/UIMachineMenuBar.cpp \
510 src/runtime/UIMachineShortcuts.cpp \
511 src/runtime/UIMachineView.cpp \
512 src/runtime/UIMachineWindow.cpp \
513 src/runtime/UIMouseHandler.cpp \
514 src/runtime/UIMultiScreenLayout.cpp \
515 src/runtime/UISession.cpp \
516 src/runtime/UIVMCloseDialog.cpp \
517 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp \
518 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
519 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \
520 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
521 src/runtime/normal/UIKeyboardHandlerNormal.cpp \
522 src/runtime/normal/UIMachineLogicNormal.cpp \
523 src/runtime/normal/UIMachineViewNormal.cpp \
524 src/runtime/normal/UIMachineWindowNormal.cpp \
525 src/runtime/scale/UIKeyboardHandlerScale.cpp \
526 src/runtime/scale/UIMachineLogicScale.cpp \
527 src/runtime/scale/UIMachineViewScale.cpp \
528 src/runtime/scale/UIMachineWindowScale.cpp \
529 src/runtime/seamless/UIKeyboardHandlerSeamless.cpp \
530 src/runtime/seamless/UIMachineLogicSeamless.cpp \
531 src/runtime/seamless/UIMachineViewSeamless.cpp \
532 src/runtime/seamless/UIMachineWindowSeamless.cpp \
533 src/selector/UIActionPoolSelector.cpp \
534 src/selector/UISelectorShortcuts.cpp \
535 src/selector/UIVMDesktop.cpp \
536 src/selector/UIVMItem.cpp \
537 src/selector/UIVMListView.cpp \
538 src/selector/UIVMPreviewWindow.cpp \
539 src/selector/UIVirtualBoxEventHandler.cpp \
540 src/selector/UISelectorWindow.cpp \
541 src/selector/VBoxSnapshotsWgt.cpp \
542 src/settings/UISettingsDefs.cpp \
543 src/settings/UISettingsDialog.cpp \
544 src/settings/UISettingsDialogSpecific.cpp \
545 src/settings/UISettingsPage.cpp \
546 src/settings/VBoxSettingsSelector.cpp \
547 src/settings/global/UIGlobalSettingsExtension.cpp \
548 src/settings/global/UIGlobalSettingsGeneral.cpp \
549 src/settings/global/UIGlobalSettingsInput.cpp \
550 src/settings/global/UIGlobalSettingsLanguage.cpp \
551 src/settings/global/UIGlobalSettingsDisplay.cpp \
552 src/settings/global/UIGlobalSettingsNetwork.cpp \
553 src/settings/global/UIGlobalSettingsNetworkDetails.cpp \
554 src/settings/global/UIGlobalSettingsProxy.cpp \
555 src/settings/global/UIGlobalSettingsUpdate.cpp \
556 src/settings/machine/UIMachineSettingsAudio.cpp \
557 src/settings/machine/UIMachineSettingsDisplay.cpp \
558 src/settings/machine/UIMachineSettingsGeneral.cpp \
559 src/settings/machine/UIMachineSettingsNetwork.cpp \
560 src/settings/machine/UIMachineSettingsParallel.cpp \
561 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
562 src/settings/machine/UIMachineSettingsSF.cpp \
563 src/settings/machine/UIMachineSettingsSFDetails.cpp \
564 src/settings/machine/UIMachineSettingsSerial.cpp \
565 src/settings/machine/UIMachineSettingsStorage.cpp \
566 src/settings/machine/UIMachineSettingsSystem.cpp \
567 src/settings/machine/UIMachineSettingsUSB.cpp \
568 src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp \
569 src/widgets/UIApplianceEditorWidget.cpp \
570 src/widgets/UIApplianceExportEditorWidget.cpp \
571 src/widgets/UIApplianceImportEditorWidget.cpp \
572 src/widgets/UIBar.cpp \
573 src/widgets/UIBootTable.cpp \
574 src/widgets/UIHotKeyEditor.cpp \
575 src/widgets/UILineTextEdit.cpp \
576 src/widgets/UIPopupBox.cpp \
577 src/widgets/UIProgressDialog.cpp \
578 src/widgets/UISpecialControls.cpp \
579 src/widgets/UIToolBar.cpp \
580 src/widgets/VBoxFilePathSelectorWidget.cpp \
581 src/widgets/VBoxGuestRAMSlider.cpp \
582 src/widgets/VBoxMediaComboBox.cpp \
583 src/widgets/VBoxMiniToolBar.cpp \
584 src/widgets/VBoxOSTypeSelectorButton.cpp \
585 src/widgets/UINameAndSystemEditor.cpp \
586 src/widgets/VBoxWarningPane.cpp \
587 src/wizards/UIWizard.cpp \
588 src/wizards/UIWizardPage.cpp \
589 src/wizards/newvm/UIWizardNewVM.cpp \
590 src/wizards/newvm/UIWizardNewVMPageBasic1.cpp \
591 src/wizards/newvm/UIWizardNewVMPageBasic2.cpp \
592 src/wizards/newvm/UIWizardNewVMPageBasic3.cpp \
593 src/wizards/newvm/UIWizardNewVMPageExpert.cpp \
594 src/wizards/newvd/UIWizardNewVD.cpp \
595 src/wizards/newvd/UIWizardNewVDPageBasic1.cpp \
596 src/wizards/newvd/UIWizardNewVDPageBasic2.cpp \
597 src/wizards/newvd/UIWizardNewVDPageBasic3.cpp \
598 src/wizards/newvd/UIWizardNewVDPageExpert.cpp \
599 src/wizards/clonevm/UIWizardCloneVM.cpp \
600 src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp \
601 src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp \
602 src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp \
603 src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp \
604 src/wizards/clonevd/UIWizardCloneVD.cpp \
605 src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp \
606 src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp \
607 src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp \
608 src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp \
609 src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp \
610 src/wizards/exportappliance/UIWizardExportApp.cpp \
611 src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp \
612 src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp \
613 src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp \
614 src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp \
615 src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp \
616 src/wizards/importappliance/UIWizardImportApp.cpp \
617 src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp \
618 src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp \
619 src/wizards/importappliance/UIWizardImportAppPageExpert.cpp \
620 src/wizards/firstrun/UIWizardFirstRun.cpp \
621 src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
622
623VirtualBox_SOURCES.win += \
624 src/runtime/UIFrameBufferDirectDraw.cpp
625VirtualBox_SOURCES.darwin += \
626 src/platform/darwin/UIAbstractDockIconPreview.cpp \
627 src/platform/darwin/UICocoaDockIconPreview.mm \
628 src/platform/darwin/UIWindowMenuManager.cpp \
629 src/runtime/UIFrameBufferQuartz2D.cpp
630
631if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
632 VirtualBox_SOURCES += \
633 src/platform/x11/UIDesktopServices_x11.cpp \
634 src/platform/x11/VBoxX11Helper.cpp \
635 src/platform/x11/XKeyboard-new.cpp
636endif
637
638VirtualBox_SOURCES.win += \
639 src/platform/win/VirtualBox.rc \
640 src/platform/win/UIDesktopServices_win.cpp \
641 src/platform/win/VBoxUtils-win.cpp
642
643VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
644VirtualBox_SOURCES.darwin += \
645 src/platform/darwin/CocoaEventHelper.mm \
646 src/platform/darwin/DarwinKeyboard.cpp \
647 src/platform/darwin/UICocoaApplication.mm \
648 src/platform/darwin/UICocoaSpecialControls.mm \
649 src/platform/darwin/UIDesktopServices_darwin.cpp \
650 src/platform/darwin/UIDesktopServices_darwin_cocoa.mm \
651 src/platform/darwin/VBoxUtils-darwin-cocoa.mm \
652 src/platform/darwin/VBoxUtils-darwin.cpp
653VirtualBox_QT_MOCHDRS.darwin += \
654 src/platform/darwin/UICocoaSpecialControls.h
655
656ifdef VBOX_WITH_ICHAT_THEATER
657 VirtualBox_SOURCES.darwin += \
658 src/platform/darwin/VBoxIChatTheaterWrapper.m
659endif
660
661ifdef VBOX_GUI_WITH_SYSTRAY
662 VirtualBox_DEFS += VBOX_GUI_WITH_SYSTRAY
663 VirtualBox_QT_MOCHDRS += \
664 src/selector/VBoxTrayIcon.h
665 VirtualBox_SOURCES += \
666 src/selector/VBoxTrayIcon.cpp
667endif
668
669if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
670 VirtualBox_SOURCES += \
671 src/VBoxFBOverlay.cpp \
672 src/VBoxFBQGL.cpp \
673 src/VBoxGLSupportInfo.cpp
674endif
675
676ifdef VBOX_WITH_DRAG_AND_DROP
677 VirtualBox_SOURCES += \
678 src/runtime/UIDnDHandler.cpp
679 VirtualBox_QT_MOCSRCS += \
680 src/runtime/UIDnDHandler.cpp
681endif
682
683# The Qt modules we're using.
684# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
685VirtualBox_QT_MODULES = Core Gui Network
686if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
687 VirtualBox_QT_MODULES += OpenGL
688endif
689
690# Pull in the ui files
691$(eval VirtualBox_SOURCES += $(FORMS))
692
693# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
694VirtualBox_SOURCES += VirtualBox1.qrc
695VirtualBox1.qrc_RCCFLAGS = -name BASIC1
696VirtualBox_SOURCES += VirtualBox2.qrc
697VirtualBox2.qrc_RCCFLAGS = -name BASIC2
698ifeq ($(KBUILD_TARGET),darwin)
699 VirtualBox_SOURCES += VirtualBoxMac.qrc
700 VirtualBoxMac.qrc_RCCFLAGS = -name MAC
701else
702 VirtualBox_SOURCES += VirtualBoxOther.qrc
703 VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
704endif
705VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
706$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
707if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
708 VirtualBox_SOURCES += VirtualBoxShaders.qrc
709 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
710endif
711
712# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
713VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
714 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
715# Compress the translation units.
716VirtualBox_LRCFLAGS = -silent
717# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
718VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
719
720
721## @todo how to detect what tool is used?
722## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
723# more generic -Wno-extra
724# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
725ifdef VBOX_WITH_XPCOM
726 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
727endif
728
729
730#
731# Generate the COM wrappers.
732#
733includedep $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
734VirtualBox_BLDDIRS += $(VirtualBox_0_OUTDIR)/include
735VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers
736VirtualBox_CLEAN += $(wildcard $(VirtualBox_0_OUTDIR)/include/*) $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
737VirtualBox_SOURCES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
738
739## @todo kmk doesn't remake optional outputs when they are missing...
740$$(VirtualBox_0_OUTDIR)/include/COMWrappers \
741+ $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep \
742+| $(if-expr defined(VirtualBox_VBOX_COMWRAPPERS) \
743, $(VirtualBox_VBOX_COMWRAPPERS) \
744, $$(VirtualBox_0_OUTDIR)/include/COMEnums.h \
745 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp \
746): \
747 $(VBOX_XIDL_FILE) \
748 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
749 $(VBOX_FILESPLIT) \
750 | $$(dir $$@)
751 $(call MSG_GENERATE,VirtualBox,$<,$@)
752 $(QUIET)$(RM) -f -- "$@" "$(PATH_TARGET)/VirtualBoxComWrapperFiles.dep"
753 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
754 $(QUIET)$(VBOX_FILESPLIT) $@ $(VirtualBox_0_OUTDIR)/include \
755 $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep VirtualBox_VBOX_COMWRAPPERS
756 $(APPEND) "$@"
757
758# alias for generating the COM Wrappers file.
759testwrappers:: $$(VirtualBox_0_OUTDIR)/include/COMWrappers
760
761
762#
763# Generate qrc file with branded icons.
764#
765VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
766VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
767$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
768 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
769 | $$(dir $$@)
770 $(call MSG_GENERATE,VirtualBox,$<,$@)
771 $(QUIET)$(SED) \
772 -e 's;@VBOX_ABOUT_PNG@;$(VBOX_BRAND_GUI_ABOUT_PNG);g' \
773 -e 's;@VBOX_ABOUT_16PX_PNG@;$(VBOX_BRAND_GUI_ABOUT_16PX_PNG);g' \
774 -e 's;@VBOX_VBOX_16PX_PNG@;$(VBOX_BRAND_GUI_VBOX_16PX_PNG);g' \
775 -e 's;@VBOX_VBOX_20PX_PNG@;$(VBOX_BRAND_GUI_VBOX_20PX_PNG);g' \
776 -e 's;@VBOX_VBOX_32PX_PNG@;$(VBOX_BRAND_GUI_VBOX_32PX_PNG);g' \
777 -e 's;@VBOX_VBOX_40PX_PNG@;$(VBOX_BRAND_GUI_VBOX_40PX_PNG);g' \
778 -e 's;@VBOX_VBOX_48PX_PNG@;$(VBOX_BRAND_GUI_VBOX_48PX_PNG);g' \
779 -e 's;@VBOX_VBOX_64PX_PNG@;$(VBOX_BRAND_GUI_VBOX_64PX_PNG);g' \
780 -e 's;@VBOX_CUBE_42PX_PNG@;$(VBOX_BRAND_GUI_CUBE_42PX_PNG);g' \
781 --output $@ \
782 $<
783
784
785#
786# Precompiled header - non-functional atm.
787#
788ifdef VBOX_WITH_PRECOMPILED_HEADERS
789VirtualBox_INCS <= $(VirtualBox_0_OUTDIR)/include
790VirtualBox_DEFS += VBOX_WITH_PRECOMPILED_HEADERS
791VirtualBox_CXXFLAGS += -Winvalid-pch -fpch-preprocess
792VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
793
794tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
795
796$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
797 $(PATH_SUB_CURRENT)/src/precomp.h \
798 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
799 $$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
800 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
801 | $$(dir $$@)
802 time 'g++-4.0' \
803 '-c' \
804 '-g' \
805 $(if-expr "$(KBUILD_TYPE)" == "debug", , -O2 ) \
806 '-pipe' \
807 '-Wall' \
808 '-Wextra' \
809 '-Wno-missing-field-initializers' \
810 '-Wno-trigraphs' \
811 '-frtti' \
812 '-fno-exceptions' \
813 '-Wno-non-virtual-dtor' \
814 '-Wno-long-long' \
815 \
816 '-fshort-wchar' \
817 '-fno-strict-aliasing' \
818 '-fvisibility=hidden' \
819 '-DVBOX_HAVE_VISIBILITY_HIDDEN' \
820 '-DRT_USE_VISIBILITY_DEFAULT' \
821 '-fvisibility-inlines-hidden' \
822 '-Winvalid-pch' \
823 '-fpch-preprocess' \
824 \
825 '-F$(PATH_SDK_QT4)/Frameworks' \
826 '-mmacosx-version-min=10.5' \
827 '-isysroot' \
828 '/Developer/SDKs/MacOSX10.5.sdk' \
829 '-m32' \
830 \
831 $(foreach inc,$(VirtualBox_INCS),\$(NL)$(TAB)-I$(inc)) \
832 '-I$(PATH_ROOT)/include' \
833 '-I$(PATH_OUT)' \
834 '-DVBOX' \
835 '-DVBOX_WITH_DEBUGGER' \
836 '-DVBOX_WITH_64_BITS_GUESTS' \
837 $(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
838 '-DRT_OS_DARWIN' \
839 '-D__DARWIN__' \
840 '-DRT_ARCH_X86' \
841 '-D__X86__' \
842 '-DIN_RING3' \
843 '-DQT_NO_DEBUG' \
844 '-DQT_THREAD_SUPPORT' \
845 '-DQT_SHARED' \
846 '-DHAVE_CONFIG_H' \
847 '-DHC_ARCH_BITS=32' \
848 '-DGC_ARCH_BITS=64' \
849 '-DVBOX_WITH_XPCOM' \
850 '-DVBOX_WITH_UPDATE_REQUEST' \
851 '-DVBOX_WITH_ALSA' \
852 '-DVBOX_WITH_PULSE' \
853 '-DVBOX_WITH_E1000' \
854 '-DVBOX_WITH_NETFLT' \
855 '-DVBOX_WITH_DEBUGGER_GUI' \
856 $(if-expr "$(KBUILD_TYPE)" != "release", '-DVBOX_WITH_DEBUGGER_GUI_MENU', ) \
857 '-DVBOX_WITH_VIDEOHWACCEL' \
858 '-DVBOX_GUI_USE_QGL' \
859 '-DVBOX_WITH_VIRTIO' \
860 '-DVBOX_WITH_PRECOMPILED_HEADERS' \
861 '-DVBOX_DARWIN_USE_NATIVE_CONTROLS' \
862 '-DQT_CORE_LIB' \
863 '-DQT_GUI_LIB' \
864 '-DQT_NETWORK_LIB' \
865 '-DQT_OPENGL_LIB' \
866 '-DMAC_OS_X_VERSION_MIN_REQUIRED=1050' \
867 '-DMAC_OS_X_VERSION_MAX_ALLOWED=1050' \
868 '-DVBOX_GUI_USE_QUARTZ2D' \
869 '-DVBOX_GUI_USE_QIMAGE' \
870 '-o' $@ $<
871endif
872
873ifeq ($(KBUILD_TARGET),win)
874#
875# On Windows we'll have to generate/edit part of the resource file.
876# The IDI_ICON1 name is Qt specific.
877#
878src/platform/win/VirtualBox.rc_INCS = $(VirtualBox_0_OUTDIR)
879src/platform/win/VirtualBox.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
880src/platform/win/VirtualBox.rc_CLEAN = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
881
882$$(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
883 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
884
885endif # win
886
887
888ifeq ($(KBUILD_TARGET),darwin)
889#
890# Create directories for each approved language or the application
891# menu won't be translated.
892#
893INSTALLS += VirtualBox.lproj
894VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
895VirtualBox.lproj_MODE = 755
896VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
897
898#
899# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
900# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
901#
902INSTALLS += VirtualBox.app
903VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
904VirtualBox.app_MODE = 644
905VirtualBox.app_SOURCES = \
906 src/platform/darwin/PkgInfo \
907 $(VirtualBox.app_0_OUTDIR)/Info.plist \
908 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
909 $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
910 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
911 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
912 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
913 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
914 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
915 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vmdk.icns=>Resources/virtualbox-vmdk.icns \
916 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vhd.icns=>Resources/virtualbox-vhd.icns \
917 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-hdd.icns=>Resources/virtualbox-hdd.icns
918
919$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
920 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
921 $(QUIET)$(RM) -f $@
922 $(QUIET)$(SED) \
923 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
924 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
925 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
926 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
927 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
928 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
929 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
930 $< > $@
931
932INSTALLS += VirtualBoxVM.app
933VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
934VirtualBoxVM.app_MODE = 644
935VirtualBoxVM.app_SOURCES = \
936 src/platform/darwin/VM-PkgInfo=>PkgInfo \
937 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist
938VirtualBoxVM.app_SYMLINKS = \
939 MacOS=>../../../MacOS/ \
940 Resources=>../../../Resources/
941
942$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
943 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
944 $(QUIET)$(RM) -f $@
945 $(QUIET)$(SED) \
946 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
947 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
948 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
949 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
950 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
951 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
952 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
953 --output $@ $<
954
955PROGRAMS += vmstarter
956vmstarter_TEMPLATE = VBOXR3EXE
957vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
958vmstarter_LDFLAGS += -framework AppKit
959vmstarter_INST = $(INST_BIN)vmstarter
960
961INSTALLS += vmstarter.app
962vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
963vmstarter.app_MODE = 644
964vmstarter.app_SOURCES = \
965 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
966 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist
967vmstarter.app_SYMLINKS = \
968 MacOS=>../../../MacOS \
969 Resources=>../../../Resources
970
971$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
972 $(call MSG_GENERATE,vmstarter.app,$<,$@)
973 $(QUIET)$(RM) -f $@
974 $(QUIET)$(SED) \
975 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
976 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
977 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
978 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
979 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
980 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
981 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
982 --output $@ $<
983endif # darwin
984
985#
986# App for testing GL support
987#
988if defined(VBOX_WITH_VIDEOHWACCEL)
989 if1of ($(KBUILD_TARGET), win linux freebsd)
990 LIBRARIES += VBoxOGL2D
991 VBoxOGL2D_TEMPLATE = VBOXR3STATIC
992 VBoxOGL2D_USES = qt4
993 VBoxOGL2D_SDKS = QT4
994 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
995 VBoxOGL2D_QT_MODULES += OpenGL
996 VBoxOGL2D_SOURCES = \
997 src/VBoxGLSupportInfo.cpp
998 VBoxOGL2D_INCS = include
999 endif
1000endif
1001
1002#
1003# Testcase for the darwin keyboard routines.
1004#
1005ifdef VBOX_WITH_TESTCASES
1006PROGRAMS.darwin += tstDarwinKeyboard
1007tstDarwinKeyboard_NAME = tstDarwinKeyboard
1008tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
1009tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
1010tstDarwinKeyboard_INCS = include
1011tstDarwinKeyboard_SOURCES = \
1012 src/platform/darwin/tstDarwinKeyboard.cpp \
1013 src/platform/darwin/DarwinKeyboard.cpp
1014tstDarwinKeyboard_SOURCES.amd64 = \
1015 src/platform/darwin/CocoaEventHelper.mm
1016tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
1017tstDarwinKeyboard_LIBS = \
1018 $(LIB_RUNTIME)
1019endif
1020
1021
1022# Unset everything that was loaded from VBoxUI.pro.
1023TEMPLATE := $(SAVED_TEMPLATE)
1024SAVED_TEMPLATE :=
1025LANGUAGE :=
1026FORMS :=
1027TRANSLATIONS :=
1028IMAGES :=
1029
1030
1031# Commit the magic.
1032# (note: before custom rules that make usage of generated variables!).
1033include $(FILE_KBUILD_SUB_FOOTER)
1034
1035#
1036# Update all known NLS translation (.ts) files in the nls/ subdirectory.
1037#
1038# NOTE: This target is intended to be run only by the GUI maintainer shortly
1039# before a new product release. VirtualBox_xx_YY.ts is a template for new
1040# languages and should never be actually translated or installed.
1041#
1042# Use the checknls target for checking again common mistakes done by the
1043# translators.
1044#
1045# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
1046# lupdate call
1047#
1048#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
1049checknls::
1050 # Check for missing :/ in image paths
1051 grep -i "src=[^:%]" $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))
1052
1053updatenls:: makeallnls nls/VirtualBox_en.ts
1054
1055makeallnls:: \
1056 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1057 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1058 $(call MSG_L1,lupdate all languages (nls/*.ts))
1059 $(QUIET)$(TOOL_QT4_LUPDATE) \
1060 $^ \
1061 -ts \
1062 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
1063 nls/VirtualBox_xx_YY.ts
1064
1065# Create the English translation file. This is something special cause it will
1066# contain the plural forms only.
1067nls/VirtualBox_en.ts: \
1068 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1069 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1070 $(call MSG_L1,lupdate $@)
1071 $(QUIET)$(TOOL_QT4_LUPDATE) \
1072 $^ \
1073 -ts \
1074 $@
1075 $(QUIET)$(SED) -n -i -e \
1076 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
1077 $@
1078
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