|
本帖最后由 Bluebells 于 2024-10-26 10:39 编辑
有网友让我弄一个 Paragon Linux File Systems for Win10/11PE x64 的制作教程, 因此又写了这么一个"重复"的制作教程
1. 安装包解包
这里不再重复, 请自行参考 Paragon APFS for Win10/11PE x64 制作教程
2. 整理文件结构
提取并整理后的文件目录树结构大概如下:
│ dokan.dll
│ extmounter.exe
│ FS4WinUI_lang.qm
│ libeay32.dll
│ Linux File Systems for Windows by Paragon Software.exe
│ msvcp140.dll ;VC 运行库文件之一, 可根据所使用的 WinPE 是否需要该文件而放置到此处(其它运行库文件也一样)
│ paragon_service.exe
│ Qt5Core.dll
│ Qt5Gui.dll
│ Qt5Network.dll
│ Qt5WebSockets.dll
│ Qt5Widgets.dll
│ qtbase.qm
│ ssleay32.dll
│ vcruntime140.dll ;VC 运行库文件之一
│
├─dokandrv10x64
│ dokan.cat
│ dokan.inf
│ dokan.sys
│
├─platforms
│ qwindows.dll
│
└─utils
cygwin1.dll
e2fsck.exe
fsdump.exe
mke2fs-hurd.conf
mke2fs.conf
mke2fs.exe
mklost+found.exe
3. 编写程序运行环境初始化脚本
- _SUB GetNTVersion
- TEAM SET$# &pMajorVersion=*4 0| SET$# &pMinorVersion=*4 0| SET$# &pBuildNumber=*4 0
- CALL $--qd --ret:&&ret ntdll.dll,RtlGetNtVersionNumbers,*&pMajorVersion,*&pMinorVersion,*&pBuildNumber
- IFEX #%&ret%=0,EXIT
- TEAM ENVI?int &pMajorVersion=&MajorVersion| ENVI?int &pMinorVersion=&MinorVersion| ENVI?int &pBuildNumber=&BuildNumber
- ENVI-ret %~1=%MajorVersion%
- ENVI-ret %~2=%MinorVersion%
- ENVI-ret %~3=%BuildNumber%
- _END
- _SUB DetectRunningEnvironment
- IFEX "%&CurDir%\Linux File Systems for Windows by Paragon Software.exe",! EXIT FILE
- IFEX "%&CurDir%\dokandrv10x64\dokan.inf",! EXIT FILE
- CALL GetNTVersion &MajorVersion
- IFEX $%&MajorVersion%<10,EXIT FILE
- IFEX $%&bX64%=0,EXIT FILE
- REGI $HKLM\SYSTEM\CurrentControlSet\Control\SystemStartOptions,&&SSO
- SED &&MNT=?:0,MININT,,%&SSO%
- FIND $%&MNT%=0,EXIT FILE
- _END
- _SUB Initialize
- SITE ?&FVER,&PVER=FVER,%&CurDir%\Linux File Systems for Windows by Paragon Software.exe
- IFEX $%&PVER%<7,ENVI &DFN=Paragon! ENVI &DFN=Paragon Software
- ;安装并启动 dokan 驱动程序
- SERV ?&Ret2 dokan
- IFEX |%&Ret2%=1,
- {
- ENVI^ DisX64=1,OldCfg
- DEVI $%&CurDir%\dokandrv10x64\dokan.inf,DefaultInstall,128
- ENVI^ DisX64=%OldCfg%
- SERV dokan
- }
- ;预定义一些配置(禁用自动更新, 禁止收集匿名统计信息, 禁用日志记录)
- REGI #HKLM\SOFTWARE\Wow6432Node\Paragon Software\Linux File Systems for Windows by Paragon Software\service\\AutoUpdate=0
- REGI #HKLM\SOFTWARE\Wow6432Node\Paragon Software\Linux File Systems for Windows by Paragon Software\service\\CollectAnonymStatistics=0
- REGI #HKLM\SOFTWARE\Wow6432Node\Paragon Software\Linux File Systems for Windows by Paragon Software\service\\Logging=0
- ;添加版本号信息到注册表(没啥用, 强迫症患者所需)
- REGI $HKLM\SOFTWARE\Wow6432Node\Paragon Software\Linux File Systems for Windows by Paragon Software\Update\\version=%&PVER%
- ;某些和谐版本需要存在"%ProgramData%\Paragon\LinuxFS for Windows"目录才能成为已注册版本
- IFEX "%ProgramData%\%&DFN%\LinuxFS for Windows",! MDIR "%ProgramData%\%&DFN%\LinuxFS for Windows"
- ;创建并启动 ParagonLinuxFSMounter 服务项
- SERV-Create ParagonLinuxFSMounter,%&CurDir%\paragon_service.exe,16,2,1,,,,ParagonLinuxFSMounter
- SERV ParagonLinuxFSMounter
- ;创建桌面快捷方式
- IFEX "%&Desktop%\\LinuxFS for Windows.lnk",! LINK %&Desktop%\LinuxFS for Windows,%&CurDir%\Linux File Systems for Windows by Paragon Software.exe
- _END
- CALL DetectRunningEnvironment
- SERV ?&Ret1 ParagonLinuxFSMounter
- IFEX |%&Ret1%=1,CALL Initialize
复制代码 将上述脚本代码保存为 Initialize.ini 文本文件, 并将该文件放置在 Linux File Systems for Windows 主程序所在目录即可
PS: 如果你不需要进行运行环境判断, 直接使用 _SUB Initialize 代码段里面的内容即可
4. 使用 PECMD 的 LOAD 命令加载上面创建的 Initialize.ini 文件即可完成 Linux File Systems for Windows 的运行环境初始化过程
PS: Paragon Linux File Systems for Windows 对 WinPE 的完整性要求比较高, 在某些过于精简的 WinPE 下可能无法运行
|
评分
-
查看全部评分
|