1

I want to re-generate the valadoc for the gnome gio-2.0 library (that is part of glib).

I'm aware that the complete documentation is available online.

I want to be able to generate it locally (ideally without having to rebuild the library myself).

Valadoc is able to generate the documentation from the gobject-introspection file (the gir file) that is created during the library compilation. This file contains all the definitions and comments.

Hopefully for me, a central repository is maintained by the vala team and the Gio-2.0.gir is available.

Now that I downloaded the file, I'm having issues invoking valadoc with the proper parameters.

The following commands:

valadoc --girdir=. --importdir=. --import=Gio-2.0 --pkg=gio-2.0 --force -o ./dist

or

valadoc --pkg=gio-2.0 --force -o ./dist

Returns

Succeeded - 0 warning(s)

And create an html with only the package names but no classes/methods/etc.

Could you help me to invoke valadoc properly?

note : for anyone curious about how the complete valadoc.org gets generated, the scripts and apps are available.

Name is carl
  • 5,961
  • 3
  • 29
  • 44

1 Answers1

3

As you've already done, you can specify the needed packages via --pkg gtk+-3.0 for example. In order to make the docs generated for those, you also have to specify --deps (without any extra arguments).

EDIT: probably of interest as well: to actually have doc strings included, you need to set the --importdir parameter to your gir directory (most of the time that's /usr/share/gir-1.0) and add e.g. --import=Gio-2.0 for each package from which you want doc strings. If you have vapis that have been generated with comments kept, you probably won't need this extra step.

tom
  • 692
  • 6
  • 12