Commit Graph

1278 Commits

Author SHA1 Message Date
lloyd konneker 15ed7157dc devel-docs: document how to add interpreter and .interp file
From my experience with gimp-script-fu-interpreter on Windows.
Feel free to correct mistakes.
2022-06-26 10:37:12 -04: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
Jehan 0b1378f235 devel-docs: add an addition release step to test the package.
We regularly have package issues which are discovered soon after
release. Let's try a new step in the release process where we would
build packages in advance just for testing.
2022-06-20 21:54:13 +02:00
Jehan 4477d64c17 devel-docs: add a point about publishing to the Microsoft Store.
See issue #1307.
There doesn't seem to be anything blocking us to publish to the
Microsoft Store, now that there is this new "traditional desktop
application" process allowing us to publish using our existing
installer. So GIMP 2.10.32 should normally be our first published
version there.
2022-06-08 20:59:09 +02:00
Niels De Graef 175dab9f86 devel-docs: Add a urlmap file
The urlmap file allows gi-docgen to generate links for namespaces that
are also generated by gi-docgen. For example, with this commit, a
reference to `GObject` will now be properly linked to the GObject
documentation.
2022-06-07 09:42:35 +02:00
Jehan 84a21eacb8 devel-docs: work-around the g-ir-docs bugs in autotools too. 2022-05-14 19:55:11 +02:00
Jehan 6f14db9ea2 devel-docs: fix again
This will work around such errors from the g-ir-doc build:

> devel-docs/g-ir-docs/pages/python/Gimp-3.0/Gimp.checks_get_colors.page:46: parser error : EntityRef: expecting ';'
> gimp_checks_get_colors (gimp_check_type (), &color1, &color2);
>                                                    ^

Similar to commit 7123b6c466, it cannot really be considered a proper
fix, barely a workaround for g-ir-doc-tool not even able to produce
valid XML. Here we have ampersands which it should have espaced into XML
entities.
Anyway this will do for now (until we just decide to drop the g-ir-docs
tools?).
2022-05-14 18:47:53 +02:00
Jehan 0c01a44369 devel-docs, libgimpbase: getting rid of gimp_checks_get_shades().
In the original gimp-2-10 branch where this feature was originally
worked on, we had to keep gimp_checks_get_shades(). But on `master`
where we will reset and break API, let's get rid of this function which
should not be used anymore.
2022-05-14 17:43:39 +02:00
lloyd konneker 5e9c92c5de plug-ins: fix script-fu-font-map error receiving GStrv
Why: MR !389 changed the signature of PDB procedures to return GStrv instead of (int, GimpStringArray)
This changes handling of results from a call to such a changed signature, in a Scheme script.

The symptom was a cryptic TinyScheme "Error: car: argument 1 must be : pair"

Most changed procedures are named like "-list".
I did a cursory grep to look for other instances.

Updated porting guide doc.
2022-05-07 19:14:42 +00:00
Jehan 288a5f1c7e devel-docs: port g-ir-doc-tool hack-fix to autotools build.
I completely forgot to port the hack from commit 7123b6c466 to
autotools as well!
2022-03-27 17:26:35 +02:00
Jehan 0225e36e9f devel-docs: add more debugging tips. 2022-03-27 15:02:10 +02:00
Jehan 7123b6c466 Issue #7685: g-ir-doc-tool produces broken XML.
To work around the issue, I just wrote a stupid sed script. Of course,
it means that if we encounter again the issue on some other docs, we'll
have to update it. In other words, it's neither robust nor a proper
long-term fix. Just a temporary hack.
See: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/425

Also fixing this issue, I encountered another bug, this time in meson,
which changes backslashes in slashes on 'command' arguments, in a
completely uninvited manner! The only workaround to this is apparently
to call an external script, which is ridiculous for such a basic stuff.
But well… here is why I implement this with a script, instead of
directly calling sed in the meson 'command'.
See: https://github.com/mesonbuild/meson/issues/1564
2022-03-26 19:07:48 +01:00
Jehan cab09cd1a6 devel-docs: fix Coding Style document.
We now have a code formatter rule file.
2022-03-14 12:36:53 +01:00
Jehan 25f891bfce devel-docs: update docs with info on the "release note demo" feature. 2022-03-08 17:37:58 +01:00
Jehan 140ce80a22 devel-docs: typo fix. 2022-02-23 22:29:03 +01:00
Jehan aaafa8683d devel-docs: add some information about theming.
Hopefully useful to get some theme makers started.
2022-02-23 19:06:40 +01:00
Jehan 61a0d97292 devel-docs: add specifications for the various locks behavior.
As I review and tweak various aspects of GIMP UI, I also write down
specifications for these subparts. Here is one for the locks behaviors.

We worked on these specifications with Aryeom and tried to make the most
useful and also somehow obvious logics for these locks, in particular
the cases when applied to layer groups which can have wider ranges of
meaning (on leaf items, it is much simpler). The various previous
commits are implemented based on these specifications.
2022-02-15 22:52:43 +01:00
Jehan aa3808addf app, devel-docs: bumping the XCF version to 17.
XCF 17 includes the new visibility locks and the ability to add position
and alpha locks on layer groups.
I am going to push the various commits implementing these different
features together which is why we gather them as a single XCF version.
2022-02-15 22:08:23 +01:00
Jehan 957b547fac Issue #7864: store and load "lock visibility" flag on items.
This was just completely forgotten!
2022-02-15 22:08:23 +01:00
Jehan f361009783 devel-docs: edit and rename debugging-tips file.
Also list it from the devel-docs README.
2022-02-13 21:07:05 +01:00
Jehan 8a3ff1a7b6 devel-docs: move HACKING from root EXTRA_DIR to devel-docs one.
Also adding the CODING_STYLE.md. There is actually the question whether
we still want to track this docs files to package them in the tarballs.
It made sense 20 years ago when devs were working from tarballs, but
nowadays, devs are expected to work from git HEAD.

Anyway this fixes the CI.
2022-02-08 23:45:22 +01:00
Jehan bad465c681 README, devel-docs: reorganize a bit the main README and devel docs.
- ps-menurc removed in GIMP 2.7.2 (i.e. stable 2.8.0) according to
  NEWS.pre-2-8.
- in our main README, redirect now to devel-docs/README.md as entry
  point for contributors.
- move HACKING to devel-docs/ and specialize it into a "how to build
  from git and contributed" docs:
  * Make it markdown.
  * Remove some now obsolete or redundant recommendations (to be fair,
    we can probably clean up the file a bit more, but we'll see).
  * Add/improve relevant information.
  * Make more obvious when you want to build from tarball or git.
  * Just keep a single short paragraph about the coding style to
    redirect people to the appropriate CODING_STYLE.md file.
  * Don't recommend sending patches to the mailing list anymore.
- move CODING_STYLE.md to devel-docs/.
2022-02-07 15:45:28 +01:00
Jehan edf0d081bd devel-docs, extensions: more gitignore updates. 2022-02-02 14:18:51 +01:00
Jehan aed8573eb9 devel-docs: add some .gitignore in reference/ subdirs. 2022-02-02 00:16:10 +01:00
Jehan 03272a9d54 devel-docs, tools: move the release-stats script to tools/.
Makes more sense and I am trying to make the devel-docs more readable
(which includes less crowded, especially with scripts which are not
really docs).
2022-02-01 14:34:46 +01:00
Jehan 4d8c1e3439 devel-docs: removing version.in.
I was wondering what this version file was for. After some git
archeology, turns out this was used for gtk-docs. Since we replaced
gtk-docs with gi-docgen in commit 92e80d12e8, this can be removed as
well.
2022-02-01 14:00:21 +01:00
Jehan 20479ee137 devel-docs: improve a bit the icons docs. 2022-02-01 11:11:38 +01:00
Jehan 097e09f60c devel-docs: make the icons docs into markdown.
Better for links. Maybe we'll play with images this way too.
2022-02-01 10:47:01 +01:00
Jehan 2b843aa674 devel-docs: update icons docs. 2022-01-27 02:13:13 +01:00
Jehan d266100ab7 devel-docs: update icons.txt and icon theme section in README. 2022-01-25 17:27:48 +01:00
Jehan 84d298d4d3 devel-docs: fix autotools dist rules.
Since I removed some files and forgot to change these rules. Though I
actually wonder if this still makes sense to distribute all these files
within the tarball anymore. It made sense in the way software was
distributed 20 years ago, but nowadays people who want to develop would
clone the git repo not get a tarball. We'll see.
2022-01-24 15:45:43 +01:00
Jehan 4065c33bf0 devel-docs: update the developer documentation further.
Add some more text and links to existing documents.

I also remove 3 files which are now either outdated or whose contents is
also written (with more or less similar text) in other more up-to-date
files.
2022-01-23 01:05:58 +01:00
Jehan 67a1d9f4d0 devel-docs: update further the devel docs.
Add more links to other files after I reviewed they were still relevant.

The `gitlab-milestones.txt` in particular had to be updated because the
contents was outdated (though we still need to manage milestones, simply
now we are a bit more fine-grained).
2022-01-22 23:00:50 +01:00
Jehan e4cb7e12b4 devel-docs: add CI info in developer docs.
Also remove the now deprecated Jenkins tutorial. We have not had this CI
system running for some time now, and the Gitlab CI has totally replaced
it.
2022-01-22 21:55:50 +01:00
Jehan fac84db028 devel-docs: add directory structure of the repo to developer docs.
Loosely based on the old structure.xml, except it was widely outdated.
So I removed or updated what was obsolete and added missing folders.

Obviously getting rid of the old `structure.xml` (now we have easier doc
generation through Gitlab).

Finally, I fix the table of contents and replaced the title with some
metadata-style stuff which Gitlab docs suggest (otherwise the document
title ends up in the table of contents, which is a bit silly).
2022-01-22 17:44:38 +01:00
Jehan 1aeee787a8 devel-docs: add a README.md.
This will be the root page for the developer documentation. Note that
there are other files in this directory (old `README` included) which
will need to be deleted but I don't do it just yet on purpose until I
checked them and integrate anything which could be of interest back into
the new documentation.
2022-01-20 22:14:07 +01:00
Jehan b35c44cb05 devel-docs: move specifications to their own subfolder.
Let's make the devel-docs folder a bit less crowded.
2022-01-20 20:41:44 +01:00
Jehan d5e22ad313 configure, meson, devel-docs: make gi-docgen into an auto option.
Also called "feature" option in meson, so that by default it depends on
auto-detection of the gi-docgen hence won't break the configuration when
the tool is missing (the feature is simply disabled).

Also move the program check into the root meson file, which is anyway
much better to have a better visibility of features, otherwise we'd end
up just having tests everywhere in any possible random directory of the
repo.

Finally add a line in the summary of the configuration step, displaying
the docs generation being enabled or disabled.
2021-12-29 00:58:10 +01:00
Niels De Graef a0495b1593 devel-docs: Fix configuration of gimp-3.0.toml
whoopsydaisy
2021-12-28 21:22:33 +01:00
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00
Jehan 362fae9147 app, devel-docs: saving the item sets in XCF (bumping to XCF 16).
We now save and load layer and channel item sets. Only missing set types
are path ones, but the whole path item is just its own exception in the
XCF format, and adding support for it, while keeping compatibility with
older XCF seem like a small headache. I could do it, but I actually
wonder if it is worth it. Would people really need to store sets of
paths?

Also this commit finally gets rid of any remnant of the old item "link"
concept (I think), so we are getting close to merging the branch.
2021-12-23 13:45:20 +01:00
Jehan 084906dbf1 app, devel-docs, libgimp, pdb: remove gimp_item_set_linked().
I cleaned many remaining places where the concept of linked item still
survived.
On loading an XCF file with linked items, we are now going to create a
named sets for the linked items, allowing people to easily select these
back if the relation was still needed.

We don't remove gimp_item_get_linked() yet and in particular, we don't
save stored items into XCF files. This will come in an upcoming change.
2021-12-23 13:45:20 +01:00
Jehan 2ce84b5245 app, devel-docs, libgimp, pdb: delete gimpitem-linked.[ch].
Getting rid of the last usage from these files dedicated to outdated
item link concept.
2021-12-23 13:45:20 +01:00
Jehan 26615fde92 app, devel-docs, libgimp, pdb: now removing gimp_item_linked_rotate(). 2021-12-23 13:45:20 +01:00
Jehan 6f901dfe3e app, devel-docs, libgimp, pdb: get rid of gimp_item_linked_translate().
Similarly to the previous commit, we get rid of "item link" code for
translating items.
2021-12-23 13:45:20 +01:00
Jehan 26d696ce9d app, devel-docs, libgimp, pdb: remove item link ref in flip code.
"Item links" concept is no more in the GUI so we are progressively
removing reference and implementation of this in the core code.
2021-12-23 13:45:20 +01:00
Jehan efaf9e099e app, libgimp, libgimpwidgets: fix "Application icon missing" in tests.
When running tests, the data are not meant to be necessarily installed.
Therefore icons won't be found when calling gimp_widgets_init().

Add some special-casing to find them relatively to the install
directory.
2021-12-23 13:39:43 +01:00
Jehan 952c24e81b devel-docs: remove gtkbuilder-porting-guide.txt from EXTRA_DIST. 2021-11-15 16:04:19 +01:00
Jehan 74aa6a2e71 devel-docs: remove gtkbuilder-porting-guide.
Over the last few years, we seem to have been in agreement that .ui
files are not so desirable anymore.

For plug-ins, they are completely deprecated in favor of our much nicer
dialog generation API from properties (the metadata plug-in(s) are the
only ones which still have .ui files but we plan to get rid of these
eventually).
For core code even, we also prefer to generate GUI when we can (as we do
for GEGL ops, for symmetries and other places).
GtkBuilder files actually make for more complicated code, imbricated in
both the C code and .ui files, more bug-prone too and we don't seem to
gain anything from the additional complexity.

So let's get rid of this dev guide.
2021-11-15 13:46:37 +01:00
Jehan 4856d725aa devel-docs: add some more tricks to review MR in Gitlab.
- The trick to fetch automatically all MRs in read-only branches.
- How to temporarily checkout and push to a contributor's remote without
  actually hard-naming their remote repo and polluting your local repo
  with every new MR.
2021-11-03 15:20:25 +01:00