bootsplash: use system bgrt theme

parent 0d42a6f7
......@@ -7,7 +7,7 @@ PRODUCT_NAME=@PRODUCT_NAME@
CODENAME=@CODENAME@
ARCH=$(shell arch)
.PHONY: graphics browser-qt ahttpd boot-grub boot-splash boot indexhtml install browser-qt/design/bg.png
.PHONY: graphics browser-qt ahttpd boot-grub boot indexhtml install browser-qt/design/bg.png
all: graphics
......@@ -31,11 +31,6 @@ graphics:
mv images/boot.png images/.boot.png; \
convert images/.boot.png -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity NorthEast -draw 'text 0,55 " $(STATUS) "' images/boot.png;\
rm -f images/.boot.png; \
for i in images/with-logo/*.png; do \
mv $$i $$i.png; \
convert $$i.png -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity NorthEast -draw 'text 0,0 " $(STATUS) "' $$i;\
rm -f $$i.png; \
done; \
fi
# product logo for ahttpd
cp -al images/product-logo.png ahttpd/images/product-logo.png
......@@ -71,16 +66,7 @@ ahttpd:
cp -a ahttpd/styles/*.css $(datadir)/alterator/design/styles
#bootsplash
boot-splash:
mkdir -p $(datadir)/plymouth/themes/$(THEME)
cp -al images/grub.jpg $(datadir)/plymouth/themes/$(THEME)/grub.jpg
# Put logo to background*x*.png
cp -al images/with-logo/background*x*.png $(datadir)/plymouth/themes/$(THEME)/
cp -a bootsplash/* $(datadir)/plymouth/themes/$(THEME)
mv $(datadir)/plymouth/themes/$(THEME)/theme.plymouth $(datadir)/plymouth/themes/$(THEME)/$(THEME).plymouth
rm -f $(datadir)/plymouth/themes/$(THEME)/*.in
mkdir -p $(datadir)/pixmaps
mv $(datadir)/plymouth/themes/$(THEME)/system-logo.png $(datadir)/pixmaps
# Nothing to do
#grub2
boot-grub:
......@@ -89,7 +75,7 @@ boot-grub:
install -m 644 images/boot.png $(sysconfdir)/../boot/grub/themes/$(THEME)/boot.png
install -m 644 images/boot.png $(sysconfdir)/../boot/grub/themes/$(THEME)/grub.png
boot: boot-splash boot-grub
boot: boot-grub
indexhtml:
install -Dpm644 indexhtml/ximper-wiki.desktop $(datadir)/applications/ximper-wiki.desktop
......
[Plymouth Theme]
Name=@NAME@
Description=Script for @BRAND_FNAME@ @NAME@
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/@THEME@
ScriptFile=/usr/share/plymouth/themes/@THEME@/theme.script
# ALT Education Theme
fun imgscale( image, scale )
{
image.Scale( image.GetWidth() * scale, image.GetHeight() * scale );
}
fun imgscale2( image, scaleX, scaleY )
{
image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY );
}
# background
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{
logo.raw = Image("background16x9.png");
}
else
{
logo.raw = Image("background4x3.png");
}
logo.image = imgscale2( logo.raw,
Window.GetWidth()/logo.raw.GetWidth(),
Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
#----------------------------------------- Dialogue --------------------------------
status = "normal";
fun dialog_setup()
{
local.box;
local.lock;
local.entry;
box.image = Image("box.png");
lock.image = Image("lock.png");
entry.image = Image("entry.png");
box.sprite = Sprite(box.image);
box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth ()/2;
box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2;
box.z = 10000;
box.sprite.SetPosition(box.x, box.y, box.z);
lock.sprite = Sprite(lock.image);
lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2;
lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2;
lock.z = box.z + 1;
lock.sprite.SetPosition(lock.x, lock.y, lock.z);
entry.sprite = Sprite(entry.image);
entry.x = lock.x + lock.image.GetWidth();
entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2;
entry.z = box.z + 1;
entry.sprite.SetPosition(entry.x, entry.y, entry.z);
global.dialog.box = box;
global.dialog.lock = lock;
global.dialog.entry = entry;
global.dialog.bullet_image = Image("bullet.png");
dialog_opacity (1);
}
fun dialog_opacity(opacity)
{
dialog.box.sprite.SetOpacity (opacity);
dialog.lock.sprite.SetOpacity (opacity);
dialog.entry.sprite.SetOpacity (opacity);
for (index = 0; dialog.bullet[index]; index++)
{
dialog.bullet[index].sprite.SetOpacity(opacity);
}
}
fun display_normal_callback ()
{
global.status = "normal";
if (global.dialog)
dialog_opacity (0);
}
fun display_password_callback (prompt, bullets)
{
global.status = "password";
if (!global.dialog)
dialog_setup();
else
dialog_opacity(1);
for (index = 0; dialog.bullet[index] || index < bullets; index++)
{
if (!dialog.bullet[index])
{
dialog.bullet[index].sprite = Sprite(dialog.bullet_image);
dialog.bullet[index].x = dialog.entry.x + index * dialog.bullet_image.GetWidth();
dialog.bullet[index].y = dialog.entry.y + dialog.entry.image.GetHeight() / 2 - dialog.bullet_image.GetHeight() / 2;
dialog.bullet[index].z = dialog.entry.z + 1;
dialog.bullet[index].sprite.SetPosition(dialog.bullet[index].x, dialog.bullet[index].y, dialog.bullet[index].z);
}
if (index < bullets)
dialog.bullet[index].sprite.SetOpacity(1);
else
dialog.bullet[index].sprite.SetOpacity(0);
}
}
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
#------------------------------------- Progressbar -----------------------------
# Segment size
segment_width = 33;
segment_height = 55;
border = 4;
# Define bar size and position
bar_height = segment_height;
bar_y = Window.GetHeight() / 2; # top progressbar edge should be at middle of screen
# Maximum number of sprites
steps = Math.Int ((Window.GetWidth() * 0.80)/segment_width); # 80% of screen width
# Adjust width and to integer number of sprites
bar_width = steps * segment_width;
bar_x = Math.Int ((Window.GetWidth() - bar_width)/2);
# Progress background border
progress_border.raw = Image ("progress_bg_main.png");
progress_border.image = imgscale2 (progress_border.raw, bar_width+border*2, bar_height+border*2);
progress_border.sprite = Sprite (progress_border.image);
progress_border.sprite.SetPosition (bar_x-border, bar_y-border);
progress_border.sprite.SetZ (2);
# Progress background spite
progress_bg.raw = Image ("progress_bg.png");
progress_bg.image = imgscale2 (progress_bg.raw, steps, 1);
progress_bg.sprite = Sprite (progress_bg.image);
progress_bg.sprite.SetPosition (bar_x, bar_y);
progress_bg.sprite.SetZ (5);
# Progress bar sprite
progress_bar.raw = Image ("progress_bar.png");
progress_bar.image = progress_bar.raw;
# Show first step
progress_bar.sprites[0] = Sprite ();
progress_bar.sprites[0].SetImage (progress_bar.image);
progress_bar.sprites[0].SetPosition (bar_x, bar_y);
progress_bar.sprites[0].SetZ (10);
fun progress_callback (duration, progress)
{
step = Math.Int (progress * steps) + 1;
if ( step > steps ) step = steps;
for( i=0; i<step; i++ ) {
progress_bar.sprites[i] = Sprite ();
progress_bar.sprites[i].SetImage (progress_bar.image);
progress_bar.sprites[i].SetPosition (bar_x+i*segment_width, bar_y);
progress_bar.sprites[i].SetZ (10);
}
}
Plymouth.SetBootProgressFunction(progress_callback);
#----------------------------------------- Quit --------------------------------
fun quit_callback ()
{
logo.sprite.SetOpacity (0);
}
Plymouth.SetQuitFunction(quit_callback);
#----------------------------------------- Message --------------------------------
message_sprites = [];
message_sprite_count = 0;
message_sprite_y = 10;
fun display_message_callback (text)
{
my_image = Image.Text(text, 1, 1, 1);
message_sprites[message_sprite_count] = Sprite(my_image);
message_sprites[message_sprite_count].SetPosition(10, message_sprite_y, 10000);
message_sprites[message_sprite_count].text = text;
message_sprite_count++;
message_sprite_y += my_image.GetHeight();
}
fun hide_message_callback (text)
{
for (i = 0; i < message_sprite_count; i++)
{
if (message_sprites[i].text == text)
message_sprites[i] = NULL;
}
}
Plymouth.SetDisplayMessageFunction (display_message_callback);
Plymouth.SetHideMessageFunction (hide_message_callback);
......@@ -74,13 +74,12 @@ BuildArch: noarch
Summary: Theme for splash animations during bootup
License: Distributable
Group: System/Configuration/Boot and Init
Provides: plymouth-theme-%theme plymouth(system-theme)
Provides: plymouth-theme-%theme
%define plymouth_theme bgrt
Requires: plymouth
Requires: plymouth-theme-bgrt
Requires: plymouth-plugin-script
Requires: plymouth-plugin-label
Requires: fonts-ttf-dejavu
Requires(pre,postun): plymouth
%description bootsplash
This package contains graphics for boot process for %distro_name
......@@ -373,8 +372,6 @@ fi
%_datadir/gnome-background-properties/ximper.xml
%files bootsplash
%_datadir/plymouth/themes/%theme/*
%_pixmapsdir/system-logo.png
%files release
%_sysconfdir/*-release
......
......@@ -42,7 +42,6 @@ AC_SUBST(TITLE_COLOR)
AC_CONFIG_FILES([
Makefile
bootsplash/theme.plymouth
browser-qt/design/design.ini
browser-qt/design/design.qss
notes/release-notes.ru.html
......
background16x9.png: PNG image, 1920 x 1080, 8-bit/color RGB, non-interlaced wallpaper for 16x9 monitors (without logotypes)
background4x3.png: PNG image, 1600 x 1200, 8-bit/color RGB, non-interlaced wallpaper for 4x3 monitors (without logotypes)
boot.jpg: JPEG image data, JFIF standard 1.01 screen for Plymouth (with logotypes)
boot.png: PNG image, 800 x 600, 8-bit/color RGB, non-interlaced DVD disk menu screen (with logotypes)
console.jpg: JPEG image data, JFIF standard 1.01 ?
grub.png: PNG image, 800 x 600, 8-bit/color RGB, non-interlaced GRUB loader screen for installed system (with logotypes)
installer.png: PNG image, 1920 x 1080, 8-bit/color RGB, non-interlaced installer backgrount (only right bottom corner is used) (without logotypes)
product-logo.png: PNG image, 348 x 45, 8-bit/color RGBA, non-interlaced product logotype
wallpaper.png: PNG image, 1920 x 1080, 8-bit/color RGB, non-interlaced default wallpaper (without logotypes)
background16x9.png: PNG image, 1920 x 1080, default wide wallpaper source
background4x3.png: PNG image, 1600 x 1200, default 4:3 wallpaper source
boot.png: PNG image, 800 x 600, bootloader image installed into the GRUB theme
installer.png: PNG image, 1920 x 1080, alterator-browser-qt installer background
product-logo.png: PNG image, 45 x 45, product logo source
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment