VirtualBox

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

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

Fe/Qt4: Use the DDK instead of the DirectX SDK.

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