mirror of https://github.com/tuyoogame/YooAsset
Update AssetBundleBuilder
parent
500b469bce
commit
18426d0481
|
@ -40,17 +40,25 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 拷贝补丁清单文件
|
// 拷贝补丁清单文件
|
||||||
{
|
{
|
||||||
string manifestFileName = YooAssetSettingsData.GetPatchManifestFileName(buildPackageName, buildPackageVersion);
|
string fileName = YooAssetSettingsData.GetPatchManifestFileName(buildPackageName, buildPackageVersion);
|
||||||
string sourcePath = $"{packageOutputDirectory}/{manifestFileName}";
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{streamingAssetsDirectory}/{manifestFileName}";
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拷贝静态版本文件
|
// 拷贝补丁清单哈希文件
|
||||||
{
|
{
|
||||||
string versionFileName = YooAssetSettingsData.GetStaticVersionFileName(buildPackageName);
|
string fileName = YooAssetSettingsData.GetPatchManifestHashFileName(buildPackageName, buildPackageVersion);
|
||||||
string sourcePath = $"{packageOutputDirectory}/{versionFileName}";
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{streamingAssetsDirectory}/{versionFileName}";
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 拷贝补丁清单版本文件
|
||||||
|
{
|
||||||
|
string fileName = YooAssetSettingsData.GetPatchManifestVersionFileName(buildPackageName);
|
||||||
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,21 +45,32 @@ namespace YooAsset.Editor
|
||||||
UpdateBuiltInBundleReference(patchManifest, buildResultContext.Results);
|
UpdateBuiltInBundleReference(patchManifest, buildResultContext.Results);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建补丁清单文件
|
// 创建补丁清单文件
|
||||||
string manifestFileName = YooAssetSettingsData.GetPatchManifestFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string packageHash = string.Empty;
|
||||||
string manifestFilePath = $"{pipelineOutputDirectory}/{manifestFileName}";
|
{
|
||||||
PatchManifest.Serialize(manifestFilePath, patchManifest);
|
string fileName = YooAssetSettingsData.GetPatchManifestFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
BuildRunner.Log($"创建补丁清单文件:{manifestFilePath}");
|
string filePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
|
PatchManifest.Serialize(filePath, patchManifest);
|
||||||
|
packageHash = HashUtility.FileMD5(filePath);
|
||||||
|
BuildRunner.Log($"创建补丁清单文件:{filePath}");
|
||||||
|
}
|
||||||
|
|
||||||
// 创建静态版本文件
|
// 创建补丁清单哈希文件
|
||||||
string staticVersionFileName = YooAssetSettingsData.GetStaticVersionFileName(buildParameters.PackageName);
|
{
|
||||||
string staticVersionFilePath = $"{pipelineOutputDirectory}/{staticVersionFileName}";
|
string fileName = YooAssetSettingsData.GetPatchManifestHashFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
StaticVersion staticVersion = new StaticVersion();
|
string filePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
staticVersion.PackageVersion = buildParameters.PackageVersion;
|
FileUtility.CreateFile(filePath, packageHash);
|
||||||
staticVersion.ManifestCRC = HashUtility.FileCRC32(manifestFilePath);
|
BuildRunner.Log($"创建补丁清单哈希文件:{filePath}");
|
||||||
StaticVersion.Serialize(staticVersionFilePath, staticVersion);
|
}
|
||||||
BuildRunner.Log($"创建静态版本文件:{staticVersionFilePath}");
|
|
||||||
|
// 创建补丁清单版本文件
|
||||||
|
{
|
||||||
|
string fileName = YooAssetSettingsData.GetPatchManifestVersionFileName(buildParameters.PackageName);
|
||||||
|
string filePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
|
FileUtility.CreateFile(filePath, buildParameters.PackageVersion);
|
||||||
|
BuildRunner.Log($"创建补丁清单版本文件:{filePath}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -28,25 +28,33 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 拷贝Report文件
|
// 拷贝Report文件
|
||||||
{
|
{
|
||||||
string reportFileName = YooAssetSettingsData.GetReportFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string fileName = YooAssetSettingsData.GetReportFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string sourcePath = $"{pipelineOutputDirectory}/{reportFileName}";
|
string sourcePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{packageOutputDirectory}/{reportFileName}";
|
string destPath = $"{packageOutputDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拷贝补丁清单文件
|
// 拷贝补丁清单文件
|
||||||
{
|
{
|
||||||
string manifestFileName = YooAssetSettingsData.GetPatchManifestFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string fileName = YooAssetSettingsData.GetPatchManifestFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string sourcePath = $"{pipelineOutputDirectory}/{manifestFileName}";
|
string sourcePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{packageOutputDirectory}/{manifestFileName}";
|
string destPath = $"{packageOutputDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拷贝静态版本文件
|
// 拷贝补丁清单哈希文件
|
||||||
{
|
{
|
||||||
string versionFileName = YooAssetSettingsData.GetStaticVersionFileName(buildParameters.PackageName);
|
string fileName = YooAssetSettingsData.GetPatchManifestHashFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string sourcePath = $"{pipelineOutputDirectory}/{versionFileName}";
|
string sourcePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{packageOutputDirectory}/{versionFileName}";
|
string destPath = $"{packageOutputDirectory}/{fileName}";
|
||||||
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 拷贝补丁清单版本文件
|
||||||
|
{
|
||||||
|
string fileName = YooAssetSettingsData.GetPatchManifestVersionFileName(buildParameters.PackageName);
|
||||||
|
string sourcePath = $"{pipelineOutputDirectory}/{fileName}";
|
||||||
|
string destPath = $"{packageOutputDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue