feat: PCL 2.14.0.0 官方源码快照(镜像自 Meloong-Git/PCL)
Build / Build (Debug) (push) Canceled after 0s
Build / Build (Release) (push) Canceled after 0s

- 源码原样保留(含 LICENCE、README、patches),未做任何修改
- MeloongCore 为 git 子模块,见 .gitmodules(内容不在本快照中)
This commit is contained in:
2026-10-25 19:05:12 +08:00
commit a5709584aa
290 changed files with 84283 additions and 0 deletions
Binary file not shown.
+30
View File
@@ -0,0 +1,30 @@
namespace PCLCS;
public static class LaunchUtils {
/// <summary>
/// 释放补丁文件并返回完整文件路径。
/// </summary>
/// <param name="patchFilePath">补丁文件路径
/// <param name="outputDirectory">补丁文件的释放目录。</param>
public static string ExtractPatch(string patchFilePath, string outputDirectory) {
Logger.Info($"选定的资源 {patchFilePath} 输出路径:{outputDirectory}");
lock (ExtractPatchLock) { // 避免 OptiFine 和 Forge 安装时同时释放导致冲突
try {
FileUtils.ExtractResources(patchFilePath, Path.Combine(outputDirectory, PathUtils.GetLastPart(patchFilePath)), typeof(LaunchUtils));
} catch (Exception ex) {
if (!FileUtils.Exists(outputDirectory)) throw new FileNotFoundException($"释放 {patchFilePath} 失败", ex);
Logger.Warn(ex, $"{patchFilePath} 文件重新释放失败,将尝试更换文件名重新生成");
patchFilePath = Path.Combine(outputDirectory, $"{PathUtils.GetFileNameWithoutExtension(patchFilePath)}2.{PathUtils.GetExtension(patchFilePath)}");
try {
FileUtils.ExtractResources(patchFilePath, Path.Combine(outputDirectory, PathUtils.GetLastPart(patchFilePath)), typeof(LaunchUtils));
} catch (Exception ex2) {
throw new FileNotFoundException($"释放 {patchFilePath} 最终尝试失败", ex2);
}
}
}
return Path.Combine(outputDirectory, PathUtils.GetLastPart(patchFilePath));
}
private static readonly object ExtractPatchLock = new();
}
Binary file not shown.