Hi Devs, In my quest to successfully the SDK using the convenient kmk sdk command, I came accross some issues and some inconsistencies :
- If you ask for the SDK, you get a part of the SDK without any control over it. - If you want the webservices parts, you need to enable it into configure first. - If you build the SDK on Linux, you are forced to build the Windows part too, and must setup the Wine environment before hand, but no doc exists on how to do that. - Some config variables exist, but are a bit meaningless in this case. So I slightly changed the kmk code to allow the following : - You can now choose which part of the SDK you want (everything by default) - Webservices bindings are now included by default - You can now disabled the MSCOM, Perl WS, Python WS, PHP WS parts Using the following variables : - VBOX_WITH_MSCOM - VBOX_WS_WITH_PERL - VBOX_WS_WITH_PYTHON - VBOX_WS_WITH_GLUE_PYTHON - VBOX_WS_WITH_PHP And have adapated the code so the current build behaviour doesn't change, but the user is left with the options of what to build. My goal was to only build the Java WS & XPCOM binding without anything else, but this was not initially possible. I hope this SVN diff will be useful. I leave the variables naming to you! This is released under the MIT license.
Index: Config.kmk =================================================================== --- Config.kmk (revision 49981) +++ Config.kmk (working copy) @@ -532,6 +532,10 @@ #VBOX_WITHOUT_COM = 1 # The webservices api. VBOX_WITH_WEBSERVICES = 1 +VBOX_WS_WITH_GLUE_PYTHON = 1 +VBOX_WS_WITH_PYTHON = 1 +VBOX_WS_WITH_PERL = 1 +VBOC_WS_WITH_PHP = 1 VBOX_WITH_WEBSERVICES_SSL = 1 # The Qt 4 GUI. VBOX_WITH_QTGUI = 1 @@ -555,6 +559,10 @@ VBOX_WITH_VRDP_RDESKTOP = 1 ## The Direct Framebuffer GUI. #VBOX_WITH_VBOXFB = 1 +# Enables MSCOM creation as per default, not to break new build +if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win" + VBOX_WITH_MSCOM = 1 +endif # Enables the Python<->XPCOM and Python<->COM bindings. VBOX_WITH_PYTHON ?= 1 if1of ($(KBUILD_TARGET), darwin linux solaris) Index: src/VBox/Main/Makefile.kmk =================================================================== --- src/VBox/Main/Makefile.kmk (revision 49981) +++ src/VBox/Main/Makefile.kmk (working copy) @@ -28,7 +28,7 @@ # # Include sub-makefile(s). # -ifdef VBOX_WITH_WEBSERVICES +if defined(VBOX_WITH_WEBSERVICES) || defined(VBOX_ONLY_SDK) include $(PATH_SUB_CURRENT)/webservice/Makefile.kmk endif include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk @@ -83,7 +83,7 @@ VBOX_IDL_HEADER.XPCOM = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h # The MS COM specific stuff. -if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win" +if defined(VBOX_WITH_MSCOM) OTHERS += \ $(VBOX_IDL_FILE.MSCOM) OTHER_CLEAN += \ Index: src/VBox/Main/webservice/Makefile.kmk =================================================================== --- src/VBox/Main/webservice/Makefile.kmk (revision 49981) +++ src/VBox/Main/webservice/Makefile.kmk (working copy) @@ -536,11 +536,24 @@ $(shell find $(1) -name \*.java) endef +ifdef VBOX_WS_WITH_GLUE_PYTHON + VBOXWEB_OTHERS += $(VBOXWEB_GLUE_PYTHON) +endif + +ifdef VBOX_WS_WITH_PYTHON + VBOXWEB_OTHERS += $(VBOXWEB_WS_PYTHON) +endif + +ifdef VBOX_WS_WITH_PERL + VBOXWEB_OTHERS += $(VBOXWEB_WS_PERL) +endif + +ifdef VBOX_WS_WITH_PHP + VBOXWEB_OTHERS += $(VBOXWEB_WS_PHP) +endif + + VBOXWEB_OTHERS += \ - $(VBOXWEB_GLUE_PYTHON) \ - $(VBOXWEB_WS_PYTHON) \ - $(VBOXWEB_WS_PERL) \ - $(VBOXWEB_WS_PHP) \ $(VBOXWEB_PYTHONWSSAMPLE) \ $(PATH_ROOT) @@ -606,34 +619,42 @@ ifdef VBOX_ONLY_SDK -$(VBOXWEB_GLUE_PYTHON): $(VBOXWEB_IDL_SRC) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl +ifdef VBOX_WS_WITH_GLUE_PYTHON + $(VBOXWEB_GLUE_PYTHON): $(VBOXWEB_IDL_SRC) $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-python.xsl) $(QUIET)$(RM) -f -- $@ $(QUIET)$(MKDIR) -p $(@D) $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-python.xsl $< +endif -$(VBOXWEB_WS_PYTHON): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) +ifdef VBOX_WS_WITH_PYTHON + $(VBOXWEB_WS_PYTHON): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(call MSG_GENERATE,,$@, WS Python bindings) $(QUIET)$(RM) -f -- $@ $(QUIET)$(MKDIR) -p $(@D) -# Try both w/o and with --file option + # Try both w/o and with --file option $(QUIET)$(REDIRECT) -C $(@D) -- $(SHELL) -c "$(VBOX_WSDL2PY) -b $(VBOXWEBSERVICE_WSDL) || $(VBOX_WSDL2PY) -b --file $(VBOXWEBSERVICE_WSDL)" $(QUIET)$(APPEND) $@ '' +endif -$(VBOXWEB_WS_PERL): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) +ifdef VBOX_WS_WITH_PERL + $(VBOXWEB_WS_PERL): $(VBOXWEB_WSDL) $(VBOXWEBSERVICE_WSDL) $(call MSG_GENERATE,,$@, WS Perl bindings) $(QUIET)$(MKDIR) -p $(@D) $(QUIET)$(REDIRECT) -C $(@D) -- $(VBOX_STUBMAKER) file://$(VBOXWEBSERVICE_WSDL) -# Ugly, ugly, ugly, make me right once + # Ugly, ugly, ugly, make me right once $(QUIET)$(SED) -e "s+http://www.virtualbox.org/Service+http://www.virtualbox.org/+" < $(VBOXWEB_WS_PERL) > $(VBOXWEB_WS_PERL).tmp $(QUIET)$(MV) $(VBOXWEB_WS_PERL).tmp $(VBOXWEB_WS_PERL) $(QUIET)$(APPEND) $@ '' +endif -$(VBOXWEB_WS_PHP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl +ifdef VBOX_WS_WITH_PHP + $(VBOXWEB_WS_PHP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl $(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-php.xsl) $(QUIET)$(RM) -f -- $@ $(QUIET)$(MKDIR) -p $(@D) $(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-php.xsl $< +endif endif # VBOX_ONLY_SDK
_______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org https://www.virtualbox.org/mailman/listinfo/vbox-dev