grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

grub4dos - animation does not work if space after filename

Open steve6375 opened this issue 4 years ago • 10 comments

In the example below

splashimage --animated=%ANIMATE%

works OK but if you add a space to the end of the line, then it only displays the first frame and there is no animation.

splashimage --animated=%ANIMATE%[SPACE CHARACTER]

No error is reported.

I suspect that the space is trying to be incremented as a frame number. Also, if a space is present at the end of the frame filename, the next command in a menu or batch file gives a grub4dos error even though the line is OK.

can trailing spaces be trimmed from the frame filename?

image

steve6375 avatar Oct 08 '21 12:10 steve6375

BOOTX64.rar.txt

yaya2007 avatar Oct 09 '21 08:10 yaya2007

Can you supply grldr please?

steve6375 avatar Oct 09 '21 08:10 steve6375

BOOTX64.rar.txt tested OK - thanks!

steve6375 avatar Oct 09 '21 08:10 steve6375

后面有空格,其实这是一个人为的行为 ,完全可以避免。我不增加代码也可以。代码还是精干为好。

yaya2007 avatar Oct 09 '21 10:10 yaya2007

sorry - I dont understand?

steve6375 avatar Oct 09 '21 10:10 steve6375

%后面的空格,是敲键盘打字,不注意人为多打了一个吧。难道是自动产生的?

yaya2007 avatar Oct 09 '21 12:10 yaya2007

The % is only an example - just using plain text command in batch file or menu has same issue.

If we have a menu.cfg file and it has

splashimage --animated=0x10=30:ms=75=695=225 (fd3)/PK/PK_GIF_frame_0001.BMP

Then if there is a space at the end of the line - it fails to animate (only the first image is displayed) No error message is generated.

This was fixed in latest test grub4efi bootx64.efi file.

steve6375 avatar Oct 09 '21 12:10 steve6375

我自己的体会,在各种编辑器里打字 一般不会多出空格。但是,在g4d或者g4e命令行打字,当使用TAB补全字符串时,会自动增加一个空格。如果是文件名,这时一定要格外注意。 因为,今天解决了动画文件名的问题,明天可能会出现其他地方的文件名问题,永无止境。

yaya2007 avatar Oct 09 '21 13:10 yaya2007

of course. This was a problem of space at end of line in a menu.lst file or .bat file - so it was not easily detected!

steve6375 avatar Oct 09 '21 13:10 steve6375

彻底吸收命令行尾部空格.

yaya2007 avatar Oct 12 '21 00:10 yaya2007