VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk@ 12331

Last change on this file since 12331 was 12331, checked in by vboxsync, 17 years ago

FE/Qt4: Added support for automatically generating the filedialog filters for
the supported hdd backends of vbox.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 18.7 KB
Line 
1# $Id: Makefile.kmk 12331 2008-09-10 08:44:41Z vboxsync $
2## @file
3# Makefile for the VirtualBox Qt GUI.
4#
5
6#
7# Copyright (C) 2006-2007 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)
29
30VBOX_WITH_REGISTRATION := 1
31
32# Ask the user to register at Sun. If this setting is disabled the user can
33# still register using the menu if desired.
34VBOX_WITH_REGISTRATION_REQUEST := 1
35
36# Show the update notifier dialog during startup. If this setting is disabled
37# the user can still update using the menu if desired.
38VBOX_WITH_UPDATE_REQUEST := 1
39
40
41#
42# The targets.
43#
44ifdef VBOX_WITH_HARDENING
45PROGRAMS += VirtualBox4Hardened
46DLLS += VirtualBox4
47else
48PROGRAMS += VirtualBox4
49endif
50
51ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
52 DLLS += VBoxKeyboard
53 ## @todo convert to install target.
54 OTHERS += $(PATH_BIN)/vboxkeyboard.tar.gz
55 CLEAN += $(PATH_BIN)/vboxkeyboard.tar.gz
56endif
57INSTALLS += VirtualBox4.nls
58
59
60#
61# VBoxKeyboard - keyboard library for X11.
62#
63VBoxKeyboard_TEMPLATE = VBOXR3
64VBoxKeyboard_SOURCES = \
65 src/linux/keyboard-new.c
66VBoxKeyboard_LIBS = X11
67VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
68
69
70#
71# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
72# redistributed with usable sources.
73#
74# This rule will link create a temporary symlink to src/linux/ and tar
75# up the selected files into a tarball that is installed into the
76# bin directory (probably belongs in /usr/shared/somewhere really,
77# but wtf, it's not like we're even trying to be FHS compliant).
78#
79## @todo this should be tar'ed down into the output directory and installed using an install target.
80$(PATH_BIN)/vboxkeyboard.tar.gz: $(abspathex \
81 $(VBoxKeyboard_SOURCES) \
82 src/linux/COPYING.LIB \
83 src/linux/keyboard.h \
84 src/linux/keyboard-layouts.h \
85 src/linux/keyboard-list.h \
86 src/linux/keyboard-tables.h \
87 src/linux/keyboard-types.h \
88 src/linux/Makefile \
89 ,$(PATH_SUB_CURRENT))
90 $(call MSG_TOOL,tar/gzip,,$@)
91 $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard $@
92 $(QUIET)$(LN_SYMLINK) $(VBOX_VIRTUALBOX4_SRC)/src/linux/ $(PATH_TARGET)/vboxkeyboard
93 $(QUIET)cd $(PATH_TARGET) \
94 && tar -chvf - $(addprefix vboxkeyboard/,$(notdir $^)) \
95 | gzip - > $@
96 $(QUIET2)$(RM) -f $(PATH_TARGET)/vboxkeyboard
97
98OTHER_CLEAN += \
99 $(PATH_BIN)/vboxkeyboard.tar.gz
100
101
102#
103# Hardened VirtualBox4.
104#
105VirtualBox4Hardened_TEMPLATE = VBOXR3HARDENEDEXE
106VirtualBox4Hardened_SOURCES = src/hardenedmain.cpp
107VirtualBox4Hardened_NAME = VirtualBox
108ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
109 #VirtualBox4Hardened_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
110 VirtualBox4Hardened_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
111endif
112
113
114#
115# Include Qt project file, we'll use FORMS and TRANSLATIONS in
116# the VirtualBox4 setup below.
117#
118SAVED_TEMPLATE := $(TEMPLATE)
119include $(PATH_SUB_CURRENT)/VBoxUI.pro
120
121
122#
123# VirtualBox4 - The GUI program.
124#
125USES += qt4
126VirtualBox4_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQT4GUI,VBOXQT4GUIEXE)
127VirtualBox4_NAME = VirtualBox
128ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers.
129 ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed.
130 #VirtualBox4_INST.darwin = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
131 VirtualBox4_INST = $(INST_BIN)VirtualBox $(INST_BIN)VirtualBoxVM
132 endif
133endif
134VirtualBox4_SDKS.win = WINPSDK DXSDK
135ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2 ## @todo solaris
136 VirtualBox4_SDKS += LIBSDL
137endif
138
139ifdef VBOX_WITH_ICHAT_THEATER
140 # For testing iChat Theater stuff change the sdk path (HACK ALERT!)
141 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
142endif
143
144VirtualBox4_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS
145VirtualBox4_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
146VirtualBox4_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
147VirtualBox4_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
148VirtualBox4_DEFS.linux = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
149VirtualBox4_DEFS.netbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
150VirtualBox4_DEFS.openbsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
151VirtualBox4_DEFS.solaris = VBOX_GUI_USE_QIMAGE #VBOX_GUI_USE_SDL
152VirtualBox4_DEFS.win = VBOX_GUI_USE_QIMAGE UNICODE QT_DLL
153VirtualBox4_DEFS.win.amd64 = VBOX_WITHOUT_QHTTP
154#ifndef VBOX_OSE
155## @todo VBOX_WITH_HACKED_QT doesn't apply to Qt4, so why is this still here?
156 VirtualBox4_DEFS.darwin += VBOX_WITH_HACKED_QT
157#endif
158ifdef VBOX_WITH_ICHAT_THEATER
159 VirtualBox4_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
160endif
161ifneq ($(KBUILD_TYPE),release)
162 # non-release builds has some extra features.
163 VirtualBox4_DEFS.win += VBOX_GUI_USE_DDRAW
164endif
165ifdef VBOX_WITH_REGISTRATION
166 VirtualBox4_DEFS += VBOX_WITH_REGISTRATION
167endif
168ifdef VBOX_WITH_REGISTRATION_REQUEST
169 VirtualBox4_DEFS += VBOX_WITH_REGISTRATION_REQUEST
170endif
171ifdef VBOX_WITH_UPDATE_REQUEST
172 VirtualBox4_DEFS += VBOX_WITH_UPDATE_REQUEST
173endif
174ifdef VBOX_WITH_ALSA
175 VirtualBox4_DEFS += VBOX_WITH_ALSA
176endif
177ifdef VBOX_WITH_PULSE
178 VirtualBox4_DEFS += VBOX_WITH_PULSE
179endif
180ifdef VBOX_WITH_E1000
181 VirtualBox4_DEFS += VBOX_WITH_E1000
182endif
183ifdef VBOX_OSE
184 VirtualBox4_DEFS += VBOX_OSE
185endif
186ifdef VBOX_WITH_DEBUGGER_GUI
187 VirtualBox4_DEFS += VBOX_WITH_DEBUGGER_GUI_MENU
188endif
189ifdef VBOX_WITH_NETFLT
190 VirtualBox4_DEFS += VBOX_WITH_NETFLT
191endif
192
193src/main.cpp_DEFS += VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\"
194src/main.cpp_DEPS += $(VBOX_VERSION_MK)
195
196VirtualBox4_INCS = \
197 ./include \
198 $(PATH_VirtualBox4)/include
199
200# Necessary for the hdd backend enumeration
201VirtualBox4_LIBS = $(LIB_DDU)
202
203ifeq ($(KBUILD_TYPE),release)
204 VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
205else
206 VirtualBox4_LDFLAGS.linux+= -rdynamic # for backtrace_symbols()
207 ifeq ($(USERNAME),dmik)
208 VirtualBox4_LDFLAGS.win += /SUBSYSTEM:windows
209 else
210 VirtualBox4_LDFLAGS.win += /SUBSYSTEM:console
211 endif
212endif
213# r=bird: what is -lz doing here? it belongs in LIBS.
214VirtualBox4_LDFLAGS.darwin = -lz \
215 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon -framework QuickTime \
216 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib)
217ifdef VBOX_WITH_ICHAT_THEATER
218 VirtualBox4_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore
219endif
220VirtualBox4_LIBS.win = \
221 $(PATH_SDK_WINPSDK_LIB)/Htmlhelp.Lib \
222 $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
223 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
224ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
225 VirtualBox4_LIBS += $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL)
226endif
227
228if "$(USER)" == "bird"
229ifdef VBOX_WITH_DEBUGGER_GUI ## @todo make this dynamically loadable and ship with release builds too.
230 ifeq ($(KBUILD_TARGET),win)
231 VirtualBox4_LIBS += $(PATH_LIB)/VBoxDbg$(VBOX_SUFF_LIB)
232 else
233 VirtualBox4_LIBS += $(PATH_DLL)/VBoxDbg$(VBOX_SUFF_DLL)
234 endif
235endif
236endif
237
238
239# Headers containing definitions of classes that use the Q_OBJECT macro.
240VirtualBox4_QT_MOCHDRS = \
241 include/QIWidgetValidator.h \
242 include/QIHotKeyEdit.h \
243 include/QIStatusBar.h \
244 include/QIStateIndicator.h \
245 include/QIMessageBox.h \
246 include/QILabel.h \
247 include/QILabel_p.h \
248 include/QILabelSeparator.h \
249 include/QIAbstractWizard.h \
250 include/QIListView.h \
251 include/QITreeWidget.h \
252 include/QIMainDialog.h \
253 include/QIHelpButton.h \
254 include/QIDialog.h \
255 include/VBoxFilePathSelectorWidget.h \
256 include/VBoxUtils.h \
257 include/VBoxGlobalSettings.h \
258 include/VBoxGlobal.h \
259 include/VBoxVMListView.h \
260 include/VBoxMediaComboBox.h \
261 include/VBoxSelectorWnd.h \
262 include/VBoxConsoleWnd.h \
263 include/VBoxConsoleView.h \
264 include/VBoxProblemReporter.h \
265 include/VBoxDownloaderWgt.h \
266 include/VBoxNetworkFramework.h \
267 include/VBoxAboutDlg.h \
268 include/VBoxCloseVMDlg.h \
269 include/VBoxNewVMWzd.h \
270 include/VBoxNewHDWzd.h \
271 include/VBoxVMFirstRunWzd.h \
272 include/VBoxRegistrationDlg.h \
273 include/VBoxUpdateDlg.h \
274 include/VBoxSnapshotDetailsDlg.h \
275 include/VBoxVMInformationDlg.h \
276 include/VBoxTakeSnapshotDlg.h \
277 include/VBoxSnapshotsWgt.h \
278 include/VBoxVMLogViewer.h \
279 include/VBoxDiskImageManagerDlg.h \
280 include/VBoxSettingsUtils.h \
281 include/VBoxVMSettingsGeneral.h \
282 include/VBoxVMSettingsHD.h \
283 include/VBoxVMSettingsCD.h \
284 include/VBoxVMSettingsFD.h \
285 include/VBoxVMSettingsAudio.h \
286 include/VBoxVMSettingsNetwork.h \
287 include/VBoxVMSettingsSerial.h \
288 include/VBoxVMSettingsParallel.h \
289 include/VBoxVMSettingsUSB.h \
290 include/VBoxVMSettingsUSBFilterDetails.h \
291 include/VBoxVMSettingsSF.h \
292 include/VBoxVMSettingsSFDetails.h \
293 include/VBoxVMSettingsVRDP.h \
294 include/VBoxGLSettingsGeneral.h \
295 include/VBoxGLSettingsInput.h \
296 include/VBoxGLSettingsUpdate.h \
297 include/VBoxGLSettingsLanguage.h \
298 include/VBoxSettingsDialog.h \
299 include/VBoxSettingsDialogSpecific.h \
300 include/VBoxSettingsPage.h \
301 include/VBoxSettingsSelector.h
302
303# Sources containing local definitions of classes that use the Q_OBJECT macro.
304VirtualBox4_QT_MOCSRCS = \
305 src/VBoxSelectorWnd.cpp \
306 src/VBoxDiskImageManagerDlg.cpp
307ifdef VBOX_WITH_XPCOM
308 VirtualBox4_QT_MOCSRCS += \
309 src/COMDefs.cpp
310endif
311
312VirtualBox4_SOURCES = \
313 src/main.cpp \
314 src/COMDefs.cpp \
315 src/QIWidgetValidator.cpp \
316 src/QIHotKeyEdit.cpp \
317 src/QIStateIndicator.cpp \
318 src/QIStatusBar.cpp \
319 src/QIMessageBox.cpp \
320 src/QILabel.cpp \
321 src/QILabelSeparator.cpp \
322 src/QIAbstractWizard.cpp \
323 src/QIDialog.cpp \
324 src/QIDialogButtonBox.cpp \
325 src/QIListView.cpp \
326 src/QITreeWidget.cpp \
327 src/QIMainDialog.cpp \
328 src/QILineEdit.cpp \
329 src/QIHelpButton.cpp \
330 src/VBoxFilePathSelectorWidget.cpp \
331 src/VBoxDefs.cpp \
332 src/VBoxGlobalSettings.cpp \
333 src/VBoxGlobal.cpp \
334 src/VBoxMediaComboBox.cpp \
335 src/VBoxProblemReporter.cpp \
336 src/VBoxSelectorWnd.cpp \
337 src/VBoxConsoleView.cpp \
338 src/VBoxConsoleWnd.cpp \
339 src/VBoxDownloaderWgt.cpp \
340 src/VBoxVMListView.cpp \
341 src/VBoxFrameBuffer.cpp \
342 src/HappyHttp.cpp \
343 src/VBoxNetworkFramework.cpp \
344 src/VBoxAboutDlg.cpp \
345 src/VBoxCloseVMDlg.cpp \
346 src/VBoxNewVMWzd.cpp \
347 src/VBoxNewHDWzd.cpp \
348 src/VBoxVMFirstRunWzd.cpp \
349 src/VBoxRegistrationDlg.cpp \
350 src/VBoxUpdateDlg.cpp \
351 src/VBoxSnapshotDetailsDlg.cpp \
352 src/VBoxVMInformationDlg.cpp \
353 src/VBoxTakeSnapshotDlg.cpp \
354 src/VBoxSnapshotsWgt.cpp \
355 src/VBoxVMLogViewer.cpp \
356 src/VBoxDiskImageManagerDlg.cpp \
357 src/VBoxVMSettingsGeneral.cpp \
358 src/VBoxVMSettingsHD.cpp \
359 src/VBoxVMSettingsCD.cpp \
360 src/VBoxVMSettingsFD.cpp \
361 src/VBoxVMSettingsAudio.cpp \
362 src/VBoxVMSettingsNetwork.cpp \
363 src/VBoxVMSettingsSerial.cpp \
364 src/VBoxVMSettingsParallel.cpp \
365 src/VBoxVMSettingsUSB.cpp \
366 src/VBoxVMSettingsUSBFilterDetails.cpp \
367 src/VBoxVMSettingsSF.cpp \
368 src/VBoxVMSettingsSFDetails.cpp \
369 src/VBoxVMSettingsVRDP.cpp \
370 src/VBoxGLSettingsGeneral.cpp \
371 src/VBoxGLSettingsInput.cpp \
372 src/VBoxGLSettingsUpdate.cpp \
373 src/VBoxGLSettingsLanguage.cpp \
374 src/VBoxSettingsDialog.cpp \
375 src/VBoxSettingsDialogSpecific.cpp \
376 src/VBoxSettingsSelector.cpp
377
378ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
379 ifndef VBOX_OSE
380 VirtualBox4_QT_MOCHDRS += \
381 include/VBoxLicenseViewer.h
382 VirtualBox4_SOURCES += \
383 src/VBoxLicenseViewer.cpp
384 else
385 VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
386 include/VBoxLicenseViewer.h \
387 src/VBoxLicenseViewer.cpp
388 endif
389 VirtualBox4_SOURCES += \
390 src/linux/XKeyboard-new.cpp \
391 src/VBoxX11Helper.cpp
392else
393 VirtualBox4_VBOX_EXTRA_NLS_SOURCES += \
394 include/VBoxLicenseViewer.h \
395 src/VBoxLicenseViewer.cpp
396endif
397
398VirtualBox4_SOURCES.win += \
399 src/VBoxFBDDRAW.cpp \
400 $(PATH_VirtualBox4)/VirtualBox4.rc
401
402VirtualBox4_SOURCES.darwin = \
403 src/darwin/DarwinKeyboard.cpp \
404 src/darwin/VBoxUtils-darwin.cpp \
405 src/VBoxFBQuartz2D.cpp
406# src/darwin/VBoxAquaStyle.cpp
407
408ifdef VBOX_WITH_ICHAT_THEATER
409 VirtualBox4_SOURCES.darwin += \
410 src/darwin/VBoxIChatTheaterWrapper.m
411endif
412
413# The Qt modules we're using.
414# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
415VirtualBox4_QT_MODULES = Core Gui
416
417# Import QDesigner UI sources and translations from VBoxUI.pro.
418# Note that the OSE about dialog is always required by lupdate/lrelease.
419ifndef VBOX_WITH_REGISTRATION
420 FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
421endif
422VirtualBox4_SOURCES := \
423 $(VirtualBox4_SOURCES) \
424 $(FORMS) \
425 ui/VBoxAboutDlg.ui
426
427# Resource files with some OSE differences.
428VirtualBox4_SOURCES += VirtualBox.qrc
429ifdef VBOX_OSE
430 VirtualBox4_SOURCES += VirtualBox_OSE.qrc
431else
432 VirtualBox4_SOURCES += VirtualBox_NonOSE.qrc
433 VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp
434 VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
435endif
436VirtualBox_OSE.qrc_RCCFLAGS = -name OSE
437VirtualBox_NonOSE.qrc_RCCFLAGS = -name NonOSE
438
439
440# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
441VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \
442 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
443# Compress the translation units.
444VirtualBox4_LRCFLAGS = -compress
445# Where to install the translations (a separate install target, VirtualBox4-nls-inst is created).
446VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
447
448
449
450# Some flag hacks (should go away).
451ifneq ($(KBUILD_TARGET),win)
452 src/HappyHttp.cpp_CXXFLAGS += -fexceptions
453 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
454 src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
455endif
456src/HappyHttp.cpp_CXXFLAGS.linux += -O2
457
458## @todo how to detect what tool is used?
459## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
460# more generic -Wno-extra
461# bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))?
462ifdef VBOX_WITH_XPCOM
463 src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
464endif
465
466
467#
468# Generate the COM wrappers.
469#
470VirtualBox4_BLDDIRS += $(PATH_VirtualBox4)/include
471VirtualBox4_INTERMEDIATES += $(PATH_VirtualBox4)/include/COMWrappers.h
472VirtualBox4_CLEAN += $(PATH_VirtualBox4)/include/COMWrappers.h
473
474$$(PATH_VirtualBox4)/include/COMWrappers.h: \
475 $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
476 $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl \
477 | $$(dir $$@)
478 $(call MSG_GENERATE,VirtualBox4,$<,$@)
479 $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/include/COMWrappers.xsl $<
480
481# alias for generating the COM Wrappers file.
482testwrappers:: $(VBOX_WRAPPERS_FILE4)
483
484
485ifeq ($(KBUILD_TARGET),win)
486#
487# On Windows we'll have to generate/edit the resource file.
488# The IDI_ICON1 name is Qt specific.
489#
490$$(PATH_VirtualBox4)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
491 $(RM) -f $@
492 $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
493
494VirtualBox4_CLEAN.win += $$(PATH_VirtualBox4)/VirtualBox4.rc
495endif # win
496
497
498ifeq ($(KBUILD_TYPE),darwin)
499#
500# On OS X (darwin) we need to install icon resources and compulsory bundle contents.
501# The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock).
502#
503INSTALLS += VirtualBox4.app
504VirtualBox4.app_INST = $(INST_VIRTUALBOX)Contents/
505VirtualBox4.app_MODE = 644
506VirtualBox4.app_SOURCES = \
507 src/darwin/PkgInfo \
508 $(PATH_VirtualBox4.app)/Info.plist \
509 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
510
511$$(PATH_VirtualBox4.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(@D)/
512 $(call MSG_GENERATE,VirtualBox4.app,$<,$@)
513 $(QUIET)$(RM) -f $@
514 $(QUIET)$(SED) \
515 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
516 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
517 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
518 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
519 $< > $@
520
521INSTALLS += VirtualBoxVM.app
522VirtualBox4VM.app_INST = $(VirtualBox4.app_INST)Resources/VirtualBoxVM.app/Contents/
523VirtualBox4VM.app_MODE = 644
524VirtualBox4VM.app_SOURCES = \
525 src/darwin/VM-PkgInfo=>PkgInfo \
526 $(PATH_VirtualBox4VM.app)/VM-Info.plist=>Info.plist \
527 $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
528VirtualBox4VM.app_SYMLINKS = \
529 MacOS=>../../../MacOS/
530
531$$(PATH_VirtualBox4VM.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(@D)/
532 $(call MSG_GENERATE,VirtualBox4VM.app,$<,$@)
533 $(QUIET)$(RM) -f $@
534 $(QUIET)$(SED) \
535 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
536 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
537 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
538 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
539 --output $@ $<
540endif # darwin
541
542
543#
544# Testcase for the darwin keyboard routines.
545#
546ifdef VBOX_WITH_TESTCASES
547PROGRAMS.darwin += tstDarwinKeyboard4
548tstDarwinKeyboard4_NAME = tstDarwinKeyboard
549tstDarwinKeyboard4_TEMPLATE = VBOXR3TSTEXE
550tstDarwinKeyboard4_INCS = include
551tstDarwinKeyboard4_SOURCES = \
552 src/darwin/tstDarwinKeyboard.cpp \
553 src/darwin/DarwinKeyboard.cpp
554tstDarwinKeyboard4_LDFLAGS = -framework IOKit -framework Carbon
555tstDarwinKeyboard4_LIBS = \
556 $(LIB_RUNTIME)
557endif
558
559
560#
561# Install the license file. Belongs in the root makefile really.
562#
563# Note: I'm doing this right here because the GUI will _not_ run
564# without that file which might be annoying for developers!
565#
566ifndef VBOX_OSE
567ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),)
568$(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
569 $(call MSG_GENERATE,,$@)
570 $(QUIET)$(CP) $< $@
571
572$(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN)
573endif
574endif
575
576
577
578# Unset everything that was loaded from VBoxUI.pro.
579TEMPLATE := $(SAVED_TEMPLATE)
580SAVED_TEMPLATE :=
581LANGUAGE :=
582FORMS :=
583TRANSLATIONS :=
584IMAGES :=
585
586
587# Commit the magic.
588# (note: before custom rules that make usage of generated variables!).
589include $(KBUILD_PATH)/subfooter.kmk
590
591
592#
593# Update all known NLS translation (.ts) files in the nls/ subdirectory.
594#
595# NOTE: This target is intended to be run only by the GUI maintainer shortly
596# before a new product release. VirtualBox_xx_YY.ts is a template for new
597# languages and should never be actually translated or installed.
598#
599updatenls:: \
600 $(filter-out %.qrc,$(VirtualBox4_SOURCES) $(VirtualBox4_VBOX_EXTRA_NLS_SOURCES)) \
601 $(wildcard include/*.h)
602 $(call MSG_L1,lupdate all languages (nls/*.ts))
603 $(QUIET)$(TOOL_QT4_LUPDATE) \
604 $^ \
605 -ts \
606 $(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \
607 nls/VirtualBox_xx_YY.ts
Note: See TracBrowser for help on using the repository browser.

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