VirtualBox

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

最後變更 在這個檔案從25363是 25363,由 vboxsync 提交於 15 年 前

FE/Qt4-NLS: update

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 26.6 KB
 
1# $Id: Makefile.kmk 25363 2009-12-14 13:41:44Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2009 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.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
42#
43# The targets.
44#
45ifdef VBOX_WITH_HARDENING
46PROGRAMS += VirtualBoxHardened
47DLLS += VirtualBox
48else
49PROGRAMS += VirtualBox
50endif
51
52ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
53 DLLS += VBoxKeyboard
54 ## @todo convert to install target.
55 OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
56 CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
57endif
58INSTALLS += VirtualBox.nls
59
60
61#
62# Include the language lists.
63#
64include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
65
66
67#
68# VBoxKeyboard - keyboard library for X11.
69#
70VBoxKeyboard_TEMPLATE = VBOXR3
71VBoxKeyboard_SOURCES = \
72 src/X11/keyboard-new.c
73VBoxKeyboard_LIBS = X11
74VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
75
76
77#
78# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
79# redistributed with usable sources.
80#
81# This rule will link create a temporary symlink to src/X11/ and tar
82# up the selected files into a tarball that is installed into the
83# bin directory (probably belongs in /usr/shared/somewhere really,
84# but wtf, it's not like we're even trying to be FHS compliant).
85#
86## @todo this should be tar'ed down into the output directory and installed using an install target.
87$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
88 $(VBoxKeyboard_SOURCES) \
89 src/X11/COPYING.LIB \
90 src/X11/keyboard.h \
91 src/X11/keyboard-layouts.h \
92 src/X11/keyboard-list.h \
93 src/X11/keyboard-tables.h \
94 src/X11/keyboard-types.h \
95 src/X11/Makefile \
96 ,$(PATH_SUB_CURRENT)) | $(PATH_TARGET)/VBoxKeyboard/
97 $(call MSG_TOOL,tar/gzip,,$@)
98 $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard $@
99 $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/X11/ $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
100 $(QUIET)cd $(PATH_TARGET)/VBoxKeyboard \
101 && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
102 | gzip - > $@
103 $(QUIET2)$(RM) -f $(PATH_TARGET)/VBoxKeyboard/vboxkeyboard
104
105OTHER_CLEAN += \
106 $(PATH_BIN)/vboxkeyboard.tar.gz
107
108
109#
110# Hardened VirtualBox.
111#
112VirtualBoxHardened_TEMPLATE = VBOXR3HARDENEDEXE
113VirtualBoxHardened_SOURCES = src/hardenedmain.cpp
114VirtualBoxHardened_NAME = VirtualBox
115ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
116 #VirtualBoxHardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
117 VirtualBoxHardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
118endif
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 ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
137 #VirtualBox_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
138 VirtualBox_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
139 endif
140endif
141VirtualBox_SDKS.win = WINPSDK DXSDK
142ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
143 VirtualBox_SDKS += LIBSDL
144endif
145
146ifdef VBOX_WITH_ICHAT_THEATER
147 # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
148 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
149endif
150
151VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
152VirtualBox_DEFS.debug = VBOX_CHECK_STATE # QT_FATAL_ASSERT
153VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
154ifndef VBOX_WITH_COCOA_QT
155VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS
156endif
157VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
158VirtualBox_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
159VirtualBox_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
160VirtualBox_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
161VirtualBox_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
162VirtualBox_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
163VirtualBox_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
164## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
165VirtualBox_DEFS.darwin.x86 += VBOX_WITH_HACKED_QT
166ifdef VBOX_WITH_ICHAT_THEATER
167 VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
168endif
169ifneq ($(KBUILD_TYPE),release)
170 # non-release builds has some extra features.
171 VirtualBox_DEFS.win += VBOX_GUI_USE_DDRAW
172endif
173VirtualBox_DEFS += \
174 $(if $(VBOX_WITH_REGISTRATION),VBOX_WITH_REGISTRATION) \
175 $(if $(VBOX_WITH_REGISTRATION_REQUEST),VBOX_WITH_REGISTRATION_REQUEST) \
176 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
177 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
178 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
179 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
180 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
181 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT)
182ifdef VBOX_WITH_DEBUGGER_GUI
183 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI
184 if "$(KBUILD_TYPE)" != "release"
185 VirtualBox_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
186 endif
187endif
188ifdef VBOX_WITH_VIDEOHWACCEL
189 VirtualBox_DEFS += VBOX_WITH_VIDEOHWACCEL \
190 VBOX_GUI_USE_QGL
191else ifdef VBOX_GUI_USE_QGL
192 VirtualBox_DEFS += VBOX_GUI_USE_QGL
193endif
194ifdef VBOX_WITH_VIRTIO
195 VirtualBox_DEFS += VBOX_WITH_VIRTIO
196endif
197
198ifdef VBOX_BLEEDING_EDGE
199VirtualBox_src/VBoxConsoleWnd.cpp_DEFS += \
200 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
201VirtualBox_src/VBoxSelectorWnd.cpp_DEFS += \
202 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
203VirtualBox_src/VBoxAboutDlg.cpp_DEFS += \
204 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
205VirtualBox_src/main.cpp_DEFS += \
206 VBOX_BLEEDING_EDGE=\"$(VBOX_BLEEDING_EDGE)\"
207endif
208
209
210VBOX_GUI_INC_DIRS = \
211 ./src \
212 ./src/globals \
213 ./src/extensions \
214 ./src/settings \
215 ./src/settings/global \
216 ./src/settings/vm \
217 ./src/wizards/newvm \
218 ./src/wizards/newhd \
219 ./src/wizards/firstrun \
220 ./src/wizards/exportappliance \
221 ./src/wizards/importappliance \
222 ./src/widgets \
223 ./src/X11 \
224 ./src/darwin
225
226VirtualBox_INCS = \
227 $(VBOX_GUI_INC_DIRS) \
228 $(PATH_VirtualBox)/include
229
230# Necessary for the hdd backend enumeration
231VirtualBox_LIBS = $(LIB_DDU)
232
233ifdef VBOX_WITH_VIDEOHWACCEL
234# Necessary for save state support
235VirtualBox_LIBS += $(LIB_VMM)
236endif
237ifeq ($(KBUILD_TYPE),release)
238 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
239else
240 VirtualBox_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
241 ifeq ($(USERNAME),dmik)
242 VirtualBox_LDFLAGS.win += /SUBSYSTEM:windows
243 else
244 VirtualBox_LDFLAGS.win += /SUBSYSTEM:console
245 endif
246endif
247
248if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
249 VirtualBox_LDFLAGS.win += /DelayLoad:QtOpenGLVBox4.dll /DelayLoad:OPENGL32.dll
250endif
251
252# r=bird: what is -lz doing here? it belongs in LIBS.
253VirtualBox_LDFLAGS.darwin = -lz \
254 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \
255 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
256VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime
257ifdef VBOX_WITH_ICHAT_THEATER
258 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
259endif
260if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
261 VirtualBox_LDFLAGS.darwin += -framework OpenGL
262endif
263
264VirtualBox_LIBS.win = \
265 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
266 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
267 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
268ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
269 VirtualBox_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
270endif
271
272if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
273 VirtualBox_LIBS.win += $(PATH_SDK_WINPSDK_LIB)/Opengl32.lib
274 VirtualBox_LIBS.solaris += GL
275 VirtualBox_LIBS.linux += GL
276endif
277
278# Headers containing definitions of classes that use the Q_OBJECT macro.
279VirtualBox_QT_MOCHDRS = \
280 src/VBoxAboutDlg.h \
281 src/VBoxCloseVMDlg.h \
282 src/VBoxConsoleView.h \
283 src/VBoxConsoleWnd.h \
284 src/VBoxGlobalSettings.h \
285 src/VBoxMediaManagerDlg.h \
286 src/VBoxRegistrationDlg.h \
287 src/VBoxSelectorWnd.h \
288 src/VBoxSnapshotDetailsDlg.h \
289 src/VBoxSnapshotsWgt.h \
290 src/VBoxTakeSnapshotDlg.h \
291 src/VBoxUpdateDlg.h \
292 src/VBoxVMInformationDlg.h \
293 src/VBoxVMListView.h \
294 src/VBoxVMLogViewer.h \
295 src/globals/VBoxGlobal.h \
296 src/globals/VBoxProblemReporter.h \
297 src/globals/VBoxUtils.h \
298 src/extensions/QIAbstractWizard.h \
299 src/extensions/QIAdvancedSlider.h \
300 src/extensions/QIArrowButtonPress.h \
301 src/extensions/QIArrowButtonSwitch.h \
302 src/extensions/QIArrowSplitter.h \
303 src/extensions/QIDialog.h \
304 src/extensions/QIFileDialog.h \
305 src/extensions/QIHotKeyEdit.h \
306 src/extensions/QIHttp.h \
307 src/extensions/QILabel.h \
308 src/extensions/QILabelSeparator.h \
309 src/extensions/QIListView.h \
310 src/extensions/QIMainDialog.h \
311 src/extensions/QIMessageBox.h \
312 src/extensions/QIRichToolButton.h \
313 src/extensions/QISplitter.h \
314 src/extensions/QIStateIndicator.h \
315 src/extensions/QIStatusBar.h \
316 src/extensions/QIToolButton.h \
317 src/extensions/QITreeView.h \
318 src/extensions/QITreeWidget.h \
319 src/extensions/QIWidgetValidator.h \
320 src/settings/VBoxSettingsDialog.h \
321 src/settings/VBoxSettingsDialogSpecific.h \
322 src/settings/VBoxSettingsPage.h \
323 src/settings/VBoxSettingsSelector.h \
324 src/settings/global/VBoxGLSettingsGeneral.h \
325 src/settings/global/VBoxGLSettingsInput.h \
326 src/settings/global/VBoxGLSettingsUpdate.h \
327 src/settings/global/VBoxGLSettingsLanguage.h \
328 src/settings/global/VBoxGLSettingsNetwork.h \
329 src/settings/global/VBoxGLSettingsNetworkDetails.h \
330 src/settings/vm/VBoxVMSettingsGeneral.h \
331 src/settings/vm/VBoxVMSettingsSystem.h \
332 src/settings/vm/VBoxVMSettingsDisplay.h \
333 src/settings/vm/VBoxVMSettingsHD.h \
334 src/settings/vm/VBoxVMSettingsAudio.h \
335 src/settings/vm/VBoxVMSettingsNetwork.h \
336 src/settings/vm/VBoxVMSettingsSerial.h \
337 src/settings/vm/VBoxVMSettingsParallel.h \
338 src/settings/vm/VBoxVMSettingsUSB.h \
339 src/settings/vm/VBoxVMSettingsUSBFilterDetails.h \
340 src/settings/vm/VBoxVMSettingsSF.h \
341 src/settings/vm/VBoxVMSettingsSFDetails.h \
342 src/wizards/newvm/VBoxNewVMWzd.h \
343 src/wizards/newhd/VBoxNewHDWzd.h \
344 src/wizards/firstrun/VBoxVMFirstRunWzd.h \
345 src/wizards/exportappliance/VBoxExportApplianceWzd.h \
346 src/wizards/importappliance/VBoxImportApplianceWzd.h \
347 src/widgets/VBoxApplianceEditorWgt.h \
348 src/widgets/VBoxBootTable.h \
349 src/widgets/VBoxDownloaderWgt.h \
350 src/widgets/VBoxExportApplianceWgt.h \
351 src/widgets/VBoxFilePathSelectorWidget.h \
352 src/widgets/VBoxImportApplianceWgt.h \
353 src/widgets/VBoxLineTextEdit.h \
354 src/widgets/VBoxMediaComboBox.h \
355 src/widgets/VBoxMiniToolBar.h \
356 src/widgets/VBoxOSTypeSelectorButton.h \
357 src/widgets/VBoxOSTypeSelectorWidget.h \
358 src/widgets/VBoxProgressDialog.h \
359 src/widgets/VBoxSpecialControls.h \
360 src/widgets/VBoxWarningPane.h
361
362# Sources containing local definitions of classes that use the Q_OBJECT macro.
363VirtualBox_QT_MOCSRCS = \
364 src/VBoxSelectorWnd.cpp \
365 src/VBoxConsoleWnd.cpp \
366 src/VBoxMediaManagerDlg.cpp
367ifdef VBOX_WITH_XPCOM
368 VirtualBox_QT_MOCSRCS += \
369 src/globals/COMDefs.cpp
370endif
371ifeq ($(KBUILD_TARGET),win)
372VirtualBox_QT_MOCSRCS += \
373 src/extensions/QIFileDialog.cpp
374endif
375
376VirtualBox_SOURCES = \
377 src/main.cpp \
378 src/VBoxAboutDlg.cpp \
379 src/VBoxCloseVMDlg.cpp \
380 src/VBoxConsoleView.cpp \
381 src/VBoxConsoleWnd.cpp \
382 src/VBoxFrameBuffer.cpp \
383 src/VBoxGlobalSettings.cpp \
384 src/VBoxHelpActions.cpp \
385 src/VBoxMediaManagerDlg.cpp \
386 src/VBoxMedium.cpp \
387 src/VBoxRegistrationDlg.cpp \
388 src/VBoxSelectorWnd.cpp \
389 src/VBoxSnapshotDetailsDlg.cpp \
390 src/VBoxSnapshotsWgt.cpp \
391 src/VBoxTakeSnapshotDlg.cpp \
392 src/VBoxUpdateDlg.cpp \
393 src/VBoxVMInformationDlg.cpp \
394 src/VBoxVMListView.cpp \
395 src/VBoxVMLogViewer.cpp \
396 src/globals/COMDefs.cpp \
397 src/globals/VBoxDefs.cpp \
398 src/globals/VBoxGlobal.cpp \
399 src/globals/VBoxProblemReporter.cpp \
400 src/extensions/QIAbstractWizard.cpp \
401 src/extensions/QIAdvancedSlider.cpp \
402 src/extensions/QIArrowButtonPress.cpp \
403 src/extensions/QIArrowButtonSwitch.cpp \
404 src/extensions/QIArrowSplitter.cpp \
405 src/extensions/QIDialog.cpp \
406 src/extensions/QIDialogButtonBox.cpp \
407 src/extensions/QIFileDialog.cpp \
408 src/extensions/QIHotKeyEdit.cpp \
409 src/extensions/QILabel.cpp \
410 src/extensions/QILabelSeparator.cpp \
411 src/extensions/QILineEdit.cpp \
412 src/extensions/QIListView.cpp \
413 src/extensions/QIMainDialog.cpp \
414 src/extensions/QIMessageBox.cpp \
415 src/extensions/QIRichToolButton.cpp \
416 src/extensions/QISplitter.cpp \
417 src/extensions/QIStateIndicator.cpp \
418 src/extensions/QIStatusBar.cpp \
419 src/extensions/QITreeView.cpp \
420 src/extensions/QITreeWidget.cpp \
421 src/extensions/QIWidgetValidator.cpp \
422 src/settings/VBoxSettingsDialog.cpp \
423 src/settings/VBoxSettingsDialogSpecific.cpp \
424 src/settings/VBoxSettingsSelector.cpp \
425 src/settings/global/VBoxGLSettingsGeneral.cpp \
426 src/settings/global/VBoxGLSettingsInput.cpp \
427 src/settings/global/VBoxGLSettingsUpdate.cpp \
428 src/settings/global/VBoxGLSettingsLanguage.cpp \
429 src/settings/global/VBoxGLSettingsNetwork.cpp \
430 src/settings/global/VBoxGLSettingsNetworkDetails.cpp \
431 src/settings/vm/VBoxVMSettingsGeneral.cpp \
432 src/settings/vm/VBoxVMSettingsSystem.cpp \
433 src/settings/vm/VBoxVMSettingsDisplay.cpp \
434 src/settings/vm/VBoxVMSettingsHD.cpp \
435 src/settings/vm/VBoxVMSettingsAudio.cpp \
436 src/settings/vm/VBoxVMSettingsNetwork.cpp \
437 src/settings/vm/VBoxVMSettingsSerial.cpp \
438 src/settings/vm/VBoxVMSettingsParallel.cpp \
439 src/settings/vm/VBoxVMSettingsUSB.cpp \
440 src/settings/vm/VBoxVMSettingsUSBFilterDetails.cpp \
441 src/settings/vm/VBoxVMSettingsSF.cpp \
442 src/settings/vm/VBoxVMSettingsSFDetails.cpp \
443 src/wizards/newvm/VBoxNewVMWzd.cpp \
444 src/wizards/newhd/VBoxNewHDWzd.cpp \
445 src/wizards/firstrun/VBoxVMFirstRunWzd.cpp \
446 src/wizards/exportappliance/VBoxExportApplianceWzd.cpp \
447 src/wizards/importappliance/VBoxImportApplianceWzd.cpp \
448 src/widgets/VBoxApplianceEditorWgt.cpp \
449 src/widgets/VBoxBootTable.cpp \
450 src/widgets/VBoxDownloaderWgt.cpp \
451 src/widgets/VBoxExportApplianceWgt.cpp \
452 src/widgets/VBoxFilePathSelectorWidget.cpp \
453 src/widgets/VBoxGuestRAMSlider.cpp \
454 src/widgets/VBoxImportApplianceWgt.cpp \
455 src/widgets/VBoxLineTextEdit.cpp \
456 src/widgets/VBoxMediaComboBox.cpp \
457 src/widgets/VBoxMiniToolBar.cpp \
458 src/widgets/VBoxOSTypeSelectorButton.cpp \
459 src/widgets/VBoxOSTypeSelectorWidget.cpp \
460 src/widgets/VBoxProgressDialog.cpp \
461 src/widgets/VBoxSpecialControls.cpp \
462 src/widgets/VBoxWarningPane.cpp
463
464ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
465 ifndef VBOX_OSE
466 VirtualBox_QT_MOCHDRS += \
467 src/VBoxLicenseViewer.h
468 VirtualBox_SOURCES += \
469 src/VBoxLicenseViewer.cpp
470 else
471 VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
472 src/VBoxLicenseViewer.h \
473 src/VBoxLicenseViewer.cpp
474 endif
475 VirtualBox_SOURCES += \
476 src/X11/XKeyboard-new.cpp \
477 src/X11/VBoxX11Helper.cpp
478else
479 VirtualBox_VBOX_EXTRA_NLS_SOURCES += \
480 src/VBoxLicenseViewer.h \
481 src/VBoxLicenseViewer.cpp
482endif
483
484VirtualBox_SOURCES.win += \
485 src/VBoxFBDDRAW.cpp \
486 src/win/VirtualBox.rc
487
488VirtualBox_SOURCES.darwin = \
489 src/darwin/DarwinKeyboard.cpp \
490 src/darwin/VBoxUtils-darwin.cpp \
491 src/darwin/AbstractDockIconPreview.cpp \
492 src/VBoxFBQuartz2D.cpp
493
494ifdef VBOX_WITH_ICHAT_THEATER
495 VirtualBox_SOURCES.darwin += \
496 src/darwin/VBoxIChatTheaterWrapper.m
497endif
498
499ifdef VBOX_WITH_COCOA_QT
500 VirtualBox_DEFS += VBOX_DARWIN_USE_NATIVE_CONTROLS
501 VirtualBox_SOURCES.darwin += \
502 src/darwin/VBoxCocoaApplication.m \
503 src/darwin/VBoxUtils-darwin-cocoa.mm \
504 src/darwin/VBoxCocoaSpecialControls.mm \
505 src/darwin/CocoaDockIconPreview.mm
506 VirtualBox_QT_MOCHDRS.darwin = \
507 src/darwin/VBoxCocoaSpecialControls.h
508else
509 VirtualBox_SOURCES.darwin += \
510 src/darwin/VBoxUtils-darwin-carbon.cpp \
511 src/darwin/CarbonDockIconPreview.cpp
512endif
513
514if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
515 VirtualBox_SOURCES += \
516 src/VBoxFBQGL.cpp \
517 src/VBoxFBOverlay.cpp \
518 src/VBoxGLSupportInfo.cpp
519endif
520# The Qt modules we're using.
521# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
522VirtualBox_QT_MODULES = Core Gui Network
523
524if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
525VirtualBox_QT_MODULES += OpenGL
526endif
527
528# Import QDesigner UI sources and translations from VBoxUI.pro.
529ifndef VBOX_WITH_REGISTRATION
530 FORMS := $(filter-out src/VBoxRegistrationDlg.ui,$(FORMS))
531endif
532$(eval VirtualBox_SOURCES += $(FORMS))
533
534# Resource files with some OSE differences (VirtualBoxBrand.qrc is created further down).
535VirtualBox_SOURCES += VirtualBox1.qrc
536VirtualBox1.qrc_RCCFLAGS = -name BASIC1
537VirtualBox_SOURCES += VirtualBox2.qrc
538VirtualBox2.qrc_RCCFLAGS = -name BASIC2
539VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
540$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND
541if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI_USE_QGL)
542VirtualBox_SOURCES += VirtualBoxShaders.qrc
543VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS
544endif
545
546# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
547VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \
548 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
549# Compress the translation units.
550VirtualBox_LRCFLAGS = -silent
551# Where to install the translations (a separate install target, VirtualBox-nls-inst is created).
552VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
553
554
555## @todo how to detect what tool is used?
556## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
557# more generic -Wno-extra
558# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
559ifdef VBOX_WITH_XPCOM
560 VirtualBox_src/globals/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
561endif
562
563
564#
565# Generate the COM wrappers.
566#
567## @todo This needs some cleaning up perhaps...
568## @todo kBuild: Non-existing +| targets should be tried remade or what?
569VirtualBox_BLDDIRS += $(PATH_VirtualBox)/include
570VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
571VirtualBox_CLEAN += \
572 $(PATH_VirtualBox)/include/COMWrappers \
573 $(PATH_VirtualBox)/include/COMWrappers.tmp \
574 $(PATH_VirtualBox)/include/COMWrappers.h \
575 $(PATH_VirtualBox)/include/COMWrappers.cpp
576VirtualBox_SOURCES += $(PATH_VirtualBox)/include/COMWrappers.cpp
577
578$$(PATH_VirtualBox)/include/COMWrappers \
579+| $$(PATH_VirtualBox)/include/COMWrappers.h \
580+| $$(PATH_VirtualBox)/include/COMWrappers.cpp: \
581 $(VBOX_XIDL_FILE) \
582 $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl \
583 | $$(dir $$@)
584 $(call MSG_GENERATE,VirtualBox,$<,$@)
585 $(QUIET)$(RM) -f $@ [email protected] [email protected] [email protected]
586 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
587
588 $(QUIET)$(SED) -e '1,/\/\/ wrapper definitions/ !d' \
589 --output [email protected] $@
590 $(QUIET)$(CP) --changed [email protected] [email protected]
591
592 $(QUIET)$(APPEND) -t -n [email protected] \
593 '/*' \
594 ' * DO NOT EDIT! This is a generated file, see COMWrappers.h for details.' \
595 ' */' \
596 '' \
597 '#include "VBoxGlobal.h"' \
598 ''
599 $(QUIET)$(SED) -e '/\/\/ wrapper definitions/,9999999 !d' \
600 -e 's/^inline //' \
601 --append [email protected] $@
602 $(QUIET)$(CP) --changed [email protected] [email protected]
603 $(QUIET)$(RM) -f [email protected]
604
605
606# alias for generating the COM Wrappers file.
607testwrappers:: $$(PATH_VirtualBox)/include/COMWrappers.h
608
609
610#
611# Generate qrc file with branded icons.
612#
613VirtualBox_BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)
614VirtualBox_CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc
615if "$(KBUILD_HOST)" == "win" ## @todo remove when kBuild ticket #52 has been fixed and deployed.
616 VBOX_DRIVE_HACK := $(firstword $(subst :, ,$(PATH_ROOT))):
617else
618 VBOX_DRIVE_HACK :=
619endif
620$(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc: \
621 $(VBOX_VIRTUALBOX4_SRC)/VirtualBoxBrand.qrc \
622 | $$(dir $$@)
623 $(call MSG_GENERATE,VirtualBox,$<,$@)
624 $(QUIET)$(SED) \
625 -e 's;@VBOX_ABOUT_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_PNG));g' \
626 -e 's;@VBOX_ABOUT_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_ABOUT_16PX_PNG));g' \
627 -e 's;@VBOX_VBOX_16PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_16PX_PNG));g' \
628 -e 's;@VBOX_VBOX_20PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_20PX_PNG));g' \
629 -e 's;@VBOX_VBOX_32PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_32PX_PNG));g' \
630 -e 's;@VBOX_VBOX_40PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_40PX_PNG));g' \
631 -e 's;@VBOX_VBOX_48PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_48PX_PNG));g' \
632 -e 's;@VBOX_VBOX_64PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_VBOX_64PX_PNG));g' \
633 -e 's;@VBOX_CUBE_42PX_PNG@;$(subst $(VBOX_DRIVE_HACK),,$(VBOX_BRAND_GUI_CUBE_42PX_PNG));g' \
634 --output $@ \
635 $<
636
637
638ifeq ($(KBUILD_TARGET),win)
639#
640# On Windows we'll have to generate/edit part of the resource file.
641# The IDI_ICON1 name is Qt specific.
642#
643src/win/VirtualBox.rc_INCS = $(PATH_VirtualBox)
644src/win/VirtualBox.rc_DEPS = $(PATH_VirtualBox)/VirtualBox-icon.rc
645src/win/VirtualBox.rc_CLEAN = $(PATH_VirtualBox)/VirtualBox-icon.rc
646
647$$(PATH_VirtualBox)/VirtualBox-icon.rc: $(MAKEFILE_CURRENT) $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
648 $(APPEND) -t $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
649
650endif # win
651
652
653ifeq ($(KBUILD_TARGET),darwin)
654#
655# Create directories for each approved language or the application
656# menu won't be translated.
657#
658INSTALLS += VirtualBox.lproj
659VirtualBox.lproj_INST = $(INST_VIRTUALBOX)Contents/Resources/
660VirtualBox.lproj_MODE = 755
661VirtualBox.lproj_DIRS := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
662
663#
664# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
665# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
666#
667INSTALLS += VirtualBox.app
668VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
669VirtualBox.app_MODE = 644
670VirtualBox.app_SOURCES = \
671 src/darwin/PkgInfo \
672 $(PATH_VirtualBox.app)/Info.plist \
673 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
674
675$$(PATH_VirtualBox.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
676 $(call MSG_GENERATE,VirtualBox.app,$<,$@)
677 $(QUIET)$(RM) -f $@
678 $(QUIET)$(SED) \
679 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
680 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
681 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
682 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
683 $< > $@
684
685INSTALLS += VirtualBoxVM.app
686VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
687VirtualBoxVM.app_MODE = 644
688VirtualBoxVM.app_SOURCES = \
689 src/darwin/VM-PkgInfo=>PkgInfo \
690 $(PATH_VirtualBoxVM.app)/VM-Info.plist=>Info.plist
691VirtualBoxVM.app_SYMLINKS = \
692 MacOS=>../../../MacOS/ \
693 Resources=>../../../Resources/
694
695$$(PATH_VirtualBoxVM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
696 $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
697 $(QUIET)$(RM) -f $@
698 $(QUIET)$(SED) \
699 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
700 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
701 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
702 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
703 --output $@ $<
704endif # darwin
705
706#
707# App for testing GL support
708#
709if defined(VBOX_WITH_VIDEOHWACCEL)
710 if1of ($(KBUILD_TARGET), win linux)
711 LIBRARIES += VBoxOGL2D
712 VBoxOGL2D_TEMPLATE = VBOXR3STATIC
713 VBoxOGL2D_USES = qt4
714# VBoxOGL2D_QTTOOL = QT4
715# VBoxOGL2D_MOCTOOL = QT4
716# VBoxOGL2D_UICTOOL = QT4
717# VBoxOGL2D_RCCTOOL = QT4
718# VBoxOGL2D_LRCTOOL = QT4
719 VBoxOGL2D_SDKS = QT4
720 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
721 VBoxOGL2D_QT_MODULES += OpenGL
722 VBoxOGL2D_SOURCES = \
723 src/VBoxGLSupportInfo.cpp
724 VBoxOGL2D_INCS = include
725 endif
726endif
727
728#
729# Testcase for the darwin keyboard routines.
730#
731ifdef VBOX_WITH_TESTCASES
732PROGRAMS.darwin += tstDarwinKeyboard
733tstDarwinKeyboard_NAME = tstDarwinKeyboard
734tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
735tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS
736tstDarwinKeyboard_INCS = include
737tstDarwinKeyboard_SOURCES = \
738 src/darwin/tstDarwinKeyboard.cpp \
739 src/darwin/DarwinKeyboard.cpp
740tstDarwinKeyboard_SOURCES.amd64 = \
741 src/darwin/VBoxCocoaApplication.m
742tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit
743tstDarwinKeyboard_LIBS = \
744 $(LIB_RUNTIME)
745endif
746
747
748# Unset everything that was loaded from VBoxUI.pro.
749TEMPLATE := $(SAVED_TEMPLATE)
750SAVED_TEMPLATE :=
751LANGUAGE :=
752FORMS :=
753TRANSLATIONS :=
754IMAGES :=
755
756
757# Commit the magic.
758# (note: before custom rules that make usage of generated variables!).
759include $(KBUILD_PATH)/subfooter.kmk
760
761#
762# Update all known NLS translation (.ts) files in the nls/ subdirectory.
763#
764# NOTE: This target is intended to be run only by the GUI maintainer shortly
765# before a new product release. VirtualBox_xx_YY.ts is a template for new
766# languages and should never be actually translated or installed.
767#
768# For Qt >= 4.6.0 it maybe necessary to add -I $(VBOX_GUI_INC_DIRS) to the
769# lupdate call
770#
771updatenls:: makeallnls nls/VirtualBox_en.ts
772
773makeallnls:: \
774 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
775 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
776 $(call MSG_L1,lupdate all languages (nls/*.ts))
777 $(QUIET)$(TOOL_QT4_LUPDATE) \
778 $^ \
779 -ts \
780 $(filter-out nls/VirtualBox_en.ts,$(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS))) \
781 nls/VirtualBox_xx_YY.ts
782
783# Create the English translation file. This is something special cause it will
784# contain the plural forms only.
785nls/VirtualBox_en.ts: \
786 $(foreach header,$(VBOX_GUI_INC_DIRS),$(wildcard $(header)/*.h)) \
787 $(filter-out %.qrc,$(VirtualBox_SOURCES) $(VirtualBox_VBOX_EXTRA_NLS_SOURCES))
788 $(call MSG_L1,lupdate $@)
789 $(QUIET)$(TOOL_QT4_LUPDATE) \
790 $^ \
791 -ts \
792 $@
793 $(QUIET)$(SED) -n -i -e \
794 '/<context>/,/<\/context>/!p;/<context>/h;/<name>/H;/<message numerus="yes">/,/<\/message>/H;/<\/context>/{H;x;/<message/p}' \
795 $@
796
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette