Commit Graph

607 Commits

Author SHA1 Message Date
Daniel Novomeský 69c81f1059 flatpak: upgrade libjxl 2023-06-16 13:15:14 +00:00
Jehan d0ac96b8b3 build: fix nightly flatpak.
Don't set both a branch and a commit, otherwise flatpak-builder will
compare the HEAD of this branch (which may evolve with the commit).

Fixes:

> Failed to download sources: module qoi: Git commit for branch master is dfc056e813c98d307238d35f7f041a725d699dfc, but expected f6dffaf1e8170cdd79945a4fb60f6403e447e020
2023-06-07 12:24:11 +02:00
Jehan 36fe8a979d build: remnants of the autotools builds in installer creation script.
Because of this, the script was failing to get the version string, which
in turn was breaking InnoSetup.

This fixes the following InnoSetup bug:

> Error on line 116 in C:\_r\_builds\k3_3muaB\0\GNOME\gimp\build\windows\installer\gimp3264.iss: Value of [Setup] section directive "VersionInfoVersion" is invalid.
2023-06-06 20:45:09 +02:00
Jehan 12f349ef34 build: gobject-introspection was not pulling gobject-introspection-runtime.
This is an issue I'll have to fix in crossroad. Let's have the CI build
fixed for now.
2023-06-06 20:45:09 +02:00
lillolollo ff0a4d012f Add aalib on crossroad 2023-06-05 23:16:59 +00:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Jehan 88e82d57af build: install gobject-introspection with MSYS2 when cross-building…
… for Windows.

Though it's useless for actually building the GIR files, we still need
this package now, for building script-fu with introspection abilities,
to generate GIMP and GEGL enums.
See the 2 previous commits for more information.
2023-05-24 23:19:20 +02:00
Alx Sa 48e976725c build: Update Windows installer associations
Adds the following formats that GIMP now supports: .ani, .cur, .dcx,
.icns, .pam, .wbmp, .iff/acbm/ilbm/lbm
2023-05-15 19:26:48 +00:00
Alx Sa d4f420769c plug-ins: Port FITS plug-in to cfitsio library
Switch to NASA-maintained cfitsio library for loading/exporting FITS images.
This allows us to import compressed FITS files (GZIP, HCOMP, PLIO, RICE) in
8/16/32 bit and float/double precision. It also simplifies export code using
the built-in cfitsio APIs.
2023-05-14 15:05:50 +00:00
Jehan a75015a821 build: add appstream-glib
It is actually available in the SDK but was removed from the runtime (relatively
recently, it would seem). As a more general rule, it seems that GNOME is phasing
it out slowly in favor of libappstream. So probably we should do the same
eventually.
Yet for now, to at least have a working nightly flatpak, let's add it to our
package.
2023-05-13 22:44:00 +02:00
Daniel Novomeský bcac1107b5 build: update meson options in MSYS2 build 2023-04-11 10:44:18 +02:00
Daniel Novomeský 1f4ce4c51f flatpak: install QOI header 2023-04-03 17:38:31 +02:00
Daniel Novomeský 04b97dc97c build: enable QOI format on Windows
and associate in the installer.
2023-04-03 09:45:10 +02:00
Jehan 371925e16b build: sync beta and nightly flatpak manifests.
I'm actually syncing with a branch which I can't test right now because flathub
seem to have some breakage. For the nightly, let's just directly push as anyway
we can't test in Gitlab MRs either because of the non-master jobs timeout.
See: https://github.com/flathub/org.gimp.GIMP/pull/202

We should always keep the diff between these files to a minimum.
2023-03-23 15:44:27 +01:00
Jehan 23a0f22614 build: improve further the flatpak README.
- Fix the markdown styling.
- Add commands on how to build GIMP from the local repository instead of a brand
  new clone (otherwise I don't see how one could develop with flatpak). I knew
  it were possible, but until today, I never tried to do this so I had to test
  first.
2023-03-23 15:12:12 +01:00
Jehan 5e1a7b15da build: remove outdated cron file and update our flatpak howto.
- The cron file was from the very early flatpak experiments before Flathub came
  into the picture, as well as the GNOME Nightly repository. Back then, we
  wanted to set up our own nightlies or release repository through a cron.
- It is still interesting to keep some instructions for local builds of the
  flatpak as some people want to use this for development (but all the part
  about exporting to a repository, signing, etc. is now unneeded for such use
  case). So I'm updating the howto to more current recommendations.
- `flatpak-howto.txt` renamed to `README.md`.
2023-03-23 14:38:08 +01:00
Jacob Boerema ecbcc4c4a4 build: fix ci failure due to partial missing bg in windows installer
Bulgarian was added to the installer po files and LINGUAS, but the other
files needing updates were forgotten. Let's fix that.
2023-03-14 14:17:19 -04:00
Daniel Novomeský dc8121729d flatpak: upgrade libjxl, highway, libde265 2023-02-13 17:59:14 +00:00
Alx Sa f6b4adafa3 build: Port fileicon.ico from gimp-2-10
This .ico contains additional 24x24, 64x64, 128x128, and 256x256 sizes
for clearer icons on different resolutions and displays.
2023-01-27 04:41:10 +00:00
Jehan 29dff58a2f build: more `meson setup` syntax update. 2023-01-24 17:48:29 +01:00
Jehan 4699d9e2ac build, gitlab-ci: using non-ambiguous `meson setup` syntax.
Fixes:

> WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2023-01-24 15:35:30 +01:00
Daniel Novomeský 12b1890980 flatpak: upgrade exiv2, libheif, libjxl 2023-01-20 12:49:16 +01:00
Jehan c5f34477e6 build: sync flathub's beta and nightly branches of the flatpak.
Only the libwmf patches are still different. Apparently we may have fixed the
same bugs in different way on both branches. We should look later in details to
see if some patches are better than the other.
2022-11-18 23:48:46 +01:00
Jehan cab8748c6c build: delete now outdated files.
It's probably unneeded as the 2.99 installers are transient and anything
installed by GIMP 2.99 won't be in stable 3.0 anymore. Still, it's nice not to
have any weird warnings even in dev releases.
2022-11-13 23:04:38 +00:00
Daniel Novomeský ec3da29f67 flatpak: remove extra lcms2
lcms 2.13 is already present.
2022-11-10 16:50:20 +01:00
Daniel Novomeský e58efc314d flatpak: change recipe for libjxl 2022-11-04 11:17:58 +00:00
Daniel Novomeský 006b77674d flatpak: Upgrade libde265 2022-11-03 12:07:52 +00:00
Jehan f7b026e3f0 build: add glib-networking to cross-built Windows jobs.
This dep is needed for various network GIO modules. Also various moving files
around from lib/gio/modules/ were broken in the new brought back jobs.
2022-10-27 16:23:56 +00:00
Daniel Novomeský 403d11330c flatpak: minor fixes in libde265 and libjxl modules
don't build unnecessary tools from libde265
libjxl uses existing BROTLI library instead of bundled one
2022-09-29 11:51:47 +00:00
Daniel Novomeský 0f8f3c3f1a flatpak: enable BMFF format support in exiv2
Improves AVIF, HEIF, JPEG XL metadata support.
2022-09-23 13:30:12 +02:00
Daniel Novomeský e0ef799473 flatpak: upgrade libheif and libjxl 2022-09-22 16:32:33 +02:00
Daniel Novomeský 75121fdbc8 build: remove ilmbase from crossroad build,
because it is no longer offered by MSYS2
2022-09-03 19:19:30 +00: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
Jehan 7375116d46 po-windows-installer: fix double escaped ampersand in XML for the…
… Windows installer localization.

There are kind of 2 separate bugs here:

- Direct i18n.gettext() to the proper data directory where to find the
  ITS file. Otherwise `meson compile gimp30-windows-installer-pot` and
  `meson compile gimp30-windows-installer-update-po` complained about
  not knowing XML and falling back to C, which is obviously a problem:

> /usr/bin/xgettext: warning: file 'build/windows/installer/lang/setup.isl.xml.in' extension 'xml' is unknown; will try C

- Set gt:escapeRule to "no" in the ITS file, otherwise the XML entity is
  kept as-is in the po file (i.e. "&" stays "&" inside the po
  files), but it's considered as raw text when merged back to XML, i.e.
  that the '&' is properly converted to a XML entity, so we end up with
  a double escape "&".
  Now the po file will have a '&' which will still be converted to XML
  entity at merge time. This is actually most likely better than asking
  translators to handle XML entities themselves (with the possibility to
  make typos and break the XML entity).

See https://savannah.gnu.org/bugs/?58643
2022-08-22 20:50:59 +02:00
Jacob Boerema b0ade14957 build: fix Windows installer
The Hungarian language file for the Windows installer was recently moved
from unofficial to the officially supported languages. However, a new
release including Hungarian by default is not available yet. This causes
our CI to fail because it can't find Hungarian in unofficial.

We change our ci script to download Hungarian from the correct location
for official languages, and adapt gimp3264.iss to reflect the correct
location.
2022-08-15 23:32:47 +00:00
Jehan 218c78e76a build: search only once for the addbom.sh script.
This avoids repeated "found: YES" output (one per installer language) on
the project configuration.
2022-07-31 18:25:33 +02:00
Jehan 47ba11056f Issue #7386: fix languages non-provided by InnoSetup showing as English.
The language files provided by the InnoSetup project (either the main
ones or the "Unofficial" ones, i.e. less maintained ones) at least
provides the name of the language, possibly in English, ideally
self-localized in its own language.

Unfortunately Kabyle didn't have any language file so we were using the
Default one, which ended up showing the lang as a duplicate (and very
wrong) "English".

With this commit, I add code to provide our own very basic base language
file, which would at least contain the language name. There is also a
concept of language ID to be verified in Windows-provided list.
Unfortunately it doesn't have any (actually it was id-ed 0x1000 like
many other languages, which looked therefore to be the code for an
unsupported lang). InnoSetup docs tells us to leave 0 then. We can add
the ability to set a specific code later in the template if we add other
un-provided languages and if they have their own lang id.

With this base infrastructure, we should be able to better support more
languages.
2022-07-31 15:10:04 +00:00
Jehan 195ed374f4 Issue #8338: add BOM to ISL file as external script.
Unfortunately the weird encoding of a string to bytes to get the UTF-8
BOM worked on my local machine, but not on the Windows CI. I'm not going
to fight it and fallback to a shell script.

I am guessing it should work fine on all platform since we use basically
the same sed call in build/windows/gitlab-ci/installer-gimp-msys2.sh
already.
2022-07-31 01:43:05 +02:00
Jehan 4293d05dda Issue #8338: add a BOM to ISL files.
Inno-Setup absolutely requires it to recognize UTF-8 translation files.
This should hopefully be the final fix to #8338.

Note that this fix is full of workaround for meson bugs or limitations.
While it was a one-liner in autotools, added to the existing rule, here
I have to add an additional (non-relevant) target rule, then uglily work
around 2 bugs:
https://github.com/mesonbuild/meson/issues/1564
https://github.com/mesonbuild/meson/issues/7696

I can't say I'm so happy about the resulting change, even though it
seems to work. If anyone can propose a nicer build rule, it would be
welcome.
2022-07-30 23:28:39 +02:00
Niels De Graef 7186907c16 build: Fix windows installer i18n
Whenever we have an element without translation, we try to use the value
without a `xml:lang` attribute. That selector was wrong though, which
leads to https://gitlab.gnome.org/GNOME/gimp/-/issues/8338, which should
now be fixed.
2022-07-29 20:40:41 +02:00
Niels De Graef 1308df4dc1 meson: Fix windows installer translations 2022-07-08 10:08:14 +02:00
Anders Jonsson e601a6c7de Change GTK+ to GTK
GTK got rid of the + in 2019:
https://lwn.net/Articles/779305/
2022-07-07 14:02:36 +00:00
lloyd konneker d5a83429b4 ScriptFu: Add script-fu-interpreter akin to other interpreters
Why:
1) users can install .scm scripts to plug-ins dir
2) Crashing scripts do not crash extension-script-fu

Scripts (.scm files) have a shebang and are executable
and in a same-named subdir of plugin dir.

Interpreter/scripts create PDB procs of type PLUGIN unlike extension-script-fu
which creates PDB procs of type TEMPORARY, owned by extension-script-fu.

Unlike other interpreters, the interpreter is-a plugin outright,
not by virtue of the script subclassing GimpPlugin and using GI.

More details in /plug-ins/script-fu/interpreter/README
2022-06-30 13:39:45 +00:00
Jehan dfa1f0fc93 build: intltool is still needed by libmypaint. 2022-06-25 17:06:30 +02:00
Jehan 66812c8862 build: fix the distcheck.
MR !653 was merged too early as Gitlab bugged on us! Anyway this fixes
the distribution contents.
2022-06-25 17:06:21 +02:00
Jehan 8122e8cf36 extensions: fix builds after MR !653 (migrating to gettext).
(1) On recent meson versions, it fixes this error:

> extensions/goat-exercises/meson.build:108:0: ERROR: i18n.merge_file keyword argument 'output' was of type array[str] but should have been str

As docs explains, 'output' only accepts one item in i18n.merge_file().

This bug also happens on older meson (but there the reported error is a
lot less useful as it doesn't mention local meson build code).

(2) `setup.isl.xml` is a temporary intermediary file used to create the
    Windows installer. It must not be installed.

(3) `gimp30-windows-installer.mo` itself is only used to create
    `setup.isl.xml`. It must not be installed as well.

(4) gimp-tips.(its|loc) files (same for gimp-tags ones) should not be
    installed. They are only temporary data.

(5) Fix environment variable: s/GETTEXT_DATA_DIRS/GETTEXTDATADIRS/

Fixes:

> /usr/bin/msgfmt: cannot locate ITS rules for ../../../data/tips/gimp-tips.xml.in

(6) Fix various bugs in the *.setup.isl files creation in autotools
    build (typo, wrong files used, order of options in `xsltproc`
    apparently meaningful, and so on. I guess the autotools build was
    not as well tested as the meson one :P).

(7) Fixing the unit test verifying language lists consistency.

(8) `setup.isl.xml.in` must be added to the distribution.
2022-06-25 12:41:21 +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
lloyd konneker 1c50e60e9c build:windows: migrate to Python3.10 on MSYS
Evidently MSYS no longer has 3.9, see recent pipeline failures.

Note reports of issues with meson on 3.10, but it might not impact this build.
2022-06-24 14:52:02 +00:00
Jehan 10145bb938 build: add an option in the Windows installer to disable update check.
This will allow to use the official Windows installer directly in the
Windows Store, as per the new proposed workflow by Microsoft.

Nevertheless our GIMP for Windows has a built-in update check which
would check if a new version exist and warn people (advising them to go
on the website and download the new installer to update). We obviously
don't want this on the Windows Store which has its own update channel.
It would be confusing.

Therefore I added a feature to disable the built-in update check (not
even showing in Preferences) by tweaking a single package variable. The
installer now comes with new option /DISABLECHECKUPDATE=true which will
add said variable.
2022-06-07 17:52:52 +02:00
Jehan 89fc542fad build: build Georgian localization for Windows installer.
Georgian added in commit 2e07b2d5cc.

This will fix the CI.
2022-05-03 20:57:58 +02:00