docs: Install man pages as html
This will let us link to them from the docs.
This commit is contained in:
@@ -459,6 +459,7 @@ reference:
|
|||||||
- mv _build/docs/reference/gdk/gdk4-wayland/ _reference/gdk4-wayland/
|
- mv _build/docs/reference/gdk/gdk4-wayland/ _reference/gdk4-wayland/
|
||||||
- mv _build/docs/reference/gsk/gsk4/ _reference/gsk4/
|
- mv _build/docs/reference/gsk/gsk4/ _reference/gsk4/
|
||||||
- mv _build/docs/reference/gtk/gtk4/ _reference/gtk4/
|
- mv _build/docs/reference/gtk/gtk4/ _reference/gtk4/
|
||||||
|
- mv _build/docs/reference/gtk/*.html _reference/gtk4/
|
||||||
- mv _build/subprojects/pango/docs/Pango/ _reference/Pango/
|
- mv _build/subprojects/pango/docs/Pango/ _reference/Pango/
|
||||||
- mv _build/subprojects/pango/docs/PangoCairo/ _reference/PangoCairo/
|
- mv _build/subprojects/pango/docs/PangoCairo/ _reference/PangoCairo/
|
||||||
- mv _build/subprojects/pango/docs/PangoFc/ _reference/PangoFc/
|
- mv _build/subprojects/pango/docs/PangoFc/ _reference/PangoFc/
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ content_files = [
|
|||||||
"wayland.md",
|
"wayland.md",
|
||||||
"windows.md",
|
"windows.md",
|
||||||
"x11.md",
|
"x11.md",
|
||||||
|
"tools.md",
|
||||||
"visual_index.md",
|
"visual_index.md",
|
||||||
]
|
]
|
||||||
content_images = [
|
content_images = [
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ expand_content_md_files = [
|
|||||||
'section-tree-widget.md',
|
'section-tree-widget.md',
|
||||||
'section-list-widget.md',
|
'section-list-widget.md',
|
||||||
'question_index.md',
|
'question_index.md',
|
||||||
'visual_index.md'
|
'visual_index.md',
|
||||||
|
'tools.md',
|
||||||
]
|
]
|
||||||
|
|
||||||
gtk_images = []
|
gtk_images = []
|
||||||
@@ -60,39 +61,39 @@ if get_option('documentation')
|
|||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: docs_dir,
|
install_dir: docs_dir,
|
||||||
|
install_tag: 'doc',
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rst2man = find_program('rst2man', 'rst2man.py', required: false)
|
rst2man = find_program('rst2man', 'rst2man.py', required: get_option('man-pages'))
|
||||||
if get_option('man-pages') and not rst2man.found()
|
rst2html5 = find_program('rst2html5', 'rst2html5.py', required: get_option('documentation'))
|
||||||
error('No rst2man found, but man pages were explicitly enabled')
|
|
||||||
|
rst_files = [
|
||||||
|
[ 'gtk4-broadwayd', '1' ],
|
||||||
|
[ 'gtk4-builder-tool', '1' ],
|
||||||
|
[ 'gtk4-encode-symbolic-svg', '1', ],
|
||||||
|
[ 'gtk4-launch', '1', ],
|
||||||
|
[ 'gtk4-query-settings', '1', ],
|
||||||
|
[ 'gtk4-rendernode-tool', '1' ],
|
||||||
|
[ 'gtk4-update-icon-cache', '1', ],
|
||||||
|
[ 'gtk4-path-tool', '1', ],
|
||||||
|
]
|
||||||
|
|
||||||
|
if get_option('build-demos')
|
||||||
|
rst_files += [
|
||||||
|
[ 'gtk4-demo', '1', ],
|
||||||
|
[ 'gtk4-demo-application', '1', ],
|
||||||
|
[ 'gtk4-widget-factory', '1', ],
|
||||||
|
[ 'gtk4-icon-browser', '1', ],
|
||||||
|
[ 'gtk4-node-editor', '1', ],
|
||||||
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('man-pages') and rst2man.found()
|
rst2x_flags = [
|
||||||
rst_files = [
|
'--syntax-highlight=none',
|
||||||
[ 'gtk4-broadwayd', '1' ],
|
]
|
||||||
[ 'gtk4-builder-tool', '1' ],
|
|
||||||
[ 'gtk4-encode-symbolic-svg', '1', ],
|
|
||||||
[ 'gtk4-launch', '1', ],
|
|
||||||
[ 'gtk4-query-settings', '1', ],
|
|
||||||
[ 'gtk4-rendernode-tool', '1' ],
|
|
||||||
[ 'gtk4-update-icon-cache', '1', ],
|
|
||||||
[ 'gtk4-path-tool', '1', ],
|
|
||||||
]
|
|
||||||
|
|
||||||
if get_option('build-demos')
|
if get_option('man-pages')
|
||||||
rst_files += [
|
|
||||||
[ 'gtk4-demo', '1', ],
|
|
||||||
[ 'gtk4-demo-application', '1', ],
|
|
||||||
[ 'gtk4-widget-factory', '1', ],
|
|
||||||
[ 'gtk4-icon-browser', '1', ],
|
|
||||||
[ 'gtk4-node-editor', '1', ],
|
|
||||||
]
|
|
||||||
endif
|
|
||||||
|
|
||||||
rst2man_flags = [
|
|
||||||
'--syntax-highlight=none',
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach rst: rst_files
|
foreach rst: rst_files
|
||||||
man_name = rst[0]
|
man_name = rst[0]
|
||||||
@@ -103,12 +104,34 @@ if get_option('man-pages') and rst2man.found()
|
|||||||
output: '@0@.@1@'.format(man_name, man_section),
|
output: '@0@.@1@'.format(man_name, man_section),
|
||||||
command: [
|
command: [
|
||||||
rst2man,
|
rst2man,
|
||||||
rst2man_flags,
|
rst2x_flags,
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
],
|
],
|
||||||
capture: true,
|
capture: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('mandir') / 'man@0@'.format(man_section),
|
install_dir: get_option('mandir') / 'man@0@'.format(man_section),
|
||||||
|
install_tag: 'doc',
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('documentation')
|
||||||
|
|
||||||
|
foreach rst: rst_files
|
||||||
|
man_name = rst[0]
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
input: '@0@.rst'.format(man_name),
|
||||||
|
output: '@0@.html'.format(man_name),
|
||||||
|
command: [
|
||||||
|
rst2html5,
|
||||||
|
rst2x_flags,
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
capture: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: docs_dir / 'gtk4',
|
||||||
|
install_tag: 'doc',
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|||||||
18
docs/reference/gtk/tools.md
Normal file
18
docs/reference/gtk/tools.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Title: Tools and Demos
|
||||||
|
|
||||||
|
GTK ships with a number of tools and demos that come with their own
|
||||||
|
documentation in the form of man pages.
|
||||||
|
|
||||||
|
- [gtk4-broadwayd](gtk4-broadwayd.html)
|
||||||
|
- [gtk4-builder-tool](gtk4-builder-tool.html)
|
||||||
|
- [gtk4-demo](gtk4-demo.html)
|
||||||
|
- [gtk4-demo-application](gtk4-demo-application.html)
|
||||||
|
- [gtk4-encode-symbolic-svg](gtk4-encode-symbolic-svg.html)
|
||||||
|
- [gtk4-icon-browser](gtk4-icon-browser.html)
|
||||||
|
- [gtk4-launch](gtk4-launch.html)
|
||||||
|
- [gtk4-node-editor](gtk4-node-editor.html)
|
||||||
|
- [gtk4-path-tool](gtk4-path-tool.html)
|
||||||
|
- [gtk4-query-settings](gtk4-query-settings.html)
|
||||||
|
- [gtk4-rendernode-tool](gtk4-rendernode-tool.html)
|
||||||
|
- [gtk4-update-icon-cache](gtk4-update-icon-cache.html)
|
||||||
|
- [gtk4-widget-factory](gtk4-widget-factory.html)
|
||||||
Reference in New Issue
Block a user