VirtualBox

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

Last change on this file since 38373 was 38372, checked in by vboxsync, 14 years ago

FE/Qt: 5823: Generalize GUI action pool: Renaming UIActionPoolOffline => UIActionPoolSelector.

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