-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fixes grub splashImage documentation + implementation #40462
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,12 +299,16 @@ sub GrubFs { | |
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n"; | ||
} | ||
if ($splashImage) { | ||
# FIXME: GRUB 1.97 doesn't resize the background image if it | ||
# doesn't match the video resolution. | ||
copy $splashImage, "$bootPath/background.png" or die "cannot copy $splashImage to $bootPath\n"; | ||
# Keeps the image's extension. | ||
my ($filename, $dirs, $suffix) = fileparse($splashImage, qr"\..[^.]*$"); | ||
# The module for jpg is jpeg. | ||
if ($suffix eq ".jpg") { | ||
$suffix = ".jpeg"; | ||
} | ||
copy $splashImage, "$bootPath/background$suffix" or die "cannot copy $splashImage to $bootPath\n"; | ||
$conf .= " | ||
insmod png | ||
if background_image " . $grubBoot->path . "/background.png; then | ||
insmod " . substr($suffix, 1) . " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we validate the suffix is one of N supported formats? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if the image format isn't supported? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous behaviour:
(Just tested) the new behaviour:
I'm guessing that an error message is quickly shown and hidden ( |
||
if background_image " . $grubBoot->path . "/background$suffix; then | ||
set color_normal=white/black | ||
set color_highlight=black/white | ||
else | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before anyone asks, this comment has been "wrong" for a while.
GRUB 1.97 may still not resize the background image, but GRUB 2.02 does!