Convert RGBA-format PNG files during install #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the first of two possible solutions to the issue of RGBA-format PNG files making their way into the repo. Files with an alpha channel cause problems for the GNOME Shell animated backgrounds code, so they need to be converted to RGB for the transitions to display properly. (See #51, #67.)
This PR addresses that by using ImageMagick to process the files as they're being installed, ensuring that only images without an alpha channel are installed, no matter what format the repo's source images are in.
As such, it does add ImageMagick as a new build dependency for the repo.
These commits also represent a general updating and enhancing of the entire build process, which IMHO are useful with or without the ImageMagick processing. And if we decide not to go this route, I can drop the conversion rules from this PR and leave the rest of the fixes in place.) Notable changes include:
Makefile(s)
$(MAKE) -C
, instead of scripted loop. Installs can now be run in parallel withmake install -jN
(though this would only have any effect if both of thedefault/
andextras/
directories were being installed together.)export
to sub-makes so they can be shared between the two paths.install
rule up intoinstall-base
plus a set ofinstall-(DE)
rules, one for each Desktop Environment. Allinstall-*
rules are prerequisites of the maininstall
rule.f41-backgrounds.spec
ImageMagick
as a BuildRequires.with_extras
into a realbcond_with
, so that installation of theextras/
dir can be activated withrpmbuild ... --with extras
with_extras
so that activating it has the proper effectInstalled image filenames (XFCE package)
The XFCE files are all installed to the same directory. Previously, the Makefile installed the images/symlinks as follows:
default/
directory:01-day.png
was installed (by copying) asf41.png
01-night.png
was installed (by copying) asf41-01-night.png
extras/
directory:01-dark-blue.png
was symlinked asf41-01-dark-blue.png
01-light-blue.png
was symlinked asf41-01-light-blue.png
(I have no idea why some are copied and others are symlinked, seems like the
default/
files could be symlinked as well. I can easily change that if it's useful, but I've left it the way it is so far.)...And then in the spec file, only
f41.png
was packaged inf41-backgrounds-xfce4
, with the rest (including the default dark image) theoretically going intof41-backgrounds-extras-xfce4
if that weren't hardcoded as disabled.Because the ImageMagick processing rules don't lend themselves to renaming the output file like that, and because it didn't really make sense to me that only one of the two default theme files was being packaged in the
-xfce4
subpackage, this PR changes the install so that:01-day.png
is installed asf41-01-day.png
01-night.png
is installed asf41-01-night.png
01-dark-blue.png
is symlinked asf41-extras-01-dark-blue.png
01-light-blue.png
is symlinked asf41-extras-01-light-blue.png
The spec file will now create the main -xfce subpackage to contain
f41*.png
, excludingf41-extras*.png
(ifwith_extras
is enabled). The excluded files will go into the-extras-xfce
subpackage instead. This seems more consistent, and doesn't relegate the f41 dark background to second-class status.So, this PR does change the installed name of the XFCE background (from
f41.png
tof41-01-day.png
, but it also provides thef41-01-night.png
image that's included for all other DEs, but was being left out of the XFCE package for some reason.RESOLUTIONS
While I was combining the redundant variables from the two directories' Makefiles, I noticed that the list of resolutions being used in the
extras/
dir had one additional size in the list, that wasn't present in thedefaults/
directory's Makefile.That size is
1920x1280
, which is a very weird resolution that I've personally never seen or heard of on any screen I've used. So, maybe it was an error that had been corrected indefaults/
but not inextras/
. In any case, because I used the more complete list it's now present in the set of symlinks created from both Makefiles — if it shouldn't be there, let me know and I'll remove it.Fixes #67