VirtualBox

Changeset 10597 in vbox


Ignore:
Timestamp:
Jul 14, 2008 1:13:43 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33295
Message:

The qt4 unit seems to work, dropping the as much of the old style bits as currently possible.

File:
1 edited

Legend:

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

    r10596 r10597  
    2828VBOX_VIRTUALBOX4_SRC := $(PATH_SUB_CURRENT)
    2929
    30 #if1of ($(KBUILD_TARGET), darwin win)
    31 USE_KBUILD_QT_UNIT := 1                 # Testing before enabling it.
    32 USE_KBUILD_QT_UNIT_PART_2 := 1
    33 #endif
    34 
    3530VBOX_WITH_REGISTRATION := 1
    3631
     
    4035
    4136# Show the update notifier dialog during startup. If this setting is disabled
    42 # the user can still register using the menu if desired.
     37# the user can still update using the menu if desired.
    4338VBOX_WITH_UPDATE_REQUEST := 1
    4439
     
    9994VBOX_PATH_QT4_SHARE      ?= $(VBOX_PATH_QT4)
    10095
    101 ifndef USE_KBUILD_QT_UNIT_PART_2
    102 VBOX_MODULE_QT4     = QtCore QtGui
    103 VBOX_DEFS_QT4       = QT_CORE_LIB QT_GUI_LIB
    104 endif # !USE_KBUILD_QT_UNIT_PART_2
    105 
    106 ifeq ($(KBUILD_TARGET),darwin)
    107  ifndef USE_KBUILD_QT_UNIT_PART_2
    108   # This is necessary because we didn't include the Qt header in framework
    109   # notation (e.g.: <QtCore/QObject>)).
    110   VBOX_INCS_QT4 = $(patsubst %, $(VBOX_PATH_QT4_FRAMEWORKS)/%.framework/Headers, $(VBOX_MODULE_QT4))
    111   # No libs cause we are using frameworks
    112   VBOX_PATH_QT4_LIB =
    113   VBOX_LIBS_QT4     =
    114  endif # !USE_KBUILD_QT_UNIT_PART_2
    115 else
    116 
    117 ifndef USE_KBUILD_QT_UNIT_PART_2
    118  VBOX_INCS_QT4       = $(addprefix $(VBOX_PATH_QT4_INCLUDE)/, $(VBOX_MODULE_QT4) Qt)
    119 endif
     96ifneq ($(KBUILD_TARGET),darwin)
    12097 VBOX_INCS_QT4      += $(VBOX_PATH_QT4_INCLUDE) ## @todo add this to the qt4 unit.
     98
     99 ifeq (enabled,enabled) # Adding mkspecs to the INCS is hopefully not really necessary... Will try disable it later.
     100  ifeq ($(KBUILD_TARGET),win)
     101   ifeq ($(KBUILD_TARGET_ARCH),amd64)
     102    ## @todo This is the correct one here: VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc2005
     103    VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc.net
     104   else
     105    VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc.net
     106   endif
     107  else ifeq ($(KBUILD_TARGET),linux)
     108   VBOX_INCS_QT4     += $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++
     109  endif
     110 endif
     111
     112 # Move down.
    121113 ifeq ($(KBUILD_TARGET),win)
    122   ifeq ($(KBUILD_TARGET_ARCH),amd64)
    123    ## @todo This is the correct one here: VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc2005
    124    VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc.net
    125   else
    126    VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc.net
    127   endif
    128  else ifeq ($(KBUILD_TARGET),linux)
    129   VBOX_INCS_QT4     += $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++
    130  endif
    131 
    132  # add the VBox prefix to Qt libs if they are built by us
    133  ifeq ($(KBUILD_TARGET),win)
    134   VBOX_LIBS_QT4      = $(patsubst %, VBox%4, $(VBOX_MODULE_QT4))
    135  else ifdef VBOX_WITH_QT4_SUN
    136   # Qt4 compiled by Sun with altered library names
    137   VBOX_LIBS_QT4      = $(patsubst %, VBox%, $(VBOX_MODULE_QT4))
    138   # Export the ld library path
     114  VBOX_LIBS_QT4 := VBoxqtmain.lib
     115 endif
     116
     117endif
     118
     119# Hack LD_LIBRARY_PATH for stuff in tools.
     120ifdef VBOX_WITH_QT4_SUN
     121 if1of ($(KBUILD_TARGET), linux)
    139122  export LD_LIBRARY_PATH := $(VBOX_PATH_QT4_LIB):$(LD_LIBRARY_PATH)
    140  else
    141   VBOX_LIBS_QT4      = $(VBOX_MODULE_QT4)
    142  endif
    143 
    144  ifeq ($(KBUILD_TARGET),win)
    145   VBOX_LIBS_QT4     := $(addsuffix .lib, $(VBOX_LIBS_QT4)) VBoxqtmain.lib
    146  endif
    147 
     123 endif
    148124endif
    149125
     
    210186
    211187TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable
    212 ifdef USE_KBUILD_QT_UNIT
    213  USES += qt4
    214  TEMPLATE_VBOXQT4GUIEXE_USES = qt4
    215  TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4
    216  TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4
    217  TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4
    218  TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4
    219  TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4
    220  TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4
    221  ifdef VBOX_WITH_QT4_SUN
    222   ifneq ($(KBUILD_TARGET),darwin) ## @todo The next darwin build should also make use the prefix just to make things more uniform.
    223    TEMPLATE_VBOXQT4GUIEXE_QT_PREFIX = VBox
    224   endif
    225  endif
    226 endif # USE_KBUILD_QT_UNIT
     188USES += qt4
     189TEMPLATE_VBOXQT4GUIEXE_USES = qt4
     190TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4
     191TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4
     192TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4
     193TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4
     194TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4
     195TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4
     196ifdef VBOX_WITH_QT4_SUN
     197 ifneq ($(KBUILD_TARGET),darwin) ## @todo The next darwin build should also make use the prefix just to make things more uniform.
     198  TEMPLATE_VBOXQT4GUIEXE_QT_PREFIX = VBox
     199 endif
     200endif
    227201TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS) $(VBOX_DEFS_QT4)
    228202TEMPLATE_VBOXQT4GUIEXE_INCS = \
     
    302276    $(VBOX_LIBPATH_X11)
    303277 else ifeq ($(KBUILD_TARGET),darwin)
    304 ifndef USE_KBUILD_QT_UNIT_PART_2
    305   # We have to add the framework path to both the linker and the compiler also.
    306   # Note that the -F flag is apple gcc only.
    307   TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -F$(VBOX_PATH_QT4_FRAMEWORKS) $(addprefix -framework , $(VBOX_MODULE_QT4))
    308 endif
    309278  TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS += -F$(VBOX_PATH_QT4_FRAMEWORKS) ## @todo fix in the qt unit. Somehow this fixes the #include <QtCore/qstring.h> stuff.
    310279  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -framework Carbon -framework QuickTime -bind_at_load
     
    500469        ./include \
    501470        $(PATH_VirtualBox4)/include
    502 ifndef USE_KBUILD_QT_UNIT
    503  VirtualBox4_INCS         += \
    504         $(PATH_VirtualBox4)/ui \
    505         $(PATH_VirtualBox4)/moc
    506 endif
    507 
    508471
    509472ifeq ($(KBUILD_TYPE),release)
     
    695658endif
    696659
    697 ifdef USE_KBUILD_QT_UNIT
    698  ## @todo Move to the appropriate places.
    699 
    700 ifdef USE_KBUILD_QT_UNIT_PART_2
    701  # The Qt modules we're using.
    702  # (The include directory and lib/framework for each module will be added by the Qt4 unit.)
    703  VirtualBox4_QT_MODULES = Core Gui
    704 endif
    705 
    706  # Import QDesigner UI sources and translations from VBoxUI.pro.
    707  # Note that the OSE about dialog is always required by lupdate/lrelease.
    708  ifndef VBOX_WITH_REGISTRATION
    709   FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
    710  endif
    711  VirtualBox4_SOURCES := \
    712         $(VirtualBox4_SOURCES) \
    713         $(FORMS) \
    714         ui/VBoxAboutDlg.ui
    715 
    716  # Resource files with some OSE differences.
    717  VirtualBox4_SOURCES += VirtualBox.qrc
    718  ifdef VBOX_OSE
    719   VirtualBox4_SOURCES += VirtualBox_OSE.qrc
    720  else
    721   VirtualBox4_SOURCES += VirtualBox_NonOSE.qrc
    722   VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp
    723   VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
    724  endif
    725  VirtualBox_OSE.qrc_RCCFLAGS = -name OSE
    726  VirtualBox_NonOSE.qrc_RCCFLAGS = -name NonOSE
    727 
    728 
    729  # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
    730  VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \
    731         $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
    732  # Compress the translation units.
    733  VirtualBox4_LRCFLAGS = -compress
    734  # Where to install the translations (a separate install target, VirtualBox4-nls-inst is created).
    735  VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
    736 
    737 
    738 else # !USE_KBUILD_QT_UNIT
    739 
    740  # Import QDesigner UI sources from VBoxUI.pro.
    741  VirtualBox4_QT_UISRCS := $(FORMS)
    742  ifndef VBOX_WITH_REGISTRATION
    743   VirtualBox4_QT_UISRCS := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox4_QT_UISRCS))
    744  endif
    745 
    746  # Import translation sources from VBoxUI.pro.
    747  VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS)
    748 
    749  # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
    750  VirtualBox4_QT_TRANSLATIONS_QT := \
    751         $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
    752                 $(filter nls/VirtualBox_%.ts,$(VirtualBox4_QT_TRANSLATIONS)))
    753 
    754  # All generated sources. Note: this list MUST be in sync with Qt source
    755  # generation rules defined somewhere below!
    756  VirtualBox4_GENSRCS = \
    757         $(foreach moc,$(notdir $(basename $(VirtualBox4_QT_MOCHDRS))), $(PATH_VirtualBox4)/moc/moc_$(moc).cpp)
    758 
    759  VirtualBox4_SOURCES += $(VirtualBox4_GENSRCS)
    760 
    761 
    762  # All generated headers. Note: this list MUST be in sync with Qt source
    763  # generation rules defined somewhere below!
    764  VirtualBox4_GENHDRS = \
    765         $(foreach moc,$(notdir $(basename $(VirtualBox4_QT_MOCSRCS))), $(PATH_VirtualBox4)/moc/$(moc).moc) \
    766         $(foreach ui,$(notdir $(basename $(VirtualBox4_QT_UISRCS))), $(PATH_VirtualBox4)/ui/$(ui).gen.h)
    767 
    768  # grep the images out of the resource file for dependency tracking
    769  VirtualBox4_QT_RC += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox.qrc)
    770  VirtualBox4_GENSRCS += $(PATH_VirtualBox4)/ui/qrc_application.cpp
    771 
    772  # We have different about dialogs in OSE and PUEL. Therefor two independent
    773  # resource files exists.
    774  ifdef VBOX_OSE
    775   VirtualBox4_QT_RC_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_OSE.qrc)
    776   VirtualBox4_GENSRCS += $(PATH_VirtualBox4)/ui/qrc_application_ose.cpp
    777  else
    778   VirtualBox4_QT_RC_NON_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_NonOSE.qrc)
    779   VirtualBox4_GENSRCS += $(PATH_VirtualBox4)/ui/qrc_application_non_ose.cpp
    780   VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp
    781   VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
    782  endif
    783 
    784  # OSE version is always necessary for lupdate/lrelease
    785  VirtualBox4_QT_UISRCS += ui/VBoxAboutDlg.ui
    786 
    787  # All header files
    788  VirtualBox4_HEADERS = \
    789         $(wildcard include/*.h) \
    790         $(VirtualBox4_GENHDRS)
    791 
    792 endif # !USE_KBUILD_QT_UNIT
     660# The Qt modules we're using.
     661# (The include directory and lib/framework for each module will be added by the Qt4 unit.)
     662VirtualBox4_QT_MODULES = Core Gui
     663
     664# Import QDesigner UI sources and translations from VBoxUI.pro.
     665# Note that the OSE about dialog is always required by lupdate/lrelease.
     666ifndef VBOX_WITH_REGISTRATION
     667 FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
     668endif
     669VirtualBox4_SOURCES := \
     670       $(VirtualBox4_SOURCES) \
     671       $(FORMS) \
     672       ui/VBoxAboutDlg.ui
     673
     674# Resource files with some OSE differences.
     675VirtualBox4_SOURCES += VirtualBox.qrc
     676ifdef VBOX_OSE
     677 VirtualBox4_SOURCES += VirtualBox_OSE.qrc
     678else
     679 VirtualBox4_SOURCES += VirtualBox_NonOSE.qrc
     680 VirtualBox4_SOURCES += src/VBoxAboutNonOSEDlg.cpp
     681 VirtualBox4_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
     682endif
     683VirtualBox_OSE.qrc_RCCFLAGS = -name OSE
     684VirtualBox_NonOSE.qrc_RCCFLAGS = -name NonOSE
     685
     686
     687# Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts
     688VirtualBox4_QT_TRANSLATIONS := $(TRANSLATIONS) \
     689        $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
     690# Compress the translation units.
     691VirtualBox4_LRCFLAGS = -compress
     692# Where to install the translations (a separate install target, VirtualBox4-nls-inst is created).
     693VirtualBox4_QT_TRANSLATIONS_INST = $(INST_BIN)nls/
     694
     695
    793696
    794697# Some flag hacks (should go away).
     
    883786                -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
    884787                --output $@ $<
    885 
    886 #
    887 # Translation installation
    888 #
    889 ifndef USE_KBUILD_QT_UNIT ## @todo later
    890 VirtualBox4.nls_INST = $(INST_BIN)nls/
    891 VirtualBox4.nls_SOURCES =  $(patsubst %.ts,$(PATH_VirtualBox4)/nls/%.qm,$(notdir $(VirtualBox4_QT_TRANSLATIONS)))
    892 VirtualBox4.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox4)/nls/%.qm,$(notdir $(VirtualBox4_QT_TRANSLATIONS_QT)))
    893 VirtualBox4.nls_MODE = 644
    894 endif # !USE_KBUILD_QT_UNIT
    895 
    896788
    897789#
     
    943835include $(KBUILD_PATH)/footer.kmk
    944836
    945 ifndef USE_KBUILD_QT_UNIT
    946 
    947 #
    948 # Qt source file generation rules
    949 #
    950 
    951 ## @todo move QT source generation macros to kBuild
    952 
    953 ##  Generate a rule to create a MOC source file from a header containing
    954 #   classes that use the Q_OBJECT macro.
    955 #   @param  $mochdr     header file with Q_OBJECT
    956 define def_qt_gen_src_moc
    957 
    958 $(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
    959 
    960 $(target)_GENSRCS_REAL += $(mocsrc)
    961 ## @todo The source should be added to GEN_SOURCES: $ (target)_GEN_SOURCES += $ (mocsrc)
    962 
    963 $(mocsrc): $(mochdr)
    964         $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@)
    965         $$(QUIET)$$(MKDIR) -p $$(@D)
    966         $$(QUIET)$$(VBOX_MOC4) \
    967                 $(addprefix -D,$($(target)_DEFS)) \
    968                 $(addprefix -I,$($(target)_INCS)) \
    969                 $(mochdr) -o $$@
    970 
    971 endef
    972 
    973 ##  Generate a rule to create a MOC include file from a source containing
    974 #   local classes that use the Q_OBJECT macro. This include is then included
    975 #   by that source, so it must be generated before the source gets compiled.
    976 #   @param  $mocsrc     source file with Q_OBJECT
    977 define def_qt_gen_inc_moc
    978 
    979 $(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
    980 $(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
    981 
    982 $(target)_GENHDRS_REAL += $(mocinc)
    983 $(target)_INTERMEDIATES += $(mocinc)
    984 
    985 $(mocobj): $(mocinc)
    986 
    987 $(mocinc): $(mocsrc)
    988         $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@)
    989         $$(QUIET)$$(MKDIR) -p $$(@D)
    990         $$(QUIET)$$(VBOX_MOC4) \
    991                 $(addprefix -D,$($(target)_DEFS)) \
    992                 $(addprefix -I,$($(target)_INCS)) \
    993                 -i $(mocsrc) -o $$@
    994 
    995 endef
    996 
    997 ##  Generate a rule to create a MOC include file from a UI header (ui.h) containing
    998 #   local classes that use the Q_OBJECT macro. This include is then included
    999 #   by that header, so it must be generated before the UI source gets compiled.
    1000 #   @param  $mocuihdr     UI header file with Q_OBJECT
    1001 define def_qt_gen_inc_mocuihdr
    1002 
    1003 $(eval uisrc    := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
    1004 $(eval uiobj    := $(PATH_$(target)_$$(uisrc))/$(notdir $(basename $$(uisrc)))$(VBOX_SUFF_OBJ))
    1005 $(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
    1006 
    1007 $(target)_GENHDRS_REAL += $(mocuiinc)
    1008 $(target)_INTERMEDIATES += $(mocuiinc)
    1009 
    1010 $(uisrc): $(mocuiinc)
    1011 $(mocuiinc): $(mocuihdr)
    1012         $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@)
    1013         $$(QUIET)$$(MKDIR) -p $$(@D)
    1014         $$(QUIET)$$(VBOX_MOC4) \
    1015                 $(addprefix -D,$($(target)_DEFS)) \
    1016                 $(addprefix -I,$($(target)_INCS)) \
    1017                 -i $(mocuihdr) -o $$@
    1018 
    1019 endef
    1020 
    1021 ##  Generate a rule to create a header file from an UI
    1022 #   definition source (.ui).
    1023 #   @param  $uifile       UI definintion source file
    1024 define def_qt_gen_src_ui
    1025 
    1026 $(eval uihdr  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).gen.h)
    1027 
    1028 $(target)_GENHDRS_REAL += $(uihdr)
    1029 $(target)_INTERMEDIATES += $(uihdr)
    1030 
    1031 $(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
    1032         $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
    1033         $$(QUIET)$$(VBOX_UIC4) $(uifile) -o $$@
    1034 
    1035 # we assume that the generated header is at least included by
    1036 # the normal header with the same name
    1037 include/$(notdir $(basename $(uifile))).h: $(uihdr)
    1038 
    1039 endef
    1040 
    1041 ##  Generate a rule to create a .qm file from a NLS translation
    1042 #   source (.ts).
    1043 #   @param  $tsfile       Translation source file
    1044 define def_qt_gen_nls
    1045 
    1046 $(eval qmfile  := $(PATH_$(target))/nls/$(notdir $(basename $(tsfile))).qm)
    1047 
    1048 OTHER_CLEAN += $(qmfile)
    1049 
    1050 # Note that we use -nocompress in lrelease to avoid stripping comments and
    1051 # other information from .qm files. If we don't do that, we get .qm files two
    1052 # times smaller, but QTranslator::findMessage() will start searching for
    1053 # translations in all existing contexts in case if it cannot find it in the
    1054 # original context (which is of course not acceptable, no matter if it's a
    1055 # special Qt "feature" or just a bug).
    1056 
    1057 $(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile)))
    1058         $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@)
    1059         $$(QUIET)$$(VBOX_LRELEASE4) -nocompress -silent $(tsfile) -qm $$@
    1060 
    1061 endef
    1062 
    1063 ## Generate rules for generating the Qt source for a target.
    1064 # @param   $target  Target name.
    1065 define def_qt_gen_src
    1066 
    1067 # moc srcs from hdrs with Q_OBJECT
    1068 $(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
    1069 # moc includes from srcs with Q_OBJECT
    1070 $(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
    1071 # moc includes from UI headers with Q_OBJECT
    1072 $(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
    1073 # UI sources
    1074 $(foreach uifile,$($(target)_QT_UISRCS),$(eval $(def_qt_gen_src_ui)))
    1075 # NLS files
    1076 $(foreach tsfile,$($(target)_QT_TRANSLATIONS),$(eval $(def_qt_gen_nls)))
    1077 $(foreach tsfile,$($(target)_QT_TRANSLATIONS_QT),$(eval $(def_qt_gen_nls)))
    1078 # dirs
    1079 $$(call DIRDEP,$(PATH_$(target))/ui/) \
    1080 $$(call DIRDEP,$(PATH_$(target))/moc/) \
    1081 $$(call DIRDEP,$(PATH_$(target))/nls/):
    1082         $$(call MSG_MKDIR,$$@)
    1083         $$(QUIET)$$(MKDIR) -p $$@
    1084 
    1085 endef
    1086 
    1087 
    1088 # Generate Qt source rules.
    1089 $(foreach target,VirtualBox4,$(eval $(def_qt_gen_src)))
    1090 
    1091 # rules for resources file creation
    1092 $(PATH_VirtualBox4)/ui/qrc_application.cpp: VirtualBox.qrc $(VirtualBox4_QT_RC)
    1093         $(call MSG_TOOL,rcc,VirtualBox4,$<,$@)
    1094         $(QUIET)$(VBOX_RCC4) -o $@  $<
    1095 
    1096 $(PATH_VirtualBox4)/ui/qrc_application_ose.cpp: VirtualBox_OSE.qrc $(VirtualBox4_QT_RC_OSE)
    1097         $(call MSG_TOOL,rcc,VirtualBox4,$<,$@)
    1098         $(QUIET)$(VBOX_RCC4) -name "OSE" -o $@  $<
    1099 
    1100 $(PATH_VirtualBox4)/ui/qrc_application_non_ose.cpp: VirtualBox_NonOSE.qrc $(VirtualBox4_QT_RC_NON_OSE)
    1101         $(call MSG_TOOL,rcc,VirtualBox4,$<,$@)
    1102         $(QUIET)$(VBOX_RCC4) -name "NonOSE" -o $@  $<
    1103 
    1104 
    1105 endif # !USE_KBUILD_QT_UNIT
    1106 
    1107837
    1108838#
     
    1116846
    1117847
    1118 ifdef USE_KBUILD_QT_UNIT
    1119848#
    1120849# Update all known NLS translation (.ts) files in the nls/ subdirectory.
     
    1135864                nls/VirtualBox_xx_YY.ts
    1136865
    1137 else
    1138 #
    1139 # Custom targets
    1140 #
    1141 
    1142 # Update all known NLS translation (.ts) files in the nls/ subdirectory.
    1143 # NOTE: This target is intened to be run only by the GUI maintainer shortly
    1144 # before a new product release. VirtualBox_xx_YY.ts is a template for new
    1145 # languages and should never be actually translated or installed.
    1146 updatenls:: $(VirtualBox4_SOURCES) $(VirtualBox4_HEADERS)
    1147         $(call MSG_L1,lupdate all languages (nls/*.ts))
    1148         $(QUIET)$(VBOX_LUPDATE4) $^ -ts $(VirtualBox4_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
    1149 
    1150 #
    1151 # Test targets
    1152 #
    1153 
    1154 test:
    1155         @echo ====================
    1156         @echo $(VirtualBox4_GENSRCS) | $(SED) -e "s/ /\n/g"
    1157         @echo --------------------
    1158         @echo $(VirtualBox4_GENSRCS_REAL) | $(SED) -e "s/ /\n/g"
    1159         @echo ====================
    1160         @echo $(VirtualBox4_GENHDRS) | $(SED) -e "s/ /\n/g"
    1161         @echo --------------------
    1162         @echo $(VirtualBox4_GENHDRS_REAL) | $(SED) -e "s/ /\n/g"
    1163         @echo ====================
    1164 
    1165 test2:
    1166         @echo $(OTHER_CLEAN) | $(SED) -e "s/ /\n/g"
    1167 
    1168 test3:
    1169         @echo $(VirtualBox4_HEADERS) | $(SED) -e "s/ /\n/g"
    1170 endif # !USE_KBUILD_QT_UNIT
    1171866
    1172867# alias for generating the COM Wrappers file.
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