Commit Graph

491 Commits

Author SHA1 Message Date
Niels De Graef 7ee72ee9f7 flatpak: Use fallback-x11
From Flatpak's NEWS:

> A new fallback-x11 permission grants X11 access, but only if the user
> is running in a X11 session. For applications that support both
> Wayland and X11, this can be used to ensure that the app doesn't have
> unnecessary X11 access while in Wayland, but still works in an X11
> session.
2021-09-30 16:10:09 +02:00
Stanislav Grinkov 2afa019c70
build, meson: Fix rc files build order dependency...
by adding special filler custom_target() build rules.

Basically, these build rules do nothing (a mere meson --version call),
but they ensure that `git-version.h` is built first, before the dependant
rc files are used in respective resource compiler build targets.

This still a nasty trick (not a proper solution), but it do the job.

See #6257 for additional information.
2021-09-30 01:08:33 +06:00
Daniel Novomesky e43743e0eb Build libjxl in Win64 native MSYS2 CI 2021-09-29 18:43:08 +02:00
Daniel Novomesky 0236308d69 Build libjxl in crossroad Win64 CI 2021-09-29 09:43:39 +02:00
Jehan 1b2ed2efd2 build: sync our nightly flatpak with last changes.
This is based from changes in wip/release/2-99-8 branch or the Flathub
flatpak (so not necessarily released yet):

- libheif bumped to 1.12.0
- Cairo with new patch to fix #235.
2021-09-27 12:43:36 +02:00
Michael Schumacher 37d76c8876 build: mention incomplete and outdated state of build/gimpbuilder-base/Dockerfile 2021-09-12 00:58:02 +02:00
Jehan ad83fd04ba build: improve Windows installer language test.
For the installer, we must also manually pull all used official
language, so I am adding a test checking that the list of pulled file
matches the list from the installer script.
2021-09-08 10:20:25 +02:00
Jehan e73f82dbfd build: fix installer.
We must also pull the Lithuanian base file for Inno Setup.
2021-09-08 09:57:24 +02:00
Jehan 2bc1dd1f9c build: fix flatpak manifest.
The option -Dcheck-update has been changed to a combo.
See commit f0be2256d0.
2021-09-05 17:06:05 +02:00
Jehan 3e1143595e build: fix typo s/en_GN/en_GB/ 2021-09-04 01:18:07 +02:00
Jehan 3b3f5c8562 build: add new Lithuanian translation to the Windows installer.
This new unit test (test-installer-langs.sh) is great, showing us
inconsistencies between files!
2021-09-04 00:54:42 +02:00
Jehan 855d5ce067 build: fix Windows installer build.
Since we don't build anymore a custom GLib and glib-networking, this
part also had to be reverted back.
2021-08-23 20:37:48 +02:00
Jehan d0bef53ecd build: patch to configure libwmf with no freetype-config.
libwmf was still relying on a script called freetype-config instead of
using standard pkg-config. It seems it got wiped out in recent freetype2
(or at the very least, this script is not present anymore in freetype2
version 24.0.18 from master runtime of GNOME SDK).
This patch uses pkg-config in libwmf configuration instead.

As I also had some autoheader "missing template" warnings (which were
failing the recreation of config scripts), I add placeholder
descriptions to AC_DEFINE() macros, as this is apparently now mandatory.
2021-08-22 17:36:25 +02:00
Jehan 63122482db build: do not build GLib for Windows anymore.
We were building it to add the patch glib!2020, but it has now been
backported in MSYS2 package:
https://github.com/msys2/MINGW-packages/issues/9154
This was about the most infamous bug #913 for very slow file dialogs on
Windows when some drives are disconnected, or with slow/non-accessible
network drives or even fake floppy drives created in the Bios.

Similarly we also wanted glib!2205 and glib!2210 for bug #6780 about
GIMP crashing unexpectedly when images are opened in other (apparently
unrelated applications). I had not updated our build scripts yet, but
anyway, it got backport to the MSYS2 package first, then even to GLib
2.68.4 which has been recently released (and bumped in MSYS2 as well).
See: https://github.com/msys2/MINGW-packages/issues/9283

So let's rely again on MSYS2 package!
2021-08-22 17:10:01 +02:00
Jehan 34748af7a7 gitlab-ci, build: compute the checksums of installer in bash script.
I completely forgot that since the installer is built on a Windows
runner, I cannot expect a standard Linux shell syntax.
As a consequence, commit de9a171a19 broke the "win-installer-nightly"
job with the following error:

> The token '&&' is not a valid statement separator in this version.

Rather than trying to find the equivalent command to run on powershell
or whatever, let's just compute the checksum at the end of our installer
creation script.
2021-08-01 17:11:58 +02:00
Jehan 9e95d44895 build: forgot a patch for a dependency of the flatpak build. 2021-07-22 17:54:48 +02:00
Jehan 58fd168f8e build: update OpenEXR in our nightly flatpak manifest.
Synced from the beta flatpak. The previous manifest rules were building
fine on Flathub build servers, but not on GNOME CI ones. It resulted in
a bunch of "ISO C++17" errors when building ilmbase.

Maybe just restricting to C++14 through build fine would have been fine,
but anyway let's also update the dependencies in the same time as we
were outdated.
2021-07-22 16:37:15 +02:00
Jehan 3e2207e1e0 build: update the master flatpak.
As per state in the wip/release/2-99-8 branch of the beta flatpak.
In particular, we update some dependencies (poppler, ghostscript and
SuiteSparse).

It should also fix the master flatpak build which seemed to fail on
downloading SuiteSparse sources. Since their upstream moved their
tarballs to be downloaded from Github, it should take care of this issue
by side effect.
2021-07-22 13:00:54 +02:00
Jehan 681d8e7454 build: MSYS2 python package is now Python 3.9.
The MSYS2 package got recently bumped from 3.8 to 3.9.6.

At first I wanted to update our packaging and installer scripts to be
more generic using glob patterns (so that they should work now and
should continue to work even if bumping to a higher minor version in the
future). Unfortunately this would work for `package-gimp-msys2.sh` but
in `files.isi`, it would only work for `libpython3.*.dll`, not for the
python3.9/ folder. InnoSetup apparently doesn't support using a folder
as source (or maybe just a folder with glob like `python3.*`) as it
resulted in a "No files found matching" error.

So leave everything with the accurate version (because anyway it's much
better to get an early failure than only at the very last step).
2021-07-17 15:25:22 +02:00
Jehan bd71814e8b build: bump GTK to 3.24.30.
Same as MSYS2, add a patch to fix keyboard input when using IMEs (which
should hopefully fix #1603). Note that this patch should be in the next
release.

Also remove the Windows Pointer Input Stack support as it is in 3.24.30.

Finally apply the patch from gtk!3661 for testing (instead of the patch
from gtk!3275), as it is supposed to fix #5475. This is the reason why
we still build our own GTK3.
2021-07-17 15:25:22 +02:00
Jehan 74f67c180e build: compile GTK with new Windows Pointer Input Stack support.
We don't know when the next GTK3 release will be and this is cool enough
that we want to test it soonish, even more with MR !458 coming soon with
a Preferences option.
2021-07-07 13:12:42 +02:00
Jehan ad86717b9b build: custom GTK3 compilation for the Windows installer. 2021-07-07 13:12:34 +02:00
Jehan 179334b618 build: do not copy a binary dependency when it already exists.
The dll_link script would overwrite the same dependencies over and over,
for instance when needed for several binaries, but worse when available
in several source directories. In our case, we look up 2 source
directories: our install prefix first, then the prefix for MSYS2
pre-built packages. So it turns out we would be overriding any
custom-built package also installed through MSYS2 (such as our patched
GLib, see my previous commits).

As a side effect, it should also make the packaging step faster as we
don't re-copy unecessarily the same DLLs over and over again. The first
one to go in stays in.
2021-06-29 12:50:45 +02:00
Jehan dc3cc6fb26 build: move glib-networking modules into our custom glib prefix.
Since gio searches its modules based on the paths as advertized by the
pkg-config, let's just move the pre-compiled modules (by MSYS2
packages). We build the same version of glib2 with the same options, and
only one additional patch. So this should not be a problem to use the
pre-built modules rather than rebuilding glib-networking too.
2021-06-28 14:48:16 +02:00
Jehan 74d3ad700a build: custom build of GLib with additional patch.
The MSYS2 package for glib2 does not include the patch to reduce delays
of disconnected volumes (glib!2020).
Let's make our own build in our CI for our installer (hence also
experimenting overriding MSYS2 packages when necessary).

Except for this patch, this is the same build as MSYS2 and same option,
as described in:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-glib2
2021-06-28 14:48:16 +02:00
Jehan 63f75471f5 build: some cleanup in build scripts for Windows.
We had some weird conflicting files errors in the CI. I think our weird
file removal is not needed anymore. So get rid of the ugly cleanup hack.
2021-06-28 14:47:57 +02:00
Jehan 0e4263d800 build, gitlab-ci: generated files should be in the build dir.
Also update the CI script to copy the generated language files before
creating the installer so that the gimp3264.iss script finds them.
2021-06-18 20:40:04 +02:00
Jehan 602add8c45 build: improve the script to test for Windows installer languages.
We were only comparing the po list with the language list in the
gimp3264.iss. Nevertheless since we also generate the <code>.setup.isl
files, we should also verify generated files corresponds exactly to the
same list of languages.
This commit does it for meson and autotools build.

This is also how I fixed the meson list (cf. previous commit).
2021-06-18 20:27:33 +02:00
Jehan a6c44a7191 build: complete Windows installer lang list in meson and fix iconv…
… conversion when some characters are not convertible.

Currently failed conversion ended up in incomplete .isl files (autotools
build) or would break the build (meson build). Ideally we should use a
target encoding which contains all source characters, but we use the
encoding as set upstream in the LanguageCodePage for the given language
file.
I'm not sure if maybe we can mix the encoding by adding our own
LanguageCodePage at the top of our generated <code>.setup.isl, then we
could just use UTF-8 for any language. It will have to be tested.

For now let's just discard non-convertible characters, assuming there
shouldn't be too many of these. It's the lesser evil in this situation.
2021-06-18 20:22:04 +02:00
Jehan 039be5d00e build: sync with development flatpak.
- dri access needed (cf. commit de8be943 on our Flathub repo).
- GNOME runtime still only provides lcms 2.10 (even in its master build)
  and we need version 2.12 to avoid some crashes (cf. commit ae60863e
  from our flathub repo).

Trying to keep the differences to a minimum. There are still some, like
the extension point is absent from the nightly manifest, but I'm not
sure if it makes sense to have it there.
Also top "cleanup" list is different but we should probably take a
closer look at this. Maybe it's outdated on both sides anyway.
2021-05-27 13:56:22 +02:00
Jehan 2503453628 Revert "flatpak: Use exact version of GEGL (0.4.30)"
This reverts commit 61389adfa0.

I was initially hoping to debug why the GEGL `master` HEAD was
presumably failing to build (according to the reverted commit) but it
actually doesn't (as tested in a feature branch's CI) even though I
don't see any recent change looking like a build fix. So let's just do a
simple reverse. :-)
2021-05-27 02:00:34 +02:00
Ondřej Míchal 61389adfa0 flatpak: Use exact version of GEGL (0.4.30)
Latest git version fails to build.
2021-05-25 11:18:57 +00:00
Ondřej Míchal 1228d898b8 flatpak: Add maxflow dependency and build with workshop
8a771fc6b9
2021-05-25 11:18:57 +00:00
Ondřej Míchal 94ed45db04 flatpak: Add patch to Cairo preventing subpixel font rendering system settings to apply to text layers
See fd391fd109
See 7a0ba49592
2021-05-25 11:18:57 +00:00
Ondřej Míchal d468722828 flatpak: Build graphviz as GEGL submodule
See 633de34a11
See dd06088c26
2021-05-25 11:18:57 +00:00
Ondřej Míchal 68cf9d8581 flatpak: Remove -Dlibdir=lib configure option
Added because of issues in Msson 0.54.0. Should be fixed since version
0.54.3.

See fbcf2afc63
2021-05-25 11:18:57 +00:00
Ondřej Míchal 551cc6a0ba flatpak: Remove meson build
GNOME SDK contains Meson since version 3.38.

See e8ea702691
2021-05-25 11:18:57 +00:00
Ondřej Míchal 95754f0d6b flatpak: Add gvfsd permission for gvfs
See https://github.com/flathub/org.gimp.GIMP/pull/104
See https://github.com/flathub/flathub/issues/2180
2021-05-25 11:18:57 +00:00
Ondřej Míchal 2842a8e691 flatpak: Bump versions of some modules
- Poppler 20.10.0 to 21.04.0
- poppler-data from 0.4.9 to 0.4.10
- OpenBLAS from 0.3.9 to 0.3.15
- libde265 from 1.0.7 to 1.0.8
- gexiv 0.12.1 to 0.12.2
2021-05-25 11:18:57 +00:00
Christopher Davis 8e448254d5 flatpak: Fix build
Add patches and dependencies needed to build the development
version of GIMP. Also switches the in-tree manifest to using
the nightly branch of the GNOME SDK and meson
as the buildsystem.
2021-05-25 11:18:57 +00:00
Jehan 8c54a0caa9 build: fix installer creation.
My commit 3fbe59cd3c broke the installer making as I forgot to remove
some rules about lua files. Proof that I should always test first!
2021-05-23 00:53:07 +02:00
Jehan 3fbe59cd3c build: do not add the same files twice for lua in the installer.
Since we moved most of them to bin/, share/lua*/ and lib/lua/ files are
not necessary anymore (according to my tests so far at least). Let's not
include them.

Also exclude the lua DLL from the generic libraries. It is only for when
the lua option is set.
2021-05-22 16:23:44 +02:00
Jehan f75cad56e0 build: disable javascript plug-ins.
No need to have GIMP trying to run the Javascript goat-exercise at
startup. All it does is make annoying error message on console output.
We know it won't run because no interpreter is available. No need for
trying.
2021-05-22 15:50:56 +02:00
Jehan 2d15aa00cc build: move lua import files into bin/.
It looks like the DLL ends up searched into bin/lgi/ and other lua files
from bin/lua/. There might be better solutions for the issue, but for
the time being, it seems to work ok.

Note that ender used instead to rebuild lua with the following changes
(cf. IRC):

> src/luaconf.h:
> #define LUA_PATH_DEFAULT \
>   "!\\..\\share\\lua\\5.1\\?.lua;" "!\\..\\share\\lua\\5.1\\?\\init.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;"
> #define LUA_CPATH_DEFAULT \
>   LUA_CDIR"..\\lib\\lua\\5.1\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"

But moving files around in the installed tree is much simpler than
rebuilding the whole lua just for this.
2021-05-22 10:35:06 +02:00
Jehan 49349c78cc build: add lua support to the Windows installer.
Note that I must not install both lua51 with luajit because these are
conflicting. Let's go with luajit from feedback we had on the best
choice (though this topic itself seems a bit heated actually).

Also clean-out the unexpected file removal because now I had the
opposite case, i.e. a CI problem because of this. And from my latest
tests, it seems to work ok for the time being without, which is much
cleaner anyway. So let's go like this for the time being.
2021-05-22 10:35:06 +02:00
Jehan 18785bf9f1 build: clean out obsolete Windows-specific patches.
- libwmf patch for issue #4061 is applied upstream (libwmf). Even though
  no new libwmf release happened, the MSYS2 package applied the patch to
  libwmf 0.2.12. So it's in our installer. Thanks to lillolollo for
  staying on top of things, as usual.
  Cf. https://github.com/msys2/MINGW-packages/pull/6977
- glib permission issue (#4594 about GIMP preventing the third-party
  software Spotify from starting) is included since glib 2.67.6/2.68.0.
  Since MSYS2 uses glib 2.68.2, it's all good.
- patch for deprecated GTK+2.24 was kept in `master` repo mostly as a
  reminder of having to deal with issue #1082 (former bug 780979) about
  transparent windows from other software interfering with GIMP. This
  was fixed as gtk!2767 which is available since GTK 3.24.27. MSYS2 uses
  GTK 3.24.29 to this day.
  Note that this patch is still relevant in the GIMP 2.10 series (hence
  in gimp-2-10 branch), not in the current GIMP 2.99 series.
2021-05-20 20:26:41 +02:00
Jehan b815bca8d3 gitlab-ci, build: --enable-windows-installer also on Linux.
By enabling this option on Linux, not only will the installer language
file be generated, but the `make check` will also now validate that the
lang list is consistent with existing gettext files (see commit
8a42c6ccc2). So it's useful information to know this for instance as
soon as some translators add a new localization.

Also oppositely remove the option on the MSYS2 native Windows 32-bit
build. For Windows, we only need this option once, as we use the
language files generated by the 64-bit build.
2021-05-20 02:55:54 +02:00
Jehan 7d9e6e311e build: fix Python support in Windows installer.
Add GObject Introspection libs, python libs and various binaries. Not
sure why we need 3 python binaries. This would need to be investigated
and possibly cleaned up a bit. Similarly maybe it would be better to be
a bit more selective about what we take from lib/python3.8/ folder
(looking what's in there, I wondered if some of the stuff were not
pulled by some dependencies and/or should maybe be filtered out).

But for now, let's make the InnoSetup scripts happy.

In any case, the resulting installer was tested and now Python plug-ins
work successfully. Wouhou!
2021-05-19 22:01:31 +02:00
Jehan 9c62dfd4d4 build: extensions are gimp32/64 specific.
Otherwise the extension files from the 32-bit build override the ones
from the 64-build. This is wrong first because we get 32-bit executables
uselessly (even though Windows 64-bit can run them, we should install
the right ones) and also because we don't build Vala plug-ins on 32-bit
(doesn't work for some reason) and as we override the extension
manifest, the Vala goat exercise is not made available even though it's
installed.
2021-05-19 22:01:21 +02:00
Jehan f647517912 build: job win-installer-nightly should return failure appropriately. 2021-05-19 22:00:53 +02:00