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