VirtualBox

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

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

branding

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