2017-11-01 21:27:13 +08:00
|
|
|
sizes = [
|
|
|
|
'16',
|
|
|
|
'22',
|
|
|
|
'24',
|
|
|
|
'32',
|
|
|
|
'48',
|
|
|
|
'64',
|
|
|
|
'256',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach size : sizes
|
|
|
|
sizedir = size+'x'+size
|
|
|
|
install_data(sizedir / 'gimp.png',
|
|
|
|
install_dir: get_option('datadir') / 'icons' / 'hicolor' / sizedir / 'apps'
|
|
|
|
)
|
|
|
|
endforeach
|
2021-07-06 16:48:24 +08:00
|
|
|
install_data('scalable/gimp.svg',
|
|
|
|
install_dir: get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps'
|
|
|
|
)
|
2017-11-01 21:27:13 +08:00
|
|
|
|
|
|
|
desktopfilename = 'gimp.desktop'
|
|
|
|
|
|
|
|
desktop_conf = configuration_data()
|
|
|
|
desktop_conf.set('GIMP_COMMAND', gimp_command)
|
|
|
|
desktop_conf.set('GIMP_VERSION', gimp_version)
|
|
|
|
desktop_conf.set('GIMP_APP_VERSION', gimp_app_version)
|
|
|
|
desktop_conf.set('MIME_TYPES', ';'.join(MIMEtypes))
|
|
|
|
desktop_conf.set('BUG_REPORT_URL', bug_report_url)
|
|
|
|
|
|
|
|
desktopfilein = configure_file(
|
|
|
|
input : desktopfilename+'.in.in',
|
|
|
|
output: desktopfilename+'.in',
|
|
|
|
configuration: desktop_conf,
|
|
|
|
)
|
|
|
|
|
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-09 02:35:45 +08:00
|
|
|
desktopfile = i18n.merge_file(
|
|
|
|
input : desktopfilein,
|
|
|
|
output: desktopfilename,
|
|
|
|
type: 'desktop',
|
|
|
|
po_dir: po_dir,
|
2017-11-01 21:27:13 +08:00
|
|
|
install: true,
|
|
|
|
install_dir: get_option('datadir') / 'applications',
|
|
|
|
)
|
|
|
|
|
|
|
|
appdatafilename = 'org.gimp.GIMP.appdata.xml'
|
|
|
|
appdatafilein = configure_file(
|
|
|
|
input : appdatafilename+'.in.in',
|
|
|
|
output: appdatafilename+'.in',
|
|
|
|
configuration: desktop_conf,
|
|
|
|
)
|
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-09 02:35:45 +08:00
|
|
|
appdatafile = i18n.merge_file(
|
|
|
|
input : appdatafilein,
|
|
|
|
output: appdatafilename,
|
|
|
|
po_dir: po_dir,
|
2017-11-01 21:27:13 +08:00
|
|
|
install: true,
|
|
|
|
install_dir: get_option('datadir') / 'metainfo',
|
|
|
|
)
|
|
|
|
|
|
|
|
if desktop_validate.found()
|
2021-06-19 02:52:02 +08:00
|
|
|
test('validate-desktop',
|
|
|
|
desktop_validate,
|
|
|
|
args: [ desktopfile ],
|
|
|
|
suite: 'desktop',
|
2017-11-01 21:27:13 +08:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2022-05-04 03:48:28 +08:00
|
|
|
if appstreamcli.found()
|
2017-11-01 21:27:13 +08:00
|
|
|
test('appdata_file',
|
2022-05-04 03:48:28 +08:00
|
|
|
appstreamcli,
|
|
|
|
args: [ 'validate', appdatafile ],
|
2017-11-01 21:27:13 +08:00
|
|
|
env: [
|
2022-08-31 07:07:27 +08:00
|
|
|
'GIMP_TESTING_ABS_TOP_BUILDDIR=' + meson.project_build_root(),
|
2017-11-01 21:27:13 +08:00
|
|
|
],
|
|
|
|
suite: 'desktop',
|
|
|
|
)
|
|
|
|
endif
|