]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.54 release v1.0.54
authorlongpanda <admin@ventoy.net>
Tue, 12 Oct 2021 11:20:02 +0000 (19:20 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 12 Oct 2021 11:20:02 +0000 (19:20 +0800)
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_windows.c
INSTALL/grub/grub.cfg
LANGUAGES/languages.json
LiveCDGUI/VTOY/autostart

index 470b0f88e35732a5b059807d7fe703f31f216f6b..d7171bc0831d5167a5ebd5b49bb80a816c779d7b 100644 (file)
@@ -1102,5 +1102,7 @@ int ventoy_chain_file_read(const char *path, int offset, int len, void *buf);
     grub_env_export(env);\
 }
 
+#define ret_goto_end(a) ret = a; goto end;
+
 #endif /* __VENTOY_DEF_H__ */
 
index 654eaebde784bc408c8b1e62abdec057a7996bb0..a35680aafaf740424610e39945b8e058ade515f2 100644 (file)
@@ -687,6 +687,7 @@ static int parse_registry_setup_cmdline
 )
 {
     char c;
+    int ret = 0;
     grub_uint32_t i = 0;    
     grub_uint32_t reglen = 0;
     wim_hash zerohash;
@@ -726,7 +727,7 @@ static int parse_registry_setup_cmdline
 
     if (grub_strncmp(decompress_data + 0x1000, "hbin", 4))
     {
-        return 5;
+        ret_goto_end(5);
     }
 
     for (i = 0x1000; i + sizeof(reg_vk) < reglen; i += 8)
@@ -746,18 +747,18 @@ static int parse_registry_setup_cmdline
 
     if (i + sizeof(reg_vk) >= reglen || regvk == NULL)
     {
-        return 6;
+        ret_goto_end(6);
     }
 
     if (regvk->datasize == 0 || (regvk->datasize & 0x80000000) > 0 ||
         regvk->dataoffset == 0 || regvk->dataoffset == 0xFFFFFFFF)
     {
-        return 7;
+        ret_goto_end(7);
     }
 
     if (regvk->datasize / 2 >= buflen)
     {
-        return 8;
+        ret_goto_end(8);
     }
 
     debug("start offset is 0x%x(%u)\n", 0x1000 + regvk->dataoffset + 4, 0x1000 + regvk->dataoffset + 4);
@@ -768,8 +769,11 @@ static int parse_registry_setup_cmdline
         *buf++ = c;
     }
 
-    grub_free(decompress_data);
-    return 0;
+    ret = 0;
+
+end:
+    grub_check_free(decompress_data);
+    return ret;
 }
 
 static wim_directory_entry * search_replace_wim_dirent
@@ -784,44 +788,49 @@ static wim_directory_entry * search_replace_wim_dirent
     int ret;
     char cmdline[256] = {0};
     wim_directory_entry *wim_dirent = NULL;
+    wim_directory_entry *pecmd_dirent = NULL;
     const char *peset_path[] = { "Windows", "System32", "peset.exe", NULL };
     const char *pecmd_path[] = { "Windows", "System32", "pecmd.exe", NULL };
     const char *winpeshl_path[] = { "Windows", "System32", "winpeshl.exe", NULL };
 
-    ret = parse_registry_setup_cmdline(file, head, lookup, meta_data, dir, cmdline, sizeof(cmdline));
-    if (0 == ret)
+    pecmd_dirent = search_full_wim_dirent(meta_data, dir, pecmd_path);
+    debug("search pecmd.exe %p\n", pecmd_dirent);
+
+    if (pecmd_dirent)
     {
-        debug("registry setup cmdline:<%s>\n", cmdline);
-        ventoy_str_toupper(cmdline);
-        
-        if (grub_strncmp(cmdline, "PECMD", 5) == 0)
+        ret = parse_registry_setup_cmdline(file, head, lookup, meta_data, dir, cmdline, sizeof(cmdline));
+        if (0 == ret)
         {
-            wim_dirent = search_full_wim_dirent(meta_data, dir, pecmd_path);
-            debug("search pecmd.exe %p\n", wim_dirent);
-        }
-        else if (grub_strncmp(cmdline, "PESET", 5) == 0)
-        {
-            wim_dirent = search_full_wim_dirent(meta_data, dir, peset_path);
-            debug("search peset.exe %p\n", wim_dirent);
-        }
-        else if (grub_strncmp(cmdline, "WINPESHL", 8) == 0)
-        {
-            wim_dirent = search_full_wim_dirent(meta_data, dir, winpeshl_path);
-            debug("search winpeshl.exe %p\n", wim_dirent);
-        }
+            debug("registry setup cmdline:<%s>\n", cmdline);
+            ventoy_str_toupper(cmdline);
+            
+            if (grub_strncmp(cmdline, "PECMD", 5) == 0)
+            {
+                wim_dirent = pecmd_dirent;
+            }
+            else if (grub_strncmp(cmdline, "PESET", 5) == 0)
+            {
+                wim_dirent = search_full_wim_dirent(meta_data, dir, peset_path);
+                debug("search peset.exe %p\n", wim_dirent);
+            }
+            else if (grub_strncmp(cmdline, "WINPESHL", 8) == 0)
+            {
+                wim_dirent = search_full_wim_dirent(meta_data, dir, winpeshl_path);
+                debug("search winpeshl.exe %p\n", wim_dirent);
+            }
 
-        if (wim_dirent)
+            if (wim_dirent)
+            {
+                return wim_dirent;
+            }
+        }
+        else
         {
-            return wim_dirent;
+            debug("registry setup cmdline failed : %d\n", ret);
         }
     }
-    else
-    {
-        debug("registry setup cmdline failed : %d\n", ret);
-    }
 
-    wim_dirent = search_full_wim_dirent(meta_data, dir, pecmd_path);
-    debug("search pecmd.exe %p\n", wim_dirent);
+    wim_dirent = pecmd_dirent;
     if (wim_dirent)
     {
         return wim_dirent;
index cb538c9a371d57acff7ed4eae4065b7a531e0788..f180475e6732d183c849695d024b02f2c5b08190 100644 (file)
@@ -1963,7 +1963,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.53"
+set VENTOY_VERSION="1.0.54"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
index eb0f452273d9900c7f6db27585aabd7e09712b06..d7c2cd89ce4a91764ed2e320e824986cfd07b42a 100644 (file)
         "STR_INSTALL_TIP":"磁盘会被格式化, 所有数据都会丢失!#@是否继续?",
         "STR_INSTALL_TIP2":"磁盘会被格式化, 所有数据都会丢失!#@再次确认是否继续?",
         "STR_INSTALL_SUCCESS":"恭喜你! Ventoy 已经成功安装到此设备中.",
-        "STR_INSTALL_FAILED":"安装 Ventoy 过程中发生错误. 你可以重新拔插一下U盘然后重试一次, 详细信息请查阅 log.txt 文件.",
+        "STR_INSTALL_FAILED":"安装 Ventoy 过程中发生错误. 你可以重新拔插一下U盘然后重试一次, 详细信息请查阅 log.txt 文件. 如果一直出错,请参考官网常见问题说明.",
         "STR_UPDATE_SUCCESS":"恭喜你! 新版本的 Ventoy 已经成功更新到此设备中.",
-        "STR_UPDATE_FAILED":"更新 Ventoy 过程中遇到错误. 你可以重新拔插一下U盘然后重试一次, 详细信息请查阅 log.txt 文件.",
+        "STR_UPDATE_FAILED":"更新 Ventoy 过程中遇到错误. 你可以重新拔插一下U盘然后重试一次, 详细信息请查阅 log.txt 文件. 如果一直出错,请参考官网常见问题说明.",
         "STR_WAIT_PROCESS":"当前有任务正在运行, 请等待...",
         "STR_MENU_OPTION":"配置选项",
         "STR_MENU_SECURE_BOOT":"安全启动支持",
         "STR_INSTALL_TIP":"The device will be formatted and all the data will be lost.#@Continue?",
         "STR_INSTALL_TIP2":"The device will be formatted and all the data will be lost.#@Continue? (Double Check)",
         "STR_INSTALL_SUCCESS":"Congratulations!#@Ventoy has been successfully installed to the device.",
-        "STR_INSTALL_FAILED":"An error occurred during the installation. You can replug the USB device and try again. Check log.txt for detail.",
+        "STR_INSTALL_FAILED":"An error occurred during the installation. You can replug the USB device and try again. Check log.txt for detail. If it always fail, please refer the FAQ in the official website.",
         "STR_UPDATE_SUCCESS":"Congratulations!#@Ventoy has been successfully updated to the device.",
-        "STR_UPDATE_FAILED":"An error occurred during the update. You can replug the USB device and try again. Check log.txt for detail.",
+        "STR_UPDATE_FAILED":"An error occurred during the update. You can replug the USB device and try again. Check log.txt for detail. If it always fail, please refer the FAQ in the official website.",
         "STR_WAIT_PROCESS":"A thread is running, please wait...",
         "STR_MENU_OPTION":"Option",
         "STR_MENU_SECURE_BOOT":"Secure Boot Support",
index 6c6c202cda5317b10f0130636a26bc74e75feb06..f52bc8c47b543f60ee9f44d0e5f7a3f9bfadd636 100644 (file)
@@ -26,4 +26,4 @@ tar xf /usr/local/sbin/ntfs-3g.tar.gz -C /
 
 /ventoy/tool/x86_64/Ventoy2Disk.gtk3 --kiosk
 
-reboot
+reboot -f