VirtualBox

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

Last change on this file since 37510 was 37494, checked in by vboxsync, 14 years ago

2d/win: disable ogl stuff delay loading to workaround qgl lib misbehave

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