VirtualBox

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

Last change on this file since 56927 was 56817, checked in by vboxsync, 9 years ago

Attempt at fixing VirtualBoxVM (untested).

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