VirtualBox

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

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

FE/Qt: GUI Maintenance: VM Selector Window overall update & coding-style rework.

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