Changeset 10293 in vbox
- Timestamp:
- Jul 7, 2008 1:15:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r10245 r10293 19 19 # additional information or have any questions. 20 20 # 21 22 # include qmake project file23 include VBoxUI.pro24 25 # Import QDesigner UI sources26 VirtualBox_QT_UISRCS := $(FORMS)27 # Import translation sources28 VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)29 30 # reset things to avoid possible conflicts with kBuild31 TEMPLATE :=32 LANGUAGE :=33 FORMS :=34 TRANSLATIONS :=35 IMAGES :=36 21 37 22 VBOX_WITH_REGISTRATION := 1 … … 171 156 # Create the targets of the form 172 157 # @executable_path/../Frameworks/Qt???.framework/Versions/4/Qt??? 173 QT_LIB_INSTALL =$(foreach mod, $(VBOX_MODULE_QT4), $(join $(join $(PATH_BIN)/../Frameworks/, $(mod)), .framework/Versions/4/$(mod)))158 QT_LIB_INSTALL = $(foreach mod, $(VBOX_MODULE_QT4), $(join $(join $(PATH_BIN)/../Frameworks/, $(mod)), .framework/Versions/4/$(mod))) 174 159 # The target for the libs. This is a special target cause is creates the 175 160 # necessary directory structure. @Bird: is there something for this in 176 161 # kBuild already? Todo: What about uninstall? 162 ## @todo bird: a qt4-framework install target with a source list like this: 163 # QtCore.framework/Versions/4/QtCore=>QtCore.framework/Versions/4/QtCore \ 164 # QtGui.framework/Versions/4/QtGui=>QtGui.framework/Versions/4/QtGui 177 165 $(QT_LIB_INSTALL): $(PATH_BIN)/../Frameworks/%: $(VBOX_PATH_QT4_FRAMEWORKS)/% 178 166 $(call MSG_INST_FILE,$<,$@) … … 183 171 endif 184 172 else 185 # The Qt DLLs (move to the root Makefile.kmk, and remove bin from INSTALLS below). 186 bin_SOURCES += $(VBOX_QT4_RUNTIME) 187 bin_INST = $(INST_BIN) 188 bin_MODE = 644 173 # The Qt DLLs 174 ## @todo move to the root Makefile.kmk, and remove qt4-bin from INSTALLS below. 175 qt4-bin_SOURCES += $(VBOX_QT4_RUNTIME) 176 qt4-bin_INST = $(INST_BIN) 177 qt4-bin_MODE = 644 189 178 endif 190 179 … … 197 186 198 187 TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable 188 ifdef USE_KBUILD_QT_UNIT 189 TEMPLATE_VBOXQT4GUIEXE_USES = qt 190 TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4 191 TEMPLATE_VBOXQT4GUIEXE_UITOOL = QT4 192 TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4 193 TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4 194 endif # USE_KBUILD_QT_UNIT 199 195 TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS) $(VBOX_DEFS_QT4) 200 196 TEMPLATE_VBOXQT4GUIEXE_INCS = \ 201 197 $(VBOX_PATH_SDK)/include \ 202 198 $(VBOX_INCS_QT4) 203 199 204 200 ifeq ($(KBUILD_TARGET),win) … … 223 219 /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \ 224 220 /DELAYLOAD:oleaut32.dll 225 TEMPLATE_VBOXQT4GUIEXE_SDKS = WINPSDK221 TEMPLATE_VBOXQT4GUIEXE_SDKS += WINPSDK 226 222 TEMPLATE_VBOXQT4GUIEXE_LIBS = \ 227 223 $(VBOX_LIBS_QT4) \ … … 342 338 343 339 # 344 # exclude inappropriate UI content345 #346 ifndef VBOX_WITH_REGISTRATION347 VirtualBox_QT_UISRCS := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS))348 endif349 350 #351 340 # The targets. 352 341 # 353 PROGRAMS = VirtualBox342 PROGRAMS += VirtualBox 354 343 ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11 355 DLLS = VBoxKeyboard4 356 OTHERS = $(PATH_BIN)/vboxkeyboard4.tar.gz 357 endif 358 INSTALLS = VirtualBox.nls bin 344 DLLS += VBoxKeyboard4 345 ## @todo convert to install target. 346 OTHERS += $(PATH_BIN)/vboxkeyboard4.tar.gz 347 endif 348 INSTALLS += VirtualBox.nls qt4-bin 359 349 360 350 # … … 393 383 394 384 385 # Include Qt project file, we'll use FORMS and TRANSLATIONS in 386 # the VirtualBox setup below. 387 SAVED_TEMPLATE := $(TEMPLATE) 388 include $(PATH_SUB_CURRENT)/VBoxUI.pro 389 390 395 391 # 396 392 # VirtualBox - The GUI program. … … 408 404 VirtualBox_INST = $(INST_BIN)VirtualBox4 $(INST_BIN)VirtualBoxVM4 409 405 410 # For testing iChat Theater stuff change 411 # the sdk path 406 # For testing iChat Theater stuff change the sdk path (HACK ALERT!) 412 407 ifdef VBOX_WITH_ICHAT_THEATER 413 408 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk 414 409 endif 415 416 endif 417 418 ifndef VBOX_OSE 419 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # linux only, yea, right. 420 # Note: I'm doing this right here because the GUI will _not_ run 421 # without that file which might be annoying for developers! 422 $(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC) 423 $(call MSG_GENERATE,,$@) 424 $(QUIET)$(CP) $< $@ 425 426 $(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN) 427 endif 428 endif 429 430 # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart 431 VirtualBox_QT_TRANSLATIONS_QT := \ 432 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\ 433 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS))) 434 435 # QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC 436 437 # Headers containing definitions of classes that use the Q_OBJECT macro 410 endif # darwin 411 412 # Headers containing definitions of classes that use the Q_OBJECT macro. 438 413 VirtualBox_QT_MOCHDRS = \ 439 414 include/QIWidgetValidator.h \ … … 491 466 include/VBoxSettingsPage.h 492 467 493 # Sources containing local definitions of classes that use the Q_OBJECT macro 468 # Sources containing local definitions of classes that use the Q_OBJECT macro. 494 469 VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp 495 470 ifdef VBOX_WITH_XPCOM 496 VirtualBox_QT_MOCSRCS += src/COMDefs.cpp 497 endif 498 499 # All generated sources. Note: this list MUST be in sync with Qt source 500 # generation rules defined somewhere below! 501 VirtualBox_GENSRCS = \ 502 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) 503 504 # All generated headers. Note: this list MUST be in sync with Qt source 505 # generation rules defined somewhere below! 506 VirtualBox_GENHDRS = \ 507 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \ 508 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).gen.h) 509 510 # All header files 511 VirtualBox_HEADERS = \ 512 $(wildcard include/*.h) \ 513 $(VirtualBox_GENHDRS) 471 VirtualBox_QT_MOCSRCS += src/COMDefs.cpp 472 endif 514 473 515 474 VirtualBox_SOURCES = \ 516 $(VirtualBox_GENSRCS) \517 475 src/main.cpp \ 518 476 src/COMDefs.cpp \ … … 600 558 endif 601 559 602 ifneq ($(KBUILD_TARGET),win)603 src/HappyHttp.cpp_CXXFLAGS += -fexceptions604 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions605 src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions606 endif607 src/HappyHttp.cpp_CXXFLAGS.linux += -O2608 609 ## @todo how to detect what tool is used?610 ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use611 # more generic -Wno-extra612 ifdef VBOX_WITH_XPCOM613 src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)614 endif615 616 560 VirtualBox_DEFS = VBOX_GUI_SEPARATE_VM_PROCESS 617 561 VirtualBox_DEFS.debug = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT … … 695 639 endif 696 640 641 ifdef USE_KBUILD_QT_UNIT 642 ## @todo Move to the appropriate places. 643 644 # Import QDesigner UI sources and translations from VBoxUI.pro. 645 # Note that the OSE about dialog is always required by lupdate/lrelease. 646 ifndef VBOX_WITH_REGISTRATION 647 FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS)) 648 endif 649 VirtualBox_SOURCES := \ 650 $(VirtualBox_SOURCES) \ 651 $(FORMS) \ 652 ui/VBoxAboutDlg.ui \ 653 $(TRANSLATIONS) 654 655 # Resource files with some OSE differences. 656 ifdef VBOX_OSE 657 VirtualBox_SOURCES += VirtualBox_OSE.qrc 658 else 659 VirtualBox_SOURCES += VirtualBox_NonOSE.qrc 660 VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp 661 VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h 662 endif 663 664 else # !USE_KBUILD_QT_UNIT 665 666 # Import QDesigner UI sources from VBoxUI.pro. 667 VirtualBox_QT_UISRCS := $(FORMS) 668 ifndef VBOX_WITH_REGISTRATION 669 VirtualBox_QT_UISRCS := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS)) 670 endif 671 672 # Import translation sources from VBoxUI.pro. 673 VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) 674 675 # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart 676 VirtualBox_QT_TRANSLATIONS_QT := \ 677 $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\ 678 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS))) 679 680 # All generated sources. Note: this list MUST be in sync with Qt source 681 # generation rules defined somewhere below! 682 VirtualBox_GENSRCS = \ 683 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) 684 685 VirtualBox_SOURCES += $(VirtualBox_GENSRCS) 686 687 688 # All generated headers. Note: this list MUST be in sync with Qt source 689 # generation rules defined somewhere below! 690 VirtualBox_GENHDRS = \ 691 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \ 692 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).gen.h) 693 694 # grep the images out of the resource file for dependency tracking 695 VirtualBox_QT_RC += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox.qrc) 696 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application.cpp 697 698 # We have different about dialogs in OSE and PUEL. Therefor two independent 699 # resource files exists. 700 ifdef VBOX_OSE 701 VirtualBox_QT_RC_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_OSE.qrc) 702 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application_ose.cpp 703 else 704 VirtualBox_QT_RC_NON_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_NonOSE.qrc) 705 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application_non_ose.cpp 706 VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp 707 VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h 708 endif 709 710 # OSE version is always necessary for lupdate/lrelease 711 VirtualBox_QT_UISRCS += ui/VBoxAboutDlg.ui 712 713 # All header files 714 VirtualBox_HEADERS = \ 715 $(wildcard include/*.h) \ 716 $(VirtualBox_GENHDRS) 717 718 endif # !USE_KBUILD_QT_UNIT 719 720 # Some flag hacks (should go away). 721 ifneq ($(KBUILD_TARGET),win) 722 src/HappyHttp.cpp_CXXFLAGS += -fexceptions 723 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions 724 src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions 725 endif 726 src/HappyHttp.cpp_CXXFLAGS.linux += -O2 727 728 ## @todo how to detect what tool is used? 729 ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use 730 # more generic -Wno-extra 731 # bird: What about $(if $(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-missing-base-class-initializer),$(VBOX_GCC_Wno-extra))? 732 ifdef VBOX_WITH_XPCOM 733 src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra) 734 endif 735 736 737 738 # 739 # On Windows we'll have to generate/edit the resource file. 740 # The IDI_ICON1 name is Qt specific. 741 # 742 $(PATH_TARGET)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D)) 743 $(RM) -f $@ 744 $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"' 745 $(CAT) $@ 746 747 OTHER_CLEAN.win += $(PATH_TARGET)/VirtualBox4.rc 748 749 750 # 751 # Other stuff. 752 # 753 697 754 WRAPPERSFILE = $(PATH_VirtualBox)/include/COMWrappers.h 698 755 WRAPPERSINCFILE = include/COMDefs.h … … 710 767 $(PATH_BIN)/vboxkeyboard.tar.gz 711 768 712 # 713 # On Windows we'll have to generate/edit the resource file. 714 # The IDI_ICON1 name is Qt specific. 715 # 716 $(PATH_TARGET)/VirtualBox4.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D)) 717 $(RM) -f $@ 718 $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"' 719 $(CAT) $@ 720 721 OTHER_CLEAN.win += $(PATH_TARGET)/VirtualBox4.rc 722 723 724 # 725 # On Mac OS X (darwin) we need to install icon resources and compusory bundle contents. 769 770 # 771 # On OS X (darwin) we need to install icon resources and compusory bundle contents. 772 # The VirtualBoxVM.app helper is for launching VMs (fixes some issues with the dock). 726 773 # 727 774 INSTALLS.darwin += VirtualBox.app … … 787 834 endif 788 835 789 # grep the images out of the resource file for dependency tracking 790 VirtualBox_QT_RC += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox.qrc) 791 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application.cpp 792 793 # We have different about dialogs in OSE and PUEL. Therefor two independent 794 # resource files exists. 795 ifdef VBOX_OSE 796 VirtualBox_QT_RC_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_OSE.qrc) 797 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application_ose.cpp 798 else 799 VirtualBox_QT_RC_NON_OSE += $(shell $(SED) '/images/!d;{s/^.*\(images\/.*\)<.*$$/\1/}' VirtualBox_NonOSE.qrc) 800 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/qrc_application_non_ose.cpp 801 VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp 802 VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h 803 endif 804 805 # OSE version is always necessary for lupdate/lrelease 806 VirtualBox_QT_UISRCS += ui/VBoxAboutDlg.ui 836 837 # 838 # Install the license file. Belongs in the root makefile really. 839 # 840 # Note: I'm doing this right here because the GUI will _not_ run 841 # without that file which might be annoying for developers! 842 # 843 ifndef VBOX_OSE 844 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) 845 $(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC) 846 $(call MSG_GENERATE,,$@) 847 $(QUIET)$(CP) $< $@ 848 849 $(PATH_BIN)/VirtualBox: $(VBOX_LICENSE_BIN) 850 endif 851 endif 852 853 854 855 # Unset everything that was loaded from VBoxUI.pro. 856 TEMPLATE := $(SAVED_TEMPLATE) 857 SAVED_TEMPLATE := 858 LANGUAGE := 859 FORMS := 860 TRANSLATIONS := 861 IMAGES := 862 807 863 808 864 # Commit the magic. … … 951 1007 endef 952 1008 1009 1010 ifndef USE_KBUILD_QT_UNIT 953 1011 # Generate Qt source rules. 954 1012 $(foreach target,VirtualBox,$(eval $(def_qt_gen_src))) 1013 endif 955 1014 956 1015 … … 1000 1059 # before a new product release. VirtualBox_xx_YY.ts is a template for new 1001 1060 # languages and should never be actually translated or installed. 1002 updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS)1061 updatenls:: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS) 1003 1062 $(call MSG_L1,lupdate all languages (nls/*.ts)) 1004 1063 $(QUIET)$(VBOX_LUPDATE4) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts 1005 1064 1006 1065 1066 ifndef USE_KBUILD_QT_UNIT 1007 1067 # 1008 1068 # Test targets … … 1025 1085 test3: 1026 1086 @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g" 1027 1028 testwrappers: $(WRAPPERSFILE) 1029 1087 endif # USE_KBUILD_QT_UNIT 1088 1089 # alias for generating the COM Wrappers file. 1090 testwrappers:: $(WRAPPERSFILE) 1091 1092 1093 ifdef USE_KBUILD_QT_UNIT 1094 1095 include $(KBUILD_PATH)/units/qt.kmk 1096 $(foreach target,VirtualBox,$(evalval def_unit_qt_target_pre)) 1097 1098 endif # USE_KBUILD_QT_UNIT 1099
Note:
See TracChangeset
for help on using the changeset viewer.