public override void Execute(object content) { base.Execute(content); PublishContent publishContent = _content as PublishContent; if (publishContent.bigVersion) { BuildPlayer(publishContent.GetVersionPath(), publishContent.platform); } Success(publishContent); }
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 = _content as PublishContent; string versionFile = publishContent.GetVersionPath() + "/version.xml"; string cacheVersionFile = publishContent.GetRootPath() + "/version.xml"; FileOperateUtil.CreateFileDirectory(versionFile); if (publishContent.bigVersion) { VersionContent versionContent = new VersionContent(); versionContent.version = publishContent.version; versionContent.resUrl = publishContent.resUrl; versionContent.Save(versionFile); string projectVersionFile = FileOperateUtil.GetRegPath(Application.dataPath + "/Resources/version.bytes"); File.Copy(versionFile, projectVersionFile, true); } else { VersionContent versionContent = new VersionContent(); if (File.Exists(cacheVersionFile)) { versionContent.Parse(File.ReadAllText(cacheVersionFile)); } versionContent.version = publishContent.version; versionContent.resUrl = publishContent.resUrl; ResVersion resVersion; resVersion.version = publishContent.resVersion; resVersion.url = publishContent.updateFile; resVersion.md5 = publishContent.updateFileMD5; resVersion.size = publishContent.updateFileSize; versionContent.resVersions.Add(resVersion); versionContent.Save(versionFile); } File.Copy(versionFile, cacheVersionFile, true); 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); }