|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
2c2082 |
# render_doIdentityImageKsplash.sh -- This function renders
|
|
|
2c2082 |
# KSplash Preview.png image. Use this function as last-rendering
|
|
|
2c2082 |
# function to KSplash base-rendering.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# Copyright (C) 2009-2010 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# This program is free software; you can redistribute it and/or modify
|
|
|
4c79b5 |
# it under the terms of the GNU General Public License as published by
|
|
|
4c79b5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
4c79b5 |
# (at your option) any later version.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# This program is distributed in the hope that it will be useful, but
|
|
|
4c79b5 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4c79b5 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# You should have received a copy of the GNU General Public License
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
4c79b5 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4c79b5 |
# USA.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
4c79b5 |
function render_doIdentityImageKsplash {
|
|
|
4c79b5 |
|
|
|
2c2082 |
# Define variables as local to avoid conflicts outside.
|
|
|
2c2082 |
local RELDIR=''
|
|
|
2c2082 |
local KSPLASH_TOP=''
|
|
|
2c2082 |
local KSPLASH_PREVIEW=''
|
|
|
2c2082 |
local RELDIRS=$(find $OPTIONVAL -regextype posix-egrep -maxdepth 1 \
|
|
|
2c2082 |
-type d -regex "^.*/$RELEASE_FORMAT$" | egrep $REGEX)
|
|
|
4c79b5 |
|
|
|
2c2082 |
# Define font file used to render Preview.png bottom text.
|
|
|
4c79b5 |
local KSPLASH_PREVIEW_FONT=/home/centos/artwork/trunk/Identity/Fonts/Ttf/DejaVuLGCSans-Bold.ttf
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Define relative location to splash_active_bar and splash_bottom
|
|
|
4c79b5 |
# images. Since we are building Preview with active and bottom
|
|
|
4c79b5 |
# splash only, there is no need to include inactive bar on
|
|
|
4c79b5 |
# checking.
|
|
|
4c79b5 |
local KSPLASH_ACTIVE_BAR="$OPTIONVAL/splash_active_bar.png"
|
|
|
4c79b5 |
local KSPLASH_BOTTOM="$OPTIONVAL/splash_bottom.png"
|
|
|
4c79b5 |
|
|
|
2c2082 |
# Check existence of non-release-specific required image files.
|
|
|
e4d34a |
cli_checkFiles $KSPLASH_ACTIVE_BAR
|
|
|
e4d34a |
cli_checkFiles $KSPLASH_BOTTOM
|
|
|
e4d34a |
cli_checkFiles $KSPLASH_PREVIEW_FONT
|
|
|
4c79b5 |
|
|
|
2c2082 |
# Look for release specific directories.
|
|
|
2c2082 |
for RELDIR in $RELDIRS;do
|
|
|
2c2082 |
|
|
|
2c2082 |
# Define release-specific files.
|
|
|
2c2082 |
KSPLASH_TOP="${RELDIR}/splash_top.png"
|
|
|
2c2082 |
KSPLASH_PREVIEW="${RELDIR}/Preview.png"
|
|
|
2c2082 |
|
|
|
2c2082 |
# Check existence of release-specific required image files.
|
|
|
2c2082 |
cli_checkFiles $KSPLASH_TOP
|
|
|
2c2082 |
|
|
|
2c2082 |
# Create Preview.png image.
|
|
|
2c2082 |
convert -append \
|
|
|
2c2082 |
$KSPLASH_TOP \
|
|
|
2c2082 |
$KSPLASH_ACTIVE_BAR \
|
|
|
2c2082 |
$KSPLASH_BOTTOM \
|
|
|
2c2082 |
$KSPLASH_PREVIEW
|
|
|
2c2082 |
|
|
|
2c2082 |
# Add bottom text to Preview.png image. The text position was
|
|
|
2c2082 |
# set inside an image of 400x300 pixels. If you change the
|
|
|
2c2082 |
# final preview image dimension, you need to change the text
|
|
|
2c2082 |
# position too.
|
|
|
2c2082 |
mogrify -draw 'text 6,295 "KDE is up and running."' \
|
|
|
2c2082 |
-fill \#ffffff \
|
|
|
2c2082 |
-font $KSPLASH_PREVIEW_FONT \
|
|
|
2c2082 |
$KSPLASH_PREVIEW
|
|
|
4c79b5 |
|
|
|
2c2082 |
cli_printMessage "$KSPLASH_PREVIEW" "AsSavedAsLine"
|
|
|
4c79b5 |
|
|
|
2c2082 |
done
|
|
|
4c79b5 |
|
|
|
4c79b5 |
}
|