|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
ab1d67 |
# render_doKsplash.sh -- This function collects KDE splash
|
|
|
ce597a |
# (KSplash) required files and creates a tar.gz package that groups
|
|
|
ce597a |
# them all together. Use this function as last-rendition action for
|
|
|
ce597a |
# KSplash base-rendition action.
|
|
|
4c79b5 |
#
|
|
|
9f5f2e |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
7cd8e9 |
# This program is free software; you can redistribute it and/or
|
|
|
7cd8e9 |
# modify it under the terms of the GNU General Public License as
|
|
|
7cd8e9 |
# published by the Free Software Foundation; either version 2 of the
|
|
|
7cd8e9 |
# License, or (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 |
|
|
|
ab1d67 |
function render_doKsplash {
|
|
|
4c79b5 |
|
|
|
39208d |
local -a SRC
|
|
|
39208d |
local -a DST
|
|
|
39208d |
local FONT=''
|
|
|
39208d |
local COUNT=0
|
|
|
4c79b5 |
|
|
|
39208d |
# Define font used to print bottom splash message.
|
|
|
25c2b4 |
FONT=$(cli_getRepoTLDir)/Identity/Fonts/DejaVuLGCSans-Bold.ttf
|
|
|
4c79b5 |
|
|
|
39208d |
# Check existence of font file.
|
|
|
39208d |
cli_checkFiles "$FONT" 'f'
|
|
|
4c79b5 |
|
|
|
39208d |
# Define absolute source location of files.
|
|
|
3ce7f9 |
SRC[0]="${OUTPUT}/splash_top.png"
|
|
|
3ce7f9 |
SRC[1]="${OUTPUT}/splash_active_bar.png"
|
|
|
3ce7f9 |
SRC[2]="${OUTPUT}/splash_inactive_bar.png"
|
|
|
3ce7f9 |
SRC[3]="${OUTPUT}/splash_bottom.png"
|
|
|
b6844a |
SRC[4]="$(dirname $TEMPLATE)/Theme.rc"
|
|
|
4c79b5 |
|
|
|
39208d |
# Check absolute source location of files.
|
|
|
39208d |
cli_checkFiles "${SRC[@]}" 'f'
|
|
|
2c2082 |
|
|
|
39208d |
# Define relative target location of files.
|
|
|
3ce7f9 |
DST[0]="${OUTPUT}/splash_top.png"
|
|
|
3ce7f9 |
DST[1]="${OUTPUT}/splash_active_bar.png"
|
|
|
3ce7f9 |
DST[2]="${OUTPUT}/splash_inactive_bar.png"
|
|
|
3ce7f9 |
DST[3]="${OUTPUT}/splash_bottom.png"
|
|
|
3ce7f9 |
DST[4]="${OUTPUT}/Theme.rc"
|
|
|
3ce7f9 |
|
|
|
3ce7f9 |
# Print action message.
|
|
|
3ce7f9 |
cli_printMessage "${OUTPUT}/Preview.png" 'AsCreatingLine'
|
|
|
2c2082 |
|
|
|
39208d |
# Create `Preview.png' image.
|
|
|
3ce7f9 |
convert -append ${SRC[0]} ${SRC[1]} ${SRC[3]} ${OUTPUT}/Preview.png
|
|
|
2c2082 |
|
|
|
39208d |
# Add bottom text to Preview.png image. The text position was set
|
|
|
39208d |
# inside an image of 400x300 pixels. If you change the final
|
|
|
39208d |
# preview image dimension, you probably need to change the text
|
|
|
39208d |
# position too.
|
|
|
39208d |
mogrify -draw 'text 6,295 "KDE is up and running."' \
|
|
|
39208d |
-fill \#ffffff \
|
|
|
39208d |
-font $FONT \
|
|
|
3ce7f9 |
${OUTPUT}/Preview.png
|
|
|
2c2082 |
|
|
|
39208d |
# Copy `Theme.rc' file.
|
|
|
39208d |
cp ${SRC[4]} ${DST[4]}
|
|
|
4c79b5 |
|
|
|
39208d |
# Apply common translation markers to Theme.rc file.
|
|
|
79e54d |
cli_replaceTMarkers "${DST[4]}"
|
|
|
ec641d |
|
|
|
4c79b5 |
}
|