chenall / grub4dos

外部命令和工具源码:https://github.com/chenall/grubutils 下载:
http://grub4dos.chenall.net
GNU General Public License v2.0
649 stars 136 forks source link

grub4dos-0.4.6a-2015-07-09.7z menu help text not cleared #66

Closed steve6375 closed 9 years ago

steve6375 commented 9 years ago

3rd, 4th and 5th line of menu help text is not cleared when use cursor keys to move down menu. Only the first and 2nd line is updated. image

yaya2007 commented 9 years ago

This is the new version. Not bug. Menu item to help 2 lines, 4 lines of menu help.

The previous version, when the display menu item to help, the menu help is gone. If all menu items are of help, the menu help is not shown. This is not right!

steve6375 commented 9 years ago

It is just title ssss \n yyyyy

single line

Actually, 1st and 2nd line work, but 3rd, 4th line do not and 5th line is not cleared. e.g. title xxxx\n111\n222\n333\n4444 boot image

steve6375 commented 9 years ago

Also, help text is on extreme left. I use menusetting to set menu position. image

This is how it should look (previous version of grldr). image

steve6375 commented 9 years ago

Simple case

menu.lst

password fred

title test\n1\n2\n3\n4\n5 boot

image

steve6375 commented 9 years ago

setmenu does move help text to right:

graphicsmode -1 800 600 setmenu --box x=8 y=2 w=0 h=20 l=4 --help=8=23 password fred title test\n1\n2\n3\n4\n5 reboot image

But, if I use only 'menusetting' then help text is on extreme left of screen.

yaya2007 commented 9 years ago

Now only allows the user to use 2 lines to help. I don't know, often use more than 2 lines to help the situation? Generally use a few lines?

steve6375 commented 9 years ago

Should be compatible with old version. Some languages (e.g. German) use many and long words so 4 lines are needed. Old version was 4 lines of help with 5th line for message (e.g. Press 'p' to gain privileged control'. Please keep it compatible.

steve6375 commented 9 years ago

Here is test case for menusetting

graphicsmode -1 800 600

setmenu --box x=8 y=2 w=0 h=20 l=4 --help=8=23

/%grub%/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart%

/_ISO/e2b/grub/menusetting.gz n n 1 23 20 2 85 8 password fred

title test\n1\n2\n3\n4\n5 reboot

image

Value for menu_border.menu_help_x should be set same as x-1 (or 0 if illegal) as default

steve6375 commented 9 years ago

P.S. Small typo in line 164 of stage2.c grub_strcpy (buff + i,"Press ENTER or \'b\' to boot.\n" should have space before Press grub_strcpy (buff + i," Press ENTER or \'b\' to boot.\n"

steve6375 commented 9 years ago

Example using 3 lines of help text in Easy2Boot (old good version of grldr) image

steve6375 commented 9 years ago

lines 139-143 missing so does not clear help text? https://github.com/chenall/grub4dos/commit/5c469149afba623452bc2b01ed720d503df1b669#diff-81be4a1d76dd8eef0ae0ed522d4989c1

yaya2007 commented 9 years ago

Has been updated

steve6375 commented 9 years ago

Still many problems - not compatible + bugs

menu.lst graphicsmode -1 800 600

/%grub%/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart%

/_ISO/e2b/grub/menusetting.gz n n 1 23 5 17 60 8 password fred

title test1A\nA123456789\nA123456789\nA123456789\nA123456789\nA123456789 reboot title test2B\nB123456789\nB123456789\nB123456789\nB123456789\nB123456789 reboot title test3C\nC123456789\nC123456789\nC123456789\nC123456789\nC123456789 reboot title test4D\nD123456789\nD123456789\nD123456789\nD123456789\nD123456789 reboot title test5E\nE123456789\nE123456789\nE123456789\nE123456789\nE123456789 reboot title test6F\nF123456789\nF123456789\nF123456789\nF123456789\nF123456789 reboot title test7G\nG123456789\nG123456789\nG123456789\nG123456789\nG123456789 reboot title continue\n set grub=_ISO/e2b/grub cat /%grub%/menu.lst > (md)0xa100+0x50 && configfile (md)0xa100+0x50

old 0.4.5c and 0.4.6a compatible.. image image New 0.4.6a NOT COMPATIBLE image

  1. Last menu text is not cleared when new menu page displayed (page down)
  2. Menu help text in wrong position under menu (x-2 y+1 needed)
  3. grub4dos help text should be suppressed if \n used in title
    • it should be on same xy position as menu help text with max of 4 lines.
  4. Only 4 lines of menu help text allowed (not 5 lines)
  5. No menu index number displayed at top of menu

If add a color command, more problems: color blue/red yellow/light-gray cyan/black magenta/cyan red/blue image Should be image

  1. Menu text not cleared when page-down (see 'test3Cue' line)
  2. Color of menu help text not set to cyan/black

Why have you added new NOTES??? This is not compatible with previous versions? Please can you remove NOTES feature and make consistent with previous versions? NOTES and Menu help text should occupy same 4 lines. OR by default, make NOTES position same position as menu help text position and same colour. Draw NOTES first and then menu help text, so menu help text overwrites NOTES. Then user can use setmenu to move NOTES text or change it's colour.

Please make new version compatible - it is very important. menusetting.gz is here - please test. https://drive.google.com/open?id=0B44X_H05wMHFMnNMUWRfV2dKRm8

yaya2007 commented 9 years ago

Mainland can not download Please provide "menusetting.gz "

steve6375 commented 9 years ago

http://www.rmprepusb.com/tutorials/grub4dos/fonts-and-graphics/Fonts800.zip Use menusetting.gz from here. or just make a Easy2Boot USB drive and add ISO files. www.easy2boot.com

steve6375 commented 9 years ago

Complete USB drive test https://onedrive.live.com/redir?resid=8A0F146CC7416BA9!1667&authkey=!AOm6OeG2FNibGgc&ithint=file%2c7z image

P.S. When chainloading, seems to be a [Hit Q to quit, any other key to continue] paging prompt with new grldr?

steve6375 commented 9 years ago

0.4.6a 2015-07-14 still have few problems.

old grub4dos image

  1. Menu help text needs moving 2 characters to left
  2. 'Use the ^ and v keys...' text is partially cleared when highlighted menu is changed. image
  3. Get a '[Hit Q to quit... message when select the 'grub old' menu (must move cursor down menu first)
    • i.e. press cursor down until get to 'grub old' and run it. Does not happen using grldr 2015-06-05. image
  4. In old version, the NOTES text is in same place as menu help text (not at bottom of screen). if \n in title then NOTES text is supressed. Suggest, that unless setmenu NOTES position command is used, the default x/y position of NOTES text is same as menu help text + if \n in menu title, then NOTES text is not displayed. image
  5. If setmenu --help-off is used (normal Easy2Boot USB drive), then the text that is written at the bottom of the display is cleared. setmenu --help-off image normal default (setmenu --help-on) image
steve6375 commented 9 years ago

P.S. setmenu --box x=7 y=3 w=30 h=10 gives 'error while parsing number' setmenu --box x=7 y=3 w=0 h=10 OK

steve6375 commented 9 years ago

color notes=0x2 changes menu help text to green - it should change the NOTES text not menu help text color helptext=0xf changes notes text AND help text to white ????

steve6375 commented 9 years ago

How to set x,y position of menu help text and NOTES text?? Not in help setmenu ?? is setmenu --help=x=y for NOTES or menu help text? It seems to be for NOTES not help??

grub4dos hangs if setmenu --help=x=y is in middle of menu!

steve6375 commented 9 years ago

If default menu timeout set, e.g. timeout 5 there is no timeout message countdown displayed??

yaya2007 commented 9 years ago

"1.Menu help text needs moving 2 characters to left" --notes=[x]=[y]=[line]

"2.'Use the ^ and v keys...' text is partially cleared when highlighted menu is changed" I don't have a repeat error here. Please try the new version.

"3.Get a '[Hit Q to quit... message when select the 'grub old' menu (must move cursor down menu first)" Do not understand, please tell me a little more, how to reproduce?

"4.In old version, the NOTES text is in same place as menu help text (not at bottom of screen). if \n in title then NOTES text is supressed." .Has been amended. Default to the old version. Can also be flexible settings.

"5.If setmenu --help-off is used (normal Easy2Boot USB drive), then the text that is written at the bottom of the display is cleared" Has been amended.

"setmenu --box x=7 y=3 w=30 h=10 gives 'error while parsing number' setmenu --box x=7 y=3 w=0 h=10 OK" There is no space between X"w=" and "30"

".color --notes=0x2 changes menu help text to green - it should change the NOTES text not menu help text color --helptext=0xf changes notes text AND help text to white ????" colot is 0xrrggbb.24 color.

"How to set x,y position of menu help text and NOTES text?? Not in help setmenu ?? is setmenu --help=x=y for NOTES or menu help text? It seems to be for NOTES not help?? grub4dos hangs if setmenu --help=x=y is in middle of menu!" Has been amended.

"If default menu timeout set, e.g. timeout 5 there is no timeout message countdown displayed??" Do not understand, please tell me a little more, how to reproduce?

yaya2007 commented 9 years ago

1.支持每像素16位彩色模式(64K 5:6:5)。 2.支持 jpg(jpeg,jpe)图像格式。 3.在 vbe 模式,使用 echo -rrggbb 可以显示 216 种彩色样本。 4.使用 echo -v 可以显示版本、内存信息。 5.color 函数增加参数: notes=[color] 菜单项注释颜色; 6.增加 setmenu 函数,增强图形菜单编辑功能。参数: --ver-on --ver-off 版本信息打开/关闭。默认打开; --help-on --help-off 菜单帮助信息打开/关闭。默认打开。应当位于菜单项标题的参数之前; --lang=en --lang=zh 菜单帮助信息中英文切换。默认英文; --auto-num 打开菜单自动编号; --line-spacing=[s] --font-spacing=[s] 设置字符间距/行间距。单位:像素。默认0。应当位于下面的参数之前; --string=[x]=[y]=[color]=["string“] 字符串位置、颜色与内容,可用于标题,说明,帮助等。单位:列,行,24位色彩; 注:如果省略颜色,位于菜单框以上按标题颜色,位于菜单框以下按帮助颜色; 字符串头尾要加英文双引号; 列数=图像水平像素/(字符宽+字符间距) 字符宽=8; 行数=图像垂直像素/(字符高+行间距) 字符高=10; --notes=[x]=[y]=[line] 菜单项标题注释位置、最大行数。单位:列,行。默认1行; --help=[x]=[y] 菜单帮助位置。单位:列,行; --box x=[x] y=[y] w=[w] h=[h] l=[l] 菜单项标题起始列,起始行,每行最大字符数,最大菜单项数,菜单框线条宽度(像素); 注:w=0 表示水平居中。此时 w 应当在 x 之后; l=0 表示不显示菜单框; --u 恢复菜单原始状态。

steve6375 commented 9 years ago

Please test with https://onedrive.live.com/redir?resid=8A0F146CC7416BA9!1667&authkey=!AOm6OeG2FNibGgc&ithint=file%2c7z replace \grldr with new 2015-07-16 grldr. New 2015-07-16 does not work at all! graphics corruption, etc. image

steve6375 commented 9 years ago

Fresh boot with test example (previous grldr 2015-07-14) https://onedrive.live.com/redir?resid=8A0F146CC7416BA9!1667&authkey=!AOm6OeG2FNibGgc&ithint=file%2c7z image image Helptext colour is changed image image Both helptext AND notes both changed image

Can use color helptext=0xf or 0xFFFFFF - same result.

What is NOTES? Menu help text or grub4dos help text? Maybe names should be helptext (for title \n menu help text) and keytext (for grub4dos help with menu keys)

Please give example of menuset --box command (not using w=0) - I cannot make it work.

image

steve6375 commented 9 years ago

re. timeout To sample my menu https://onedrive.live.com/redir?resid=8A0F146CC7416BA9!1667&authkey=!AOm6OeG2FNibGgc&ithint=file%2c7z add

default 6 timeout 55

Then there should be timeout countdown in seconds on screen - but it is not displayed???

OK - I see timeout now display on right of highlighted menu! BUT it is on wrong line if page-down in menu image

yaya2007 commented 9 years ago

Link no access. Please send to the mailbox: fjy1@hotmail.com。Contain“graphics corruption”

setmenu --box x=8 w=30 y=6 h=10 l=2

steve6375 commented 9 years ago

image

w=30 does not work, w=0 works.

yaya2007 commented 9 years ago

3

Normal image loading.

setmenu --box x=8 w=30 y=6 h=10 l=2 Although the newspaper is wrong, but already work.Why the newspaper is wrong, I'll check again.

"Both helptext AND notes both changed" "BUT it is on wrong line if page-down in menu" The problem has been known.

"Notes" is modified as "entry_help", which is appropriate.

steve6375 commented 9 years ago

2015-07-14 In menu.lst set tophelp=13

but 'entry_help' is not on line 13???

steve6375 commented 9 years ago

I re-compiled the 2015-07-16 source and grldr still gives same graphics problem. The problem is caused by the this line in menu.lst /menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart% line. If I remove this line it displays a menu.

P.S. Only one line of 'entry-help' text is displayed??

steve6375 commented 9 years ago

2015-07-16 setmenu --box x=7 y=8 w=54 h=5 l=1 This works in \menu.lst but not from command console.

I replace /menusetting.gz with setmenu --box x=7 y=8 w=54 h=5 l=1 setmenu --help=17=15

but there are problems: image 1 entry-help not start at x=17 2 entry-help only displays one line also there should be no helptext lines displayed if \n used in title or iftitle

3 if I add default 7 timeout 55 image

yaya2007 commented 9 years ago

"2015-07-14 In menu.lst set tophelp=13 but 'entry_help' is not on line 13???" 2015-07-16Version: --notes=[x]=[y]=[line]

"1 entry-help not start at x=17 2 entry-help only displays one line also there should be no helptext lines displayed if \n used in title or iftitle" 'setmenu --help=17=15' help start at x=17; entry-help start at x=16. The default,entry-help displays 1 lines, and is located in the top 1 rows of help. Otherwise, you need to set up entry-help .

"3 if I add default 7 timeout 55" As already know, there is no change.

yaya2007 commented 9 years ago

"/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart%" I extracted the "menusetting" file, so I didn't observe the error.

steve6375 commented 9 years ago

New grub4dos 0.4.6a MUST be backwards compatible with previous 0.4.5c and older 0.4.6a. Many people use menuset or menusetting batch file to set menu position. Default for entry-help should be 4 lines (not 1) to be same as previous versions.

ReadMe_Grub4dos.txt:

You may append your help text to the title line. The help text must begin with "\n", for example: title This is the title\nThis is the help text.\nAnd this is the 2nd line of the help text.

if title xx\n is used then grub4dos help text should be suppressed and only display entry-help, same as old versions. New grub4dos should work with menusetting. If not, all new grub4dos menus must be re-written by all users and will now only work with new version and will not work with 0.4.5c or older 0.4.6a!!

If you want to make a non-compatible version of grub4dos, please call it 'grub4yaya' or something else. Documentation for grub4dos is well known and many people have written menus for grub4dos which will now not work with new version or crash if try to use menusetting. Please make compatible menu system which will work with menusetting.gz or use a different name for grub4dos.

yaya2007 commented 9 years ago

"New grub4dos 0.4.6a MUST be backwards compatible with previous 0.4.5c and older 0.4.6a." This is to be, I recognize.

"New grub4dos should work with menusetting." This requirement is a bit high. Set menu, from the Internet to find, as well as menuset, and so on, whether it is compatible? "/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart%"The image can not be loaded, with the current new version of the setting menu is no relationship.

Now the difference is that"if title xx\n is used then grub4dos help text should be suppressed and only display entry-help,” Some people need help and entry-help exist at the same time. Do not need help, you can so --help-off shielding, I think it is not compatible with the.

steve6375 commented 9 years ago

Syntax of setmenu --notes not very clear

maybe change to --notes=[x]=[y]=[no. lines]

steve6375 commented 9 years ago

menuset is in grubutils by chenall https://code.google.com/p/grubutils/downloads/list

I can add extra code to make Easy2Boot work on old and new versions, but it is not ideal:

set NEWGRUB= cat --locate="setmenu --param" (md)0x200+0x100 > nul && set NEWGRUB=1 if not exist NEWGRUB /menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart% if exist NEWGRUB set /a hstart=%rstart%-2 > nul if exist NEWGRUB set /a tophelp=%tophelp%+1 > nul if exist NEWGRUB setmenu --box x=%rstart% y=%topstart% w=%menuw% h=%noitems% l=%bdwidth%

if exist NEWGRUB setmenu --help=%hstart%=34

if exist NEWGRUB setmenu --notes=%hstart%=%tophelp%=4 if exist NEWGRUB setmenu --help-off set NEWGRUB= && set hstart=

yaya2007 commented 9 years ago

Take your advice. Set 1 old patterns (by default, so that the menu can help disappear), consistent with previous versions; Set 1 new models (no menu help disappearing)

steve6375 commented 9 years ago

OK - If setmenu command is used then set new model. ? Default old model has 4 lines help text?

re. timeout counter - can the number countdown be placed outside of the menu? If using Arabic menus, the text is right-justified - counter number then obscures the text: image

if menu is full width then keep same position as now (inside menu). If menu (start+width) < max-screen-width - 2 then display at far right, outside of menu.

How can counter be disabled?

steve6375 commented 9 years ago

Can password prompt be same colour as 'menu-entry' text and also right-start in same position as 'menu-entry' text? Example below has yellow menu-entry text, but 'Password: is white (console text colour) and it's position is far left. If run password from console then current display is OK, but if run password from a menu then colour and position should match 'menu-entry' text - is this possible please? image

steve6375 commented 9 years ago

Problems with 2015-07-24 image 1 timeout counter in wrong place if default is in 2nd page of menu and overwrites menu entry - needs to be outside of menu box. image Suggest colour of timeout counter is 'normal' colour so that it stands out against highlight colour?

2 Password prompt not aligned under menu (and in standard/console colour not 'menu-entry' colour. image

3 Improve help for setmenu image suggest 'lines' or 'number of lines' or 'no. lines'

4 New version incompatible with menusetting.gz utility.

yaya2007 commented 9 years ago

Can you send a menu containing the language of Arabia to my mailbox?

steve6375 commented 9 years ago

Hi yaya

MenuArabic.lst is how an Egyption would write the menu.lst using Notepad - BUT it does not display in correct order under grub4dos.

To be displayed correctly in grub4dos, the text needs to be reversed. They use Fribidi.exe to reverse the Arabic glyphs

So it is converted to menurev.lst

MenuArabic.lst >>>>>> (Fribidi.exe >>>>>>> menurev.lst

But this does not really matter for grub4dos, grub4dos just needs to align the menu to the right by padding each menu entry with spaces

e.g. | is menu border...

| abcde |

when displayed in menu should be

| abcde|

See http://reboot.pro/topic/16340-graphicsmode-syntax/page-2#entry193544

e.g. if menu width is 60 characters, then menu entry for abcde should be

<55 spaces>abcde if menu width is 30 characters, then menu entry for abcdef should be <25 spaces>abcde So you do not need to worry about reversing the characters because Fribidi.exe can process the characters. A good feature would be to right-align the menu text according to the menu width. If possible, the next step would be to do what fribidi.exe does (reverse Arabic characters but not non-Arabic characters) - but this may be difficult for you???
steve6375 commented 9 years ago

Demo menu at http://files.easy2boot.com/200001245-9453c9647d/menuArabicDemo.lst

yaya2007 commented 9 years ago

Now the situation is: 1.Compatible menusetting.gz; 2.Adjust the position and color of the password; 3.Fixed second page down timing error; 4.Added right align; Test grldr is located in the following, I do not know whether to visit. http://bbs.wuyou.net/forum.php?mod=viewthread&tid=369720&extra=page%3D1 The 1 floor ![Uploading cs.jpg…]()

steve6375 commented 9 years ago

I tested new version - Good job!

1.Compatible menusetting.gz; OK Now :-) 2.Adjust the position and color of the password;
Problems: 2a menu help text (not menu-entry) needs to be moved > 1 space to right 2b Menu help text and menu-entry text needs to be cleared - see Demo image

3.Fixed second page down timing error; OK What are rules now?

4.Added right align; This does not work if the menu text has embedded RTF codes - see example file. image

http://files.easy2boot.com/200001246-1389a1582d/menuArabicDemo1.lst

steve6375 commented 9 years ago

P.S. In help text - suggest use * to indicate defaults image

re. setmenu --string=10=30=0xFFFFFF00FF0000="HELLO" This does not show white background ??? image e.g. color helptext=0xFFFFFF00FF0000 shows white background

Is X position correct for strings?? I don't think it should be right-aligned??

steve6375 commented 9 years ago

P.S. Please can we have a setmenu command to disable/enable the countdown timer?

steve6375 commented 9 years ago

How about add extra setmenu command???

setmenu --timeout-pos=[x]=[y]

if y not specified then use menu entry line (x determines position on line) if x=-1 then disable countdown