VirtualBox

Changeset 87670 in vbox for trunk/doc/manual


Ignore:
Timestamp:
Feb 9, 2021 8:58:15 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142712
Message:

doc/manual: bugref:9831. Make everything work (qcollectiongenerator from some Qt builds need help with the plugin directory), add translation support and generally do a thorough cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/Makefile.kmk

    r87649 r87670  
    8686 $(error HHC was renamed to VBOX_HHC!)
    8787endif
    88 
    89 VBOX_QHCP_FILES = \
    90         UserManual.qhcp
    9188
    9289VBOX_QHELP_OUTPUT_FILES = \
     
    266263        $(notdir $(VBOX_MANUAL_TEX_UNICODE_FILES)) \
    267264        $(addprefix HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(lang))) \
     265        $(addprefix qhelp/,   $(VBOX_MANUAL_PNG_FILES_$(lang))) \
    268266        html-single/UserManual.html \
    269         html-single/UserManual.qhp \
    270         html-single/UserManual.qhcp \
    271         html-single/UserManual.qhc \
    272         html-single/UserManual.qch \
     267        $(addprefix qhelp/, UserManual.qhp UserManual.qhcp $(VBOX_QHELP_OUTPUT_FILES)) \
    273268        $(addprefix HTMLHelp/,    index.html go01.html) \
     269        $(addprefix qhelp/,       index.html go01.html) \
    274270        $(addprefix html-chunks/, index.html go01.html) \
    275271        $(foreach n,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 \
     
    278274            HTMLHelp/ch$(n).html \
    279275            HTMLHelp/re$(n).html \
    280             $(foreach d2,0 1 2 3 4 5 6 7 8 9,$(foreach d1,0 1 2 3 4 5 6 7 8 9,HTMLHelp/ch$(n)s$(d2)$(d1).html)) ) \
     276            $(foreach d2,0 1 2 3 4 5 6 7 8 9,$(foreach d1,0 1 2 3 4 5 6 7 8 9,HTMLHelp/ch$(n)s$(d2)$(d1).html)) \
     277            qhelp/ch$(n).html \
     278            qhelp/re$(n).html \
     279            $(foreach d2,0 1 2 3 4 5 6 7 8 9,$(foreach d1,0 1 2 3 4 5 6 7 8 9,qhelp/ch$(n)s$(d2)$(d1).html)) ) \
    281280        $(foreach n,a b c \
    282281            ,html-chunks/ap$(n).html \
    283282            HTMLHelp/ap$(n).html \
    284             $(foreach s,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20,HTMLHelp/ap$(n)s$(s).html) ) \
     283            $(foreach s,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20,HTMLHelp/ap$(n)s$(s).html) \
     284            qhelp/ap$(n).html \
     285            $(foreach s,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20,qhelp/ap$(n)s$(s).html) ) \
    285286        $(foreach n,01 02 03 04 05 \
    286287            ,html-chunks/pr$(n).html \
    287288            HTMLHelp/pr$(n).html \
    288             $(foreach s,01 02 03 04 05 06 07 08,HTMLHelp/pr$(n)s$(s).html) ) \
     289            $(foreach s,01 02 03 04 05 06 07 08,HTMLHelp/pr$(n)s$(s).html) \
     290            qhelp/pr$(n).html \
     291            $(foreach s,01 02 03 04 05 06 07 08,qhelp/pr$(n)s$(s).html) ) \
    289292        HTMLHelp/toc.hhc \
    290293        HTMLHelp/htmlhelp.hhp \
     294        qhelp/toc.hhc \
     295        qhelp/htmlhelp.hhp \
    291296        UserManual.pdf \
    292297        VirtualBox.chm \
     298        $(VBOX_QHELP_OUTPUT_FILES) \
    293299        ChangeLog.html \
    294300        validatemanual.run \
     
    708714
    709715
     716# A few things which are shared between htmlhelp and qhelp docs.
     717VBOX_DOCBOOK_HTMLHELP_FORMATCFG = \
     718        $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
     719        $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
     720        $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
     721
     722# Prepare the XSL file for our title page, htmlhelp and qhelp variant.
     723$(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl: \
     724                $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
     725        $(call MSG_L1,xsltproc $<)
     726        $(QUIET)$(RM) -f [email protected] $@
     727        $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
     728        $(QUIET)$(MV) -f [email protected] $@
     729
    710730
    711731ifdef VBOX_WITH_DOCS_CHM
     
    716736 # DocBook XML files, as defined above, then feed that into the
    717737 # Microsoft Help Compiler.
    718  #
    719  VBOX_DOCBOOK_HTMLHELP_FORMATCFG = \
    720         $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
    721         $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
    722         $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
    723 
    724  # Prepare the XSL file for our title page, htmlhelp variant.
    725  $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl: \
    726                 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
    727         $(call MSG_L1,xsltproc $<)
    728         $(QUIET)$(RM) -f [email protected] $@
    729         $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
    730         $(QUIET)$(MV) -f [email protected] $@
    731738
    732739 # Generate CHM from HHP
     
    910917, $(evalcall2 def_vbox_refentry_to_manpage,$(lang),$(file))))
    911918
    912 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/,$(VBOX_MANUAL_PNG_FILES_en_US)): \
    913                 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/%: $(VBOX_PATH_MANUAL_SRC)/en_US/% | $$(dir $$@)
    914         $(call MSG_L1,Copying temporary $< => $@)
    915         $(QUIET)$(INSTALL_STAGING) -m0644 -- '$<' '$(@D)'
    916 
    917 ################Generate qHelp's qhp file out of HTMLHelp###############################
    918 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl: \
    919                 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
    920         $(call MSG_L1,xsltproc $<)
    921         $(QUIET)$(RM) -f [email protected] $@
    922         $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
    923         $(QUIET)$(MV) -f [email protected] $@
    924 
    925 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/htmlhelp.hhp: \
    926                 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
    927                 $(VBOX_MANUAL_XML_FILES_COMMON) \
    928                 $(VBOX_MANUAL_XML_FILES_GENERATED_en_US) \
    929                 $(VBOX_DOCBOOK_HTMLHELP_FORMATCFG) \
    930                 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl \
    931                 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
    932                 $(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
    933                 $(VBOX_XML_ENTITIES) \
    934                 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
    935         $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$$^))),,$(firstword $(filter %.xml,$^)),$@)
    936         $(QUIET)$(RM) -f $@
    937         $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output $(@D)/ \
     919
     920ifdef VBOX_WITH_DOCS_QHELP
     921 #
     922 # VirtualBox.qch/VirtualBox.qhc
     923 #
     924 # We first generate a .hhp help source file from the preprocessed
     925 # DocBook XML files, as defined above, then feed that into a converter
     926 # creating the suitable input for creating a QHelp collection file.
     927
     928 # Generate QCH from QHelp source
     929 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     930 define def_vbox_usermanual_qhp_to_qch
     931 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
     932 $$(out_dir)/qhelp/UserManual.qch + \
     933 $$(out_dir)/qhelp/UserManual.qhc: \
     934                $$(out_dir)/qhelp/UserManual.qhcp \
     935                $$(out_dir)/qhelp/UserManual.qhp \
     936                $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
     937                | $$$$(dir $$$$@)
     938        $$(call MSG_L1,qcollectiongenerator $$<,=> $$@)
     939        $$(QUIET)$$(RM) -f $$@
     940        $$(QUIET)$$(REDIRECT) -E QT_QPA_PLATFORM_PLUGIN_PATH=$$(PATH_SDK_QT5)/plugins -- $$(PATH_TOOL_QT5_BIN)/qcollectiongenerator $$<
     941        $$(call MSG_L1,Fresh QCH is now at $$@)
     942 endef
     943 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_qhp_to_qch))
     944
     945 # Generate QHP from HHP for QHelp
     946 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     947 define def_vbox_usermanual_hhp_qhelp_to_qhp
     948 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
     949 $$(out_dir)/qhelp/UserManual.qhp: \
     950                $$(out_dir)/qhelp/htmlhelp.hhp \
     951                $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
     952                | $$$$(dir $$$$@)
     953        $$(call MSG_L1,htmlhelp-qthelp.py $$<,=> $$@)
     954        $$(QUIET)$$(RM) -f $$@
     955        $$(QUIET)$$(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py -d $$(<D) -o $$@
     956 endef
     957 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_hhp_qhelp_to_qhp))
     958
     959 # Generate HHP for QHelp from XML
     960 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     961 define def_vbox_usermanual_xml_to_hhp_qhelp
     962 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
     963 $$(out_dir)/qhelp/htmlhelp.hhp: \
     964                $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \
     965                $$(VBOX_MANUAL_XML_FILES_COMMON) \
     966                $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
     967                $$(VBOX_DOCBOOK_HTMLHELP_FORMATCFG) \
     968                $$(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl \
     969                $$(if $$(VBOX_HAVE_XMLLINT),$$(out_dir)/validatemanual.run,) \
     970                $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
     971                $$(VBOX_XML_ENTITIES) | $$$$(dir $$$$@)
     972        $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
     973        $$(QUIET)$$(RM) -f $$@
     974        $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$(@D)/ \
    938975                --stringparam htmlhelp.chm \
    939                 $(subst /,\\,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm) \
    940                 $(HTMLHELPOPTS) $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
    941                 $<
    942 
    943 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhp: \
    944                 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
    945                 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
    946                 $(VBOX_XML_ENTITIES) | $$(dir $$@) \
    947                 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/htmlhelp.hhp
    948                 $(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py -d $(@D) -o $@
    949 
    950 ################Copy qhcp file from the source directory###############################
    951 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhcp: \
    952         $$(dir $$@)
    953         $(QUIET)$(INSTALL_STAGING) -m0664 -- $(addprefix $(VBOX_PATH_MANUAL_SRC)/, $(VBOX_QHCP_FILES)) $@
    954 
    955 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhc: \
    956         $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhcp \
    957         $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhp \
    958         $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/, $(VBOX_MANUAL_PNG_FILES_en_US))
    959         $(PATH_TOOL_QT5_BIN)/qcollectiongenerator $<
    960 
    961 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qch: \
    962         $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhc
     976                $$(subst /,\\,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/VirtualBox.chm) \
     977                $$(HTMLHELPOPTS) $$(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
     978                $$<
     979 endef
     980 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_xml_to_hhp_qhelp))
     981
     982 # copy the qhcp file.
     983 define def_vbox_cp_qhcp
     984 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
     985 $$(out_dir)/UserManual.qhcp: \
     986                $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/% | $$$$(dir $$$$@)
     987        $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
     988 endef
     989 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_qhcp)))
     990
     991 # copy the PNG files.
     992 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     993 define def_vbox_cp_images_qhelp
     994 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
     995 $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
     996                $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
     997        $$(call MSG_L1,Copying temporary $$< => $$@)
     998        $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
     999 endef
     1000 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_qhelp)))
     1001
     1002endif # VBOX_WITH_DOCS_QHELP
    9631003
    9641004
Note: See TracChangeset for help on using the changeset viewer.

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