mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 00:11:15 +00:00
Add muli-languages support for Ventoy menu.
F5 ---> Menu Language Select Language files are in INSTALL/grub/menu/ directory.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" ]; then
|
||||
set default=0
|
||||
menuentry "Calculate and check md5sum" --class=checksum_md5 {
|
||||
menuentry "@VTMENU_CHKSUM_MD5_CALC_CHK" --class=checksum_md5 {
|
||||
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" vtReadChecksum
|
||||
@@ -18,7 +18,7 @@ if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" ]; then
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate md5sum" --class=checksum_md5 {
|
||||
menuentry "@VTMENU_CHKSUM_MD5_CALC" --class=checksum_md5 {
|
||||
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
@@ -28,7 +28,7 @@ fi
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" ]; then
|
||||
set default=1
|
||||
menuentry "Calculate and check sha1sum" --class=checksum_sha1 {
|
||||
menuentry "@VTMENU_CHKSUM_SHA1_CALC_CHK" --class=checksum_sha1 {
|
||||
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" vtReadChecksum
|
||||
@@ -45,7 +45,7 @@ if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" ]; then
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha1sum" --class=checksum_sha1 {
|
||||
menuentry "@VTMENU_CHKSUM_SHA1_CALC" --class=checksum_sha1 {
|
||||
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
@@ -57,7 +57,7 @@ fi
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" ]; then
|
||||
set default=2
|
||||
menuentry "Calculate and check sha256sum" --class=checksum_sha256 {
|
||||
menuentry "@VTMENU_CHKSUM_SHA256_CALC_CHK" --class=checksum_sha256 {
|
||||
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" vtReadChecksum
|
||||
@@ -74,7 +74,7 @@ if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" ]; then
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha256sum" --class=checksum_sha256 {
|
||||
menuentry "@VTMENU_CHKSUM_SHA256_CALC" --class=checksum_sha256 {
|
||||
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
@@ -86,7 +86,7 @@ fi
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" ]; then
|
||||
set default=3
|
||||
menuentry "Calculate and check sha512sum" --class=checksum_sha512{
|
||||
menuentry "@VTMENU_CHKSUM_SHA512_CALC_CHK" --class=checksum_sha512{
|
||||
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" vtReadChecksum
|
||||
@@ -103,7 +103,7 @@ if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" ]; then
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha512sum" --class=checksum_sha512{
|
||||
menuentry "@VTMENU_CHKSUM_SHA512_CALC" --class=checksum_sha512{
|
||||
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
@@ -112,6 +112,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
|
@@ -1,10 +1,11 @@
|
||||
|
||||
source $prefix/menulang.cfg
|
||||
source $prefix/power.cfg
|
||||
source $prefix/hwinfo.cfg
|
||||
source $prefix/keyboard.cfg
|
||||
|
||||
submenu "Resolution Configuration" --class=debug_resolution --class=F5tool {
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
submenu "@VTMENU_RESOLUTION_CFG" --class=debug_resolution --class=F5tool {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
|
||||
@@ -28,27 +29,27 @@ submenu "Resolution Configuration" --class=debug_resolution --class=F5tool {
|
||||
done
|
||||
}
|
||||
|
||||
submenu "Screen Display Mode" --class=debug_screen_mode --class=F5tool {
|
||||
menuentry 'Force Text Mode' --class=debug_text_mode --class=debug_screen_mode --class=F5tool {
|
||||
submenu "@VTMENU_SCREEN_MODE" --class=debug_screen_mode --class=F5tool {
|
||||
menuentry '@VTMENU_SCREEN_TEXT_MODE' --class=debug_text_mode --class=debug_screen_mode --class=F5tool {
|
||||
terminal_output console
|
||||
}
|
||||
menuentry 'Force Graphics Mode' --class=debug_gui_mode --class=debug_screen_mode --class=F5tool {
|
||||
menuentry '@VTMENU_SCREEN_GUI_MODE' --class=debug_gui_mode --class=debug_screen_mode --class=F5tool {
|
||||
terminal_output gfxterm
|
||||
}
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
}
|
||||
|
||||
if [ $VTOY_THEME_COUNT -gt 1 ]; then
|
||||
submenu "Theme Select" --class=debug_theme_select --class=F5tool {
|
||||
if [ -n "$VTOY_THEME_COUNT" -a $VTOY_THEME_COUNT -gt 1 ]; then
|
||||
submenu "@VTMENU_THEME_SELECT" --class=debug_theme_select --class=F5tool {
|
||||
vt_select_theme_cfg
|
||||
}
|
||||
fi
|
||||
|
||||
if [ "$grub_platform" != "pc" ]; then
|
||||
submenu 'Ventoy UEFI Utilities' --class=debug_util --class=F5tool {
|
||||
menuentry 'Show EFI Drivers' --class=debug_util_efidrv --class=debug_util --class=F5tool {
|
||||
menuentry '@VTMENU_UTIL_SHOW_EFI_DRV' --class=debug_util_efidrv --class=debug_util --class=F5tool {
|
||||
vt_push_pager
|
||||
chainloader ${vtoy_path}/vtoyutil_${VTOY_EFI_ARCH}.efi env_param=${env_param} ${vtdebug_flag} feature=show_efi_drivers
|
||||
boot
|
||||
@@ -57,22 +58,22 @@ if [ "$grub_platform" != "pc" ]; then
|
||||
read vtInputKey
|
||||
}
|
||||
|
||||
menuentry 'Fixup Windows BlinitializeLibrary Failure' --class=debug_util_blinit --class=debug_util --class=F5tool {
|
||||
menuentry '@VTMENU_UTIL_FIX_BLINIT_FAIL' --class=debug_util_blinit --class=debug_util --class=F5tool {
|
||||
chainloader ${vtoy_path}/vtoyutil_${VTOY_EFI_ARCH}.efi env_param=${env_param} ${vtdebug_flag} feature=fix_windows_mmap
|
||||
boot
|
||||
echo -e "\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --class=F5tool {
|
||||
menuentry 'Check global control plugin configuration' --class=debug_control --class=debug_json --class=F5tool {
|
||||
submenu '@VTMENU_JSON_CHK_JSON' --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_CONTROL' --class=debug_control --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path control $vtoy_iso_part
|
||||
|
||||
@@ -81,7 +82,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check theme plugin configuration' --class=debug_theme --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_THEME' --class=debug_theme --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path theme $vtoy_iso_part
|
||||
|
||||
@@ -90,7 +91,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check auto install plugin configuration' --class=debug_autoinstall --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_AUTOINS' --class=debug_autoinstall --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path auto_install $vtoy_iso_part
|
||||
|
||||
@@ -99,7 +100,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check persistence plugin configuration' --class=debug_persistence --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_PERSIST' --class=debug_persistence --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path persistence $vtoy_iso_part
|
||||
|
||||
@@ -111,7 +112,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check menu alias plugin configuration' --class=debug_menualias --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_MENU_ALIAS' --class=debug_menualias --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path menu_alias $vtoy_iso_part
|
||||
|
||||
@@ -120,7 +121,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check menu tip plugin configuration' --class=debug_menutip --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_MENU_TIP' --class=debug_menutip --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path menu_tip $vtoy_iso_part
|
||||
|
||||
@@ -129,7 +130,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check menu class plugin configuration' --class=debug_menuclass --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_MENU_CLASS' --class=debug_menuclass --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path menu_class $vtoy_iso_part
|
||||
|
||||
@@ -138,7 +139,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check injection plugin configuration' --class=debug_injection --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_INJECTION' --class=debug_injection --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path injection $vtoy_iso_part
|
||||
|
||||
@@ -147,7 +148,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check auto memdisk plugin configuration' --class=debug_automemdisk --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_AUTO_MEMDISK' --class=debug_automemdisk --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path auto_memdisk $vtoy_iso_part
|
||||
|
||||
@@ -156,7 +157,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check image list plugin configuration' --class=debug_imagelist --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_IMG_LIST' --class=debug_imagelist --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path image_list $vtoy_iso_part
|
||||
|
||||
@@ -165,7 +166,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check image blacklist plugin configuration' --class=debug_imageblacklist --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_IMG_BLIST' --class=debug_imageblacklist --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path image_blacklist $vtoy_iso_part
|
||||
|
||||
@@ -174,7 +175,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check boot conf replace plugin configuration' --class=debug_bootconf_replace --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_CONF_REPLACE' --class=debug_bootconf_replace --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path conf_replace $vtoy_iso_part
|
||||
|
||||
@@ -183,7 +184,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check dud plugin configuration' --class=debug_dud --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_DUD' --class=debug_dud --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path dud $vtoy_iso_part
|
||||
|
||||
@@ -192,7 +193,7 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check password plugin configuration' --class=debug_pwd --class=debug_json --class=F5tool {
|
||||
menuentry '@VTMENU_JSON_CHK_PASSWORD' --class=debug_pwd --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path password $vtoy_iso_part
|
||||
|
||||
@@ -201,21 +202,12 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json --cla
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Check custom boot plugin configuration' --class=debug_custom_boot --class=debug_json --class=F5tool {
|
||||
set pager=1
|
||||
vt_check_plugin_json $vt_plugin_path custom_boot $vtoy_iso_part
|
||||
|
||||
echo -e "\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
unset pager
|
||||
}
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
|
@@ -108,6 +108,11 @@ function ventoy_show_help {
|
||||
fi
|
||||
}
|
||||
|
||||
function ventoy_load_menu_lang_file {
|
||||
vt_load_file_to_mem "auto" $vtoy_efi_part/grub/menu.tar.gz vtoy_menu_lang_mem
|
||||
loopback vt_menu_tarfs mem:${vtoy_menu_lang_mem_addr}:size:${vtoy_menu_lang_mem_size}
|
||||
}
|
||||
|
||||
function get_os_type {
|
||||
set vtoy_os=Linux
|
||||
|
||||
@@ -2344,7 +2349,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.82"
|
||||
set VENTOY_VERSION="1.0.83"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
@@ -2433,6 +2438,9 @@ fi
|
||||
#Load Partition Table
|
||||
vt_load_part_table $vtoydev
|
||||
|
||||
#Load menu lang file
|
||||
ventoy_load_menu_lang_file
|
||||
|
||||
#Load Plugin
|
||||
if [ -f $vtoy_iso_part/ventoy/ventoy.json ]; then
|
||||
clear
|
||||
@@ -2442,6 +2450,7 @@ else
|
||||
vt_check_json_path_case $vtoy_iso_part
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$VTOY_MENU_TIMEOUT" ]; then
|
||||
set timeout=$VTOY_MENU_TIMEOUT
|
||||
else
|
||||
@@ -2463,10 +2472,8 @@ fi
|
||||
|
||||
if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then
|
||||
set VTOY_F3_CMD="vt_dynamic_menu 1 1"
|
||||
set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Browser F3:TreeView F4:Localboot F5:Tools F6:ExMenu"
|
||||
else
|
||||
set VTOY_F3_CMD="vt_dynamic_menu 1 0"
|
||||
set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Browser F3:ListView F4:Localboot F5:Tools F6:ExMenu"
|
||||
fi
|
||||
|
||||
terminal_output console
|
||||
@@ -2575,7 +2582,6 @@ export VTOY_HELP_CMD
|
||||
export VTOY_CHKSUM_CMD
|
||||
export VTOY_HELP_TXT_LANGUAGE
|
||||
export VTOY_CHKSUM_FILE_PATH
|
||||
export VTOY_HOTKEY_TIP
|
||||
|
||||
|
||||
#colect all image files (iso files)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
menuentry 'Hardware Information' --class=debug_hwinfo --class=F5tool {
|
||||
menuentry '@VTMENU_HWINFO' --class=debug_hwinfo --class=F5tool {
|
||||
smbios -t 4 -s 0x10 --set=cpu_brand
|
||||
|
||||
set system_vendor="-";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
submenu "Keyboard Layouts" --class=debug_krdlayout --class=F5tool {
|
||||
submenu "@VTMENU_KEYBRD_LAYOUT" --class=debug_krdlayout --class=F5tool {
|
||||
menuentry QWERTY_USA --class=debug_kbd --class=debug_krdlayout --class=F5tool {
|
||||
set_keyboard_layout QWERTY_USA
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
menuentry 'Search and boot Windows' --class=boot_windows --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_WINDOWS' --class=boot_windows --class=F4boot {
|
||||
|
||||
set partid=3
|
||||
while [ $partid -le 128 ]; do
|
||||
@@ -38,7 +38,7 @@ if [ "$grub_platform" = "pc" ]; then
|
||||
fi
|
||||
}
|
||||
|
||||
menuentry 'Search and boot Grub4dos' --class=boot_g4d --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_G4D' --class=boot_g4d --class=F4boot {
|
||||
if search -n -s -f /grldr; then
|
||||
ntldr /grldr
|
||||
else
|
||||
@@ -46,19 +46,19 @@ if [ "$grub_platform" = "pc" ]; then
|
||||
fi
|
||||
}
|
||||
|
||||
menuentry 'Boot the 1st local disk' --class=boot_disk --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_HDD1' --class=boot_disk --class=F4boot {
|
||||
set root=(hd0,1)
|
||||
chainloader +1
|
||||
boot
|
||||
}
|
||||
|
||||
menuentry 'Boot the 2nd local disk' --class=boot_disk --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_HDD2' --class=boot_disk --class=F4boot {
|
||||
set root=(hd1,1)
|
||||
chainloader +1
|
||||
boot
|
||||
}
|
||||
|
||||
menuentry 'Boot the 3rd local disk' --class=boot_disk --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_HDD3' --class=boot_disk --class=F4boot {
|
||||
set root=(hd2,1)
|
||||
chainloader +1
|
||||
boot
|
||||
@@ -66,7 +66,7 @@ if [ "$grub_platform" = "pc" ]; then
|
||||
|
||||
else
|
||||
|
||||
menuentry 'Search and boot Windows' --class=boot_windows --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_WINDOWS' --class=boot_windows --class=F4boot {
|
||||
|
||||
set partid=3
|
||||
while [ $partid -le 128 ]; do
|
||||
@@ -102,7 +102,7 @@ else
|
||||
}
|
||||
|
||||
if [ "$grub_cpu" = "i386" ]; then
|
||||
menuentry 'Search and boot BOOTIA32.EFI' --class=boot_uefi --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_IA32EFI' --class=boot_uefi --class=F4boot {
|
||||
set VTOY_SEARCH_NO_VTOYEFI=1
|
||||
if search -n -s -f /efi/boot/bootia32.efi; then
|
||||
unset VTOY_SEARCH_NO_VTOYEFI
|
||||
@@ -115,7 +115,7 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
menuentry 'Search and boot xorboot' --class=boot_xorboot --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_XORBOOT' --class=boot_xorboot --class=F4boot {
|
||||
set VTOY_SEARCH_NO_VTOYEFI=1
|
||||
if search -n -s -f /efi/xorboot/xorboot32.xor; then
|
||||
unset VTOY_SEARCH_NO_VTOYEFI
|
||||
@@ -132,7 +132,7 @@ else
|
||||
fi
|
||||
}
|
||||
elif [ "$grub_cpu" = "arm64" ]; then
|
||||
menuentry 'Search and boot BOOTAA64.EFI' --class=boot_uefi --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_AA64EFI' --class=boot_uefi --class=F4boot {
|
||||
set VTOY_SEARCH_NO_VTOYEFI=1
|
||||
if search -n -s -f /efi/boot/bootaa64.efi; then
|
||||
unset VTOY_SEARCH_NO_VTOYEFI
|
||||
@@ -145,7 +145,7 @@ else
|
||||
fi
|
||||
}
|
||||
else
|
||||
menuentry 'Search and boot BOOTX64.EFI' --class=boot_uefi --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_X64EFI' --class=boot_uefi --class=F4boot {
|
||||
set VTOY_SEARCH_NO_VTOYEFI=1
|
||||
if search -n -s -f /efi/boot/bootx64.efi; then
|
||||
unset VTOY_SEARCH_NO_VTOYEFI
|
||||
@@ -158,7 +158,7 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
menuentry 'Search and boot xorboot' --class=boot_xorboot --class=F4boot {
|
||||
menuentry '@VTMENU_LB_SBOOT_XORBOOT' --class=boot_xorboot --class=F4boot {
|
||||
set VTOY_SEARCH_NO_VTOYEFI=1
|
||||
if search -n -s -f /efi/xorboot/xorboot.xor; then
|
||||
unset VTOY_SEARCH_NO_VTOYEFI
|
||||
@@ -179,6 +179,6 @@ else
|
||||
|
||||
fi
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
|
81
INSTALL/grub/menu/en_US.json
Normal file
81
INSTALL/grub/menu/en_US.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"VTMENU_LANGUAGE_NAME": "en_US (English)",
|
||||
|
||||
"VTMENU_STR_HOTKEY_LIST": "h:Help F1:Memdisk F2:Browser F3:ListView F4:Localboot F5:Tools F6:ExMenu",
|
||||
"VTMENU_STR_HOTKEY_TREE": "h:Help F1:Memdisk F2:Browser F3:TreeView F4:Localboot F5:Tools F6:ExMenu",
|
||||
"VTMENU_RETURN_PREVIOUS": "Return to previous menu [Esc]",
|
||||
|
||||
"VTMENU_MENU_LANG": "Menu Language Select",
|
||||
|
||||
"VTMENU_LB_SBOOT_WINDOWS": "Search and boot Windows",
|
||||
"VTMENU_LB_SBOOT_G4D": "Search and boot Grub4dos",
|
||||
"VTMENU_LB_SBOOT_HDD1": "Boot the 1st local disk",
|
||||
"VTMENU_LB_SBOOT_HDD2": "Boot the 2nd local disk",
|
||||
"VTMENU_LB_SBOOT_HDD3": "Boot the 3rd local disk",
|
||||
"VTMENU_LB_SBOOT_X64EFI": "Search and boot BOOTX64.EFI",
|
||||
"VTMENU_LB_SBOOT_IA32EFI": "Search and boot BOOTIA32.EFI",
|
||||
"VTMENU_LB_SBOOT_AA64EFI": "Search and boot BOOTAA64.EFI",
|
||||
"VTMENU_LB_SBOOT_XORBOOT": "Search and boot xorboot",
|
||||
|
||||
"VTMENU_FILE_CHKSUM": "File checksum",
|
||||
"VTMENU_CHKSUM_MD5_CALC": "Calculate md5sum",
|
||||
"VTMENU_CHKSUM_SHA1_CALC": "Calculate sha1sum",
|
||||
"VTMENU_CHKSUM_SHA256_CALC": "Calculate sha256sum",
|
||||
"VTMENU_CHKSUM_SHA512_CALC": "Calculate sha512sum",
|
||||
"VTMENU_CHKSUM_MD5_CALC_CHK": "Calculate and check md5sum",
|
||||
"VTMENU_CHKSUM_SHA1_CALC_CHK": "Calculate and check sha1sum",
|
||||
"VTMENU_CHKSUM_SHA256_CALC_CHK": "Calculate and check sha256sum",
|
||||
"VTMENU_CHKSUM_SHA512_CALC_CHK": "Calculate and check sha512sum",
|
||||
|
||||
"VTMENU_POWER": "Power",
|
||||
"VTMENU_POWER_REBOOT": "Reboot",
|
||||
"VTMENU_POWER_HALT": "Halt",
|
||||
"VTMENU_POWER_BOOT_EFIFW": "Reboot to EFI setup",
|
||||
|
||||
"VTMENU_KEYBRD_LAYOUT": "Keyboard Layouts",
|
||||
"VTMENU_HWINFO": "Hardware Information",
|
||||
|
||||
"VTMENU_RESOLUTION_CFG": "Resolution Configuration",
|
||||
"VTMENU_SCREEN_MODE": "Screen Display Mode",
|
||||
"VTMENU_SCREEN_TEXT_MODE": "Force Text Mode",
|
||||
"VTMENU_SCREEN_GUI_MODE": "Force Graphics Mode",
|
||||
|
||||
"VTMENU_THEME_SELECT": "Theme Select",
|
||||
|
||||
"VTMENU_UTIL_SHOW_EFI_DRV": "Show EFI Drivers",
|
||||
"VTMENU_UTIL_FIX_BLINIT_FAIL": "Fixup Windows BlinitializeLibrary Failure",
|
||||
|
||||
"VTMENU_JSON_CHK_JSON": "Check plugin json configuration (ventoy.json)",
|
||||
"VTMENU_JSON_CHK_CONTROL": "Check global control plugin configuration",
|
||||
"VTMENU_JSON_CHK_THEME": "Check theme plugin configuration",
|
||||
"VTMENU_JSON_CHK_AUTOINS": "Check auto install plugin configuration",
|
||||
"VTMENU_JSON_CHK_PERSIST": "Check persistence plugin configuration",
|
||||
"VTMENU_JSON_CHK_MENU_ALIAS": "Check menu alias plugin configuration",
|
||||
"VTMENU_JSON_CHK_MENU_TIP": "Check menu tip plugin configuration",
|
||||
"VTMENU_JSON_CHK_MENU_CLASS": "Check menu class plugin configuration",
|
||||
"VTMENU_JSON_CHK_INJECTION": "Check injection plugin configuration",
|
||||
"VTMENU_JSON_CHK_AUTO_MEMDISK": "Check auto memdisk plugin configuration",
|
||||
"VTMENU_JSON_CHK_IMG_LIST": "Check image list plugin configuration",
|
||||
"VTMENU_JSON_CHK_IMG_BLIST": "Check image blacklist plugin configuration",
|
||||
"VTMENU_JSON_CHK_CONF_REPLACE": "Check boot conf replace plugin configuration",
|
||||
"VTMENU_JSON_CHK_DUD": "Check dud plugin configuration",
|
||||
"VTMENU_JSON_CHK_PASSWORD": "Check password plugin configuration",
|
||||
|
||||
"VTMENU_NORMAL_MODE": "Boot in normal mode",
|
||||
"VTMENU_WIMBOOT_MODE": "Boot in wimboot mode",
|
||||
"VTMENU_GRUB2_MODE": "Boot in grub2 mode",
|
||||
"VTMENU_MEMDISK_MODE": "Boot in memdisk mode",
|
||||
|
||||
"VTMENU_RET_TO_LISTVIEW": "Return to ListView",
|
||||
"VTMENU_RET_TO_TREEVIEW": "Return to TreeView",
|
||||
|
||||
"VTMENU_NO_AUTOINS_SCRIPT": "Boot without auto installation template",
|
||||
"VTMENU_AUTOINS_USE": "Boot with",
|
||||
|
||||
"VTMENU_NO_PERSIST": "Boot without persistence",
|
||||
"VTMENU_PERSIST_USE": "Boot with",
|
||||
|
||||
"VTMENU_BROWER_RETURN": "Return",
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
}
|
81
INSTALL/grub/menu/zh_CN.json
Normal file
81
INSTALL/grub/menu/zh_CN.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"VTMENU_LANGUAGE_NAME": "zh_CN (简体中文)",
|
||||
|
||||
"VTMENU_STR_HOTKEY_LIST": "h:帮助 F1:内存模式 F2:本地浏览 F3:列表模式 F4:本地启动 F5:工具 F6:扩展菜单",
|
||||
"VTMENU_STR_HOTKEY_TREE": "h:帮助 F1:内存模式 F2:本地浏览 F3:树形模式 F4:本地启动 F5:工具 F6:扩展菜单",
|
||||
"VTMENU_RETURN_PREVIOUS": "返回上一级菜单 [Esc]",
|
||||
|
||||
"VTMENU_MENU_LANG": "菜单语言",
|
||||
|
||||
"VTMENU_LB_SBOOT_WINDOWS": "搜索并启动 Windows",
|
||||
"VTMENU_LB_SBOOT_G4D": "搜索并启动 Grub4dos",
|
||||
"VTMENU_LB_SBOOT_HDD1": "启动本地硬盘1中的系统",
|
||||
"VTMENU_LB_SBOOT_HDD2": "启动本地硬盘2中的系统",
|
||||
"VTMENU_LB_SBOOT_HDD3": "启动本地硬盘3中的系统",
|
||||
"VTMENU_LB_SBOOT_X64EFI": "搜索并启动 BOOTX64.EFI",
|
||||
"VTMENU_LB_SBOOT_IA32EFI": "搜索并启动 BOOTIA32.EFI",
|
||||
"VTMENU_LB_SBOOT_AA64EFI": "搜索并启动 BOOTAA64.EFI",
|
||||
"VTMENU_LB_SBOOT_XORBOOT": "搜索并启动 xorboot",
|
||||
|
||||
"VTMENU_FILE_CHKSUM": "文件校验",
|
||||
"VTMENU_CHKSUM_MD5_CALC": "计算 MD5 校验值",
|
||||
"VTMENU_CHKSUM_SHA1_CALC": "计算 SHA1 校验值",
|
||||
"VTMENU_CHKSUM_SHA256_CALC": "计算 SHA256 校验值",
|
||||
"VTMENU_CHKSUM_SHA512_CALC": "计算 SHA512 校验值",
|
||||
"VTMENU_CHKSUM_MD5_CALC_CHK": "计算并检查 MD5 校验值",
|
||||
"VTMENU_CHKSUM_SHA1_CALC_CHK": "计算并检查 SHA1 校验值",
|
||||
"VTMENU_CHKSUM_SHA256_CALC_CHK": "计算并检查 SHA256 校验值",
|
||||
"VTMENU_CHKSUM_SHA512_CALC_CHK": "计算并检查 SHA512 校验值",
|
||||
|
||||
"VTMENU_POWER": "电源",
|
||||
"VTMENU_POWER_REBOOT": "重启",
|
||||
"VTMENU_POWER_HALT": "关机",
|
||||
"VTMENU_POWER_BOOT_EFIFW": "重启进入 UEFI 设置菜单",
|
||||
|
||||
"VTMENU_KEYBRD_LAYOUT": "键盘布局",
|
||||
"VTMENU_HWINFO": "硬件信息",
|
||||
|
||||
"VTMENU_RESOLUTION_CFG": "屏幕分辨率",
|
||||
"VTMENU_SCREEN_MODE": "显示模式",
|
||||
"VTMENU_SCREEN_TEXT_MODE": "文本模式",
|
||||
"VTMENU_SCREEN_GUI_MODE": "图形模式",
|
||||
|
||||
"VTMENU_THEME_SELECT": "主题选择",
|
||||
|
||||
"VTMENU_UTIL_SHOW_EFI_DRV": "显示 UEFI 驱动",
|
||||
"VTMENU_UTIL_FIX_BLINIT_FAIL": "修复 Windows BlinitializeLibrary 错误",
|
||||
|
||||
"VTMENU_JSON_CHK_JSON": "检查插件配置文件 (ventoy.json)",
|
||||
"VTMENU_JSON_CHK_CONTROL": "配置检查 —— 全局控制插件",
|
||||
"VTMENU_JSON_CHK_THEME": "配置检查 —— 主题插件",
|
||||
"VTMENU_JSON_CHK_AUTOINS": "配置检查 —— 自动安装插件",
|
||||
"VTMENU_JSON_CHK_PERSIST": "配置检查 —— 持久化插件",
|
||||
"VTMENU_JSON_CHK_MENU_ALIAS": "配置检查 —— 菜单别名插件",
|
||||
"VTMENU_JSON_CHK_MENU_TIP": "配置检查 —— 菜单提示插件",
|
||||
"VTMENU_JSON_CHK_MENU_CLASS": "配置检查 —— 菜单类型插件",
|
||||
"VTMENU_JSON_CHK_INJECTION": "配置检查 —— 文件注入插件",
|
||||
"VTMENU_JSON_CHK_AUTO_MEMDISK": "配置检查 —— 自动内存盘模式插件",
|
||||
"VTMENU_JSON_CHK_IMG_LIST": "配置检查 —— 文件列表插件(白名单)",
|
||||
"VTMENU_JSON_CHK_IMG_BLIST": "配置检查 —— 文件列表插件(黑名单)",
|
||||
"VTMENU_JSON_CHK_CONF_REPLACE": "配置检查 —— 启动配置替换插件",
|
||||
"VTMENU_JSON_CHK_DUD": "配置检查 —— Driver Update Disk插件",
|
||||
"VTMENU_JSON_CHK_PASSWORD": "配置检查 —— 密码插件",
|
||||
|
||||
"VTMENU_NORMAL_MODE": "以正常模式启动",
|
||||
"VTMENU_WIMBOOT_MODE": "以 wimboot 模式启动",
|
||||
"VTMENU_GRUB2_MODE": "以 grub2 模式启动",
|
||||
"VTMENU_MEMDISK_MODE": "以内存盘模式启动",
|
||||
|
||||
"VTMENU_RET_TO_LISTVIEW": "返回到列表模式",
|
||||
"VTMENU_RET_TO_TREEVIEW": "返回到树形模式",
|
||||
|
||||
"VTMENU_NO_AUTOINS_SCRIPT": "不使用自动安装脚本",
|
||||
"VTMENU_AUTOINS_USE": "使用",
|
||||
|
||||
"VTMENU_NO_PERSIST": "不使用持久化数据文件",
|
||||
"VTMENU_PERSIST_USE": "使用",
|
||||
|
||||
"VTMENU_BROWER_RETURN": "返回",
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
}
|
3
INSTALL/grub/menulang.cfg
Normal file
3
INSTALL/grub/menulang.cfg
Normal file
@@ -0,0 +1,3 @@
|
||||
submenu "@VTMENU_MENU_LANG" --class=debug_menu_lang --class=F5tool {
|
||||
#ventoy_pack.sh will generate menuentry here
|
||||
|
@@ -1,25 +1,25 @@
|
||||
submenu "Power" --class=debug_power --class=F5tool {
|
||||
menuentry Reboot --class=debug_reboot --class=debug_power --class=F5tool {
|
||||
submenu "@VTMENU_POWER" --class=debug_power --class=F5tool {
|
||||
menuentry "@VTMENU_POWER_REBOOT" --class=debug_reboot --class=debug_power --class=F5tool {
|
||||
echo -e '\n\nSystem is rebooting ... \n'
|
||||
sleep 1
|
||||
reboot
|
||||
}
|
||||
|
||||
menuentry Halt --class=debug_halt --class=debug_power --class=F5tool {
|
||||
menuentry "@VTMENU_POWER_HALT" --class=debug_halt --class=debug_power --class=F5tool {
|
||||
echo -e '\n\nSystem is halting ... \n'
|
||||
sleep 1
|
||||
halt
|
||||
}
|
||||
|
||||
if [ "$grub_platform" != "pc" ]; then
|
||||
menuentry 'Reboot to EFI setup' --class=debug_efisetup --class=debug_power --class=F5tool {
|
||||
menuentry '@VTMENU_POWER_BOOT_EFIFW' --class=debug_efisetup --class=debug_power --class=F5tool {
|
||||
echo -e '\n\nRebooting to enter UEFI firmware setup ... \n'
|
||||
sleep 1
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
||||
}
|
||||
|
@@ -88,6 +88,26 @@ tar czf help.tar.gz ./help/
|
||||
rm -rf ./help
|
||||
cd ../../
|
||||
|
||||
#tar menu txt & update menulang.cfg
|
||||
cd $tmpmnt/grub/
|
||||
|
||||
for vtlang in $(ls menu/); do
|
||||
vtlangname=${vtlang%.*}
|
||||
vtlangtitle=$(grep VTMENU_LANGUAGE_NAME menu/$vtlang | awk -F\" '{print $4}')
|
||||
echo "menuentry \"$vtlangtitle\" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {" >> menulang.cfg
|
||||
echo " vt_load_menu_lang $vtlangname" >> menulang.cfg
|
||||
echo "}" >> menulang.cfg
|
||||
done
|
||||
echo "menuentry '@VTMENU_RETURN_PREVIOUS' --class=vtoyret VTOY_RET {" >> menulang.cfg
|
||||
echo " echo 'Return ...'" >> menulang.cfg
|
||||
echo "}" >> menulang.cfg
|
||||
echo "}" >> menulang.cfg
|
||||
|
||||
tar czf menu.tar.gz ./menu/
|
||||
rm -rf ./menu
|
||||
cd ../../
|
||||
|
||||
|
||||
|
||||
cp $OPT ./ventoy $tmpmnt/
|
||||
cp $OPT ./EFI $tmpmnt/
|
||||
|
Reference in New Issue
Block a user