Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework wallpaper handling #218

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Files: *
Copyright: 2007-2023 Michael Prokop <[email protected]>
License: GPL-2+

Files: fonts/graphicoreBitmapFont0-Light.otf
Files: templates/wallpaper/graphicoreBitmapFont0-Light.otf
Copyright: 2010, Lasse Fister [email protected]
License: SIL

Expand Down
2 changes: 1 addition & 1 deletion debian/grml-live.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ docs/grml-live-remaster.8 usr/share/man/man8/
docs/grml-live.8 usr/share/man/man8/
etc/grml etc
examples usr/share/doc/grml-live/
fonts usr/share/grml-live/
grml-live usr/sbin/
remaster/grml-live-remaster usr/sbin/
scripts usr/share/grml-live/
Expand All @@ -11,4 +10,5 @@ templates/GRML usr/share/grml-live/templates/
templates/boot/grub usr/share/grml-live/templates/boot/
templates/boot/isolinux usr/share/grml-live/templates/boot/
templates/secureboot usr/share/grml-live/templates/
templates/wallpaper usr/share/grml-live/templates/
templates/windows usr/share/grml-live/templates/
1 change: 1 addition & 0 deletions debian/grml-live.maintscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rm_conffile /etc/grml/fai/config/files/etc/inittab/GRML_SMALL 0.43.0~
rm_conffile /etc/grml/fai/config/files/etc/locale.gen/GRML_FULL 0.49.3~
rm_conffile /etc/grml/fai/config/files/etc/lsb-base-logging.sh/GRMLBASE 0.42.3~
rm_conffile /etc/grml/fai/config/files/etc/systemd/system/[email protected]/override.conf/GRMLBASE 0.33.2~
rm_conffile /etc/grml/fai/config/files/usr/share/grml/desktop-bg.png/GRMLBASE 0.49.4~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/36-cpufrequtils 0.33.0~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/37-portmap 0.49.2~
rm_conffile /etc/grml/fai/config/scripts/GRMLBASE/40-deborphan 0.35.0~
Expand Down
1 change: 0 additions & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/42-branding
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set -u
set -e

fcopy -m root,root,0755 -v /usr/share/initramfs-tools/scripts/init-top/grml
fcopy -M -v /usr/share/grml/desktop-bg.png
fcopy -M -v /usr/share/doc/grml-docs/startpage.html

## END OF FILE #################################################################
Expand Down
15 changes: 8 additions & 7 deletions etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf}
TITLE_FONTSIZE=${TITLE_FONTSIZE:-200}
VERSION_FONTSIZE=${VERSION_FONTSIZE:-100}
GRML_BG=${GRML_BG:-"$target"/usr/share/grml/desktop-bg.png}
GRML_WALLPAPER=${GRML_WALLPAPER:-"$target"/usr/share/grml/desktop.jpg}

FONTFILE="$TEMPLATE_DIRECTORY"/wallpaper/font.otf
GRML_BG="$TEMPLATE_DIRECTORY"/wallpaper/input.png

echo "Creating GRMLBASE wallpaper"

if [ ! -x "$(which convert)" ]; then
echo "convert not installed, skipping wallpaper."
exit 0
echo "convert not installed, skipping wallpaper."
exit 0
fi

if [ ! -f "$GRML_BG" ]; then
echo "Could not find Grml background image, skipping wallpaper"
echo "Could not find input image $GRML_BG, skipping wallpaper"
exit 0
fi

Expand All @@ -33,8 +36,6 @@ if [ ! -f "$FONTFILE" ]; then
exit 0
fi

echo "Creating standard wallpaper"

convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \
Expand Down
12 changes: 6 additions & 6 deletions etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ target=${target:?}
# shellcheck source=/dev/null
. "$GRML_LIVE_CONFIG"

FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf}
TITLE_FONTSIZE=${TITLE_FONTSIZE:-200}
GRML_BG=${GRML_BG:-$target/usr/share/grml/desktop-bg.png}
GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg}

echo "Creating release wallpaper"
FONTFILE="$TEMPLATE_DIRECTORY"/wallpaper/font.otf
GRML_BG="$TEMPLATE_DIRECTORY"/wallpaper/input.png

echo "Creating RELEASE wallpaper"

if [ ! -x "$(which convert)" ]; then
echo "convert not installed, skipping release wallpaper."
exit 0
fi

if [ ! -f "$GRML_BG" ]; then
echo "Could not find Grml background image, skipping release wallpaper"
echo "Could not find input image $GRML_BG, skipping wallpaper"
exit 0
fi

if [ ! -f "$FONTFILE" ]; then
echo "Could not find font $FONTFILE, skipping release wallpaper"
echo "Could not find font $FONTFILE, skipping wallpaper"
exit 0
fi


convert "$GRML_BG" -gravity center \
-fill white -font "$FONTFILE" \
-pointsize "$TITLE_FONTSIZE" \
Expand Down
2 changes: 1 addition & 1 deletion grml-live
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ einfo "Logging actions to logfile $LOGFILE"
# dump config variables into file, for script access {{{
CONFIGDUMP=$(mktemp)
set | grep -E \
'^(GRML_NAME|RELEASENAME|DATE|VERSION|SUITE|ARCH|DISTRI_NAME|USERNAME|HOSTNAME|APT_PROXY)=' \
'^(GRML_NAME|RELEASENAME|DATE|VERSION|SUITE|ARCH|DISTRI_NAME|TEMPLATE_DIRECTORY|USERNAME|HOSTNAME|APT_PROXY)=' \
> "${CONFIGDUMP}"
# }}}

Expand Down
1 change: 1 addition & 0 deletions templates/wallpaper/font.otf
Loading