Commit Graph

52111 Commits

Author SHA1 Message Date
Anders Jonsson 83dee0e43a app: translate link labels and tooltip in Welcome dialog 2024-04-23 14:57:25 +00:00
Bruno Lopes f40ecca648 gitlab-ci, build: Enable ccache for win crossbuilds
Due to design, crossroad install everything in the same prefix. So, let's
drop the pkg caching (.cache) and reuse ccache path inherited from .default.
2024-04-23 14:08:55 +00:00
Alx Sa 47aabfc93a core, libgimpcolor: CMKY & HSL to float
Continuing 32d64ab1, this converts the
few instances of CMYK and HSL/A double
to float to match babl's precision.
2024-04-23 13:38:59 +00:00
Bruno Lopes bffe62d43e gitlab-ci, build: Drop custom "CI_*" variables
Let's figure out what job is running using the predefined GitLab variables.
2024-04-23 13:20:29 +00:00
Yuri Chornoivan 1420e60f45 Update Ukrainian translation 2024-04-23 13:20:11 +00:00
bootchk 7b37d5bee8 GUI: Eliminate menu Filters>Development>Script-Fu>Test
Only affects unstable build.

Move remaining items to Demos.
They have names like "Test foo."
They only install on an unstable build.

The ScriptFu>Test menu is only in an unstable release.
It is untranslated.

The ScriptFu menus don't need to be so deep.
The Demos menu is an appropriate place for test plugins.

If the Demos menu is not in the stable release and translated,
Gimp creates the Demos menu and it is untranslated.
2024-04-23 07:57:32 -04:00
bootchk f64115d3b2 Plugins: GUI: Move HelloWorld and Sphere plugin menu items to Demos menu.
The "Sphere" plugin demonstrate all the widgets for arguments of a plugin.
Only its menu label is translated.

The "Hello World" plugin demonstrates an independently interpreted SF plugin.
It has no translations, even of its menu label.

Formerly in ..ScriptFu>Test menu.

They still are installed even in a stable release.
If we don't want 3.0 stable to ship with demos,
need more changes to meson.build.

They are akin to the goat exercise plugins.
These plugins are expected to ship with the goat plugins in a stable build.
!!! But 2.10 did not ship with any demo plugins in stable build.

There are duplicate "Sphere" (v2) and "Sphere v3" plugins.

Does not break string freeze.

The new-style "Sphere v3" plugin moves to Demos.
It will be installed with stable build.
No translations will change.

"Sphere" (v2) will only be installed in an unstable build.

FUTURE: we should translate Hello World and Sphere v3.
If they are to ship as demos, their GUI should be translated.

FUTURE: low priority we could rename "Sphere v3" to just Sphere,
and Sphere to "Sphere v2" so there is no conflict.
2024-04-23 11:46:48 +00:00
Bruno Lopes 42356db4b4 gitlab-ci, build: Clarify DWARF debug symbols "extraction"
Partially reverts af79bbe0 (regarding .debug "extraction" in cross builds)

Now, we call the split debug script from the main bundling script, which makes
similar to our macOS .app bundling script. This cleans a bit of code in .yml
and make things clearer to the mere mortals in the scripts.
2024-04-23 07:53:48 -03:00
bootchk c5c0976ed7 app: GUI: Delete root menu "Test", move its item to Demos
Its contents is a test plugin, "Test dialog".
I am responsible for it, and it is ugly, even in unstable.
Is only installed in an unstable build.

We need a convention that menu items for plugins named like "Test foo"
should only be installed in unstable build,
and should require no translations.

Note that if the Demos menu does not exist,
Gimp creates it, and it is not translated,
but only present in an unstable build.
2024-04-22 16:06:38 -04:00
Bruno Lopes 8ef4b40c8c build/windows: Fix Installer after native x64 and arm64 TWAIN drop
Native arm64 and x64 TWAIN binaries are not built anymore. No need to
discard at dist time what doesn't exist. (32-bit TWAIN not affected)

Also, start to using our own ARM64 runners to do the dist. This is more
reliable since the shared x64 runners can (and indeed) cause long queue.
2024-04-22 18:52:25 +00:00
Jacob Boerema b3f8ad3eea libgimp: fix #11382 oversized export dialog with long comment
When there is a very long comment shown in the export dialog, the
dialog expands horizontally. Possibly making it wider than your screen
instead of wrapping the text.

Let's set word wrapping for the text view. That way the text will
wrap at a reasonable length and use the multiline text view instead
of just the first line.
2024-04-22 13:26:29 -04:00
Jürgen Benvenuti 5569e40b8c Update German translation 2024-04-22 17:16:15 +00:00
Alan Mortensen 44a3d88802 Update Danish translation 2024-04-22 16:38:14 +00:00
Alan Mortensen 5bf2bb901e Update Danish translation 2024-04-22 16:36:30 +00:00
Martin 290d5ccd67 Update Slovenian translation 2024-04-22 14:19:28 +00:00
Bruno Lopes 28ba5d6918 gitlab-ci: Silence universal variables
They were generating a distracting output in CLANG* shells, as noted by
@lillolollo in a comment from MR: Infrastructure/gimp-web-devel!65

In the process, make AppImage and Windows (native) scripts use these
variables, without hardcoding the same variables from .yml anymore.
2024-04-22 13:22:31 +00:00
bootchk 55cc32e7f4 ScriptFu: Plugins: fix #11346 broken "Export Palette" plugin.
Fix ScriptFu, CRITICAL handling filename args user-entered in old-style interface.

Fix plugin, changes to API re Resource i.e. Palette and Colormap

Add message giving mangled name of output file.

Driveby minor refactoring of plugin.

Driveby cleanup, remove old email addresses.

Driveby use script-fu-use-v3 binding to PDB.
2024-04-22 06:17:13 -04:00
Alx Sa c691bd2a0b actions: Prevent crash due to non-existent editors
Resolves #10914

Some dockables such as "gimp-pattern-editor" and
"gimp-mybrush-editor" are listed as Editors even though
we don't yet have dedicated GimpDataEditors for them.
This causes problems when using certain features like
duplicating. To resolve for now, we check if
gimp_window_strategy_show_dockable_dialog () returns a
valid GimpDataEditor before trying to use it.
Per Jehan, we also verify that an edit button exists
and is visible before we try to call the edit command.
2024-04-22 01:24:36 +00:00
Jehan 2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:

- It is properly cleaned out once the build ends (instead of leaving a full
  config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
  issues over).
- Every use of the in-build GIMP will have its own config directory, and in
  particular when they are called in parallel.

As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
2024-04-21 20:43:29 -03:00
Jehan a54253db04 build, gimp-data: all 'file-*-save' plug-in procedures got renamed to 'file-*-export'. 2024-04-21 18:18:44 -03:00
Bruno Lopes a56cfc9080 build/windows: add UTF-8 support to non MS Store manifest
This is recommended by Microsoft for "*nix apps" and adding it to the
.exe manifest will avoid disparity between MSIX and other versions
(e.g. CI crossbuilds and CI native builds/installer/local builds).
2024-04-21 18:18:44 -03:00
Bruno Lopes 3f0532ba86 app, devel-docs: add a bit of MS Store documentation
See also: Infrastructure/gimp-web-devel!46
2024-04-21 18:18:35 -03:00
Jehan a9c8420368 build/windows: fix submodule checkout failure
Bruno note: This commit was repurposed after ad132ad0.

---

For some reason, on the Windows/Aarch64 runners only, submodule updates fails
with:

> + git submodule update --init
> From https://gitlab.gnome.org/GNOME/gimp-data
>  * branch            d1041a4d97871c85538938872d0ace69d2fc44c2 -> FETCH_HEAD
> error: Your local changes to the following files would be overwritten by checkout:
>         images/README.md
>         images/logo/meson.build
>         images/meson.build

The big question was: why are there edits to begin with? This is supposed to be
a brand new clone!
After a bit of investigation, it turns out that the whole files have incorrect
EOL endings (a `git diff` returns every possible lines in the whole
repositories, but `git diff --ignore-cr-at-eol` returns nothing). It looks like
this breaks the submodule update.
2024-04-21 18:15:32 -03:00
Jehan 194eaf1312 build/windows: drop plug-ins .ico (it is now generated by gimp-data) 2024-04-21 18:15:32 -03:00
Jehan b41fe61698 build/windows: generate fileicon .png's for MS Store and drop .ico
Also update the gimp.rc and delete the committed fileicon.ico now that
gimp-data generates this file the same way as these PNG fileicon-s.
2024-04-21 18:15:32 -03:00
Jehan 085d8a02b5 build/windows: generate a default XCF file to be copied by Windows
Attribute uap4:ShellNewFileName is meant as a template file to be copied when
someone initiate the Shell "New" command (via the Explorer context menu).
2024-04-21 18:15:31 -03:00
Bruno Lopes 4c968d9aa0 meson, build/windows: generate AppList, StoreLogo and *Tile .png's
Most of the work in this commit is by @Jehan.

These icons are used only by the .msix (MS Store) distribution of GIMP.

Some legacy icons are used only by Windows 10 and need to have smaller logo
than full image dimensions, so let's not use colorsvg2png. We just pass the
dimensions to use by configuring variants of the same base script.
2024-04-21 18:15:31 -03:00
Bruno Lopes 37045e477b gitlab-ci, build/windows: Add MS Store job to CI
The new dist job can produce two artifacts: a *.msixupload file
ready for submission and/or a *.msixbundle only for testing.

See the commit about the script for more details.
2024-04-21 18:15:18 -03:00
Jehan 8cf688ac16 meson, build/windows: generate .pdb (CodeView) debug symbols
This makes possible to debug with DIA SDK, if wanted by the developer.
Also, this is needed to create .appxsym files for MS Store debugging.

Ideally meson should be able to install for us, but apparently it doesn't.
See https://github.com/mesonbuild/meson/issues/12977
2024-04-21 18:13:47 -03:00
Bruno Lopes 184e2704a4 build/windows: Add MS Store dist script
Adds PowerShell script and proper manifest for making .msixupload
(only for releases) and/or .msixbundle (always, for testing).

As authorized by Jehan, 32-bit willn't be supported. The reasons are:
1. 32-bit is going to die when WIA plug-in is done. This can hurt reviews
2. 32-bit is being restricted in ARM64 version. This causes disparity
3. 32-bit is generating a big footprint. "This is bad for the environment"
   To be clear: we are discarding most of 32-bit artifact (see point 1)
   and what could not (TWAIN for x64 only, point 2) almost doubles .msix.

There is one small circumstantial reason too:
4. 32-bit wouldn't have .pdb even after GCC 14 because bins have same name
   as x64, and MS don't allow multiarch debug symbols in the same .appxsym
2024-04-21 18:12:38 -03:00
Jacob Boerema 9d133add5b build: openjpeg dependency was missing
Both in our Debian and Windows deps the openjpeg dependency was
missing, so let's add it back.
2024-04-21 12:40:41 -04:00
Jehan c65aca8b17 plug-ins: rename various '*-save.[ch]' files to '*-export.[ch]'.
Though it's not visible and could happily wait for after GIMP 3 release, this
was annoying when grepping. Just did a quick cleanup.

I also removed gimprc.common which is a forgotten remnant from the autotools
build.
2024-04-21 16:48:58 +02:00
Alx Sa 32d64ab1c9 core, widgets: Convert HSV/A to float
Per Pippin, the only color model that can
have double precision is RGB/A.
Therefore, we need to switch all others to
use float instead. This patch converts the
HSV and HSVA double babl formats.
2024-04-21 03:42:27 +00:00
Bruno Lopes 2dc6f41114 gitlab-ci, build: Use 'bundling' naming instead of 'packaging'
As hinted in d09a2a6f

We now use the word 'bundle' to signify "program files in the same prefix"
(e.g. .appimage, .zip, .app). This is in line with our source and dev-docs
(just take a search in the repo). So, appimage and windows scripts changed.

The word 'package' normally means "program files distributed for install in
the same prefix or not" (e.g. .deb, .msi, .dmg). This is in line with CMake
naming of some commands, but meson prefers to call 'dist', which we use more.

So, this partly reverts some things of GNOME/gimp!1171 and reinforce others
for even more "rationality" in the overall build structure of GIMP.
2024-04-20 22:32:46 -03:00
Bruno Lopes b1c25ca5dc gitlab-ci: Clarify some CI-wide variables 2024-04-20 23:23:39 +00:00
Jehan 0dc9ff7c06 libgimp: clean out the "interactive" intermediate dialog which was hidden…
… since forever anyway!

GIMP used to have a second export dialog, a generically generated one, appearing
either before or after (depending on when gimp_export_image() was called) the
custom export dialog implemented by the plug-in code. This has been hidden deep
in code since forever (since version 2.8.0 in fact, I believe) and only kept
hidden behind an environment variable "GIMP_INTERACTIVE_EXPORT". I don't think
we'll ever revive this, so let's clean up.

In fact, not one, but in worst case even 2 more dialogs were hidden behind this
variable! The first dialog (confirm_save_dialog()) was a confirmation when the
selected drawable was a layer mask or a channel (and not a layer). Most export
code don't even seem to care about the selected drawables anymore anyway (cf.
issue #7370), except with gimp_file_save() non-interactively (issue #8855),
which is a real mess of inconsistency anyway.

The second dialog (export_dialog()) was listing the various actions to do on a
copy of the image to help the plug-in (e.g. merge layers/flatten image, etc.)
and possibly give choices to some of these actions. Though there is definitely
no reason to request this kind of thing anymore, especially for a short-lasting
image copy, the list of action could still be interesting in the future, not as
information of what is going to be done, but as information of the kind of data
loss of the exported format. I could imagine we want to be able to reuse such
information for generating types of data loss per format in the export dialog,
in particular in the context of my long-term export workflow refactoring (from
which resizing before export such as #2531 are part of, but the whole
refactoring project is much wider).

In the whole discussion of #5858, there will be the question on whether we don't
want plug-ins to be directly given a "ready-to-use" image depending on
capabilities they advertized in create_procedure().
2024-04-21 00:16:27 +02:00
Jehan b4f84dfd8f NEWS: update. 2024-04-20 23:51:53 +02:00
Alx Sa 7abcc97c6a modules: Swap ColorWheel to HSV float
Should resolve #11370

Per Pippin, HSV double is not a valid
color model for babl. We need to change
to HSV float to resolve the warning when
selecting colors on the Color Wheel.
2024-04-20 21:31:58 +00:00
Bruno Lopes 0c32125f1c gitlab-ci: Fix duplicate merge and push pipelines
This is a well know problem documented in GitLab docs that happens when
the CI isn't properly configured that was causing double pipelines in MRs.
Let's fix it, and reduce some redundancy.
2024-04-20 20:50:04 +00:00
Jehan ef314804c4 Issue #11361: building fails on macOS.
This line should have never been pushed (in commit a78c41d2a3), my bad! It was
an early (extremely ugly and bad!) attempt to try and have the bindings see the
libraries another way than using DYLD_LIBRARY_PATH (which was instead resolved
with commit 3e980d5ad4).

This omission went unnoticed until I add `set -e` very likely as this failed
command would stop the script in failure.
2024-04-20 20:17:59 +02:00
Jehan d661e8efb1 libgimpcolor: gimprgb-parse finally deleted.
- gimp_rgb_list_names() ported as gimp_color_list_names() using NUL-terminated
  GimpColorArray.
- GimpColorHexEntry uses the new function (and is therefore now GimpRGB free!).
- gimp_rgb_parse_name() deleted as it's unused since my previous commit.

With all this, gimprgb-parse.c is now deleted from the repository! \o/
2024-04-20 20:04:32 +02:00
Jehan b31a465a9e plug-ins: port ifs-compose to GeglColor. 2024-04-20 20:04:32 +02:00
Bruno Lopes 6428e51f2a gitlab-ci: Move 'analysis' stage to a more "mainstream" position
I suppose the intention of having this stage at the end was to make clear: no
job depends on it. However, this place is not common or ideal but one of two:
1) before building, which is more linear; or 2) after building (the choosen)
even if this isn't dynamic analysis (tests), since they are both related and
some compilers and build systems do static analysis. Anyway, not after dist.

The new place is a bit  more clear to devs used at "build, test, deploy" praxis
and maybe will be now better noticed by the existing devs before distributing.
It's not perfect, since I explained above that there are two places/approaches.

Obviously, the stage continues to be OPTIONAL to pass, nothing was changed.

---

Also, dropped the deprecated "only:" (in clang-format job) in favor of "rules:"
and made the artifacts paths of clang-format and cppcheck more consistent.
2024-04-20 17:35:45 +00:00
Jehan 0f9b08c37e libgimpcolor: more GimpRGB-based functions are now unused. 2024-04-20 16:10:32 +02:00
bootchk 2914fd40ff ScriptFu: Test: maintenance, fix tests broken by changes to Gimp, add tests.
Fix tests broken by changes to gimp_data, wilber.png=>gimp-logo.png

Uncomment failing tests whose issue was fixed.

Remove calls to deprecated functions.

Make more test files use v3 binding script-fu-use-v3

Compare floats relatively by epsilon.

Add some missing tests.
2024-04-20 08:25:35 -04:00
Alx Sa a0d040bddc libgimp: GimpSaveProcedure to GimpExportProcedure
This patch continues porting save API to
export for the 3.0 release.
2024-04-20 07:50:42 -04:00
Jehan 62ab8e2604 libgimp, libgimpcolor: make real unit test of old (compiled but unused) …
… test-color-parser.c file.

The file libgimpcolor/test-color-parser.c was compiled but never actually called
by the build. Now that we have a nice infrastructure to test libgimp API, I am
moving it there with the new format. Doing this also allowed me to discover some
bugs in CSS parsing, as well as discover Python binding was failing here (cf.
the few previous commits).

Only one test is disabled so far, the one where 4 digits are used per channel in
hexadecimal notation: "#64649595eded". This format simply doesn't appear
anywhere in the spec, and also the result values in the samples listing don't
even fit. So far, I'm just unsure what to do with it, if we want to keep this
support (of some kind of higher precision hex notation, but not specified, so is
it even used by anyone?) or not.

All the other tests just work in both C and Python!
2024-04-20 12:39:52 +02:00
Jehan 106d18605a libgimpcolor, app: gimp_color_parse_(css|hex|name)() renamed with _substring() suffix.
New functions with the same name as these functions are created, except without
the length argument (i.e. it's equivalent to calling these with -1).

The reason for this is that using strings with a length variant which may be
negative to switch to NUL-terminated strings are not bindable. At least in our
case, when testing in Python, the input string ended up as corrupted garbage and
GObject Introspection docs warns about such interfaces:

> In particular, avoid functions taking a const char * with a signed length that
> can be set to a negative value to let the function compute the string length
> in bytes. These functions are hard to bind, and require manual overrides.

(see: https://gi.readthedocs.io/en/latest/writingbindableapis.html#strings)

So instead, I create a simple version which runs on NUL-terminated strings only
and which is bound, whereas unbinding the generic length-version (making it
C-only, or maybe usable in some other bindings which ignore the (skip)
annotation; apparently some do this).
2024-04-20 12:37:20 +02:00
Jehan d51cde85c1 plug-ins: script-fu is now GimpRGB-free. 2024-04-20 12:06:41 +02:00
Jehan 6a85efe92c libgimpcolor: gimp_rgb_parse_hex() is also unused. 2024-04-20 03:41:27 +02:00