Commit 7d150790 authored by longpanda's avatar longpanda
Browse files

1.0.16 release

parent 0f8478fb
...@@ -70,7 +70,7 @@ CONST CHAR16 *gEfiBootFileName[] = ...@@ -70,7 +70,7 @@ CONST CHAR16 *gEfiBootFileName[] =
L"\\EFI\\BOOT\\GRUBX64.EFI", L"\\EFI\\BOOT\\GRUBX64.EFI",
L"\\EFI\\BOOT\\BOOTx64.EFI", L"\\EFI\\BOOT\\BOOTx64.EFI",
L"\\EFI\\BOOT\\bootx64.efi", L"\\EFI\\BOOT\\bootx64.efi",
L"\\efi\\boot\\bootx64.efi" L"\\efi\\boot\\bootx64.efi",
}; };
VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...) VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...)
......
...@@ -2017,6 +2017,17 @@ static grub_err_t ventoy_cmd_dump_img_list(grub_extcmd_context_t ctxt, int argc, ...@@ -2017,6 +2017,17 @@ static grub_err_t ventoy_cmd_dump_img_list(grub_extcmd_context_t ctxt, int argc,
return 0; return 0;
} }
static grub_err_t ventoy_cmd_dump_injection(grub_extcmd_context_t ctxt, int argc, char **args)
{
(void)ctxt;
(void)argc;
(void)args;
ventoy_plugin_dump_injection();
return 0;
}
static grub_err_t ventoy_cmd_dump_auto_install(grub_extcmd_context_t ctxt, int argc, char **args) static grub_err_t ventoy_cmd_dump_auto_install(grub_extcmd_context_t ctxt, int argc, char **args)
{ {
(void)ctxt; (void)ctxt;
...@@ -2361,6 +2372,7 @@ static cmd_para ventoy_cmds[] = ...@@ -2361,6 +2372,7 @@ static cmd_para ventoy_cmds[] =
{ "vt_dynamic_menu", ventoy_cmd_dynamic_menu, 0, NULL, "", "", NULL }, { "vt_dynamic_menu", ventoy_cmd_dynamic_menu, 0, NULL, "", "", NULL },
{ "vt_check_mode", ventoy_cmd_check_mode, 0, NULL, "", "", NULL }, { "vt_check_mode", ventoy_cmd_check_mode, 0, NULL, "", "", NULL },
{ "vt_dump_img_list", ventoy_cmd_dump_img_list, 0, NULL, "", "", NULL }, { "vt_dump_img_list", ventoy_cmd_dump_img_list, 0, NULL, "", "", NULL },
{ "vt_dump_injection", ventoy_cmd_dump_injection, 0, NULL, "", "", NULL },
{ "vt_dump_auto_install", ventoy_cmd_dump_auto_install, 0, NULL, "", "", NULL }, { "vt_dump_auto_install", ventoy_cmd_dump_auto_install, 0, NULL, "", "", NULL },
{ "vt_dump_persistence", ventoy_cmd_dump_persistence, 0, NULL, "", "", NULL }, { "vt_dump_persistence", ventoy_cmd_dump_persistence, 0, NULL, "", "", NULL },
{ "vt_select_auto_install", ventoy_cmd_sel_auto_install, 0, NULL, "", "", NULL }, { "vt_select_auto_install", ventoy_cmd_sel_auto_install, 0, NULL, "", "", NULL },
......
...@@ -672,6 +672,7 @@ void ventoy_swap_img(img_info *img1, img_info *img2); ...@@ -672,6 +672,7 @@ void ventoy_swap_img(img_info *img1, img_info *img2);
char * ventoy_plugin_get_cur_install_template(const char *isopath); char * ventoy_plugin_get_cur_install_template(const char *isopath);
install_template * ventoy_plugin_find_install_template(const char *isopath); install_template * ventoy_plugin_find_install_template(const char *isopath);
persistence_config * ventoy_plugin_find_persistent(const char *isopath); persistence_config * ventoy_plugin_find_persistent(const char *isopath);
void ventoy_plugin_dump_injection(void);
void ventoy_plugin_dump_auto_install(void); void ventoy_plugin_dump_auto_install(void);
int ventoy_fill_windows_rtdata(void *buf, char *isopath); int ventoy_fill_windows_rtdata(void *buf, char *isopath);
int ventoy_plugin_get_persistent_chunklist(const char *isopath, int index, ventoy_img_chunk_list *chunk_list); int ventoy_plugin_get_persistent_chunklist(const char *isopath, int index, ventoy_img_chunk_list *chunk_list);
......
...@@ -1087,6 +1087,20 @@ grub_err_t ventoy_cmd_load_plugin(grub_extcmd_context_t ctxt, int argc, char **a ...@@ -1087,6 +1087,20 @@ grub_err_t ventoy_cmd_load_plugin(grub_extcmd_context_t ctxt, int argc, char **a
VENTOY_CMD_RETURN(GRUB_ERR_NONE); VENTOY_CMD_RETURN(GRUB_ERR_NONE);
} }
void ventoy_plugin_dump_injection(void)
{
injection_config *node = NULL;
for (node = g_injection_head; node; node = node->next)
{
grub_printf("\nIMAGE:<%s>\n", node->isopath);
grub_printf("ARCHIVE:<%s>\n", node->archive);
}
return;
}
void ventoy_plugin_dump_auto_install(void) void ventoy_plugin_dump_auto_install(void)
{ {
int i; int i;
......
...@@ -726,8 +726,15 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath) ...@@ -726,8 +726,15 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
script = (char *)ventoy_plugin_get_injection(pos); script = (char *)ventoy_plugin_get_injection(pos);
if (script) if (script)
{ {
debug("injection archive <%s>\n", script); if (ventoy_check_file_exist("%s%s", ventoy_get_env("vtoy_iso_part"), script))
grub_snprintf(data->injection_archive, sizeof(data->injection_archive) - 1, "%s", script); {
debug("injection archive <%s> OK\n", script);
grub_snprintf(data->injection_archive, sizeof(data->injection_archive) - 1, "%s", script);
}
else
{
debug("injection archive <%s> NOT exist\n", script);
}
} }
else else
{ {
......
...@@ -186,21 +186,31 @@ fi ...@@ -186,21 +186,31 @@ fi
# Step 3 : Extract injection archive # # Step 3 : Extract injection archive #
# # # #
#################################################################### ####################################################################
if [ -e $VTOY_PATH/ventoy_injection ]; then ventoy_unpack_injection() {
echo "decompress injection ..." >>$VTLOG
vtmagic=$(hexdump -n 2 -e '2/1 "%02X"' $VTOY_PATH/ventoy_injection) vtmagic=$(hexdump -n 2 -e '2/1 "%02X"' $VTOY_PATH/ventoy_injection)
echo "vtmagic=$vtmagic ..." >>$VTLOG echo "ventoy_unpack_injection vtmagic=$vtmagic ..."
if [ "1F8B" = "vtmagic" ] || [ "1F9E" = "vtmagic" ]; then if [ "1F8B" = "$vtmagic" ] || [ "1F9E" = "$vtmagic" ]; then
zcat $VTOY_PATH/ventoy_injection | tar -xf -C / echo "tar.gz tar -xzvf"
elif [ "425A" = "vtmagic" ]; then tar -xzvf $VTOY_PATH/ventoy_injection -C /
bzcat $VTOY_PATH/ventoy_injection | tar -xf -C / elif [ "425A" = "$vtmagic" ]; then
elif [ "FD37" = "vtmagic" ]; then echo "tar.bz2 tar -xjvf"
xzcat $VTOY_PATH/ventoy_injection | tar -xf -C / tar -xjvf $VTOY_PATH/ventoy_injection -C /
elif [ "FD37" = "$vtmagic" ]; then
echo "tar.xz tar -xJvf"
tar -xJvf $VTOY_PATH/ventoy_injection -C /
elif [ "5D00" = "$vtmagic" ]; then
echo "tar.lzma tar -xavf"
tar -xavf $VTOY_PATH/ventoy_injection -C /
else else
unzip -o -q $VTOY_PATH/ventoy_injection -d / echo "unzip -o"
unzip -o $VTOY_PATH/ventoy_injection -d /
fi fi
}
if [ -e $VTOY_PATH/ventoy_injection ]; then
echo "### decompress injection ... ###" >>$VTLOG
ventoy_unpack_injection > $VTOY_PATH/injection.log 2>&1
fi fi
......
...@@ -54,7 +54,16 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json { ...@@ -54,7 +54,16 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json {
echo -e "\npress ENTER to exit ..." echo -e "\npress ENTER to exit ..."
read vtInputKey read vtInputKey
unset pager unset pager
} }
menuentry 'Check injection plugin configuration' --class=debug_injection {
set pager=1
vt_check_plugin_json $vt_plugin_path injection $vtoy_iso_part
echo -e "\npress ENTER to exit ..."
read vtInputKey
unset pager
}
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET { menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
echo 'Return ...' echo 'Return ...'
......
...@@ -68,15 +68,15 @@ function ventoy_localboot { ...@@ -68,15 +68,15 @@ function ventoy_localboot {
} }
function ventoy_ext_menu { function ventoy_ext_menu {
#if [ -e $vt_plugin_path/ventoy/ventoy_grub.cfg ]; then if [ -e $vt_plugin_path/ventoy/ventoy_grub.cfg ]; then
set ventoy_new_context=1 set ventoy_new_context=1
configfile $vt_plugin_path/ventoy/ventoy_grub.cfg configfile $vt_plugin_path/ventoy/ventoy_grub.cfg
unset ventoy_new_context unset ventoy_new_context
#else else
# echo "ventoy_grub.cfg NOT exist." echo "ventoy_grub.cfg NOT exist."
# echo -e "\npress ENTER to exit ..." echo -e "\npress ENTER to exit ..."
# read vtInputKey read vtInputKey
#fi fi
} }
function get_os_type { function get_os_type {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment