VirtualBox

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

Last change on this file since 37808 was 37551, checked in by vboxsync, 14 years ago

FE/Qt4: fix osx

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