]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Support programs loading for DLC Boot PE. (#1647)
authorlongpanda <admin@ventoy.net>
Tue, 31 May 2022 06:11:24 +0000 (14:11 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 31 May 2022 06:11:24 +0000 (14:11 +0800)
INSTALL/grub/grub.cfg

index 1c9ac28b965b90f3dcf433d889e21491b92a4d79..3f6af71467ed83aeb9e8201fece142c9844a217c 100644 (file)
@@ -111,12 +111,18 @@ function ventoy_show_help {
 function get_os_type {
     set vtoy_os=Linux
     
-    for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do        
-        if vt_file_exist_nocase (loop)/$file; then        
-            set vtoy_os=Windows            
-            break
+    if vt_str_begin "$vt_volume_id" "DLC Boot"; then
+        if [ -f (loop)/DLCBoot.exe ]; then
+            set vtoy_os=Windows
         fi
-    done
+    else
+        for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do        
+            if vt_file_exist_nocase (loop)/$file; then        
+                set vtoy_os=Windows            
+                break
+            fi
+        done
+    fi
 
     if [ "$vtoy_os" = "Linux" ]; then
         if vt_strstr "$vt_system_id" "FreeBSD"; then
@@ -206,6 +212,15 @@ function distro_specify_wim_patch_phase2 {
     if [ -f (loop)/boot/boot.wim ]; then
         vt_windows_collect_wim_patch wim /boot/boot.wim
     fi
+
+    if vt_str_begin "$vt_volume_id" "DLC Boot"; then
+        for vwfile in "/DLC1/WinPE/W11x64.wim" "/DLC1/WinPE/W10x64.wim" "/DLC1/WinPE/W10x86.wim"; do
+            if [ -f (loop)/$vwfile ]; then
+                vt_windows_collect_wim_patch wim $vwfile
+            fi
+        done
+    fi
+    
 }