VirtualBox

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

Last change on this file since 26956 was 26920, checked in by vboxsync, 15 years ago

FE/Qt4: new core: forgotten makefile

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