From 20087bab5df69067cd2f8ceffe6c269d93965446 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Fri, 8 Feb 2002 15:45:01 +0000 Subject: Add themes support --- Makefile | 2 +- bootsplash.spec | 1 + scripts/Makefile | 5 ++++- scripts/bootsplash.sysconfig | 26 ++++++++++++++++++++++++ scripts/make-boot-splash | 9 +++++--- themes/Mandrake/cfg/bootsplash-1024x768.cfg | 19 +++++++++++++++++ themes/Mandrake/cfg/bootsplash-1280x1024.cfg | 19 +++++++++++++++++ themes/Mandrake/cfg/bootsplash-800x600.cfg | 19 +++++++++++++++++ themes/Mandrake/global.config | 2 ++ themes/Mandrake/images/bootsplash-1024x768.jpg | Bin 0 -> 25594 bytes themes/Mandrake/images/bootsplash-1280x1024.jpg | Bin 0 -> 33873 bytes themes/Mandrake/images/bootsplash-800x600.jpg | Bin 0 -> 20832 bytes 12 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 scripts/bootsplash.sysconfig create mode 100644 themes/Mandrake/cfg/bootsplash-1024x768.cfg create mode 100644 themes/Mandrake/cfg/bootsplash-1280x1024.cfg create mode 100644 themes/Mandrake/cfg/bootsplash-800x600.cfg create mode 100644 themes/Mandrake/global.config create mode 100644 themes/Mandrake/images/bootsplash-1024x768.jpg create mode 100644 themes/Mandrake/images/bootsplash-1280x1024.jpg create mode 100644 themes/Mandrake/images/bootsplash-800x600.jpg diff --git a/Makefile b/Makefile index 9daf96d..e7d50e0 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ RELEASE := $(shell sed -n 's/%define release //p' < $(NAME).spec) RELTAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') SUBDIRS=scripts -DATADIRS=images cfg +DATADIRS=themes prefix=/ sharedir=/usr/share diff --git a/bootsplash.spec b/bootsplash.spec index d3fa2ee..25508d1 100644 --- a/bootsplash.spec +++ b/bootsplash.spec @@ -40,6 +40,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README ChangeLog +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} %_datadir/%{name}/* %changelog diff --git a/scripts/Makefile b/scripts/Makefile index e27fd95..c39fe83 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,15 +1,18 @@ PL=detect-resolution SH=make-boot-splash rewritejpeg +SYS=bootsplash.sysconfig sharedir=/usr/share +etcsysdir=/etc/sysconfig check: @for i in $(SH);do /bin/bash -n $$i || exit 1;echo $$i syntax OK;done @for i in $(PL);do perl -c $$i ||exit 1;done install: - @mkdir -p $(prefix)$(sharedir)/bootsplash/scripts/ + @mkdir -p $(prefix)$(sharedir)/bootsplash/scripts/ $(prefix)$(etcsysdir) @for i in $(SH) $(PL);do install -m755 $$i $(prefix)$(sharedir)/bootsplash/scripts/;done + install -m644 bootsplash.sysconfig $(prefix)$(etcsysdir)/bootsplash clean: rm -f *~ \#*\# \ No newline at end of file diff --git a/scripts/bootsplash.sysconfig b/scripts/bootsplash.sysconfig new file mode 100644 index 0000000..7fefdb8 --- /dev/null +++ b/scripts/bootsplash.sysconfig @@ -0,0 +1,26 @@ +# -*- Mode: shell-script -*- +# Specify here if you want add the splash logo to initrd when +# generating an initrd. You can specify : +# +# SPLASH=no to don't have a splash screen +# +# SPLASH=auto to make autodetect the splash screen +# +# SPLASH=INT When Integer could be 800x600 1024x768 1280x1024 +# +SPLASH=auto + +# Choose the themes. The should be based in +# /usr/share/bootsplash/themes/ +THEME=Mandrake + +# Say yes here if you want to leave the logo on the console. +# Three options : +# +# LOGO_CONSOLE=no don't display logo under console. +# +# LOGO_CONSOLE=yes display logo under console. +# +# LOGO_CONSOLE=theme leave the theme to decide. +# +LOGO_CONSOLE=theme diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash index 674fbff..e524606 100755 --- a/scripts/make-boot-splash +++ b/scripts/make-boot-splash @@ -7,6 +7,9 @@ : ${splash_dir=/usr/share/bootsplash} +[[ -f /etc/sysconfig/bootsplash ]] && source /etc/sysconfig/bootsplash +[[ -z $THEME ]] && THEME=Mandrake + initrd_file=$1 [[ -z $initrd_file ]] && { @@ -28,9 +31,9 @@ elif [[ $vgamode == 1280* ]];then resolution=1280x1024 fi -if [[ -f $splash_dir/images/bootsplash-$resolution.jpg && -f $splash_dir/cfg/bootsplash-$resolution.cfg ]];then - image=$splash_dir/images/bootsplash-$resolution.jpg - config=$splash_dir/cfg/bootsplash-$resolution.cfg +if [[ -f $splash_dir/themes/$THEME/images/bootsplash-$resolution.jpg && -f $splash_dir/themes/$THEME/cfg/bootsplash-$resolution.cfg ]];then + image=$splash_dir/themes/$THEME/images/bootsplash-$resolution.jpg + config=$splash_dir/themes/$THEME/cfg/bootsplash-$resolution.cfg fi if [[ -n $image ]];then diff --git a/themes/Mandrake/cfg/bootsplash-1024x768.cfg b/themes/Mandrake/cfg/bootsplash-1024x768.cfg new file mode 100644 index 0000000..cd251d1 --- /dev/null +++ b/themes/Mandrake/cfg/bootsplash-1024x768.cfg @@ -0,0 +1,19 @@ +# This is the configuration file for the 1024x768 bootsplash picture. +# This file is necessary to specify the coordinates of the text box on the +# splash screen. + +# tx is the x coordinate of the text window in characters. default is 19 +# multiply width font width for coordinate in pixels. +tx=0 + +# ty is the y coordinate of the text window in characters. default is 10 +ty=0 + +# tw is the width of the text window in characters. default is 104 +# NOTE: this should at least be 80 as on the standard linux text console +tw=104 + +# th is the height of the text window in characters. default is 34 +# NOTE: this should at least be 25 as on the standard linux text console +th=34 + diff --git a/themes/Mandrake/cfg/bootsplash-1280x1024.cfg b/themes/Mandrake/cfg/bootsplash-1280x1024.cfg new file mode 100644 index 0000000..c734db9 --- /dev/null +++ b/themes/Mandrake/cfg/bootsplash-1280x1024.cfg @@ -0,0 +1,19 @@ +# This is the configuration file for the 1280x1024 bootsplash picture +# This file is necessary to specify the coordinates of the text box on the +# splash screen. + +# tx is the x coordinate of the text window in characters. default is 24 +# multiply width font width for coordinate in pixels. +tx=0 + +# ty is the y coordinate of the text window in characters. default is 14 +ty=0 + +# tw is the width of the text window in characters. default is 130 +# NOTE: this should at least be 80 as on the standard linux text console +tw=130 + +# th is the height of the text window in characters. default is 44 +# NOTE: this should at least be 25 as on the standard linux text console +th=44 + diff --git a/themes/Mandrake/cfg/bootsplash-800x600.cfg b/themes/Mandrake/cfg/bootsplash-800x600.cfg new file mode 100644 index 0000000..de6af8c --- /dev/null +++ b/themes/Mandrake/cfg/bootsplash-800x600.cfg @@ -0,0 +1,19 @@ +# This is the configuration file for the 800x600 bootsplash picture. +# This file is necessary to specify the coordinates of the text box on the +# splash screen. + +# tx is the x coordinate of the text window in characters. default is 15 +# multiply width font width for coordinate in pixels. +tx=0 + +# ty is the y coordinate of the text window in characters. default is 8 +ty=0 + +# tw is the width of the text window in characters. default is 82 +# NOTE: this should at least be 80 as on the standard linux text console +tw=82 + +# th is the height of the text window in characters. default is 26 +# NOTE: this should at least be 25 as on the standard linux text console +th=26 + diff --git a/themes/Mandrake/global.config b/themes/Mandrake/global.config new file mode 100644 index 0000000..a837d99 --- /dev/null +++ b/themes/Mandrake/global.config @@ -0,0 +1,2 @@ +# See definitions on /etc/sysconfig/bootsplash +LOGO_CONSOLE=no \ No newline at end of file diff --git a/themes/Mandrake/images/bootsplash-1024x768.jpg b/themes/Mandrake/images/bootsplash-1024x768.jpg new file mode 100644 index 0000000..a4e7eed Binary files /dev/null and b/themes/Mandrake/images/bootsplash-1024x768.jpg differ diff --git a/themes/Mandrake/images/bootsplash-1280x1024.jpg b/themes/Mandrake/images/bootsplash-1280x1024.jpg new file mode 100644 index 0000000..1084f53 Binary files /dev/null and b/themes/Mandrake/images/bootsplash-1280x1024.jpg differ diff --git a/themes/Mandrake/images/bootsplash-800x600.jpg b/themes/Mandrake/images/bootsplash-800x600.jpg new file mode 100644 index 0000000..bdb34c4 Binary files /dev/null and b/themes/Mandrake/images/bootsplash-800x600.jpg differ -- cgit v1.2.1