2018-12-08 21:31:25 +00:00
|
|
|
project('GStreamer manuals and tutorials', 'c',
|
2024-03-05 12:58:57 +00:00
|
|
|
version: '1.25.0.1',
|
2024-11-15 14:46:14 +00:00
|
|
|
meson_version : '>= 1.3')
|
2018-11-13 14:29:37 +00:00
|
|
|
|
2020-06-23 22:01:53 +00:00
|
|
|
hotdoc_p = find_program('hotdoc')
|
|
|
|
if not hotdoc_p.found()
|
|
|
|
message('Hotdoc not found, not building the documentation')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
hotdoc_req = '>= 0.12.2'
|
2022-01-04 20:37:59 +00:00
|
|
|
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
2020-06-23 22:01:53 +00:00
|
|
|
if not hotdoc_version.version_compare(hotdoc_req)
|
2020-06-24 12:27:27 +00:00
|
|
|
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
2020-06-23 22:01:53 +00:00
|
|
|
endif
|
|
|
|
|
2018-11-13 14:29:37 +00:00
|
|
|
hotdoc = import('hotdoc')
|
2019-04-26 01:05:06 +00:00
|
|
|
hotdoc_subprojects = []
|
2018-11-13 14:29:37 +00:00
|
|
|
|
|
|
|
apiversion = '1.0'
|
2019-04-26 01:05:06 +00:00
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
pathsep = ';'
|
|
|
|
else
|
|
|
|
pathsep = ':'
|
|
|
|
endif
|
|
|
|
|
2020-04-23 03:51:03 +00:00
|
|
|
python3 = import('python').find_installation()
|
|
|
|
|
|
|
|
built_subprojects = get_option('built_subprojects')
|
|
|
|
if built_subprojects != ''
|
|
|
|
message('Have subprojects list from options')
|
|
|
|
else
|
|
|
|
read_file_contents = '''
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
assert len(sys.argv) >= 2
|
|
|
|
fname = sys.argv[1]
|
|
|
|
|
|
|
|
with open(fname, 'r') as f:
|
|
|
|
for l in f:
|
|
|
|
print(l)
|
|
|
|
'''
|
|
|
|
|
|
|
|
# gst-build will generate this file for us to consume so that subproject
|
|
|
|
# changes can still work
|
2021-10-18 14:47:00 +00:00
|
|
|
fname = join_paths(meson.project_build_root(), '..', '..', 'GstDocumentedSubprojects')
|
2020-04-23 03:51:03 +00:00
|
|
|
cmdres = run_command(
|
|
|
|
python3,
|
|
|
|
'-c', read_file_contents,
|
|
|
|
fname,
|
2022-01-04 20:37:59 +00:00
|
|
|
check: false,
|
2020-04-23 03:51:03 +00:00
|
|
|
)
|
|
|
|
if cmdres.returncode() == 0
|
|
|
|
built_subprojects = cmdres.stdout().strip()
|
|
|
|
message('Have subprojects from file: @0@'.format(fname))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-04-26 01:05:06 +00:00
|
|
|
libs = ''
|
|
|
|
plugins_doc = ''
|
|
|
|
deps = []
|
|
|
|
plugins_sitemap = ''
|
2020-04-23 03:51:03 +00:00
|
|
|
if built_subprojects != ''
|
|
|
|
foreach project_name: built_subprojects.split(',')
|
2019-04-26 01:05:06 +00:00
|
|
|
sub = subproject(project_name)
|
|
|
|
if sub.get_variable('build_hotdoc')
|
|
|
|
message('Building @0@ documentation'.format(project_name))
|
|
|
|
|
2022-08-26 12:39:00 +00:00
|
|
|
foreach lib: sub.get_variable('libs_doc', [])
|
2019-04-26 01:05:06 +00:00
|
|
|
hotdoc_subprojects += [lib]
|
|
|
|
libs += lib.full_path() + pathsep
|
|
|
|
deps += [lib]
|
|
|
|
endforeach
|
|
|
|
|
2022-08-26 12:39:00 +00:00
|
|
|
foreach plugin_doc: sub.get_variable('plugins_doc', [])
|
2023-03-19 18:35:29 +00:00
|
|
|
warning(project_name+ ': variable plugins_doc is deprecated, use gst_plugins_doc instead')
|
2019-04-26 01:05:06 +00:00
|
|
|
plugins_doc += plugin_doc.full_path() + pathsep
|
|
|
|
hotdoc_subprojects += [plugin_doc]
|
|
|
|
deps += [plugin_doc]
|
|
|
|
endforeach
|
2023-03-19 18:35:29 +00:00
|
|
|
|
|
|
|
foreach plugin_doc: sub.get_variable('gst_plugins_doc', [])
|
|
|
|
plugins_doc += plugin_doc + pathsep
|
|
|
|
endforeach
|
2019-04-26 01:05:06 +00:00
|
|
|
else
|
|
|
|
message('@0@ did not build hotdoc documentation, can\'t build API doc'.format(project_name))
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
2019-03-06 12:24:19 +00:00
|
|
|
deps += [dependency('gstreamer-' + apiversion, fallback: ['gstreamer', 'gst_dep'])]
|
2019-04-26 01:05:06 +00:00
|
|
|
|
|
|
|
if get_option('use_portal_index')
|
|
|
|
index = 'markdown/index.md'
|
|
|
|
else
|
|
|
|
index = 'markdown/simple-index.md'
|
|
|
|
endif
|
|
|
|
sitemap_gen = find_program('scripts/generate_sitemap.py')
|
|
|
|
sitemap = configure_file(command: [sitemap_gen, '@INPUT@', '@OUTPUT@',
|
2019-11-04 16:01:57 +00:00
|
|
|
'gi-index', libs, plugins_doc],
|
2019-04-26 01:05:06 +00:00
|
|
|
input: 'sitemap.txt',
|
|
|
|
output: 'sitemap.txt')
|
2018-11-13 14:29:37 +00:00
|
|
|
|
2024-02-26 18:15:05 +00:00
|
|
|
html_theme = 'https://github.com/hotdoc/hotdoc_lumen_theme/releases/download/0.16/hotdoc_lumen_theme-0.16.tar.xz?sha256=b7d7dde51285d1c90836c44ae298754e4cfa957e9a6d14ee5844b8a2cac04b5a'
|
2018-11-13 14:29:37 +00:00
|
|
|
|
|
|
|
gstreamer_doc = hotdoc.generate_doc('GStreamer',
|
|
|
|
project_version: apiversion,
|
2019-04-26 01:05:06 +00:00
|
|
|
sitemap: sitemap,
|
|
|
|
index: index,
|
2019-11-04 16:01:57 +00:00
|
|
|
gi_index: index,
|
2018-11-13 14:29:37 +00:00
|
|
|
install: true,
|
|
|
|
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
|
|
|
|
syntax_highlighting_activate: true,
|
|
|
|
html_theme: html_theme,
|
2020-12-04 19:10:51 +00:00
|
|
|
include_paths: [
|
|
|
|
meson.current_source_dir() / 'examples',
|
|
|
|
meson.current_source_dir() / 'markdown' / 'tutorials' / 'basic',
|
|
|
|
meson.current_source_dir() / 'markdown' / 'templates',
|
|
|
|
meson.current_source_dir() / 'markdown' / 'tutorials' / 'playback',
|
|
|
|
],
|
2018-11-13 14:29:37 +00:00
|
|
|
html_extra_theme: join_paths(meson.current_source_dir(), 'theme/extra'),
|
2019-04-26 01:05:06 +00:00
|
|
|
dependencies: deps,
|
|
|
|
subprojects: hotdoc_subprojects,
|
2018-11-13 14:29:37 +00:00
|
|
|
disable_incremental_build: true,
|
2019-05-21 12:18:53 +00:00
|
|
|
gst_list_plugins_page: 'gst-index',
|
|
|
|
gst_index: join_paths(meson.current_source_dir(), 'markdown/plugins_doc.md'),
|
2018-11-13 14:29:37 +00:00
|
|
|
devhelp_activate: true,
|
2019-05-26 10:38:38 +00:00
|
|
|
devhelp_online: 'https://gstreamer.freedesktop.org/documentation/',
|
2019-04-26 01:05:06 +00:00
|
|
|
build_always_stale: true,
|
|
|
|
edit_on_github_repository: 'https://gitlab.freedesktop.org/gstreamer/gst-docs/',
|
2020-06-23 19:21:03 +00:00
|
|
|
previous_symbol_index: join_paths(meson.current_source_dir(), 'symbols', 'symbol_index.json'),
|
2022-10-13 20:40:35 +00:00
|
|
|
fatal_warnings: get_option('fatal_warnings')
|
2018-12-08 23:28:57 +00:00
|
|
|
)
|
2018-08-15 16:59:25 +00:00
|
|
|
|
2022-11-21 15:20:41 +00:00
|
|
|
# For devhelp
|
|
|
|
meson.add_devenv({'XDG_DATA_DIRS': meson.current_build_dir() / 'GStreamer-doc'},
|
|
|
|
method: 'prepend')
|
|
|
|
|
2018-08-15 16:59:25 +00:00
|
|
|
cdata = configuration_data()
|
|
|
|
cdata.set('GST_API_VERSION', apiversion)
|
|
|
|
readme = configure_file(input: 'scripts/RELEASE_README.md',
|
|
|
|
output: 'README.md',
|
|
|
|
configuration : cdata)
|
|
|
|
|
|
|
|
run_target('release',
|
|
|
|
command: [find_program('scripts/release.py'),
|
|
|
|
gstreamer_doc.full_path(),
|
2020-06-23 19:21:03 +00:00
|
|
|
meson.project_version(),
|
|
|
|
meson.current_build_dir()],
|
2018-08-15 16:59:25 +00:00
|
|
|
depends: [gstreamer_doc]
|
2020-06-24 12:27:27 +00:00
|
|
|
)
|
2022-11-07 00:10:39 +00:00
|
|
|
|
2024-02-06 16:37:19 +00:00
|
|
|
meson.add_dist_script('scripts/gen-changelog.py', meson.project_name(), '1.22.0', meson.project_version())
|