public override void Execute(object content) { base.Execute(content); PublishContent publishContent = content as PublishContent; if (!publishContent.bigVersion) { ProgressBarUtil.Title = "AssetBundle文件拷贝"; ProgressBarUtil.Content = "AssetBundle文件拷贝到缓存目录"; ProgressBarUtil.Percent = 0.0f; ProgressBarUtil.Show(); string resPath = PublishContent.GetResPath(publishContent.GetRootPath()); string resCachePath = resPath + "Cache"; string updateResPath = PublishContent.GetResPath(publishContent.GetUpdateFilePath()); PublishUtil.Copy(updateResPath, resCachePath, "*.ab", new ABProgress()); string versionResCachePath = PublishContent.GetResPath(publishContent.GetVersionPath()); PublishUtil.Copy(resCachePath, versionResCachePath, "*.ab", new ABProgress()); ProgressBarUtil.Title = "Lua文件拷贝"; ProgressBarUtil.Content = "Lua文件拷贝到缓存目录"; ProgressBarUtil.Percent = 0.0f; string luaPath = PublishContent.GetLuaPath(publishContent.GetRootPath()); string luaCachePath = luaPath + "Cache"; string updateLuaPath = PublishContent.GetLuaPath(publishContent.GetUpdateFilePath()); PublishUtil.Copy(updateLuaPath, luaCachePath, "*.lua", new ABProgress()); string versionLuaCachePath = PublishContent.GetLuaPath(publishContent.GetVersionPath()); PublishUtil.Copy(luaCachePath, versionLuaCachePath, "*.lua", new ABProgress()); ProgressBarUtil.Close(); } Success(publishContent); }
public override void Execute(object content) { base.Execute(content); PublishContent publishContent = this._content as PublishContent; if (!publishContent.bigVersion) { string updateFilePath = publishContent.GetUpdateFilePath(); string updateFile = "/res_" + publishContent.resVersion + ".bin"; string updateFullFile = publishContent.GetVersionPath() + updateFile; FileOperateUtil.CreateFileDirectory(updateFullFile); FolderEncoder folderEncoder = new FolderEncoder(updateFilePath, updateFullFile, "*.*"); long size = folderEncoder.Encode(null); publishContent.updateFile = updateFile; publishContent.updateFileSize = size; } this.Success(publishContent); }