VirtualBox

Changeset 98684 in vbox


Ignore:
Timestamp:
Feb 22, 2023 10:50:36 AM (2 years ago)
Author:
vboxsync
Message:

Docs: bugref:10302. Adding a new ifdef guarded code to produce qhelp files from dita.

File:
1 edited

Legend:

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

    r98678 r98684  
    919919 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_ditamap_to_pdf,$(lang)))
    920920
    921  define def_ditamap_to_htmlhelp
    922   ditamap-to-htmlhelp: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp
    923   $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp: \
    924                 $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
    925                 $(VBOX_REFENTRY_DITA_FILES) \
    926                 $$(VBOX_PATH_MANUAL_SRC)/correct_references.py
    927                 $$(call MSG_L1,correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics)
    928                 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics
    929                 $(QUIET)$(call VBOX_DITA_ENV_SETUP) \
    930                 $(VBOX_JAVA) -jar $(VBOX_DITA_PATH_LIB)/dost.jar /i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
    931                         /transtype:htmlhelp /ditadir:$(VBOX_DITA_PATH) /outdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp /tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp
    932 
    933  endef
    934  $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_ditamap_to_htmlhelp,$(lang)))
    935 
    936921 #
    937922 # ChangeLog.html
     
    995980, $(evalcall2 def_vbox_refentry_to_manpage,$(lang),$(file))))
    996981
     982# VBOX_WITH_DOCS_QHELP_WITH_DITA is just a temporary variable not to break the qhelp build
     983# for others. When we switch to dita completely the code block inside ifdef VBOX_WITH_DOCS_QHELP
     984# should be replaced by the one inside VBOX_WITH_DOCS_QHELP_WITH_DITA
     985ifdef VBOX_WITH_DOCS_QHELP_WITH_DITA
     986 VBOX_WITH_DOCS_QHELP       =
     987endif
    997988
    998989ifdef VBOX_WITH_DOCS_QHELP
     
    10801071endif # VBOX_WITH_DOCS_QHELP
    10811072
     1073ifdef VBOX_WITH_DOCS_QHELP_WITH_DITA
     1074 #
     1075 # VirtualBox.qch/VirtualBox.qhc
     1076 #
     1077 # We first generate a .hhp help source file from the preprocessed
     1078 # DocBook XML files, as defined above, then feed that into a converter
     1079 # creating the suitable input for creating a QHelp collection file.
     1080
     1081 # Generate QCH from QHelp source
     1082 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     1083 define def_vbox_usermanual_qhp_to_qch
     1084  local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
     1085  $$(out_dir)/qhelp/UserManual.qch + \
     1086  $$(out_dir)/qhelp/UserManual.qhc: \
     1087                $$(out_dir)/qhelp/UserManual.qhcp \
     1088                $$(out_dir)/qhelp/UserManual.qhp \
     1089                $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
     1090                | $$$$(dir $$$$@)
     1091        $$(call MSG_L1,$$(notdir $$(QHELPGENERATOR)) $$<,=> $$@)
     1092        $$(QUIET)$$(RM) -f $$@
     1093        $$(QUIET)$$(REDIRECT) -E QT_QPA_PLATFORM_PLUGIN_PATH=$$(PATH_SDK_QT5)/plugins -- $$(QHELPGENERATOR) $$<
     1094        $$(call MSG_L1,Fresh QCH is now at $$@)
     1095 endef
     1096 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_qhp_to_qch))
     1097
     1098 # Generate QHP from HHP for QHelp
     1099 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     1100 define def_vbox_usermanual_hhp_qhelp_to_qhp
     1101  local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
     1102  $$(out_dir)/qhelp/UserManual.qhp: \
     1103                $$(out_dir)/qhelp/UserManual.hhp \
     1104                $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
     1105                | $$$$(dir $$$$@)
     1106        $$(call MSG_L1,htmlhelp-qthelp.py $$<,=> $$@)
     1107        $$(QUIET)$$(RM) -f $$@
     1108        $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py -d $$(<D) -o $$@ -f UserManual.hhp -t UserManual.hhc
     1109 endef
     1110 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_hhp_qhelp_to_qhp))
     1111
     1112
     1113 define def_ditamap_to_htmlhelp
     1114  ditamap-to-htmlhelp: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp
     1115  $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp: \
     1116                $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
     1117                $(VBOX_REFENTRY_DITA_FILES) \
     1118                $$(VBOX_PATH_MANUAL_SRC)/correct_references.py
     1119                $$(call MSG_L1,correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics)
     1120                $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics
     1121                $(QUIET)$(call VBOX_DITA_ENV_SETUP) \
     1122                $(VBOX_JAVA) -jar $(VBOX_DITA_PATH_LIB)/dost.jar /i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
     1123                        /transtype:htmlhelp /ditadir:$(VBOX_DITA_PATH) /outdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp /tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp
     1124
     1125 endef
     1126 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_ditamap_to_htmlhelp,$(lang)))
     1127
     1128 # copy the qhcp file.
     1129 define def_vbox_cp_qhcp
     1130  local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
     1131  $$(out_dir)/UserManual.qhcp: \
     1132                $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/% | $$$$(dir $$$$@)
     1133        $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
     1134 endef
     1135 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_qhcp)))
     1136
     1137 # copy the PNG files.
     1138 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
     1139 define def_vbox_cp_images_qhelp
     1140  local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
     1141  $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
     1142                $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
     1143        $$(call MSG_L1,Copying temporary $$< => $$@)
     1144        $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
     1145 endef
     1146 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_qhelp)))
     1147
     1148endif # VBOX_WITH_DOCS_QHELP_WITH_DITA
    10821149
    10831150# Handy aliases.
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