@@ -7,7 +7,7 @@ import { checkIsReady, getHotPEDriveLetter } from "./check"
77import { ReactNode } from "react"
88import { getUsableLetter } from "../../utils/disk/diskInfo"
99import { migrateHPM } from "../hpm/hpm"
10- const fs = window . require ( 'fs' )
10+ const fs = window . require ( 'fs' ) as typeof import ( 'fs' )
1111
1212const tempPath = roConfig . path . clientTemp + 'install\\peFiles\\'
1313
@@ -17,13 +17,18 @@ const pecmdPath = roConfig.path.tools + 'PECMD.exe'
1717const fbplusPath = roConfig . path . tools + 'fbplus.exe'
1818
1919async function xPartFiles ( ISOPath : string , xEFIPath : string , xDataPath : string ) {
20- const EFI_List : string [ ] = [ "EFI" , "Boot" , "HotPE\\Boot.wim" , "bootmgr" , "bootmgr.efi" , "ventoy.dat" ]
20+ const EFI_List : string [ ] = [ "EFI" , "Boot" , "HotPE\\Boot.wim" , "bootmgr" , "bootmgr.efi" , "ntldr" , " ventoy.dat"]
2121 const Data_List : string [ ] = [ "HotPE -xr!Boot.wim" , "HotProgMods" , "AUTORUN.INF" , "HotPE.ico" ]
2222
23- //解压ISO文件
23+ //解压ISO文件EFI 分区
2424 for ( const tList of EFI_List ) {
2525 await unZipFile ( ISOPath , xEFIPath , tList )
2626 }
27+ if ( ! fs . existsSync ( xEFIPath + 'ntldr' ) ) {
28+ await copyFile ( xEFIPath + 'bootmgr' , xEFIPath + 'ntldr' )
29+ }
30+
31+ //解压ISO文件Data 分区
2732 for ( const tList of Data_List ) {
2833 await unZipFile ( ISOPath , xDataPath , tList )
2934 }
0 commit comments