VirtualBox

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

Last change on this file since 27057 was 27012, checked in by vboxsync, 15 years ago

FE/Qt4: New running VM core: initial seamless mode feature commit.

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