chenall / grub4dos

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

Request - allow multiple paths for 'command --set-path' #322

Open steve6375 opened 3 years ago

steve6375 commented 3 years ago

image

e.g.

if exist @uefi command --set-path=(bd)/extefi;(bd)/common
if not exist @uefi command --set-path=(bd)/extmbr;(bd)/common

This would allow grub4dos and grub4efi to be run from the same drive. common batch files and utilities can be in one folder, but ext folder utilities can be set depending on legacy or uefi boot.

If this is difficult to do, maybe add one extra search path for utilities, e.g. command --set-util-path=(bd)/extefi

or hard-code /ext folder into search path, e.g.

command --set-path=(bd)/common

search path will be: (root) (root)/ext (bd)/common (bd)/common/ext

Would also be better to have downloads with ext folder under /boot/grub/extefi and /boot/grub/extmbr similar to grub2 modules stucture???

a1ive commented 3 years ago

Why not use mkimage to generate an efi file with all external commands?

makemod.exe ext\cpuid ext\fat ext\date ...
mkimage.exe -p /efi/grub -o BOOTX64.EFI -O x86_64-efi -c menu.lst -f unifont.gz -m grub4dos.mod
steve6375 commented 3 years ago

still doesn't solve the problem of how to add extra grub4dos/grub4efi utils...

yaya2007 commented 3 years ago

外部命令的默认路径: grub4dos /boot/grub grub4efi /efi/grub

可以定制: command --set-path=

steve6375 commented 3 years ago

need multiple paths (or at least two) so can set ext utilities path common batch files are in one folder, ext utils in second folder e.g. hotkey will work under grub4dos or grub4efi because we can set the second path

image