VirtualBox

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

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

compile fix for VBOX_WITH_CROGL=

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