mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 01:13:24 +00:00
devel-docs: get rid of g-ir-doc.
Per the (quite off-topic) discussion in #12772, the fact it's quite broken on Windows, apparently not too maintained anymore and its syntax clashes with gi-docgen syntax…
This commit is contained in:
parent
9821d91745
commit
26a079bd57
9 changed files with 3 additions and 171 deletions
|
@ -386,10 +386,6 @@ These are:
|
|||
-Dgi-docgen=enabled|disabled This option controls whether the libgimp
|
||||
C API references will be created using gi-docgen.
|
||||
|
||||
-Dg-ir-doc=true This option controls whether the libgimp API
|
||||
references for some binding languages will be created using
|
||||
g-ir-doc-tool and yelp-build.
|
||||
|
||||
-Denable-multiproc=false This option allows you to disable support for
|
||||
multiple processors. It is enabled by default.
|
||||
|
||||
|
|
|
@ -949,7 +949,6 @@
|
|||
],
|
||||
"buildsystem": "meson",
|
||||
"config-opts": [
|
||||
"-Dg-ir-doc=false",
|
||||
"-Dgi-docgen=disabled",
|
||||
"-Dicc-directory=/run/host/usr/share/color/icc/",
|
||||
"-Dcheck-update=no",
|
||||
|
|
|
@ -48,8 +48,7 @@ if (-not $GITLAB_CI)
|
|||
Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):gimp_build[collapsed=true]$([char]13)$([char]27)[0KBuilding GIMP"
|
||||
if (-not (Test-Path _build-$MSYSTEM_PREFIX\build.ninja -Type Leaf))
|
||||
{
|
||||
#FIXME: g-ir-doc is broken. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/11200
|
||||
#There is no GJS for Windows. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5891
|
||||
#FIXME: There is no GJS for Windows. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5891
|
||||
meson setup _build-$MSYSTEM_PREFIX -Dprefix="$GIMP_PREFIX" -Djavascript=disabled `
|
||||
-Ddirectx-sdk-dir="$MSYS2_PREFIX/$MSYSTEM_PREFIX" -Denable-default-bin=enabled `
|
||||
-Dbuild-id='org.gimp.GIMP_official' $INSTALLER_OPTION $STORE_OPTION $NON_RELOCATABLE_OPTION
|
||||
|
|
|
@ -3,19 +3,8 @@
|
|||
Here's a guide to the modules you're likely to need.
|
||||
It's a work in progress: feel free to add to it.
|
||||
|
||||
Eventually we'll have online documentation for these classes.
|
||||
In the meantime, you can generate your own:
|
||||
```
|
||||
HTMLDOCDIR=/path/to/doc/dir
|
||||
g-ir-doc-tool -I /path/to/share/gir-1.0/ --language=Python -o $HTMLDOCDIR Gimp-3.0.gir
|
||||
```
|
||||
Then browse $HTMLDOCDIR with yelp, or generate HTML from it:
|
||||
```
|
||||
cd $HTMLDOCDIR
|
||||
yelp-build cache *.page
|
||||
yelp-build html .
|
||||
|
||||
```
|
||||
Online documentation for our libraries can be found at:
|
||||
https://developer.gimp.org/api/3.0/
|
||||
|
||||
You can also get some information in GIMP's Python console with
|
||||
*help(module)* or *help(object)*, and you can get a list of functions
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
sed -i 's/<\(Prefix\|Image\)/\<\1/g' "$@"
|
||||
sed -i 's/&\([a-z0-9_]\+[^a-z0-9_;]\)/\&\1/g' "$@"
|
|
@ -1,136 +0,0 @@
|
|||
foreach lang : [ 'python', 'gjs' ]
|
||||
|
||||
# XXX meson does not allow building into subdir:
|
||||
# https://github.com/mesonbuild/meson/issues/2320
|
||||
# Otherwise I could use '-o', '@OUTDIR@' into following commands if
|
||||
# the `output` was subdir-able.
|
||||
gir_docs_dir = custom_target('g-ir-docs-' + lang + '-dir',
|
||||
depends: [ libgimp_gir, libgimpui_gir ],
|
||||
input: [ ],
|
||||
output: [ 'gir-' + lang + '-dirs' ],
|
||||
command: [
|
||||
'mkdir', '-p',
|
||||
'@OUTDIR@' + '/pages/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/' + lang + '/Gimp-' + gimp_api_version
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
## Gimp Module ##
|
||||
|
||||
# XXX `output` is bogus. g-ir-doc-tool produces a lot of output,
|
||||
# basically one page per public symbol, which is more than 1000 so
|
||||
# it's not usable. Since custom_target() requires an 'output', I could
|
||||
# just set one output such as 'index.page` as a trick, but since we
|
||||
# have another issue on subdir anyway (cf. above), I use some bogus
|
||||
# file instead. The fact the bogus file is not even created does not
|
||||
# even seem to be a problem for meson.
|
||||
# Moreover I realized that the targets listed by ninja are only the
|
||||
# output files (not the target name), so I basically ends up using
|
||||
# this field to create understandable names).
|
||||
gir_docs_pages = custom_target('g-ir-Gimp-' + lang + '-pages',
|
||||
depends: [ gir_docs_dir, libgimp_gir ],
|
||||
input: [ libgimp_gir[0] ],
|
||||
output: [ 'Gimp-' + lang + '-pages' ],
|
||||
command: [
|
||||
gir_doc_tool,
|
||||
'-I', prefix / 'share/gir-1.0/',
|
||||
'-I', meson.project_build_root() / 'libgimp',
|
||||
'--language=' + lang,
|
||||
'-o', '@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version,
|
||||
meson.project_build_root() / '@INPUT@'
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
# This step is completely an ugly workaround for 2 tool issues. The
|
||||
# first issue is that g-ir-doc-tool generates invalid XML by not
|
||||
# transforming less-than signs into entities. So I am special-casing
|
||||
# the one API documentation where we need to write a less-than (it will
|
||||
# need to be updated if this happens again).
|
||||
# See GIMP issue #7685.
|
||||
# The second issue is in meson itself which transforms backslash into
|
||||
# slashes preventing to write most basic regexp in a 'command'. For
|
||||
# this reason, I need to add the sed command as an external script.
|
||||
# See meson issue #1564.
|
||||
docs_pages_fix_sh = find_program('docs_pages_fix.sh')
|
||||
gir_docs_pages_fix = custom_target('g-ir-Gimp-' + lang + '-pages-fix',
|
||||
input: [ gir_docs_pages ],
|
||||
output: [ 'Gimp-' + lang + '-pages-fix' ],
|
||||
command: [
|
||||
docs_pages_fix_sh,
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version + '/Gimp.Procedure.add_menu_path.page',
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version + '/Gimp.checks_get_colors.page',
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version + '/Gimp.ColorArray.page',
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
gir_docs_cache = custom_target('g-ir-Gimp-' + lang + '-cache',
|
||||
input: [ gir_docs_pages_fix ],
|
||||
output: [ 'Gimp-' + lang + '-cache' ],
|
||||
command: [
|
||||
yelp_build, 'cache',
|
||||
'-o', '@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
gir_docs_html = custom_target('g-ir-Gimp-' + lang + '-html',
|
||||
input: [ gir_docs_cache ],
|
||||
output: [ 'Gimp-' + lang + '-html' ],
|
||||
# TODO: `output` needs to be complete for installation to work. So
|
||||
# we need to figure out how to install the generated files (listing
|
||||
# all of them is a crazy idea, but maybe we can generate the
|
||||
# expected list somehow? Maybe even using the .def file which is
|
||||
# already an exhaustive listing would be a good idea?
|
||||
# Also where should we install exactly?
|
||||
#install_dir: prefix / gimpdatadir / 'g-ir-docs/html/' + lang + '/Gimp',
|
||||
#install: true,
|
||||
command: [
|
||||
'yelp-build', 'html',
|
||||
'-o', '@OUTDIR@' + '/html/' + lang + '/Gimp-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/pages/' + lang + '/Gimp-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
## GimpUi module ##
|
||||
|
||||
gir_ui_docs_pages = custom_target('g-ir-GimpUi-' + lang + '-pages',
|
||||
depends: [ gir_docs_dir, libgimpui_gir ],
|
||||
input: [ libgimpui_gir[0] ],
|
||||
output: [ 'GimpUi-' + lang + '-pages' ],
|
||||
command: [
|
||||
gir_doc_tool,
|
||||
'-I', prefix / 'share/gir-1.0/',
|
||||
'-I', meson.project_build_root() / 'libgimp',
|
||||
'--language=' + lang,
|
||||
'-o', '@OUTDIR@' + '/pages/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
meson.project_build_root() / '@INPUT@'
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
gir_ui_docs_cache = custom_target('g-ir-GimpUi-' + lang + '-cache',
|
||||
input: [ gir_ui_docs_pages ],
|
||||
output: [ 'GimpUi-' + lang + '-cache' ],
|
||||
command: [
|
||||
yelp_build, 'cache',
|
||||
'-o', '@OUTDIR@' + '/pages/' + lang + '/GimpUi-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/pages/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
gir_ui_docs_html = custom_target('g-ir-GimpUi-' + lang + '-html',
|
||||
input: [ gir_ui_docs_cache ],
|
||||
output: [ 'GimpUi-' + lang + '-html' ],
|
||||
#install_dir: prefix / gimpdatadir / 'g-ir-docs/html/' + lang + '/GimpUi',
|
||||
#install: true,
|
||||
command: [
|
||||
'yelp-build', 'html',
|
||||
'-o', '@OUTDIR@' + '/html/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/pages/' + lang + '/GimpUi-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
endforeach
|
||||
|
||||
## TODO: a unit test using yelp-check would be useful.
|
|
@ -11,7 +11,3 @@ mkdb_args_common = [
|
|||
if gi_docgen.found() and have_gobject_introspection
|
||||
subdir('reference')
|
||||
endif
|
||||
|
||||
if get_option('g-ir-doc')
|
||||
subdir('g-ir-docs')
|
||||
endif
|
||||
|
|
|
@ -1268,11 +1268,6 @@ appstreamcli = find_program('appstreamcli', version: '>=0.15.3', required: get_o
|
|||
|
||||
gi_docgen = find_program('gi-docgen', required: get_option('gi-docgen'))
|
||||
|
||||
if get_option('g-ir-doc')
|
||||
gir_doc_tool = find_program('g-ir-doc-tool', required: true)
|
||||
yelp_build = find_program('yelp-build', required: true)
|
||||
endif
|
||||
|
||||
# Check for vector icons
|
||||
have_vector_icons = get_option('vector-icons')
|
||||
if have_vector_icons
|
||||
|
@ -2226,7 +2221,6 @@ final_message = [
|
|||
'',
|
||||
'''Documentation:''',
|
||||
''' libgimp API Reference: @0@'''.format(gi_docgen.found() and have_gobject_introspection),
|
||||
''' GObject Introspection: @0@'''.format(get_option('g-ir-doc')),
|
||||
'',
|
||||
'''Bug report URL: @0@'''.format(bug_report_url),
|
||||
]
|
||||
|
|
|
@ -59,7 +59,6 @@ option('file-plug-ins-test', type: 'boolean', value: 'false', description: 'Alwa
|
|||
option('can-crosscompile-gir', type: 'boolean', value: false, description: 'GIR is buildable even if crosscompiling')
|
||||
|
||||
option('gi-docgen', type: 'feature', value: 'auto', description: 'Build developer documentation (uses gi-docgen)')
|
||||
option('g-ir-doc', type: 'boolean', value: false, description: 'Build developer documentation for introspected API')
|
||||
|
||||
option('linux-input', type: 'feature', value: 'auto', description: 'Linux input event controller module')
|
||||
option('vector-icons', type: 'boolean', value: true, description: 'Use vector icons rather than raster ones')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue