VirtualBox

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

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

FE/Qt: 6123: Initial implementation of expert-mode for VirtualBox wizards.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette