VirtualBox

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

Last change on this file since 39347 was 39337, checked in by vboxsync, 14 years ago

FE/Qt: Update Manager rework: Support update queue, which can now synchronously process enqueued activities (For now there are two of them: 1. Checking for a new VBox version, 2. Checking/Updating of VBox Extension Pack).

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