|
cls
cls
@echo off&cls
:main
color 1e&title GfxMenu - Kernel&mode con lines=20 cols=60&echo.&echo.
echo. Message配置—于山&echo.
echo. [A] 解开messageold文件
echo. [B] 打包message文件
echo. [C] 添加message进度条配置
echo. [D] 恢复因MsgDiyer编辑而掉失的进度条
echo. [E] 修改message配置
echo. [F] 修改message字体&echo.
set /p se= 你选择(a、b、c、d、e、f)回车:
if /i "%se%" == "a" goto jieya
if /i "%se%" == "b" goto yasuo
if /i "%se%" == "c" goto gdt
if /i "%se%" == "d" goto gd
if /i "%se%" == "e" goto peizhi
if /i "%se%" == "f" goto ziti
goto main
:jieya
if not exist messageold echo.文件不存在!把档命名为:messageold放在此目录下再操作!&pause>nul&exit
del data\*.* /q >nul 2>nul
bin\cpio.exe -t <messageold> data\list.txt
cd data&..\bin\cpio.exe -i <..\messageold
echo.&echo. 已解开:messageold文件到data\目录下&pause>nul&goto exit
cd..&pause>nul&goto main
:peizhi
if not exist data\gfxboot.cfg.bak copy /y data\gfxboot.cfg data\gfxboot.cfg.bak >nul
type data\gfxboot.cfg|find /i "menu_text_normal">nul 2>nul
if not "%errorlevel%" == "0" echo. gfxboot.cfg档无效!&pause>nul&goto main
:custom
echo.&echo. [分辨率设置] [隐藏 菜单 设置] [其它]
echo.&echo. 分辨率: [1] 1024x768 [2] 800x600 [3] 640x480
set /p custom= 请选择(1/2/3):
if "%custom%" == "1" bin\sed "s/.*custom_width=.*$/custom_width=1024/g" data\gfxboot.cfg|more>temp.tmp&bin\sed "s/.*height=.*$/custom_height=768/g" temp.tmp|more>data\temp.temp&move /y data\temp.temp data\gfxboot.cfg>nul&goto help
if "%custom%" == "2" bin\sed "s/.*custom_width=.*$/custom_width=800/g" data\gfxboot.cfg|more>temp.tmp&bin\sed "s/.*height=.*$/custom_height=600/g" temp.tmp|more>data\temp.temp&move /y data\temp.temp data\gfxboot.cfg>nul&goto help
if "%custom%" == "3" bin\sed "s/.*custom_width=.*$/custom_width=640/g" data\gfxboot.cfg|more>temp.tmp&bin\sed "s/.*height=.*$/custom_height=480/g" temp.tmp|more>data\temp.temp&move /y data\temp.temp data\gfxboot.cfg>nul&goto help
goto custom
:help
echo.&set /p help= 隐藏"帮助"选项(Y/N)
if "%help%" == "" (goto help)
if /i "%help%" == "y" (bin\sed "s/.*help=.*$/hide_help=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto max) else (if /i "%help%" == "n" bin\sed "s/.*help=.*$/# hide_help=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto max)&goto help
:max
set /p max= 最大菜单数:
echo %max%|findstr /ibe "[0-9]*">nul
if "%errorlevel%" == "0" (bin\sed "s/.*entries=.*$/menu_max_entries=%max%/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul) else (echo.&echo. 只能输入数字&goto max)
:show
set /p show= 隐藏 "引导选项"(Y/N)
if "%show%" == "" goto show
if /i "%show%" == "y" (bin\sed "s/.*show=.*$/# boot_show=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto reboot) else (if /i "%show%" == "n" bin\sed "s/.*show=.*$/boot_show=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto reboot)&goto show
:reboot
set /p reboot= 隐藏"重启"选项(Y/N)
if "%reboot%" == "" goto reboot
if /i "%reboot%" == "y" (bin\sed "s/.*reboot=.*$/hide_reboot=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto powoff) else (if /i "%reboot%" == "n" bin\sed "s/.*reboot=.*$/# hide_reboot=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto powoff)&goto reboot
:powoff
set /p powoff= 隐藏"关机"选项(Y/N)
if "%powoff%" == "" goto powoff
if /i "%powoff%" == "y" (bin\sed "s/.*poweroff=.*$/hide_poweroff=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto lang) else (if /i "%powoff%" == "n" bin\sed "s/.*poweroff=.*$/# hide_poweroff=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto lang)&goto powoff
:lang
set /p lang= 隐藏"语言"选项(Y/N)
if /i "%lang%" == "y" (bin\sed "s/.*lang=.*$/hide_lang=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto main) else (if /i "%lang%" == "n" bin\sed "s/.*lang=.*$/# hide_lang=1/g" data\gfxboot.cfg|more>temp.tmp&move /y temp.tmp data\gfxboot.cfg>nul&goto main)&goto lang
:yasuo
if not exist data\list.txt (echo. 找不到list.txt,请先用此工具解开文件!&pause>nul&exit)
cd data&..\bin\cpio.exe -o <list.txt> ..\message
echo.&echo. 已打包成功,新文件名:message&pause>nul&goto main
:ziti
copy /y data\16x16.fnt data\16x16.fnt.bak>nul
set /p font= 输入Windows\Fonts下字体文件名(不含路径):
if /i "%font%" == "" goto ziti
if not exist %systemroot%\fonts\%font% echo. 找不到%font%檔&pause>nul&goto ziti
echo. 请稍后...
bin\mkblfont -v -l 18 -a 0x20-0x7e,0xa0-0xbf,0xc1-0xcb,0xcd-0xce,0xd0-0xd1,0xd3-0xd8,0xda-0xff -t bin\chs.txt -f %font%:prop=2:space_width=4:size=17:nobitmap=1:autohint=1 data\16x16.fnt >nul
echo. 完毕 16x16.fnt&pause>nul&goto main
:gdt
copy /y bin\gfxboot.cfg data\gfxboot.cfg>nul
copy /y bin\init data\init>nul
echo.&echo. 已添加进度条配置:可进行其它配置或打包文件!&pause>nul&goto main
:gd
copy /y bin\init data\init>nul
echo.&echo. 已经恢复因MsgDiyer编辑而掉失的进度条!&pause>nul&goto main
|
|