From c824f20a9fe45fc3ea575d1adcfb715822b64660 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 28 Dec 2013 17:51:02 -0600 Subject: Move distro-specific defaultsettings files into the debian directory to get around quilt format limitations --- .../distrospecific/usplash/moreblue-orbit/Makefile | 120 + .../usplash/moreblue-orbit/background.svg | 6773 ++++++++++++++++++++ .../distrospecific/usplash/moreblue-orbit/cmap.gif | Bin 0 -> 472522 bytes .../usplash/moreblue-orbit/progress.png | Bin 0 -> 4543 bytes .../distrospecific/usplash/moreblue-orbit/theme.c | 178 + .../distrospecific/usplash/moreblue-orbit/theme.in | 20 + .../usplash/moreblue-orbit/themesetup.sh | 151 + 7 files changed, 7242 insertions(+) create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/Makefile create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/background.svg create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/cmap.gif create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/progress.png create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.c create mode 100644 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.in create mode 100755 ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/themesetup.sh (limited to 'ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash') diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/Makefile b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/Makefile new file mode 100644 index 000000000..6f677f506 --- /dev/null +++ b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/Makefile @@ -0,0 +1,120 @@ +# usplash-theme-debian - Makefile +# +# Copyright © 2006 - 2007 David Härdeman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# This is the list of sizes to build and include in the theme +# By convention, the sizes should go from smaller to larger +sizes = 640x480 800x600 1024x768 1280x1024 + +# This creates a list with entries like background_800x600.png... +backgrounds = $(addsuffix .png, $(addprefix background_, $(sizes))) +background_objs = $(backgrounds:.png=.o) +progressfgs = $(addsuffix .png, $(addprefix progressfg_, $(sizes))) +progressfg_objs = $(progressfgs:.png=.o) +progressbgs = $(addsuffix .png, $(addprefix progressbg_, $(sizes))) +progressbg_objs = $(progressbgs:.png=.o) +theme = moreblue-orbit-theme.so + +CC = gcc +CFLAGS = -g -Wall -fPIC +LDFLAGS = +INCLUDES = +COMPILE = $(CC) $(INCLUDES) $(CFLAGS) +LINK = $(CC) $(CFLAGS) $(LDFLAGS) + +INSTALL = install +INSTALL_DATA = $(INSTALL) -m 644 +INSTALL_PROG = $(INSTALL) -m 755 + +DESTDIR = /usr/lib/usplash + +# Default = silent build +V = +ifeq ($(strip $(V)),) +E = @echo +Q = @ +else +E = @\# +Q = +endif +export E Q + +all: $(theme) +.PHONY: all +.DEFAULT: all + +$(theme): theme.o $(background_objs) $(progressfg_objs) $(progressbg_objs) + $(E) " LINK " $@ + $(Q) $(COMPILE) -shared -o $@ $^ + +theme.h: theme.in progress.png themesetup.sh $(backgrounds) $(progressfgs) $(progressbgs) + $(E) " THMPARM " $@ + $(Q) ./themesetup.sh $(sizes) > $@ + +theme.o: theme.c theme.h + +background_%.png: background.svg cmap.gif + $(E) " BG " $@ + $(Q) rsvg-convert -w `echo $* | cut -dx -f1` -h `echo $* | cut -dx -f2` -f png $< > $@ + +progressfg_%.png: background_%.png progress.png cmap.gif + $(E) " PROGFG " $@ + $(Q) composite -compose dst_over -gravity center $< progress.png $@ + +progressbg_%.png: background_%.png progress.png cmap.gif + $(E) " PROGBG " $@ + $(Q) composite -gravity center -dissolve 25x100 progress.png $< png:- | \ + composite -gravity center -compose src_over png:- progress.png $@ + +%.o: %.c + $(E) " CC " $@ + $(Q) $(COMPILE) -o $@ -c $< + +%.c: %.png cmap.gif + $(E) " PNGSRC " $@ + $(Q) convert $< +dither -map cmap.gif gif:- | \ + convert gif:- $< + $(Q) pngtousplash $< > $@ + +#cmap.gif: background.svg progress.png +# $(E) " CMAP " $@ +# $(Q) rsvg-convert -w 1024 -h 768 -f png background.svg | \ +# composite -compose src_over -gravity center progress.png png:- +dither cmap.gif + +install: $(theme) + $(E) " INSTALL " $< + $(Q) $(INSTALL_DATA) -D $< $(DESTDIR)/$(theme) +.PHONY: install + +install-strip: $(theme) + $(MAKE) INSTALL='$(INSTALL) -s' install +.PHONY: install-strip + +clean: + $(E) " CLEAN " + $(Q) - find . -type f -name '*.png.c' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name '*.cfont' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name '*.o' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name '*.so' -print0 | xargs -0r rm -f +# $(Q) - find . -type f -name 'cmap.*' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name 'background_*' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name 'progressfg_*' -print0 | xargs -0r rm -f + $(Q) - find . -type f -name 'progressbg_*' -print0 | xargs -0r rm -f + $(Q) - rm -f theme.h +.PHONY: clean + +.PRECIOUS: %.c progressbg_%.png progressfg_%.png background_%.png diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/background.svg b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/background.svg new file mode 100644 index 000000000..d60e2ed74 --- /dev/null +++ b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/background.svg @@ -0,0 +1,6773 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/cmap.gif b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/cmap.gif new file mode 100644 index 000000000..ac8c4b80a Binary files /dev/null and b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/cmap.gif differ diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/progress.png b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/progress.png new file mode 100644 index 000000000..de57c529f Binary files /dev/null and b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/progress.png differ diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.c b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.c new file mode 100644 index 000000000..59632522e --- /dev/null +++ b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.c @@ -0,0 +1,178 @@ +/* usplash + * + * theme.c - theme definition + * + * Copyright © 2006 David Härdeman + * based on example-theme from usplash which is + * Copyright © 2006 Dennis Kaarsemaker + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include + +void t_init(struct usplash_theme *theme); +void t_draw_progressbar(struct usplash_theme *theme, int percentage); +void t_clear_progressbar(struct usplash_theme *theme); +void t_clear_text(struct usplash_theme *theme); +void t_animate_step(struct usplash_theme* theme, int pulsating); + +/* Auto-generated theme definitions */ +#include "theme.h" + +static struct private_hack *phack = NULL; + +void +t_init(struct usplash_theme *theme) +{ + int x, y; + + /* START - HACKS R US */ + phack = (struct private_hack *)theme->font; + theme->font = NULL; + /* FINISH - HACKS R US */ + usplash_getdimensions(&x, &y); + theme->progressbar_x = (x - theme->pixmap->width)/2 + theme->progressbar_x; + theme->progressbar_y = (y - theme->pixmap->height)/2 + theme->progressbar_y; +} + +void +t_draw_progressbar(struct usplash_theme *theme, int percentage) +{ + int w = (phack->progress_bg->width * percentage / 100); + static int last_w = 0; + + if (w != 0 && w == last_w) + return; + + /* Check if we're changing mode between startup and shutdown */ + if (last_w >= 0 && w < 0) { + usplash_put(theme->progressbar_x, + theme->progressbar_y, + phack->progress_fg); + last_w = 0; + } else if (last_w < 0 && w > 0) { + usplash_put(theme->progressbar_x, + theme->progressbar_y, + phack->progress_bg); + last_w = 0; + } + + /* Draw only the part which has changed since last time */ + if (percentage == 0) { + usplash_put(theme->progressbar_x, + theme->progressbar_y, + phack->progress_bg); + } else if (percentage < 0) { + usplash_put_part(theme->progressbar_x - last_w, + theme->progressbar_y, + -w + last_w, + phack->progress_bg->height, + phack->progress_bg, + -last_w, 0); + } else if (percentage > 0) { + usplash_put_part(theme->progressbar_x + last_w, + theme->progressbar_y, + w - last_w, + phack->progress_fg->height, + phack->progress_fg, + last_w, 0); + } + + last_w = w; +} + +void +t_clear_progressbar(struct usplash_theme *theme) +{ + t_draw_progressbar(theme, 0); +} + +void +t_clear_text(struct usplash_theme *theme) +{ + int x, y, x1, y1, x2, y2; + usplash_getdimensions(&x, &y); + + /* Draw outer border */ + x1 = (x - theme->pixmap->width)/2 + theme->text_x - TEXT_EXTRA_PX; + y1 = (y - theme->pixmap->height)/2 + theme->text_y - TEXT_EXTRA_PX; + x2 = x1 + theme->text_width + 2 * TEXT_EXTRA_PX; + y2 = y1 + theme->text_height + 2 * TEXT_EXTRA_PX; + usplash_clear(x1, y1, x2, y2, theme->text_foreground); + + /* Draw main text area with TEXT_BORDER_PX pixels padding */ + x1 += TEXT_BORDER_PX; + y1 += TEXT_BORDER_PX; + x2 -= TEXT_BORDER_PX; + y2 -= TEXT_BORDER_PX; + usplash_clear(x1, y1, x2, y2, theme->text_background); +} + +void +t_animate_step(struct usplash_theme* theme, int pulsating) +{ + static int pulsate_step = 0; + static int pulse_width = 70; + static int step_width = 1; + static int prev_step = 0; + static int reset = 1; + int num_steps = (phack->progress_fg->width - pulse_width)/step_width; + int x1; + + if (!pulsating) { + reset = 1; + return; + } + + if (reset) { + /* Reset pulse */ + t_clear_progressbar(theme); + reset = 0; + pulsate_step = 0; + usplash_put_part(theme->progressbar_x, + theme->progressbar_y, + pulse_width, + phack->progress_fg->height, + phack->progress_fg, + 0, 0); + } else { + /* Remove from left hand side of pulse */ + x1 = step_width * prev_step; + usplash_put_part(theme->progressbar_x + x1, + theme->progressbar_y, + step_width, + phack->progress_bg->height, + phack->progress_bg, + x1, 0); + } + + /* Add to right hand side of pulse */ + x1 = step_width * pulsate_step + pulse_width; + usplash_put_part(theme->progressbar_x + x1, + theme->progressbar_y, + step_width, + phack->progress_fg->height, + phack->progress_fg, + x1, 0); + + /* Check for wraparound */ + prev_step = pulsate_step; + pulsate_step++; + if (pulsate_step >= num_steps) + reset = 1; +} + diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.in b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.in new file mode 100644 index 000000000..ae8c4dd26 --- /dev/null +++ b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/theme.in @@ -0,0 +1,20 @@ +#define PALETTE_BG 0 +#define PALETTE_PROGRESS_FG 0 +#define PALETTE_PROGRESS_BG 0 +#define PALETTE_TEXT_BG 251 +#define PALETTE_TEXT_FG 0 +#define PALETTE_TEXT_SUCCESS 67 +#define PALETTE_TEXT_FAILURE 134 + +#define TEXT_BORDER_PX 1 +#define TEXT_PADDING_PX 9 +#define TEXT_EXTRA_PX (TEXT_BORDER_PX + TEXT_PADDING_PX) +#define TEXT_MARGIN 30 + +/* Horrible hack */ +struct private_hack { + struct usplash_pixmap *pixmap; /* Background image */ + struct usplash_pixmap *progress_fg; /* Progress bar foreground */ + struct usplash_pixmap *progress_bg; /* Progress bar background */ +}; + diff --git a/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/themesetup.sh b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/themesetup.sh new file mode 100755 index 000000000..81f0bd882 --- /dev/null +++ b/ubuntu/maverick/defaultsettings/desktop-base/debian/distrospecific/usplash/moreblue-orbit/themesetup.sh @@ -0,0 +1,151 @@ +#!/bin/sh + +# +# Sanity checks +# +if [ ! -e theme.in ]; then + exit 1 +fi + +if [ $# -lt 1 ]; then + exit 1 +fi + +# +# Helper functions +# +struct_name() { + name=${1%.*} + echo "pixmap_$name" +} + +# +# Begin processing +# + +echo "/*" +echo " * Part 1 - Generic header part" +echo " */" +cat theme.in +echo + + + +echo "/*" +echo " * Part 2 - Forward theme struct declarations" +echo " */" +first=yes +for size in $@; do + if [ $first = "yes" ]; then + THEMENAME="usplash_theme" + first=no + else + THEMENAME="usplash_theme_$size" + fi + echo "struct usplash_theme $THEMENAME;" +done +echo + + + +echo "/*" +echo " * Step 3 - Actual theme struct defs" +echo " */" +first=yes +while [ 1 ]; do + size="$1" + if [ -z "$size" ]; then + exit 0 + fi + + if [ $first = "yes" ]; then + THEMENAME="usplash_theme" + first=no + else + THEMENAME="usplash_theme_$size" + fi + + if [ -z "$2" ]; then + THEMENEXT="NULL" + else + THEMENEXT="&usplash_theme_$2" + fi + shift + + PGFG_PIX="progressfg_$size.png" + PGFG_STRUCT=$(struct_name "$PGFG_PIX") + PGBG_PIX="progressbg_$size.png" + PGBG_STRUCT=$(struct_name "$PGBG_PIX") + BG_PIX="background_$size.png" + BG_STRUCT=$(struct_name "$BG_PIX") + + PROGRESS_WIDTH=$( identify "$PGFG_PIX" | cut -d' ' -f3 | cut -dx -f1) + PROGRESS_HEIGHT=$( identify "$PGFG_PIX" | cut -d' ' -f3 | cut -dx -f2) + WIDTH=${size%x*} + HEIGHT=${size#*x} + + if [ $(( $WIDTH / 16 )) -eq $(( $HEIGHT / 9 )) ]; then + RATIO="USPLASH_16_9" + else + RATIO="USPLASH_4_3" + fi + + cat <