VirtualBox

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

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

FE/Qt: 5800: Rework GUI networking support to use latest Qt networking classes: Networking stuff moved into the src/net sub-folder. Global UINetworkManager created. It will be used by all the downloaders and other network purposes.

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