Commit Graph

10 Commits

Author SHA1 Message Date
Simon McVittie
1a8e2228f6 girepository: Provide placeholders for positional parameters
Otherwise, correct invocation isn't clear from the --help output.

This does not introduce new translated strings: FILE was already
translated.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-28 11:27:15 +00:00
Simon McVittie
9541b43eef girepository: Provide placeholders for --includedir
If we don't do this, the --help text is formatted as though the option
did not expect an argument.

This does not introduce new translated strings: DIRECTORY was already
translated.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-28 11:26:59 +00:00
Philip Withnall
57a8834d7b girepository: Add translation support to utility tools
This fixes a few formatting and newline issues in the strings at the
same time, but nothing major.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3263
2024-02-26 18:10:56 +00:00
Philip Withnall
90b2185c56 Merge branch 'wip/smcv/decompiler-order' into 'main'
gi-decompile-typelib: Interpret --includedir as most-important-first

See merge request GNOME/glib!3928
2024-02-15 19:02:24 +00:00
Philip Withnall
a9fabe5fc0 Merge branch 'wip/smcv/decompiler' into 'main'
girwriter: Take the GIRepository as a parameter

See merge request GNOME/glib!3925
2024-02-15 12:26:45 +00:00
Simon McVittie
64762fdef6 gi-decompile-typelib: Interpret --includedir as most-important-first
This is a behaviour change from g-ir-generate, which treats it as
least-important-first (the last directory on the command-line is
searched first).

gi-compile-repository --includedir and gcc -I are most-important-first
(the first directory on the command-line is searched first) so it seems
like it makes most sense to be consistent with that.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-14 12:00:05 +00:00
Simon McVittie
f80e978f00 girwriter: Take the GIRepository as a parameter
We certainly won't find the requested namespace in a newly-created
repository with no typelibs loaded.

Fixes: 9ab84bc1 "girwriter: Stop using the singleton GIRepository"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-14 11:13:04 +00:00
Simon McVittie
4180a2069c gi-decompile-repository: Remove unused --shlib option
This seems to have been a remnant of support for embedding the typelib
in the shared library, which was removed from this tool in commit 4bf5ef6b
"[girepository] Actually verify header of loaded typelibs in
g_irepository_require" (originally gobject-introspection@05ffd857).

The feature of embedding the typelib in a shared library was itself
removed in commit b2df59c3 "compiler: Remove --code argument",
originally gobject-introspection@ac81f3e8, with a note that because
we rely on being able to load the shared library into g-ir-scanner,
anything that links g-ir-scanner output into the shared library would be
a circular dependency.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-14 10:42:39 +00:00
Philip Withnall
aaed30f3dc gi-decompile-repository: Port to girepository-2.0
Update the code to the latest standards and to use girepository-2.0
after it’s been imported to this repository.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-09 20:40:47 +00:00
Philip Withnall
5c3c2cf6b3 girepository: Rename g-ir-generate and g-ir-inspect
Rename them to `gi-decompile-repository` and `gi-inspect-repository` to
match the existing `gi-compile-repository`. The names have to differ
from those used in girepository-1.0 to avoid collisions.

‘generate’ has been changed to ‘decompile’ because it does the inverse
of what `gi-compile-repository` does: it converts a typelib to a GIR
file. ‘generate’ never really made much sense for this anyway — it’s
almost a synonym of ‘compile’.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-09 20:40:17 +00:00