Commit graph

16 commits

Author SHA1 Message Date
Bruno Lopes
d56676a2fa
meson, desktop, plug-ins: Generate MIMEtypes var dynamically
This way, we avoid divergence with MIMEs declared on the
plug-ins .c and .py files and we eliminate duplicate work.

See also: 2ce3c604
2025-06-13 13:47:19 -03:00
Jehan
aede2709b0 Issue #14233: incorrect StartupWMClass in gimp.desktop.
The WM_CLASS X property is apparently set to windows throughout the
program by the g_set_prgname() call which we changed in commit
95e32ebb34 from being the executable name (being the fully qualified
program name with the version) to the desktop name.
2025-06-12 02:31:36 +02:00
Integral
95e32ebb34 app: set a specific desktop filename to fix wayland window icon
Set a specific desktop filename to fix window icon under Wayland.

Closes: #13183
2025-05-17 13:24:20 +00:00
Bruno Lopes
8ef7bf3553
desktop: Port test-appdata.sh to Python
This works on Windows too so let's make it cross platform.
2025-04-18 20:56:07 -03:00
Jehan
a18d347bf5 desktop: fix AppData unit testing when in RC+git code.
We still want the normal GIMP_RELEASE C macro to be set because the
whole development frame should have code behaving like release code, yet
only for the AppStream metadata testing, we want to allow a "TODO"
release date while in +git code.
2024-12-11 09:18:13 +01:00
Jehan
9368c8abdd desktop: fix AppStream validation with TODO release date.
As I recall, this is something we in fact used to have in gimp-2-10
branch and which we lost when switching from appstream-util to
appstreamcli validation tool (the later is now recommended, but it's
also less featureful, they don't even have a relax test!). So that was a
regression in the build system.

Note that it's not just not to have to put a date too early in our
AppStream metadata, but it's also that this way, we won't forget to
update it upon release (hence shipping with a wrong release data in
metadata). Indeed, when building a non-release version, date="TODO" will
pass the test, yet moving on to a point release version, the validation
test will now fail on a TODO date.
2024-08-29 23:19:58 +02:00
Jehan
4e3792d3f1 desktop: application icons are now generated from the new logo source SVG. 2024-03-28 00:19:10 +01:00
Jehan
3da0cdc03d desktop: removing autotools-only test files.
These are implemented directly in the meson build files.
2023-05-27 00:16:47 +02:00
Jehan
ca230cb770 meson: fix warnings of deprecated features.
Now that we bumped our meson requirement, meson is complaining about
several features now deprecated even in the minimum required meson
version:

s/meson.source_root/meson.project_source_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.

s/meson.build_root/meson.project_build_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.

Fixing using path() on xdg_email and python ExternalProgram variables:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead

s/get_pkgconfig_variable *(\([^)]*\))/get_variable(pkgconfig: \1)/ to
fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': dependency.get_pkgconfig_variable. use dependency.get_variable(pkgconfig : ...) instead
2022-08-31 01:29:37 +02:00
Niels De Graef
f663d26ab5 Migrate from intltool to gettext
intltool has long been dead upstream. Let's not poke the dead corpse,
please.

This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.

Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.

The following major changes happened:

* meson: Changed `custom_target()` to `i18n.merge_file()` for all
  supported file types
* Added `.its` and `.loc`  files for the GIMP-specific XML formats, so
  that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
  do this in gettext, so instead we start from an XML file (again with
  its own ITS rules etc), translate that with gettext, and then use
  `xsltproc` with a bit of magic to output the .isl file for each
  language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
  which gettext natively understands.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
2022-06-25 10:25:49 +02:00
Jehan
920041c3a0 desktop: gimp-data-extras AppStream was moved to the appropriate repo.
See the commit 28467cb on the gimp-data-extras repo where I moved this
data in. Not sure why this metadata file was ever pushed to the main
repo as it is obviously for the data-extras package (or else I am
missing some information!).

The old 2017 report where it was originally added:
https://bugzilla.gnome.org/show_bug.cgi?id=763398
2022-05-04 23:00:00 +02:00
Jehan
1691d9b8bc desktop: fix the data-extras AppStream file.
appstreamcli was returning the error:

> E: gimp-data-extras:3: cid-is-not-rdns gimp-data-extras

Apparently non-desktop component must absolutely follow the schema with
a unique identifier with 3 parts or more.

As advised in the spec, let's use the main desktop component ID, adding
a specific subpart.

Also use underscore rather than hyphen for maximum compatibility.
See: https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

Finally for addons, share/metainfo/ is the recommended install path.
See: https://freedesktop.org/software/appstream/docs/sect-Metadata-Addon.html
2022-05-03 22:33:27 +02:00
Jehan
73f1f944c5 desktop: use appstreamcli for testing instead of appstream-util.
As told to us, this is the reference AppStream file testing tool, and it
understands more of the spec.

Also since commit 73e2e701da, appstream-util chokes on newer url types
from the spec. These tags are now supported both in appstream-util and
appstreamcli source code, except that appstreamcli had release 0.15.3,
available in Debian testing, whereas there were apparently no recent
appstream-glib/util release (and none since 2020). So for these various
reasons, let's go with the appstreamcli tool.

The only downside is that appstream package (where appstreamcli lives)
is not available on MSYS2, but since it's only an optional test tool for
XML files which should be common on all platforms, it's probably
acceptable.
2022-05-03 21:48:28 +02:00
Jehan
36f103c95f desktop: install a scalable GIMP icon too.
The source is still desktop/src/gimp.svg.
2021-07-06 11:21:37 +02:00
Jehan
1a3efe09f8 desktop: make validate-desktop a unit test.
Instead of a target, let's make it a test. Also I realize it already
existed as desktop_file test. But it's simpler to run it directly (no
need of an external script).

Note: I still leave the test-desktop.sh script as it is used for the
autotools test.
2021-06-18 21:00:38 +02:00
Félix Piédallu
65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00