From 74506214e74d326e7515af3e0bfde41161d1531f Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:48 +0100 Subject: [PATCH] Add appstream metainfo file This is used by software centres such as GNOME Software to display information about the app, both before and after it is installed. The used here follows the recommendations in the Appstream specification, with the exception of violating the spec's strong encouragement to use only lowercase characters. This is because the version that is already published by Flathub uses an uppercase T in the final component of the ID.[0] The file shipped by Fedora followed an older convention of using the desktop file name as the ID. This is acknowledged by the section near the bottom of the file, which will allow software centres to associate the reverse-domain-name ID with the older ID.[1] Many fields in this file are translatable. This was the motivation for the preceeding two changes: - By using xgettext rather than intltool, the untranslated template may be written using the normal appstream XML tags, rather than needing to use (for example) <_name>Tux Paint to mark that field for translation, which renders the template not valid for tools like 'appstreamcli validate'. - Merging translations at build time, rather than committing the translated XML to the repo as well, avoids another potentially error-prone manual step when updating the source file or translations. The release notes are taken from the press releases on the Tuxpaint website. They will be extracted for translation. Another option is to replace the with ..., but AFAIK no software centres currently show these URLs.[2] [0]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic [1]: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-id-desktopapp [2]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases TODO: - align comment Fixes: https://sourceforge.net/p/tuxpaint/feature-requests/172/ --- .gitignore | 2 +- Makefile | 12 +- src/org.tuxpaint.Tuxpaint.metainfo.xml.in | 145 ++++++++++++++++++++++ src/po/POTFILES.in.in | 1 + 4 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 src/org.tuxpaint.Tuxpaint.metainfo.xml.in diff --git a/.gitignore b/.gitignore index 50a434c60..a4cd19c4a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ TuxPaint.dmg *.thumbs src/po/POTFILES.in src/tuxpaint.desktop - +src/org.tuxpaint.Tuxpaint.metainfo.xml diff --git a/Makefile b/Makefile index 66227bb82..b82771f20 100644 --- a/Makefile +++ b/Makefile @@ -266,6 +266,9 @@ endif ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps +# Appstream metainfo +METAINFO_PREFIX=$(DESTDIR)$(PREFIX)/share/metainfo + # Maemo flag MAEMOFLAG:= @@ -532,6 +535,9 @@ $(MOFILES): trans/%.mo: src/po/%.po %.desktop: %.desktop.in $(POTFILES) msgfmt --desktop -d src/po --template $< -o $@ +%.metainfo.xml: %.metainfo.xml.in $(POTFILES) + msgfmt --xml -d src/po --template $< -o $@ + .PHONY: translations ifeq "$(shell msgfmt -h)" "" translations: trans @@ -541,7 +547,7 @@ translations: trans @echo "Install gettext to run Tux Paint in non-U.S. English modes." @echo "--------------------------------------------------------------" else -translations: trans $(MOFILES) src/tuxpaint.desktop +translations: trans $(MOFILES) src/tuxpaint.desktop src/org.tuxpaint.Tuxpaint.metainfo.xml endif trans: @@ -714,6 +720,7 @@ clean: # are the same as they were when you installed, of course!!! .PHONY: uninstall uninstall: uninstall-i18n + -rm $(METAINFO_PREFIX)/org.tuxpaint.Tuxpaint.metainfo.xml -rm /usr/share/applications/tuxpaint.desktop -rm /usr/share/pixmaps/tuxpaint.png -rm $(ICON_PREFIX)/tuxpaint.png @@ -930,7 +937,7 @@ install-nokia770: # FIXME: No way to install SVG icons using `xdg-icon-resource` # (see https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/790449) .PHONY: install-xdg -install-xdg: src/tuxpaint.desktop +install-xdg: src/tuxpaint.desktop src/org.tuxpaint.Tuxpaint.metainfo.xml @echo @echo "...Installing launcher icon into desktop environment..." @if [ "x$(shell which xdg-icon-resource install)" != "x" ]; then \ @@ -951,6 +958,7 @@ install-xdg: src/tuxpaint.desktop @if [ "x$(shell which update-desktop-database)" != "x" ]; then \ update-desktop-database ; \ fi + install --mode=0644 -t $(METAINFO_PREFIX) src/org.tuxpaint.Tuxpaint.metainfo.xml # Install the PNG icon (for KDE desktop, etc.) # and the 24-color 32x32 XPM (for other Window managers): diff --git a/src/org.tuxpaint.Tuxpaint.metainfo.xml.in b/src/org.tuxpaint.Tuxpaint.metainfo.xml.in new file mode 100644 index 000000000..b0ba9a5bb --- /dev/null +++ b/src/org.tuxpaint.Tuxpaint.metainfo.xml.in @@ -0,0 +1,145 @@ + + + + + org.tuxpaint.Tuxpaint + CC0-1.0 + GPL-3.0+ + Tux Paint + A drawing program for children. + +

+ Tux Paint is a free, award-winning drawing program for children ages 3 to + 12. + Tux Paint is used in schools around the world as a computer literacy + drawing activity. + It combines an easy-to-use interface, fun sound effects, and an + encouraging cartoon mascot who guides children as they use the program. +

+

+ Kids are presented with a blank canvas and a variety of drawing tools to + help them be creative. +

+
+ New Breed Software et al. + https://tuxpaint.org/ + https://sourceforge.net/p/tuxpaint/_list/tickets + https://www.tuxpaint.org/docs/en/html/FAQ.html + https://www.tuxpaint.org/docs/ + + http://www.newbreedsoftware.com/donate/ + https://www.tuxpaint.org/help/po/ + https://www.tuxpaint.org/contact/ + + + https://tuxpaint.org/screenshots/starter-coloringbook.png + The Magic tool is a set of special effects + + + https://tuxpaint.org/screenshots/example_simple.png + The Paint Brush tool lets you draw freehand, using various brushes and colors + + + https://tuxpaint.org/screenshots/example_space.png + The Stamp tool is like a set of rubber stamps or stickers + + + + + +

Tux Paint's Color palette includes a new Color Mixer option, which allows users to combine different proportions of primary colors (red, yellow, and blue) and shades (white, grey, and black) to create new colors, similar to mixing paints.

+

The Color Picker option, which previously offered a static palette of around sixty-five thousand color choices, now supports separate hue, saturation, and value settings, allowing users to choose from over sixteen million colors.

+

Also, a keyboard shortcut is now available for quick access to the Color Selector — the "pipette" tool used for picking colors from the current drawing.

+

The Paint and Lines tools now provide a way to adjust the spacing of brushes, allowing dotted lines or smearing effects to be made. Many brushes have been given better default spacing values, as well.

+

Two new variations of the Zoom Magic Tool, Tile Zoom and Rush, have been added. When shrinking a drawing with Tile Zoom, it replicates the drawing across the canvas in tiles, rather than filling the canvas with a solid background color. The Rush tool blurs the results.

+

Tux Paint's Shapes tool now offers hexagon (6-sided) and heptagon (7-sided) polygons. For shapes which can be stretched (rectangle, oval, etc.), the aspect ratio of the shape is displayed at the bottom while you make your adjustments. Instructional information shown while using some other tools has also been expanded.

+

Keyboard shortcuts, such as [Control]+[S] to save a drawing, are now accessed with the more traditional [⌘ Command] key when using Tux Paint on macOS. Sizing of Tux Paint's built-in on-screen keyboard has been improved. The look and feel of the user documentation has been improved.

+
+
+ + +

Tux Paint's Paint and Line tools now support brushes that rotate based on the angle of the stroke. This new rotation feature, as well as the older directional and animated brush features, are now visually indicated by the brush shape selector. Additionally, the Fill tool now offers a freehand painting mode for interactively coloring within a confined area.

+

Six new Magic tools have been added to Tux Paint. Panels shrinks and duplicates the drawing into a 2-by-2 grid, which is useful for making four-panel comics. Opposite produces complementary colors. Lightning interactively draws a lightning bolt. Reflection creates a lake-like reflection on the drawing. Stretch stretches and squashes the picture like a fun-house mirror. Lastly, Smooth Rainbow provides a more gradual variation of Tux Paint's classic Rainbow tool.

+

A number of existing Magic tools have been updated, as well. Improvements were made to Halftone, which simulates photographs on newsprint; Cartoon, which makes an image look like a cartoon drawing; and TV, which simulates a television screen. Additionally, Cartoon and Halftone, along with Blocks, Chalk, and Emboss, now offer the ability to alter the entire image at once!

+

Finally, Magic tools are now grouped into collections of similar effects — painting, distorts, color filters, picture warps, pattern painting, artistic, and picture decorations — making it easier to find the tool you need.

+
+
+ + +

Tux Paint's Fill tool now offers options to fill an area with color gradients. The "Radial" fill creates a circular gradient centered around the mouse click, while the "Linear" fill allows the interactive creation of gradients at different angles and sizes.

+

New Magic tools have been added to Tux Paint: "Pixels" makes it easier to create retro-gaming style pixel art, "Checkerboard" fills the entire canvas with a check pattern, and "Clone" allows duplicating parts of the picture via brush strokes.

+

Tux Paint's user documentation has been overhauled, making localization easier. Parties interested in helping with localization are encouraged to contact the Tux Paint team.

+

Finally, a new pair of accessibility options have been added. The entire user interface can now be enlarged benefiting users with impaired vision, and making the program more suitable to very high density displays. This feature, along with a new option to re-organize the color palette, can also be helpful to users of coarse input devices, such as eye-gaze tracking systems.

+
+
+ + +

A major improvement has been made to the Shapes tool, which now provides options to choose whether shapes are drawn from the center or a corner, making it easier to use in any situation.

+

The on-screen keyboard, an accessibility feature optionally available when using the Text and Label tools, now appears larger on bigger displays; helpful for users of coarser input devices, such as eye-tracking systems.

+

The Eraser tool adds new, smaller eraser sizes, and applies smoother, contiguous strokes when the pointer is moved quickly.

+

Finally, this newest version adds options to export individual drawings and GIF animations, making it easy to share pictures, cartoons, and slideshows with others.

+
+
+ + +

The latest version has promoted the "Fill" tool, previously found under the "Magic" section of Tux Paint, to the main toolbar, where it's easier to find. It also includes some performance improvements during start-up and when bringing up the "New" drawing dialog. The solid background colors can also be placed at the end of that dialog, allowing emphasis of template images.

+

Tux Paint also now makes it possible to disable stereo sound, which can benefit users with a hearing impairment, or in situations where only one speaker is available.

+
+
+ + +

New in this version are a "color picker", which allows any color within a drawing to be chosen using the pointer, and a set of three-, four-, and five-pointed star shapes.

+

The latest version also incorporates a number of new translations, bringing the number of supported languages up to nearly 130: Bengali, Bodo, Dogri, Kabyle, Urdu, and Devanagari and Perso-Arabic variations of Kashmiri and Sindhi. Thirty other translations have been updated, as well.

+
+
+ +
+ + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + + tuxpaint-devel@lists.sourceforge.net + + keyboard + pointing + touch + medium + + + small + + tuxpaint + tuxpaint.desktop + + + tuxpaint.desktop + +
diff --git a/src/po/POTFILES.in.in b/src/po/POTFILES.in.in index ace0b33cc..1f2b83cff 100644 --- a/src/po/POTFILES.in.in +++ b/src/po/POTFILES.in.in @@ -6,6 +6,7 @@ great.h im.c macos.h macos.m +org.tuxpaint.Tuxpaint.metainfo.xml.in shapes.h titles.h tools.h