VirtualBox

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

Last change on this file since 35346 was 34813, checked in by vboxsync, 14 years ago

FE/Qt: Build fix #1 for r68621.

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