VirtualBox

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

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

FE/Qt: Moving VBoxMedium stuff into separate folder, renaming it into UIMedium. Remove VBoxMedium stuff from VBoxGlobal/VBoxDefs.

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