VirtualBox

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

Last change on this file since 52218 was 52130, checked in by vboxsync, 10 years ago

FE/Qt: 7462: Runtime UI: Menu-bar, menu cleanup/rework (part 03).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 44.5 KB
Line 
1# $Id: Makefile.kmk 52130 2014-07-22 15:52:00Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2014 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_SOURCES.win = src/platform/win/VirtualBoxHardened.rc
58VirtualBoxHardened_NAME = VirtualBox
59VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
60VirtualBoxHardened_LDFLAGS.win = /SUBSYSTEM:$(if-expr "$(KBUILD_TYPE)" != "release",console,windows)
61src/platform/win/VirtualBoxHardened.rc_INCS = $(VirtualBox_0_OUTDIR)
62src/platform/win/VirtualBoxHardened.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
63
64
65#
66# Include Qt project file, we'll use FORMS and TRANSLATIONS in
67# the VirtualBox setup below.
68#
69SAVED_TEMPLATE := $(TEMPLATE)
70include $(PATH_SUB_CURRENT)/VBoxUI.pro
71
72
73#
74# VirtualBox - The GUI program.
75#
76USES += qt4
77VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
78VirtualBox_NAME = VirtualBox
79ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
80 VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
81endif
82VirtualBox_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
83
84VirtualBox_DEFS =
85VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
86VirtualBox_DEFS.darwin = VBOX_WITH_TRANSLUCENT_SEAMLESS
87VirtualBox_DEFS.win = UNICODE QT_DLL
88ifdef VBOX_WITH_ICHAT_THEATER
89 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
90endif
91VirtualBox_DEFS += \
92 $(if $(VBOX_WITH_ADDITIONS_AUTOUPDATE_UI),VBOX_WITH_ADDITIONS_AUTOUPDATE_UI) \
93 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
94 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
95 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
96 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
97 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
98 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
99 $(if $(VBOX_WITH_VDE),VBOX_WITH_VDE) \
100 $(if $(VBOX_WITH_UDPTUNNEL),VBOX_WITH_UDPTUNNEL) \
101 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK) \
102 $(if $(VBOX_WITH_EHCI),VBOX_WITH_EHCI) \
103 $(if $(VBOX_WITH_HARDENING),VBOXR3_HARDENED_DLL) \
104 $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP) \
105 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH) \
106 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI) \
107 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
108 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM) \
109 $(if $(VBOX_WITH_CROGL),VBOX_WITH_CROGL) \
110 $(if $(VBOX_GUI_WITH_HIDPI),VBOX_GUI_WITH_HIDPI) \
111 $(if $(VBOX_GUI_WITH_PIDFILE),VBOX_GUI_WITH_PIDFILE) \
112 $(if $(VBOX_GUI_WITH_KEYS_RESET_HANDLER),VBOX_GUI_WITH_KEYS_RESET_HANDLER) \
113 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1)
114ifdef VBOX_WITH_DEBUGGER_GUI
115 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
116 if "$(KBUILD_TYPE)" != "release"
117 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
118 endif
119endif
120ifdef VBOX_WITH_VIDEOHWACCEL
121 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
122 VBOX_GUI_USE_QGL
123else ifdef VBOX_GUI_USE_QGL
124 VirtualBox_DEFS += VBOX_GUI_USE_QGL
125endif
126ifdef VBOX_WITH_LIBCURL
127 VirtualBox_DEFS += VBOX_GUI_WITH_NETWORK_MANAGER
128 VBOX_GUI_WITH_NETWORK_MANAGER := 1
129endif
130ifdef VBOX_BLEEDING_EDGE
131VirtualBox_src/selector/UISelectorWindow.cpp_DEFS += \
132 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
133VirtualBox_src/runtime/UIMachineWindow.cpp_DEFS += \
134 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
135VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
136 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
137VirtualBox_src/main.cpp_DEFS += \
138 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
139endif
140
141
142
143VBOX_GUI_INC_DIRS = \
144 ./src \
145 ./src/converter \
146 ./src/extensions \
147 ./src/extensions/graphics \
148 ./src/extradata \
149 ./src/globals \
150 ./src/medium \
151 ./src/platform \
152 ./src/platform/darwin \
153 ./src/platform/win \
154 ./src/platform/x11 \
155 ./src/runtime \
156 ./src/runtime/fullscreen \
157 ./src/runtime/normal \
158 ./src/runtime/scale \
159 ./src/runtime/seamless \
160 ./src/selector \
161 ./src/selector/graphics/chooser \
162 ./src/selector/graphics/details \
163 ./src/settings \
164 ./src/settings/global \
165 ./src/settings/machine \
166 ./src/widgets \
167 ./src/widgets/graphics \
168 ./src/wizards \
169 ./src/wizards/newvm \
170 ./src/wizards/newvd \
171 ./src/wizards/clonevm \
172 ./src/wizards/clonevd \
173 ./src/wizards/exportappliance \
174 ./src/wizards/importappliance \
175 ./src/wizards/firstrun
176
177ifdef VBOX_GUI_WITH_NETWORK_MANAGER
178VBOX_GUI_INC_DIRS += \
179 ./src/net
180endif
181
182VirtualBox_INCS = \
183 $(VBOX_GUI_INC_DIRS) \
184 $(VirtualBox_0_OUTDIR)/include
185
186# Necessary for the hdd backend enumeration
187VirtualBox_LIBS = $(LIB_DDU)
188
189if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd)
190 VirtualBox_LIBS += dl
191endif
192
193# This library is required for multi-monitor support
194VirtualBox_LIBS.linux += Xinerama
195VirtualBox_LIBS.solaris += Xinerama
196VirtualBox_LIBS.freebsd += Xinerama
197
198ifneq ($(KBUILD_TARGET),win)
199VirtualBox_CXXFLAGS += -Wno-switch
200endif
201
202ifeq ($(KBUILD_TYPE),release)
203 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
204else
205 VirtualBox_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
206 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
207endif
208
209# delay loading causes VM process crashes due to the misbehave of the current QtOpenGLVBox4.dll we use
210# (i.e. it does not create the ogl context properly when loaded this way)
211#
212# @todo: investigate a better work-around and enable back delay loading since it is needed to avoid
213# crashes caused by buggy ogl drivers for the case 2D is not used (i.e. no ogl stuff loaded)
214#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
215# VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
216#endif
217
218VirtualBox_LDFLAGS.darwin = \
219 -framework AppKit -framework Carbon -framework IOKit \
220 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
221ifdef VBOX_WITH_ICHAT_THEATER
222 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
223endif
224
225VirtualBox_LIBS.win = \
226 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Htmlhelp.Lib \
227 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ddraw.lib \
228 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
229if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
230 VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
231endif
232
233if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
234 VirtualBox_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
235 VirtualBox_LIBS.solaris += GL
236 VirtualBox_LIBS.linux += GL
237 VirtualBox_LIBS.freebsd += GL
238 VirtualBox_LDFLAGS.darwin += -framework OpenGL
239endif
240ifdef VBOX_WITH_CROGL
241 VirtualBox_LIBS += $(PATH_STAGE_LIB)/VBoxOGLTest$(VBOX_SUFF_LIB)
242endif
243
244
245# Headers containing definitions of classes that use the Q_OBJECT macro.
246VirtualBox_QT_MOCHDRS = \
247 src/UIMediumTypeChangeDialog.h \
248 src/VBoxAboutDlg.h \
249 src/VBoxGlobalSettings.h \
250 src/VBoxLicenseViewer.h \
251 src/VBoxSnapshotDetailsDlg.h \
252 src/VBoxTakeSnapshotDlg.h \
253 src/UIVMInfoDialog.h \
254 src/UIVMLogViewer.h \
255 src/extensions/QIAdvancedSlider.h \
256 src/extensions/QIArrowButtonPress.h \
257 src/extensions/QIArrowButtonSwitch.h \
258 src/extensions/QIArrowSplitter.h \
259 src/extensions/QIDialog.h \
260 src/extensions/QIFileDialog.h \
261 src/extensions/QILabel.h \
262 src/extensions/QILabelSeparator.h \
263 src/extensions/QIListView.h \
264 src/extensions/QIMainDialog.h \
265 src/extensions/QIMenu.h \
266 src/extensions/QIMessageBox.h \
267 src/extensions/QIProcess.h \
268 src/extensions/QIRichTextLabel.h \
269 src/extensions/QIRichToolButton.h \
270 src/extensions/QISplitter.h \
271 src/extensions/QIStatusBar.h \
272 src/extensions/QIStatusBarIndicator.h \
273 src/extensions/QITabWidget.h \
274 src/extensions/QITableView.h \
275 src/extensions/QIToolButton.h \
276 src/extensions/QITreeView.h \
277 src/extensions/QITreeWidget.h \
278 src/extensions/QIWidgetValidator.h \
279 src/extensions/QIAdvancedToolBar.h \
280 src/extensions/graphics/QIGraphicsWidget.h \
281 src/extradata/UIExtraDataManager.h \
282 src/globals/UIActionPool.h \
283 src/globals/UIAnimationFramework.h \
284 src/globals/UIMainEventListener.h \
285 src/globals/UIMessageCenter.h \
286 src/globals/UIModalWindowManager.h \
287 src/globals/UIPopupCenter.h \
288 src/globals/UIShortcutPool.h \
289 src/globals/UIThreadPool.h \
290 src/globals/VBoxGlobal.h \
291 src/globals/VBoxUtils.h \
292 src/medium/UIMediumEnumerator.h \
293 src/medium/UIMediumManager.h \
294 src/runtime/UIActionPoolRuntime.h \
295 src/runtime/UIConsoleEventHandler.h \
296 src/runtime/UIFrameBuffer.h \
297 src/runtime/UIIndicatorsPool.h \
298 src/runtime/UIKeyboardHandler.h \
299 src/runtime/UIMachine.h \
300 src/runtime/UIMachineLogic.h \
301 src/runtime/UIMachineWindow.h \
302 src/runtime/UIMachineView.h \
303 src/runtime/UIMouseHandler.h \
304 src/runtime/UIMultiScreenLayout.h \
305 src/runtime/UISession.h \
306 src/runtime/UIStatusBarEditorWindow.h \
307 src/runtime/UIVMCloseDialog.h \
308 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.h \
309 src/runtime/fullscreen/UIMachineLogicFullscreen.h \
310 src/runtime/fullscreen/UIMachineViewFullscreen.h \
311 src/runtime/fullscreen/UIMachineWindowFullscreen.h \
312 src/runtime/normal/UIKeyboardHandlerNormal.h \
313 src/runtime/normal/UIMachineLogicNormal.h \
314 src/runtime/normal/UIMachineViewNormal.h \
315 src/runtime/normal/UIMachineWindowNormal.h \
316 src/runtime/scale/UIKeyboardHandlerScale.h \
317 src/runtime/scale/UIMachineLogicScale.h \
318 src/runtime/scale/UIMachineViewScale.h \
319 src/runtime/scale/UIMachineWindowScale.h \
320 src/runtime/seamless/UIKeyboardHandlerSeamless.h \
321 src/runtime/seamless/UIMachineLogicSeamless.h \
322 src/runtime/seamless/UIMachineViewSeamless.h \
323 src/runtime/seamless/UIMachineWindowSeamless.h \
324 src/selector/UIActionPoolSelector.h \
325 src/selector/UIVMDesktop.h \
326 src/selector/UIVMItem.h \
327 src/selector/UIVirtualBoxEventHandler.h \
328 src/selector/UISelectorWindow.h \
329 src/selector/VBoxSnapshotsWgt.h \
330 src/selector/graphics/chooser/UIGChooser.h \
331 src/selector/graphics/chooser/UIGChooserModel.h \
332 src/selector/graphics/chooser/UIGChooserView.h \
333 src/selector/graphics/chooser/UIGChooserHandlerMouse.h \
334 src/selector/graphics/chooser/UIGChooserHandlerKeyboard.h \
335 src/selector/graphics/chooser/UIGChooserItem.h \
336 src/selector/graphics/chooser/UIGChooserItemGroup.h \
337 src/selector/graphics/chooser/UIGChooserItemMachine.h \
338 src/selector/graphics/details/UIGDetails.h \
339 src/selector/graphics/details/UIGDetailsModel.h \
340 src/selector/graphics/details/UIGDetailsView.h \
341 src/selector/graphics/details/UIGDetailsItem.h \
342 src/selector/graphics/details/UIGDetailsGroup.h \
343 src/selector/graphics/details/UIGDetailsSet.h \
344 src/selector/graphics/details/UIGDetailsElement.h \
345 src/selector/graphics/details/UIGDetailsElements.h \
346 src/selector/graphics/details/UIGMachinePreview.h \
347 src/settings/UISettingsDialog.h \
348 src/settings/UISettingsDialogSpecific.h \
349 src/settings/UISettingsPage.h \
350 src/settings/VBoxSettingsSelector.h \
351 src/settings/global/UIGlobalSettingsExtension.h \
352 src/settings/global/UIGlobalSettingsGeneral.h \
353 src/settings/global/UIGlobalSettingsInput.h \
354 src/settings/global/UIGlobalSettingsLanguage.h \
355 src/settings/global/UIGlobalSettingsDisplay.h \
356 src/settings/global/UIGlobalSettingsNetwork.h \
357 src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h \
358 src/settings/global/UIGlobalSettingsNetworkDetailsHost.h \
359 src/settings/global/UIGlobalSettingsPortForwardingDlg.h \
360 src/settings/machine/UIMachineSettingsAudio.h \
361 src/settings/machine/UIMachineSettingsDisplay.h \
362 src/settings/machine/UIMachineSettingsGeneral.h \
363 src/settings/machine/UIMachineSettingsNetwork.h \
364 src/settings/machine/UIMachineSettingsParallel.h \
365 src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
366 src/settings/machine/UIMachineSettingsSF.h \
367 src/settings/machine/UIMachineSettingsSFDetails.h \
368 src/settings/machine/UIMachineSettingsSerial.h \
369 src/settings/machine/UIMachineSettingsStorage.h \
370 src/settings/machine/UIMachineSettingsSystem.h \
371 src/settings/machine/UIMachineSettingsUSB.h \
372 src/settings/machine/UIMachineSettingsUSBFilterDetails.h \
373 src/widgets/UIApplianceEditorWidget.h \
374 src/widgets/UIApplianceExportEditorWidget.h \
375 src/widgets/UIApplianceImportEditorWidget.h \
376 src/widgets/UIBar.h \
377 src/widgets/UIBootTable.h \
378 src/widgets/UIHostComboEditor.h \
379 src/widgets/UIHotKeyEditor.h \
380 src/widgets/UILineTextEdit.h \
381 src/widgets/UIMenuBar.h \
382 src/widgets/UIPopupBox.h \
383 src/widgets/UIPopupPane.h \
384 src/widgets/UIPopupPaneTextPane.h \
385 src/widgets/UIPopupPaneButtonPane.h \
386 src/widgets/UIPopupStack.h \
387 src/widgets/UIPopupStackViewport.h \
388 src/widgets/UIPortForwardingTable.h \
389 src/widgets/UIProgressDialog.h \
390 src/widgets/UISpacerWidgets.h \
391 src/widgets/UISpecialControls.h \
392 src/widgets/UIToolBar.h \
393 src/widgets/VBoxFilePathSelectorWidget.h \
394 src/widgets/VBoxMediaComboBox.h \
395 src/widgets/UIMiniToolBar.h \
396 src/widgets/VBoxOSTypeSelectorButton.h \
397 src/widgets/UINameAndSystemEditor.h \
398 src/widgets/UIWarningPane.h \
399 src/widgets/UIFilmContainer.h \
400 src/widgets/graphics/UIGraphicsButton.h \
401 src/widgets/graphics/UIGraphicsRotatorButton.h \
402 src/widgets/graphics/UIGraphicsZoomButton.h \
403 src/widgets/graphics/UIGraphicsToolBar.h \
404 src/widgets/graphics/UIGraphicsTextPane.h \
405 src/wizards/UIWizard.h \
406 src/wizards/UIWizardPage.h \
407 src/wizards/newvm/UIWizardNewVM.h \
408 src/wizards/newvm/UIWizardNewVMPageBasic1.h \
409 src/wizards/newvm/UIWizardNewVMPageBasic2.h \
410 src/wizards/newvm/UIWizardNewVMPageBasic3.h \
411 src/wizards/newvm/UIWizardNewVMPageExpert.h \
412 src/wizards/newvd/UIWizardNewVD.h \
413 src/wizards/newvd/UIWizardNewVDPageBasic1.h \
414 src/wizards/newvd/UIWizardNewVDPageBasic2.h \
415 src/wizards/newvd/UIWizardNewVDPageBasic3.h \
416 src/wizards/newvd/UIWizardNewVDPageExpert.h \
417 src/wizards/clonevm/UIWizardCloneVM.h \
418 src/wizards/clonevm/UIWizardCloneVMPageBasic1.h \
419 src/wizards/clonevm/UIWizardCloneVMPageBasic2.h \
420 src/wizards/clonevm/UIWizardCloneVMPageBasic3.h \
421 src/wizards/clonevm/UIWizardCloneVMPageExpert.h \
422 src/wizards/clonevd/UIWizardCloneVD.h \
423 src/wizards/clonevd/UIWizardCloneVDPageBasic1.h \
424 src/wizards/clonevd/UIWizardCloneVDPageBasic2.h \
425 src/wizards/clonevd/UIWizardCloneVDPageBasic3.h \
426 src/wizards/clonevd/UIWizardCloneVDPageBasic4.h \
427 src/wizards/clonevd/UIWizardCloneVDPageExpert.h \
428 src/wizards/exportappliance/UIWizardExportApp.h \
429 src/wizards/exportappliance/UIWizardExportAppPageBasic1.h \
430 src/wizards/exportappliance/UIWizardExportAppPageBasic2.h \
431 src/wizards/exportappliance/UIWizardExportAppPageBasic3.h \
432 src/wizards/exportappliance/UIWizardExportAppPageBasic4.h \
433 src/wizards/exportappliance/UIWizardExportAppPageExpert.h \
434 src/wizards/importappliance/UIWizardImportApp.h \
435 src/wizards/importappliance/UIWizardImportAppPageBasic1.h \
436 src/wizards/importappliance/UIWizardImportAppPageBasic2.h \
437 src/wizards/importappliance/UIWizardImportAppPageExpert.h \
438 src/wizards/firstrun/UIWizardFirstRun.h \
439 src/wizards/firstrun/UIWizardFirstRunPageBasic.h
440
441ifdef VBOX_GUI_WITH_NETWORK_MANAGER
442 VirtualBox_QT_MOCHDRS += \
443 src/net/UINetworkManager.h \
444 src/net/UINetworkManagerDialog.h \
445 src/net/UINetworkManagerIndicator.h \
446 src/net/UINetworkRequest.h \
447 src/net/UINetworkRequestWidget.h \
448 src/net/UINetworkReply.h \
449 src/net/UINetworkCustomer.h \
450 src/net/UIUpdateManager.h \
451 src/net/UIDownloader.h \
452 src/net/UIDownloaderAdditions.h \
453 src/net/UIDownloaderExtensionPack.h \
454 src/net/UIDownloaderUserManual.h \
455 src/settings/global/UIGlobalSettingsProxy.h \
456 src/settings/global/UIGlobalSettingsUpdate.h
457endif
458
459ifdef VBOX_WITH_DRAG_AND_DROP
460 VirtualBox_QT_MOCHDRS += \
461 src/runtime/UIDnDHandler.h
462 ifdef VBOX_WITH_DRAG_AND_DROP_GH
463 VirtualBox_QT_MOCHDRS += \
464 src/runtime/UIDnDMIMEData.h \
465 src/runtime/UIDnDDrag.h
466 endif
467endif
468
469VirtualBox_QT_MOCHDRS.darwin += \
470 src/platform/darwin/UIWindowMenuManager.h
471
472# Sources containing local definitions of classes that use the Q_OBJECT macro.
473VirtualBox_QT_MOCSRCS = \
474 src/UIVMLogViewer.cpp \
475 src/extensions/QIArrowSplitter.cpp \
476 src/extensions/QISplitter.cpp \
477 src/extensions/QIAdvancedToolBar.cpp \
478 src/extradata/UIExtraDataManager.cpp \
479 src/globals/UIActionPool.cpp \
480 src/globals/UIThreadPool.cpp \
481 src/medium/UIMediumEnumerator.cpp \
482 src/medium/UIMediumManager.cpp \
483 src/runtime/UIActionPoolRuntime.cpp \
484 src/runtime/UIIndicatorsPool.cpp \
485 src/runtime/UIMachine.cpp \
486 src/runtime/UIStatusBarEditorWindow.cpp \
487 src/selector/UIActionPoolSelector.cpp \
488 src/selector/UIVMDesktop.cpp \
489 src/settings/UISettingsDialogSpecific.cpp \
490 src/settings/global/UIGlobalSettingsInput.cpp \
491 src/settings/machine/UIMachineSettingsStorage.cpp \
492 src/settings/machine/UIMachineSettingsUSB.cpp \
493 src/widgets/UIHotKeyEditor.cpp \
494 src/widgets/UIPortForwardingTable.cpp \
495 src/wizards/importappliance/UIWizardImportApp.cpp
496
497ifdef VBOX_GUI_WITH_NETWORK_MANAGER
498 VirtualBox_QT_MOCSRCS += \
499 src/net/UINetworkReply.cpp \
500 src/net/UIUpdateManager.cpp
501endif
502
503VirtualBox_QT_MOCSRCS.darwin += \
504 src/platform/darwin/UIWindowMenuManager.cpp
505VirtualBox_QT_MOCSRCS.win += \
506 src/extensions/QIFileDialog.cpp
507
508ifdef VBOX_WITH_XPCOM
509 VirtualBox_QT_MOCSRCS += \
510 src/globals/COMDefs.cpp
511endif
512
513VirtualBox_SOURCES = \
514 src/main.cpp \
515 src/UIMediumTypeChangeDialog.cpp \
516 src/VBoxAboutDlg.cpp \
517 src/VBoxGlobalSettings.cpp \
518 src/VBoxLicenseViewer.cpp \
519 src/VBoxSnapshotDetailsDlg.cpp \
520 src/VBoxTakeSnapshotDlg.cpp \
521 src/UIVMInfoDialog.cpp \
522 src/UIVMLogViewer.cpp \
523 src/converter/UIConverter.cpp \
524 src/converter/UIConverterBackendCOM.cpp \
525 src/converter/UIConverterBackendGlobal.cpp \
526 src/extensions/QIAdvancedSlider.cpp \
527 src/extensions/QIArrowButtonPress.cpp \
528 src/extensions/QIArrowButtonSwitch.cpp \
529 src/extensions/QIArrowSplitter.cpp \
530 src/extensions/QIDialog.cpp \
531 src/extensions/QIDialogButtonBox.cpp \
532 src/extensions/QIFileDialog.cpp \
533 src/extensions/QILabel.cpp \
534 src/extensions/QILabelSeparator.cpp \
535 src/extensions/QILineEdit.cpp \
536 src/extensions/QIListView.cpp \
537 src/extensions/QIMainDialog.cpp \
538 src/extensions/QIMenu.cpp \
539 src/extensions/QIMessageBox.cpp \
540 src/extensions/QIProcess.cpp \
541 src/extensions/QIRichTextLabel.cpp \
542 src/extensions/QIRichToolButton.cpp \
543 src/extensions/QISplitter.cpp \
544 src/extensions/QIStatusBar.cpp \
545 src/extensions/QIStatusBarIndicator.cpp \
546 src/extensions/QITableView.cpp \
547 src/extensions/QITreeView.cpp \
548 src/extensions/QITreeWidget.cpp \
549 src/extensions/QIWidgetValidator.cpp \
550 src/extensions/QIAdvancedToolBar.cpp \
551 src/extensions/graphics/QIGraphicsWidget.cpp \
552 src/extradata/UIExtraDataDefs.cpp \
553 src/extradata/UIExtraDataManager.cpp \
554 src/globals/UIDefs.cpp \
555 src/globals/COMDefs.cpp \
556 src/globals/UIActionPool.cpp \
557 src/globals/UIAnimationFramework.cpp \
558 src/globals/UIIconPool.cpp \
559 src/globals/UIImageTools.cpp \
560 src/globals/UIMainEventListener.cpp \
561 src/globals/UIMessageCenter.cpp \
562 src/globals/UIModalWindowManager.cpp \
563 src/globals/UIPopupCenter.cpp \
564 src/globals/UIShortcutPool.cpp \
565 src/globals/UIThreadPool.cpp \
566 src/globals/VBoxGlobal.cpp \
567 src/medium/UIMediumDefs.cpp \
568 src/medium/UIMedium.cpp \
569 src/medium/UIMediumEnumerator.cpp \
570 src/medium/UIMediumManager.cpp \
571 src/runtime/UIActionPoolRuntime.cpp \
572 src/runtime/UIConsoleEventHandler.cpp \
573 src/runtime/UIFrameBuffer.cpp \
574 src/runtime/UIIndicatorsPool.cpp \
575 src/runtime/UIKeyboardHandler.cpp \
576 src/runtime/UIMachine.cpp \
577 src/runtime/UIMachineLogic.cpp \
578 src/runtime/UIMachineView.cpp \
579 src/runtime/UIMachineWindow.cpp \
580 src/runtime/UIMouseHandler.cpp \
581 src/runtime/UIMultiScreenLayout.cpp \
582 src/runtime/UISession.cpp \
583 src/runtime/UIStatusBarEditorWindow.cpp \
584 src/runtime/UIVMCloseDialog.cpp \
585 src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp \
586 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
587 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \
588 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
589 src/runtime/normal/UIKeyboardHandlerNormal.cpp \
590 src/runtime/normal/UIMachineLogicNormal.cpp \
591 src/runtime/normal/UIMachineViewNormal.cpp \
592 src/runtime/normal/UIMachineWindowNormal.cpp \
593 src/runtime/scale/UIKeyboardHandlerScale.cpp \
594 src/runtime/scale/UIMachineLogicScale.cpp \
595 src/runtime/scale/UIMachineViewScale.cpp \
596 src/runtime/scale/UIMachineWindowScale.cpp \
597 src/runtime/seamless/UIKeyboardHandlerSeamless.cpp \
598 src/runtime/seamless/UIMachineLogicSeamless.cpp \
599 src/runtime/seamless/UIMachineViewSeamless.cpp \
600 src/runtime/seamless/UIMachineWindowSeamless.cpp \
601 src/selector/UIActionPoolSelector.cpp \
602 src/selector/UIVMDesktop.cpp \
603 src/selector/UIVMItem.cpp \
604 src/selector/UIVirtualBoxEventHandler.cpp \
605 src/selector/UISelectorWindow.cpp \
606 src/selector/graphics/chooser/UIGChooser.cpp \
607 src/selector/graphics/chooser/UIGChooserModel.cpp \
608 src/selector/graphics/chooser/UIGChooserView.cpp \
609 src/selector/graphics/chooser/UIGChooserHandlerMouse.cpp \
610 src/selector/graphics/chooser/UIGChooserHandlerKeyboard.cpp \
611 src/selector/graphics/chooser/UIGChooserItem.cpp \
612 src/selector/graphics/chooser/UIGChooserItemGroup.cpp \
613 src/selector/graphics/chooser/UIGChooserItemMachine.cpp \
614 src/selector/graphics/details/UIGDetails.cpp \
615 src/selector/graphics/details/UIGDetailsModel.cpp \
616 src/selector/graphics/details/UIGDetailsView.cpp \
617 src/selector/graphics/details/UIGDetailsItem.cpp \
618 src/selector/graphics/details/UIGDetailsGroup.cpp \
619 src/selector/graphics/details/UIGDetailsSet.cpp \
620 src/selector/graphics/details/UIGDetailsElement.cpp \
621 src/selector/graphics/details/UIGDetailsElements.cpp \
622 src/selector/graphics/details/UIGMachinePreview.cpp \
623 src/selector/VBoxSnapshotsWgt.cpp \
624 src/settings/UISettingsDefs.cpp \
625 src/settings/UISettingsDialog.cpp \
626 src/settings/UISettingsDialogSpecific.cpp \
627 src/settings/UISettingsPage.cpp \
628 src/settings/VBoxSettingsSelector.cpp \
629 src/settings/global/UIGlobalSettingsExtension.cpp \
630 src/settings/global/UIGlobalSettingsGeneral.cpp \
631 src/settings/global/UIGlobalSettingsInput.cpp \
632 src/settings/global/UIGlobalSettingsLanguage.cpp \
633 src/settings/global/UIGlobalSettingsDisplay.cpp \
634 src/settings/global/UIGlobalSettingsNetwork.cpp \
635 src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp \
636 src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp \
637 src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp \
638 src/settings/machine/UIMachineSettingsAudio.cpp \
639 src/settings/machine/UIMachineSettingsDisplay.cpp \
640 src/settings/machine/UIMachineSettingsGeneral.cpp \
641 src/settings/machine/UIMachineSettingsNetwork.cpp \
642 src/settings/machine/UIMachineSettingsParallel.cpp \
643 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
644 src/settings/machine/UIMachineSettingsSF.cpp \
645 src/settings/machine/UIMachineSettingsSFDetails.cpp \
646 src/settings/machine/UIMachineSettingsSerial.cpp \
647 src/settings/machine/UIMachineSettingsStorage.cpp \
648 src/settings/machine/UIMachineSettingsSystem.cpp \
649 src/settings/machine/UIMachineSettingsUSB.cpp \
650 src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp \
651 src/widgets/UIApplianceEditorWidget.cpp \
652 src/widgets/UIApplianceExportEditorWidget.cpp \
653 src/widgets/UIApplianceImportEditorWidget.cpp \
654 src/widgets/UIBar.cpp \
655 src/widgets/UIBootTable.cpp \
656 src/widgets/UIHostComboEditor.cpp \
657 src/widgets/UIHotKeyEditor.cpp \
658 src/widgets/UILineTextEdit.cpp \
659 src/widgets/UIMenuBar.cpp \
660 src/widgets/UIPopupBox.cpp \
661 src/widgets/UIPopupPane.cpp \
662 src/widgets/UIPopupPaneTextPane.cpp \
663 src/widgets/UIPopupPaneButtonPane.cpp \
664 src/widgets/UIPopupStack.cpp \
665 src/widgets/UIPopupStackViewport.cpp \
666 src/widgets/UIPortForwardingTable.cpp \
667 src/widgets/UIProgressDialog.cpp \
668 src/widgets/UISpecialControls.cpp \
669 src/widgets/UIToolBar.cpp \
670 src/widgets/VBoxFilePathSelectorWidget.cpp \
671 src/widgets/VBoxGuestRAMSlider.cpp \
672 src/widgets/VBoxMediaComboBox.cpp \
673 src/widgets/UIMiniToolBar.cpp \
674 src/widgets/VBoxOSTypeSelectorButton.cpp \
675 src/widgets/UINameAndSystemEditor.cpp \
676 src/widgets/UIWarningPane.cpp \
677 src/widgets/UIFilmContainer.cpp \
678 src/widgets/graphics/UIGraphicsButton.cpp \
679 src/widgets/graphics/UIGraphicsRotatorButton.cpp \
680 src/widgets/graphics/UIGraphicsZoomButton.cpp \
681 src/widgets/graphics/UIGraphicsToolBar.cpp \
682 src/widgets/graphics/UIGraphicsTextPane.cpp \
683 src/wizards/UIWizard.cpp \
684 src/wizards/UIWizardPage.cpp \
685 src/wizards/newvm/UIWizardNewVM.cpp \
686 src/wizards/newvm/UIWizardNewVMPageBasic1.cpp \
687 src/wizards/newvm/UIWizardNewVMPageBasic2.cpp \
688 src/wizards/newvm/UIWizardNewVMPageBasic3.cpp \
689 src/wizards/newvm/UIWizardNewVMPageExpert.cpp \
690 src/wizards/newvd/UIWizardNewVD.cpp \
691 src/wizards/newvd/UIWizardNewVDPageBasic1.cpp \
692 src/wizards/newvd/UIWizardNewVDPageBasic2.cpp \
693 src/wizards/newvd/UIWizardNewVDPageBasic3.cpp \
694 src/wizards/newvd/UIWizardNewVDPageExpert.cpp \
695 src/wizards/clonevm/UIWizardCloneVM.cpp \
696 src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp \
697 src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp \
698 src/wizards/clonevm/UIWizardCloneVMPageBasic3.cpp \
699 src/wizards/clonevm/UIWizardCloneVMPageExpert.cpp \
700 src/wizards/clonevd/UIWizardCloneVD.cpp \
701 src/wizards/clonevd/UIWizardCloneVDPageBasic1.cpp \
702 src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp \
703 src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp \
704 src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp \
705 src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp \
706 src/wizards/exportappliance/UIWizardExportApp.cpp \
707 src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp \
708 src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp \
709 src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp \
710 src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp \
711 src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp \
712 src/wizards/importappliance/UIWizardImportApp.cpp \
713 src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp \
714 src/wizards/importappliance/UIWizardImportAppPageBasic2.cpp \
715 src/wizards/importappliance/UIWizardImportAppPageExpert.cpp \
716 src/wizards/firstrun/UIWizardFirstRun.cpp \
717 src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
718
719ifdef VBOX_GUI_WITH_NETWORK_MANAGER
720VirtualBox_SOURCES += \
721 src/net/UINetworkManager.cpp \
722 src/net/UINetworkManagerDialog.cpp \
723 src/net/UINetworkManagerIndicator.cpp \
724 src/net/UINetworkRequest.cpp \
725 src/net/UINetworkRequestWidget.cpp \
726 src/net/UINetworkReply.cpp \
727 src/net/UINetworkCustomer.cpp \
728 src/net/UIDownloader.cpp \
729 src/net/UIDownloaderAdditions.cpp \
730 src/net/UIDownloaderExtensionPack.cpp \
731 src/net/UIDownloaderUserManual.cpp \
732 src/net/UIUpdateDefs.cpp \
733 src/net/UIUpdateManager.cpp \
734 src/settings/global/UIGlobalSettingsProxy.cpp \
735 src/settings/global/UIGlobalSettingsUpdate.cpp
736endif
737
738VirtualBox_SOURCES.darwin += \
739 src/platform/darwin/UIAbstractDockIconPreview.cpp \
740 src/platform/darwin/UICocoaDockIconPreview.mm \
741 src/platform/darwin/UIWindowMenuManager.cpp \
742
743if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
744 VirtualBox_SOURCES += \
745 src/platform/x11/UIDesktopServices_x11.cpp \
746 src/platform/x11/VBoxX11Helper.cpp \
747 src/platform/x11/XKeyboard-new.cpp
748endif
749
750VirtualBox_SOURCES.win += \
751 src/platform/win/VirtualBox.rc \
752 src/platform/win/UIDesktopServices_win.cpp \
753 src/platform/win/VBoxUtils-win.cpp \
754 src/platform/win/WinKeyboard.cpp
755
756VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
757VirtualBox_SOURCES.darwin += \
758 src/platform/darwin/CocoaEventHelper.mm \
759 src/platform/darwin/DarwinKeyboard.cpp \
760 src/platform/darwin/UICocoaApplication.mm \
761 src/platform/darwin/UICocoaSpecialControls.mm \
762 src/platform/darwin/UIDesktopServices_darwin.cpp \
763 src/platform/darwin/UIDesktopServices_darwin_cocoa.mm \
764 src/platform/darwin/VBoxUtils-darwin-cocoa.mm \
765 src/platform/darwin/VBoxUtils-darwin.cpp
766VirtualBox_QT_MOCHDRS.darwin += \
767 src/platform/darwin/UICocoaSpecialControls.h
768
769ifdef VBOX_WITH_ICHAT_THEATER
770 VirtualBox_SOURCES.darwin += \
771 src/platform/darwin/VBoxIChatTheaterWrapper.m
772endif
773
774if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
775 VirtualBox_SOURCES += \
776 src/VBoxFBOverlay.cpp \
777 src/VBoxGLSupportInfo.cpp
778endif
779
780ifdef VBOX_WITH_DRAG_AND_DROP
781 VirtualBox_SOURCES += \
782 src/runtime/UIDnDHandler.cpp
783 ifdef VBOX_WITH_DRAG_AND_DROP_GH
784 VirtualBox_SOURCES += \
785 src/runtime/UIDnDMIMEData.cpp \
786 src/runtime/UIDnDDrag.cpp
787 VirtualBox_SOURCES.win += \
788 src/runtime/UIDnDDropSource_win.cpp \
789 src/runtime/UIDnDDataObject_win.cpp \
790 src/runtime/UIDnDEnumFormat_win.cpp
791 endif
792endif
793
794# The Qt modules we're using.
795# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
796VirtualBox_QT_MODULES = Core Gui Network
797if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
798 VirtualBox_QT_MODULES += OpenGL
799endif
800
801# Pull in the ui files
802$(eval VirtualBox_SOURCES += $(FORMS))
803
804# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
805VirtualBox_SOURCES += VirtualBox1.qrc
806VirtualBox1.qrc_RCCFLAGS = -name BASIC1
807VirtualBox_SOURCES += VirtualBox2.qrc
808VirtualBox2.qrc_RCCFLAGS = -name BASIC2
809ifeq ($(KBUILD_TARGET),darwin)
810 VirtualBox_SOURCES += VirtualBox1_hidpi.qrc
811 VirtualBox1_hidpi.qrc_RCCFLAGS = -name BASIC1_HIDPI
812 VirtualBox_SOURCES += VirtualBox2_hidpi.qrc
813 VirtualBox2_hidpi.qrc_RCCFLAGS = -name BASIC2_HIDPI
814 VirtualBox_SOURCES += VirtualBoxMac.qrc
815 VirtualBoxMac.qrc_RCCFLAGS = -name MAC
816else
817 VirtualBox_SOURCES += VirtualBoxOther.qrc
818 VirtualBoxOther.qrc_RCCFLAGS = -name OTHER
819endif
820VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
821$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
822if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
823 VirtualBox_SOURCES += VirtualBoxShaders.qrc
824 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
825endif
826
827# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
828VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
829 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
830# Compress the translation units.
831VirtualBox_LRCFLAGS = -silent
832# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
833VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
834
835
836## @todo how to detect what tool is used?
837## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
838# more generic -Wno-extra
839# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
840ifdef VBOX_WITH_XPCOM
841 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
842endif
843
844
845#
846# Generate the COM wrappers.
847#
848includedep $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
849VirtualBox_BLDDIRS += $(VirtualBox_0_OUTDIR)/include
850VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers
851VirtualBox_CLEAN += $(wildcard $(VirtualBox_0_OUTDIR)/include/*) $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep
852VirtualBox_SOURCES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
853
854## @todo kmk doesn't remake optional outputs when they are missing...
855$$(VirtualBox_0_OUTDIR)/include/COMWrappers \
856+ $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep \
857+| $(if-expr defined(VirtualBox_VBOX_COMWRAPPERS) \
858, $(VirtualBox_VBOX_COMWRAPPERS) \
859, $$(VirtualBox_0_OUTDIR)/include/COMEnums.h \
860 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp \
861): \
862 $(VBOX_XIDL_FILE) \
863 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
864 $(VBOX_FILESPLIT) \
865 | $$(dir $$@)
866 $(call MSG_GENERATE,VirtualBox,$<,$@)
867 $(QUIET)$(RM) -f -- "$@" "$(PATH_TARGET)/VirtualBoxComWrapperFiles.dep"
868 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
869 $(QUIET)$(VBOX_FILESPLIT) $@ $(VirtualBox_0_OUTDIR)/include \
870 $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep VirtualBox_VBOX_COMWRAPPERS
871 $(APPEND) "$@"
872
873# alias for generating the COM Wrappers file.
874testwrappers:: $$(VirtualBox_0_OUTDIR)/include/COMWrappers
875
876
877#
878# Generate qrc file with branded icons.
879#
880VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
881VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
882$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
883 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
884 $(PATH_ROOT)/Config.kmk \
885 | $$(dir $$@)
886 $(call MSG_GENERATE,VirtualBox,$<,$@)
887 $(QUIET)$(SED) \
888 -e 's;@VBOX_ABOUT_PNG@;$(VBOX_BRAND_GUI_ABOUT_PNG);g' \
889 -e 's;@VBOX_ABOUT_HIDPI_PNG@;$(VBOX_BRAND_GUI_ABOUT_HIDPI_PNG);g' \
890 -e 's;@VBOX_ABOUT_16PX_PNG@;$(VBOX_BRAND_GUI_ABOUT_16PX_PNG);g' \
891 -e 's;@VBOX_VBOX_16PX_PNG@;$(VBOX_BRAND_GUI_VBOX_16PX_PNG);g' \
892 -e 's;@VBOX_VBOX_20PX_PNG@;$(VBOX_BRAND_GUI_VBOX_20PX_PNG);g' \
893 -e 's;@VBOX_VBOX_32PX_PNG@;$(VBOX_BRAND_GUI_VBOX_32PX_PNG);g' \
894 -e 's;@VBOX_VBOX_40PX_PNG@;$(VBOX_BRAND_GUI_VBOX_40PX_PNG);g' \
895 -e 's;@VBOX_VBOX_48PX_PNG@;$(VBOX_BRAND_GUI_VBOX_48PX_PNG);g' \
896 -e 's;@VBOX_VBOX_64PX_PNG@;$(VBOX_BRAND_GUI_VBOX_64PX_PNG);g' \
897 -e 's;@VBOX_CUBE_42PX_PNG@;$(VBOX_BRAND_GUI_CUBE_42PX_PNG);g' \
898 -e 's;@VBOX_CUBE_SVG@;$(VBOX_BRAND_GUI_VBOX_SVG);g' \
899 --output $@ \
900 $<
901
902
903#
904# Precompiled header - non-functional atm.
905#
906ifdef VBOX_WITH_PRECOMPILED_HEADERS
907VirtualBox_INCS <= $(VirtualBox_0_OUTDIR)/include
908VirtualBox_DEFS += VBOX_WITH_PRECOMPILED_HEADERS
909VirtualBox_CXXFLAGS += -Winvalid-pch -fpch-preprocess
910VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/precomp.h.gch
911
912tstx: $$(VirtualBox_0_OUTDIR)/include/precomp.h.gch
913
914$$(VirtualBox_0_OUTDIR)/include/precomp.h.gch: \
915 $(PATH_SUB_CURRENT)/src/precomp.h \
916 $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
917 $$(filter %.gen.h, $$(VirtualBox_INTERMEDIATES) ) \
918 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h \
919 | $$(dir $$@)
920 time 'g++-4.0' \
921 '-c' \
922 '-g' \
923 $(if-expr "$(KBUILD_TYPE)" == "debug", , -O2 ) \
924 '-pipe' \
925 '-Wall' \
926 '-Wextra' \
927 '-Wno-missing-field-initializers' \
928 '-Wno-trigraphs' \
929 '-frtti' \
930 '-fno-exceptions' \
931 '-Wno-non-virtual-dtor' \
932 '-Wno-long-long' \
933 \
934 '-fshort-wchar' \
935 '-fno-strict-aliasing' \
936 '-fvisibility=hidden' \
937 '-DVBOX_HAVE_VISIBILITY_HIDDEN' \
938 '-DRT_USE_VISIBILITY_DEFAULT' \
939 '-fvisibility-inlines-hidden' \
940 '-Winvalid-pch' \
941 '-fpch-preprocess' \
942 \
943 '-F$(PATH_SDK_QT4)/Frameworks' \
944 '-mmacosx-version-min=10.5' \
945 '-isysroot' \
946 '/Developer/SDKs/MacOSX10.5.sdk' \
947 '-m32' \
948 \
949 $(foreach inc,$(VirtualBox_INCS),\$(NL)$(TAB)-I$(inc)) \
950 '-I$(PATH_ROOT)/include' \
951 '-I$(PATH_OUT)' \
952 '-DVBOX' \
953 '-DVBOX_WITH_DEBUGGER' \
954 '-DVBOX_WITH_64_BITS_GUESTS' \
955 $(if-expr "$(KBUILD_TYPE)" == "debug", '-DDEBUG' '-DDEBUG_bird' '-DDEBUG_USERNAME=bird' '-DVBOX_CHECK_STATE' ,) \
956 '-DRT_OS_DARWIN' \
957 '-D__DARWIN__' \
958 '-DRT_ARCH_X86' \
959 '-D__X86__' \
960 '-DIN_RING3' \
961 '-DQT_NO_DEBUG' \
962 '-DQT_THREAD_SUPPORT' \
963 '-DQT_SHARED' \
964 '-DHAVE_CONFIG_H' \
965 '-DHC_ARCH_BITS=32' \
966 '-DGC_ARCH_BITS=64' \
967 '-DVBOX_WITH_XPCOM' \
968 '-DVBOX_WITH_UPDATE_REQUEST' \
969 '-DVBOX_WITH_ALSA' \
970 '-DVBOX_WITH_PULSE' \
971 '-DVBOX_WITH_E1000' \
972 '-DVBOX_WITH_NETFLT' \
973 '-DVBOX_WITH_DEBUGGER_GUI' \
974 $(if-expr "$(KBUILD_TYPE)" != "release", '-DVBOX_WITH_DEBUGGER_GUI_MENU', ) \
975 '-DVBOX_WITH_VIDEOHWACCEL' \
976 '-DVBOX_GUI_USE_QGL' \
977 '-DVBOX_WITH_VIRTIO' \
978 '-DVBOX_WITH_PRECOMPILED_HEADERS' \
979 '-DVBOX_DARWIN_USE_NATIVE_CONTROLS' \
980 '-DQT_CORE_LIB' \
981 '-DQT_GUI_LIB' \
982 '-DQT_NETWORK_LIB' \
983 '-DQT_OPENGL_LIB' \
984 '-DMAC_OS_X_VERSION_MIN_REQUIRED=1050' \
985 '-DMAC_OS_X_VERSION_MAX_ALLOWED=1050' \
986 '-o' $@ $<
987endif
988
989ifeq ($(KBUILD_TARGET),win)
990#
991# On Windows we'll have to generate/edit part of the resource file.
992# The IDI_ICON1 name is Qt specific.
993#
994src/platform/win/VirtualBox.rc_INCS = $(VirtualBox_0_OUTDIR)
995src/platform/win/VirtualBox.rc_DEPS = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
996src/platform/win/VirtualBox.rc_CLEAN = $(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc
997
998$$(VirtualBox_0_OUTDIR)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
999 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
1000
1001endif # win
1002
1003
1004ifeq ($(KBUILD_TARGET),darwin)
1005#
1006# Create directories for each approved language or the application
1007# menu won't be translated.
1008#
1009INSTALLS += VirtualBox.lproj
1010VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
1011VirtualBox.lproj_MODE = 755
1012VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
1013
1014#
1015# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
1016# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
1017#
1018INSTALLS += VirtualBox.app
1019VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
1020VirtualBox.app_MODE = 644
1021VirtualBox.app_SOURCES = \
1022 src/platform/darwin/PkgInfo \
1023 $(VirtualBox.app_0_OUTDIR)/Info.plist \
1024 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns \
1025 $(VBOX_BRAND_GUI_VBOX_64PX_PNG)=>Resources/virtualbox.png \
1026 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox.icns=>Resources/virtualbox-vbox.icns \
1027 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns=>Resources/virtualbox-vbox-extpack.icns \
1028 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ovf.icns=>Resources/virtualbox-ovf.icns \
1029 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-ova.icns=>Resources/virtualbox-ova.icns \
1030 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vdi.icns=>Resources/virtualbox-vdi.icns \
1031 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vmdk.icns=>Resources/virtualbox-vmdk.icns \
1032 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-vhd.icns=>Resources/virtualbox-vhd.icns \
1033 $(PATH_ROOT)/src/VBox/Resources/darwin/virtualbox-hdd.icns=>Resources/virtualbox-hdd.icns
1034
1035$$(VirtualBox.app_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
1036 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
1037 $(QUIET)$(RM) -f $@
1038 $(QUIET)$(SED) \
1039 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1040 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1041 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1042 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1043 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1044 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1045 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1046 $< > $@
1047
1048INSTALLS += VirtualBoxVM.app
1049VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
1050VirtualBoxVM.app_MODE = 644
1051VirtualBoxVM.app_SOURCES = \
1052 src/platform/darwin/VM-PkgInfo=>PkgInfo \
1053 $(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist=>Info.plist \
1054 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
1055VirtualBoxVM.app_SYMLINKS = \
1056 MacOS=>../../../MacOS/
1057
1058$$(VirtualBoxVM.app_0_OUTDIR)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
1059 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
1060 $(QUIET)$(RM) -f $@
1061 $(QUIET)$(SED) \
1062 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1063 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1064 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1065 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1066 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1067 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1068 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1069 --output $@ $<
1070
1071PROGRAMS += vmstarter
1072vmstarter_TEMPLATE = VBOXR3EXE
1073vmstarter_SOURCES = src/platform/darwin/vmstarter.mm
1074vmstarter_LDFLAGS += -framework AppKit
1075vmstarter_INST = $(INST_BIN)vmstarter
1076
1077INSTALLS += vmstarter.app
1078vmstarter.app_INST = $(VirtualBox.app_INST)Resources/vmstarter.app/Contents/
1079vmstarter.app_MODE = 644
1080vmstarter.app_SOURCES = \
1081 src/platform/darwin/vmstarter-PkgInfo=>PkgInfo \
1082 $(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist=>Info.plist \
1083 $(foreach mysrc,$(VirtualBox.app_SOURCES),$(if-expr $(pos =>Resources/,$(mysrc)) > 0,$(mysrc),))
1084vmstarter.app_SYMLINKS = \
1085 MacOS=>../../../MacOS \
1086
1087$$(vmstarter.app_0_OUTDIR)/vmstarter-Info.plist: $(PATH_SUB_CURRENT)/src/platform/darwin/vmstarter-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
1088 $(call MSG_GENERATE,vmstarter.app,$<,$@)
1089 $(QUIET)$(RM) -f $@
1090 $(QUIET)$(SED) \
1091 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1092 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1093 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1094 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1095 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
1096 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
1097 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
1098 --output $@ $<
1099endif # darwin
1100
1101#
1102# App for testing GL support
1103#
1104if defined(VBOX_WITH_VIDEOHWACCEL)
1105 if1of ($(KBUILD_TARGET), win linux freebsd)
1106 LIBRARIES += VBoxOGL2D
1107 VBoxOGL2D_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE),VBOXMAINEXE)
1108 VBoxOGL2D_DEFS = QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
1109 VBoxOGL2D_QT_MODULES += OpenGL
1110 VBoxOGL2D_SOURCES = \
1111 src/VBoxGLSupportInfo.cpp
1112 VBoxOGL2D_INCS = include
1113 endif
1114endif
1115
1116#
1117# Testcase for the darwin keyboard routines.
1118#
1119ifdef VBOX_WITH_TESTCASES
1120PROGRAMS.darwin += tstDarwinKeyboard
1121tstDarwinKeyboard_NAME = tstDarwinKeyboard
1122tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
1123tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
1124tstDarwinKeyboard_INCS = include
1125tstDarwinKeyboard_SOURCES = \
1126 src/platform/darwin/tstDarwinKeyboard.cpp \
1127 src/platform/darwin/DarwinKeyboard.cpp
1128tstDarwinKeyboard_SOURCES.amd64 = \
1129 src/platform/darwin/CocoaEventHelper.mm
1130tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
1131tstDarwinKeyboard_LIBS = \
1132 $(LIB_RUNTIME)
1133endif
1134
1135
1136# Unset everything that was loaded from VBoxUI.pro.
1137TEMPLATE := $(SAVED_TEMPLATE)
1138SAVED_TEMPLATE :=
1139LANGUAGE :=
1140FORMS :=
1141TRANSLATIONS :=
1142IMAGES :=
1143
1144
1145#
1146# Doxygen documentation.
1147#
1148QTGUI_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/qtgui
1149BLDDIRS += $(QTGUI_DOXYFILE_OUTPUT)
1150OTHER_CLEAN += \
1151 $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui \
1152 $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
1153
1154# Generate the Doxyfile
1155$(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui: \
1156 $(PATH_SUB_CURRENT)/Doxyfile \
1157 $(PATH_SUB_CURRENT)/Makefile.kmk \
1158 | $$(dir $$@)
1159 $(RM) -f $@ [email protected] [email protected]
1160 $(CP) -f $< [email protected]
1161 $(APPEND) [email protected]
1162 $(APPEND) [email protected] "OUTPUT_DIRECTORY = $(QTGUI_DOXYFILE_OUTPUT)"
1163 $(APPEND) [email protected] "WARN_LOGFILE = $(QTGUI_DOXYFILE_OUTPUT)/errors"
1164 $(APPEND) [email protected] "INCLUDE_PATH = $(PATH_ROOT)/include ."
1165 $(APPEND) [email protected] "PREDEFINED += $(ARCH_BITS_DEFS)"
1166 $(APPEND) [email protected]
1167 $(APPEND) [email protected] "INPUT = $(dir $<)"
1168 $(APPEND) [email protected]
1169 $(MV) -f [email protected] $@
1170
1171# Do the actual job.
1172$(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui: $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui $$(QTGUI_DOXYFILE_INPUT) | $(QTGUI_DOXYFILE_OUTPUT)/
1173 $(RM) -Rf -- $(QTGUI_DOXYFILE_OUTPUT)/html/
1174 doxygen $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui
1175 $(APPEND) $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
1176
1177# aliases
1178docs.qtgui: $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
1179if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
1180docs: $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
1181endif
1182
1183
1184
1185# Commit the magic.
1186# (note: before custom rules that make usage of generated variables!).
1187include $(FILE_KBUILD_SUB_FOOTER)
1188
1189#
1190# Update all known NLS translation (.ts) files in the nls/ subdirectory.
1191#
1192# NOTE: This target is intended to be run only by the GUI maintainer shortly
1193# before a new product release. VirtualBox_xx_YY.ts is a template for new
1194# languages and should never be actually translated or installed.
1195#
1196# Use the checknls target for checking again common mistakes done by the
1197# translators.
1198#
1199# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
1200# lupdate call
1201#
1202#VirtualBox_QT_TRANSLATIONS = nls/VirtualBox_de.ts
1203checknls::
1204 # Check for missing :/ in image paths
1205 grep -i "src=[^:%]" $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))
1206
1207updatenls:: makeallnls nls/VirtualBox_en.ts
1208
1209makeallnls:: \
1210 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1211 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1212 $(call MSG_L1,lupdate all languages (nls/*.ts))
1213 $(QUIET)$(TOOL_QT4_LUPDATE) \
1214 $^ \
1215 -ts \
1216 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
1217 nls/VirtualBox_xx_YY.ts
1218
1219# Create the English translation file. This is something special cause it will
1220# contain the plural forms only.
1221nls/VirtualBox_en.ts: \
1222 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
1223 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
1224 $(call MSG_L1,lupdate $@)
1225 $(QUIET)$(TOOL_QT4_LUPDATE) \
1226 $^ \
1227 -ts \
1228 $@
1229 $(QUIET)$(SED) -n -i -e \
1230 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
1231 $@
1232
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