VirtualBox

Changeset 29654 in vbox for trunk/src/VBox/Frontends/Common


Ignore:
Timestamp:
May 18, 2010 9:37:32 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
61808
Message:

FE/Qt and Common: move the X11 keyboard library out of the GUI

Location:
trunk/src/VBox/Frontends/Common
Files:
2 added
2 copied
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/Common/Makefile.kmk

    r29523 r29654  
    11# $Id$
    22## @file
    3 # Top-level makefile for the VBox frontends.
     3# Top-level makefile for VBox frontends shared bits
    44#
    55
    66#
    7 # Copyright (C) 2006-2007 Oracle Corporation
     7# Copyright (C) 2010 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616#
    1717
    18 SUB_DEPTH = ../../..
     18SUB_DEPTH = ../../../..
    1919include $(KBUILD_PATH)/subheader.kmk
    2020
    2121# Include Sub-Makefiles
    22 ifdef VBOX_WITH_MAIN
    23  include $(PATH_SUB_CURRENT)/VBoxManage/Makefile.kmk
    24 endif
    25 ifndef VBOX_ONLY_DOCS
    26  ifdef VBOX_WITH_VBOXSDL
    27   include $(PATH_SUB_CURRENT)/VBoxSDL/Makefile.kmk
    28  endif
    29  ifdef VBOX_WITH_VBOXBFE
    30   include $(PATH_SUB_CURRENT)/VBoxBFE/Makefile.kmk
    31  endif
    32  ifdef VBOX_WITH_VBOXFB
    33   include $(PATH_SUB_CURRENT)/VBoxFB/Makefile.kmk
    34  endif
    35  ifdef VBOX_WITH_HEADLESS
    36   include $(PATH_SUB_CURRENT)/VBoxHeadless/Makefile.kmk
    37  endif
    38  ifdef VBOX_WITH_QTGUI
    39   include $(PATH_SUB_CURRENT)/VirtualBox/Makefile.kmk
    40  endif
    41 endif # !VBOX_ONLY_DOCS
    42 
    43 ## @todo Include Python shell into binary delivery?
    44 ifdef VBOX_ONLY_SDK
    45  include $(PATH_SUB_CURRENT)/VBoxShell/Makefile.kmk
     22ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
     23 include $(PATH_SUB_CURRENT)/VBoxKeyboard/Makefile.kmk
    4624endif
    4725
  • trunk/src/VBox/Frontends/Common/VBoxKeyboard/Makefile

    r29523 r29654  
    1818#
    1919
    20 VBoxKeyboard.so : keyboard-new.o
    21         gcc -shared -o VBoxKeyboard.so keyboard-new.o -lX11
     20CFLAGS = -I. -fPIC
     21
     22VBoxKeyboard.so : keyboard.o
     23        gcc -shared -o VBoxKeyboard.so keyboard.o -lX11
  • trunk/src/VBox/Frontends/Common/VBoxKeyboard/Makefile.kmk

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

    r29523 r29654  
    4242 */
    4343
    44 #include "keyboard.h"
    45 
    4644#include <X11/Xatom.h>
    4745#include <X11/keysym.h>
     
    5553#include <stdlib.h>
    5654#include <stdio.h>
     55
     56#include <VBox/VBoxKeyboard.h>
    5757
    5858#define KEYC2SCAN_SIZE 256
     
    569569
    570570    byLayout = X11DRV_InitKeyboardByLayout(display);
    571     *byLayoutOK = byLayout;
     571    if (byLayoutOK)
     572        *byLayoutOK = byLayout;
    572573
    573574    byType = X11DRV_InitKeyboardByType(display);
    574     *byTypeOK = byType;
     575    if (byTypeOK)
     576        *byTypeOK = byType;
    575577
    576578    /* Remap keycodes after initialization. Remapping stops after an
Note: See TracChangeset for help on using the changeset viewer.

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