VirtualBox

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

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

FE/Qt: 5984: Summary pages of wizards will now reflect summary without scroll-bars, taking into account real summary size-hint.

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