@@ -80,7 +80,7 @@ function isoboot (iso_path, iso_label, iso_uuid, dev_uuid)
80
80
name = grub .gettext (" Boot ISO (Loopback)" )
81
81
grub .add_icon_menu (icon , command , name )
82
82
end
83
-
83
+
84
84
function enum_loop (loop_path )
85
85
-- enum_loop path_without_(loop)
86
86
-- return table
@@ -99,7 +99,7 @@ function isoboot (iso_path, iso_label, iso_uuid, dev_uuid)
99
99
grub .enum_file (enum_loop_func , " (loop)" .. loop_path )
100
100
return f_table
101
101
end
102
-
102
+
103
103
function check_distro ()
104
104
-- return icon, script, name, linux_extra
105
105
-- default
@@ -262,7 +262,11 @@ function isoboot (iso_path, iso_label, iso_uuid, dev_uuid)
262
262
if grub .file_exist (" (loop)/platform/i86pc/kernel/amd64/unix" ) then
263
263
return " solaris" , " smartos" , " SmartOS" , " "
264
264
end
265
-
265
+ -- check /sources/install.wim /x64/sources/install.esd
266
+ if grub .file_exist (" (loop)/sources/install.wim" ) or grub .file_exist (" (loop)/x86/sources/install.esd" ) or grub .file_exist (" (loop)/x64/sources/install.esd" ) then
267
+ linux_extra = string.gsub (iso_path , " /" , " \\\\ " )
268
+ return " nt6" , " windows" , " Windows" , linux_extra
269
+ end
266
270
return " iso" , " unknown" , " Linux" , " "
267
271
end
268
272
icon , distro , name , linux_extra = check_distro ()
@@ -321,23 +325,6 @@ function open (file, file_type, device, device_type, arch, platform)
321
325
isoboot (iso_path , iso_label , iso_uuid , dev_uuid )
322
326
end
323
327
if platform == " pc" then
324
- if device_type == " 1" and grub .file_exist (" (loop)/sources/install.wim" ) and grub .file_exist (" /install.gz" ) then
325
- -- windows install iso
326
- icon = " nt6"
327
- towinpath (file )
328
- command = " set lang=en_US; terminal_output console; "
329
- .. " enable_progress_indicator=1; loopback wimboot /wimboot; loopback install /install.gz; "
330
- .. " set installiso=" .. win_path .. " ; save_env -f (memdisk)/null.cfg installiso; "
331
- .. " linux16 (wimboot)/wimboot; initrd16 newc:bootmgr:(loop)/bootmgr "
332
- .. " newc:bcd:(loop)/boot/bcd newc:boot.sdi:(loop)/boot/boot.sdi "
333
- .. " newc:null.cfg:(memdisk)/null.cfg "
334
- .. " newc:mount_x64.exe:(install)/mount_x64.exe newc:mount_x86.exe:(install)/mount_x86.exe "
335
- .. " newc:start.bat:(install)/start.bat newc:winpeshl.ini:(install)/winpeshl.ini "
336
- .. " newc:boot.wim:(loop)/sources/boot.wim; "
337
- .. " cat (memdisk)/null.cfg "
338
- name = grub .gettext (" Install Windows from ISO" )
339
- grub .add_icon_menu (icon , command , name )
340
- end
341
328
-- memdisk iso
342
329
icon = " iso"
343
330
command = " linux16 $prefix/memdisk iso raw; enable_progress_indicator=1; initrd16 " .. file
@@ -370,26 +357,6 @@ function open (file, file_type, device, device_type, arch, platform)
370
357
grub .add_icon_menu (icon , command , name )
371
358
end
372
359
elseif platform == " efi" then
373
- if device_type == " 1" and grub .file_exist (" (loop)/sources/install.wim" ) then
374
- -- windows install iso
375
- icon = " nt6"
376
- towinpath (file )
377
- command = " set lang=en_US; loopback wimboot ${prefix}/wimboot.gz; "
378
- .. " loopback install ${prefix}/install.gz; "
379
- .. " set installiso=" .. win_path .. " ; save_env -f ${prefix}/null.cfg installiso; "
380
- .. " cat ${prefix}/null.cfg; "
381
- .. " wimboot @:bootmgfw.efi:(wimboot)/bootmgfw.efi "
382
- .. " @:bcd:(wimboot)/bcd "
383
- .. " @:boot.sdi:(wimboot)/boot.sdi "
384
- .. " @:null.cfg:${prefix}/null.cfg "
385
- .. " @:mount_x64.exe:(install)/mount_x64.exe "
386
- .. " @:mount_x86.exe:(install)/mount_x86.exe "
387
- .. " @:start.bat:(install)/start.bat "
388
- .. " @:winpeshl.ini:(install)/winpeshl.ini "
389
- .. " @:boot.wim:(loop)/sources/boot.wim; "
390
- name = grub .gettext (" Install Windows from ISO" )
391
- grub .add_icon_menu (icon , command , name )
392
- end
393
360
if arch == " x86_64" then
394
361
-- map iso
395
362
icon = " iso"
0 commit comments