fi
}
+function ventoy_language {
+ configfile $prefix/menulang.cfg
+}
+
function ventoy_diagnosis {
vt_enum_video_mode
configfile $prefix/debug.cfg
fi
loopback vt_help_tarfs mem:${vtoy_help_txt_mem_addr}:size:${vtoy_help_txt_mem_size}
- if [ -f "(vt_help_tarfs)/help/${VTOY_HELP_TXT_LANGUAGE}.txt" ]; then
- cat "(vt_help_tarfs)/help/${VTOY_HELP_TXT_LANGUAGE}.txt"
+ vt_cur_menu_lang vtCurLang
+ if [ -f "(vt_help_tarfs)/help/${vtCurLang}.txt" ]; then
+ cat "(vt_help_tarfs)/help/${vtCurLang}.txt"
else
cat "(vt_help_tarfs)/help/en_US.txt"
fi
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
loopback -d easysfs
}
+function ventoy_img_easyos2 {
+ vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
+ vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
+
+ if [ -e (vtimghd,2)/easyos/easy.sfs ]; then
+ loopback easysfs (vtimghd,2)/easyos/easy.sfs
+ elif [ -d (vtimghd,2)/easyos/releases ]; then
+ vt_fs_enum_1st_dir (vtimghd,2) /easyos/releases/ vt_dir_name
+ loopback easysfs (vtimghd,2)/easyos/releases/$vt_dir_name/easy.sfs
+ fi
+
+ vt_get_lib_module_ver (easysfs) /lib/modules/ vt_module_ver
+
+ if [ -n "$vt_module_ver" ]; then
+ for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do
+ if [ -e (easysfs)/lib/modules/$vt_module_ver/$mod ]; then
+ vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
+ fi
+ done
+ fi
+
+ ventoy_debug_pause
+
+ #boot image file
+ vt_set_boot_opt rdinit=/vtoy/vtoy
+ vt_img_hook_root
+
+ vt_limine_menu (vtimghd,1)/limine.cfg vt_sys_menu_mem
+ configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
+
+ vt_img_unhook_root
+ vt_unset_boot_opt
+ loopback -d easysfs
+}
+
function ventoy_img_volumio {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_img_esysrescue
elif [ -e (vtimghd,1)/easy.sfs ]; then
ventoy_img_easyos
+ elif [ -d (vtimghd,2)/easyos ]; then
+ ventoy_img_easyos2
elif [ -e (vtimghd,1)/volumio.initrd ]; then
ventoy_img_volumio
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then
#############################################################
#############################################################
-set VENTOY_VERSION="1.0.80"
+set VENTOY_VERSION="1.0.84"
#ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1
set VTOY_CHKSUM_CMD="ventoy_checksum"
set VTOY_HELP_TXT_LANGUAGE="en_US"
set VTOY_CHKSUM_FILE_PATH="X"
+set VTOY_LANG_CMD="ventoy_language"
if [ "$grub_platform" = "pc" ]; then
#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
vt_check_json_path_case $vtoy_iso_part
fi
+if [ -n "$VTOY_MENU_LANGUAGE" ]; then
+ vt_init_menu_lang "$VTOY_MENU_LANGUAGE"
+else
+ vt_init_menu_lang en_US
+fi
+
if [ -n "$VTOY_MENU_TIMEOUT" ]; then
set timeout=$VTOY_MENU_TIMEOUT
else
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
export VTOY_CHKSUM_CMD
export VTOY_HELP_TXT_LANGUAGE
export VTOY_CHKSUM_FILE_PATH
+export VTOY_LANG_CMD
#colect all image files (iso files)