plymouth/plymouth-watermark-config.patch
Cliff Zhao 3a03be408f Accepting request 950754 from home:qzhao:branches:Base:System
1. Add plymouth-watermark-config.patch: Add two-step theme watermark configuration support, make the plymouth-branding easy to render the theme (bsc#1189613). 2. Add plymouth-quiet-dracut-build-info.patch: Avoid the dracut building info which is useless for plymouth(bsc#1189613). 3. Add plymouth-install-label-library-and-font-file-to-initrd.patch: Compress label.so and current theme's font into initrd to avoid prompt disappear when the folder in which has been encrypt  (boo#1183425).

OBS-URL: https://build.opensuse.org/request/show/950754
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=311
2022-02-02 14:42:58 +00:00

50 lines
2.4 KiB
Diff

diff -Nura plymouth-0.9.5~git20210406.e554475/src/plugins/splash/two-step/plugin.c plymouth-0.9.5~git20210406.e554475_new/src/plugins/splash/two-step/plugin.c
--- plymouth-0.9.5~git20210406.e554475/src/plugins/splash/two-step/plugin.c 2021-04-06 19:53:40.000000000 +0800
+++ plymouth-0.9.5~git20210406.e554475_new/src/plugins/splash/two-step/plugin.c 2021-09-19 17:04:54.441225214 +0800
@@ -1053,7 +1053,6 @@
plugin = calloc (1, sizeof(ply_boot_splash_plugin_t));
image_dir = ply_key_file_get_value (key_file, "two-step", "ImageDir");
-
ply_trace ("Using '%s' as working directory", image_dir);
asprintf (&image_path, "%s/lock.png", image_dir);
@@ -1076,9 +1075,23 @@
plugin->background_tile_image = ply_image_new (image_path);
free (image_path);
- asprintf (&image_path, "%s/watermark.png", image_dir);
- plugin->watermark_image = ply_image_new (image_path);
- free (image_path);
+ char *release_watermark_path, *theme_watermark_path;
+ release_watermark_path = ply_key_file_get_value (key_file, "two-step", "WatermarkPath");
+ asprintf (&theme_watermark_path, "%s/watermark.png", image_dir);
+ if (release_watermark_path != NULL && access(release_watermark_path, R_OK) == 0 )
+ {
+ ply_trace ("openSUSE's Watermark path: '%s'", release_watermark_path);
+ plugin->watermark_image = ply_image_new (release_watermark_path);
+ free (release_watermark_path);
+ }
+ else if( access(theme_watermark_path, R_OK) == 0)
+ {
+ ply_trace ("Theme's Watermark path: '%s'", theme_watermark_path);
+ plugin->watermark_image = ply_image_new (theme_watermark_path);
+ free (theme_watermark_path);
+ }
+ else
+ plugin->watermark_image = NULL;
plugin->animation_dir = image_dir;
diff -Nura plymouth-0.9.5~git20210406.e554475/themes/bgrt/bgrt.plymouth.desktop plymouth-0.9.5~git20210406.e554475_new/themes/bgrt/bgrt.plymouth.desktop
--- plymouth-0.9.5~git20210406.e554475/themes/bgrt/bgrt.plymouth.desktop 2021-04-06 19:53:40.000000000 +0800
+++ plymouth-0.9.5~git20210406.e554475_new/themes/bgrt/bgrt.plymouth.desktop 2021-09-19 17:14:04.299069740 +0800
@@ -7,6 +7,7 @@
Font=Cantarell 12
TitleFont=Cantarell Light 30
ImageDir=@PLYMOUTH_THEME_PATH@/spinner
+WatermarkPath=/usr/share/pixmaps/distribution-logos/light-inline.png
DialogHorizontalAlignment=.5
DialogVerticalAlignment=.382
TitleHorizontalAlignment=.5