Commit graph

47065 commits

Author SHA1 Message Date
Jehan
8a42c6ccc2 build: add a test to check the Windows installer languages.
This way, we will avoid in the future any discrepancies between
languages set in the Windows installer and available translations (po
files in po-windows-installer/) because `make check`/`ninja test` will
fail.
2021-05-19 21:59:18 +02:00
Jehan
9d065b8718 build: create installer with debug symbols and Python support. 2021-05-19 21:59:09 +02:00
Jehan
c5b05b6e03 build: separate debug symbols from binaries in the Windows installer.
The shell script was given to me by ender. This is an additional step he
runs after building.
2021-05-19 21:59:00 +02:00
Jacob Boerema
016948c482 plug-ins: load 16-bit per sample SGI images as 16 bit integer
We were loading 16-bit per sample SGI images as 8-bit
integer images even though we have had support for
16-bit integer for a long time now.

Changed to use 16-bit integer encoding now. Saw
this request a while ago on the gimp user mailing list.
2021-05-18 18:53:59 -04:00
Jehan
90ee7bd417 NEWS: update. 2021-05-18 16:59:13 +02:00
Rodrigo Lledó
0d479b4e3e Update Spanish translation 2021-05-18 12:01:58 +00:00
Rodrigo Lledó
625c437352 Update Spanish translation 2021-05-18 11:33:35 +00:00
Jacob Boerema
e1fcaaaa0a plug-ins: always stop on error after reading PSD layer block. 2021-05-17 21:27:07 -04:00
Jacob Boerema
be20a25ec6 plug-ins: additional layer info in PSD images can have multiple resources.
Instead of only checking for the layer resources Lr16 and Lr32 make it
a loop and use the generic get_layer_resource_header to read all
resources.

We still need to figure out at a later time how to best handle these
resources.
2021-05-17 21:27:07 -04:00
Jacob Boerema
d99b87c529 plug-ins: add support for reading Photoshop PSB image files. 2021-05-17 21:27:07 -04:00
Jacob Boerema
35f4b7b517 plug-ins: make PSD resource loading handle 64-bit lengths.
For PSB images certain resources have 64-bit lengths.
Let's handle this transparently by adding a psd_version
parameter and depending on that and the type of
resource we decide if the length to read is 32 or 64-bit.

We also return the total header size. This way the
calling function can use that to determine the
remaining length.

Because we needed to check the signature when
loading the header we remove that check from
the load_layer_resource function since that
would be redundant.
2021-05-17 21:27:06 -04:00
Jacob Boerema
6f523d33dd plug-ins: adjust some psd-load debug statements for 64-bit. 2021-05-17 21:27:06 -04:00
Jacob Boerema
2df0569a50 plug-ins: PSD ChannelLengthInfo data_len should be 64 bit. 2021-05-17 21:27:06 -04:00
Jacob Boerema
0de02a5b2d plug-ins: PSD layer size validation only for "normal" layers.
Apparently layer height or width can be negative for certain
PSD layers that have the irrelevant flag set.

We move those checks down until after we have read that
flag and only validate if the irrelevant flag is not set.
2021-05-17 21:27:06 -04:00
Jacob Boerema
f82974a70e plug-ins: in psd-load.c change debug state to 4 for 1 bit conversion details.
Since the 1-bit conversion debug statements causes a huge amount
of info which can cause slowdowns when loading do it only when
explicitly setting it to IFDBG(4).
2021-05-17 21:27:06 -04:00
Jacob Boerema
714052e998 plug-ins: remove outdated comment about GIMP_MAX_IMAGE_SIZE in psd-load.c
GIMP_MAX_IMAGE_SIZE is nowadays 524288.
2021-05-17 21:27:06 -04:00
Jacob Boerema
2e2e43a404 plug-ins: add psd_read_len function
In certain places in a PSB file we need to read 64-bit
lengths where in a PSD we read a 32-bit length.

To make handling this easier we add a function that
determines if we need to read 4 or 8 bytes and 
also handles converting the value from big endian.
2021-05-17 21:27:06 -04:00
Jacob Boerema
0a703115d1 plug-ins: increase MAX_CHANNELS in PSD files to 99.
Even though the current specs say max is 56 there
are sample files with more channels. Since there is
no reason why we can't handle more let's increase
the maximum to 99 for now.
2021-05-17 21:27:06 -04:00
Jacob Boerema
32be0ec709 plug-ins: PSD layer name can be NULL.
Apparently in a PSD a layer name can be NULL which
gimp_item_set_name doesn't like so only use it when
we have a valid layer name.
2021-05-17 21:27:06 -04:00
Jacob Boerema
58183e55c6 plug-ins: store PSD file version in our PSDimage data structure. 2021-05-17 21:27:05 -04:00
Jehan
f98ccf5b32 build: Windows installer version deduced from configure.ac.
I left the version I was using while testing, but this is obviously
wrong as we would always forget to update it (actually even now it was
wrong as it was producing an installer versionned 2.99.6 whereas it
should have been 2.99.7!). Instead let's grep the major/minor/micro from
the build system.
2021-05-17 16:03:24 +02:00
Jehan
5a366ee0d2 gitlab-ci: reorganize pipeline rules.
The goal is to make it easier to understand which pipeline is run when,
for future maintenance, and also to make it easy to trigger a specific
pipeline through Gitlab pipeline interface.
2021-05-17 14:34:29 +02:00
Jehan
62ae32123a build: add aalib dependency for ASCII Art support.
- Adding a patch sent to me by Sylvie Alexandre meant to help aalib
  build on MSYS2 for Windows 32 and 64-bit.
- Additionally, add an additional patch from myself because it was still
  not building properly.
- Also update the config.guess|sub files because the original ones (from
  2001!) were just too old and not properly recognizing the host mingw
  system (especially the 64-bit one apparently) in the MSYS2 CI jobs of
  GIMP.
- Finally regenerate the whole aclocal/libtoolize/autoconf/automake
  build system because these old files just don't play nice with recent
  autotools though the source files still regenerate fine (despite with
  some warnings, but nothing blocking).
- Add crt-git dependency because libws2_32 is in there.
2021-05-17 13:15:31 +02:00
Jehan
a181d672ef configure: better libaa detection.
- Use aalib-config (available at least in the last releases of libaa,
  1.4rc5 from 20 years ago!). Especially important as the basic
  AC_CHECK_LIB() test does not work in my tests on Windows builds
  because some more libs are needed.
- Make sure file-aa is also built if AA_LIBS environment variable is
  explicitly set. Prevous code was not working in such case (file-aa was
  not built even with AA_LIBS set).
2021-05-17 13:15:31 +02:00
Jehan
cf6482f716 build: more optional feature to Windows installer.
headers-git package needed for DirectInput.
2021-05-17 13:15:30 +02:00
Jehan
de31d65daa gitlab-ci: gimp-distcheck-debian and gimp-autotools-debian redundant.
We had an autotools build stopping at `make check` and a separate one
for `make distcheck`. This just seems very redundant hence a waste of
resources.
So let's drop the job gimp-autotools-debian then add a `make check` step
to gimp-distcheck-debian.

Also as a side change, I move the cppcheck to being a scheduled job.
It's not such resource intensive job, nor did it take much time, yet
it's not like we use this information constantly. Moreover it never
fails anyway (so it's not like it gives much information on a per-commit
basis, unless we explicitly look into the resulting files) and with the
ability to run custom jobs whenever we want, this is far enough if
sometimes we need to generate the cppcheck analysis more frequently.
The rest of the time, having 2 jobs of this a week (our current
schedule) is far enough.
2021-05-14 19:56:55 +02:00
Jehan
1d03258797 gitlab-ci, build: construct the Windows installer from CI.
Run InnoSetup in the Windows CI to build the installer from both the 32
and 64-bit builds.

Current limitations:
- No installer signature yet.
- Dependencies will have to be checked more thoroughly.
- Apart from babl and GEGL, we may want to make custom builds of any
  package which has a patch in build/windows/patches/ (Windows-specific
  patches) and build/patches/ (all platform patches).
- Plug-in interpreters (Python, Lua…) don't work. This will need to be
  looked at in detail.

Globally this first automated installer build works fine though, as I
could install it in a Windows 10 VM and GIMP ran fine! So it's a first
step towards fully automated releases for Windows.
2021-05-14 19:27:30 +02:00
Jehan
9057de6c33 build: remove some data relevant to GTK+2 from installer. 2021-05-14 19:25:48 +02:00
Jehan
2415d06c66 build: no signed installer for the CI yet. 2021-05-14 19:25:48 +02:00
Jehan
681c37d830 build: "debug" component only known when DEBUG_SYMBOLS is defined. 2021-05-14 19:25:48 +02:00
Jehan
8cd05ceba7 build: unset LZMADictionarySize high value.
With compression level "ultra64" for LZMA, default value is 65536, which
is far enough (the installer file was only 100kib bigger, it doesn't
make that big of a difference in the end).
With the original value, the CI build would fail with "Out of memory"
error.

See also: https://jrsoftware.org/ishelp/index.php?topic=setup_lzmadictionarysize
2021-05-14 19:25:48 +02:00
Jehan
529eb56477 build: also looking for HKEY_CURRENT_USER Inno Setup registry key.
This will allow to use an user-installer Inno Setup, which is nicer,
especially to install it inside the CI without bothering about admin
rights.
2021-05-14 19:25:48 +02:00
Jehan
3d50cb339c build: patterns to bypass ghostscript version detection.
Do not try to follow up on the installed ghostscript (otherwise we'll
always have to fix as MSYS2 packages get updated). Instead, just install
whatever is in the /share/ghostscript/ path (assuming there is data for
a single version, which should be the case, especially on a resetted CI
build) and excluding the /doc/ folder.
2021-05-14 19:25:48 +02:00
Jehan
9f2b32de6c build: package a bit more.
These files I'm adding are currently being requested by the installer
script, even though I'm not sure at all how much needed they are,
especially for some of them (because I could successfully create an
installer by just commenting these out in the installer script).
2021-05-14 19:25:48 +02:00
Jehan
004749158d gitlab-ci: native (MSYS2) Win32 32/64 builds only on schedules.
Having them at each commit is counter-productive, first because these
builds take so long and second because there seems to be quite few
Windows runners. So we end up constantly waiting for CI jobs from
previous commits (so we are just constantly waiting).

This is resource over-usage. So instead, I'll just set this in scheduled
jobs. For release preparation though, we'll have to set up a workflow
later to trigger these jobs off-schedule/on-demand (I can see there is a
Gitlab interface to do this), but this can wait for when the installer
is fully generated by the CI anyway.
2021-05-13 17:47:03 +02:00
Yuri Chornoivan
d408568628 Update Ukrainian translation 2021-05-13 07:59:38 +00:00
Matej Urbančič
eeefa46403 Update Slovenian translation 2021-05-13 07:41:47 +00:00
Matej Urbančič
c7a8c35903 Update Slovenian translation 2021-05-13 07:40:53 +00:00
Matej Urbančič
970f7b0465 Update Slovenian translation 2021-05-13 07:38:09 +00:00
Jacob Boerema
82cb11eb54 plug-ins: add extra safety checks in psd-load.
Add some extra check when loading  masks to
detect problems and in some cases try to fix them
by skipping the problematic data.
2021-05-12 17:55:29 -04:00
Jacob Boerema
eb78aa994e plug-ins: fix computation of padding in fread_unicode_string. 2021-05-12 17:55:29 -04:00
Jacob Boerema
3da302adce plug-ins: consider reading less bytes than we need an error in psd-util. 2021-05-12 17:55:29 -04:00
Jacob Boerema
670ef6b9a3 plug-ins: fix setting error message in psd-util. 2021-05-12 17:55:29 -04:00
Jacob Boerema
3d248dc66f plug-ins: PSD color block can have a non zero length even when mode is RGB.
Not taking a non zero length into consideration caused us to read from the
wrong location in certain cases and then fail loading.

Always use the specified length to go to the correct location. This is not
a guarantee that we will be able to correctly load the image but at least
we won't read wrong data from the wrong location.
2021-05-12 17:55:28 -04:00
Jacob Boerema
666ae4ecfe plug-ins: don't use G_GSIZE_FORMAT specifier in translatable string in psd-load.
See: 38c0344fa8 (note_1103992)
2021-05-12 17:55:28 -04:00
Jehan
9b033f8996 plug-ins: fix creating multiple preview display for JPEG export.
Commit aba721ae68 fixed its intended bug but brought a new: each time
the preview was updated, a new display was created. This fixes this new
bug. Hopefully it's good now!
2021-05-12 22:46:52 +02:00
Jehan
065581b0a9 NEWS: update. 2021-05-12 13:21:07 +02:00
Yuri Chornoivan
db10c2b971 Update Ukrainian translation 2021-05-12 06:08:40 +00:00
Anders Jonsson
85c050c440 Update Swedish translation 2021-05-11 20:20:10 +00:00
Jehan
668c9de5a5 app: add back a timeout-based idle function to queue a canvas redraw.
I'm still very unclear why exactly but it would seem that just queuing
the redraw with an idle function is not enough. At least on Windows,
Jacob was having cases where opening an image would get stuck unless the
mouse was moved (causing draw events most likely).

So let's use a timeout function instead. Probably no need to queue the
idle followed by the timeout function as we had before commit
4fee04b839. Instead just directly queue a draw if relevant, then run the
timeout at regular interval (marching ants speed).
2021-05-11 19:36:20 +02:00