private static void CreatVersionTxt() { // 版号文件 string fileUrl = CreatFileUrlMd5(ABHelper.VersionNumFileName); ABHelper.WriteVersionNumFile(CurVersionABExportPath + fileUrl, ABHelper.VersionNumCombine(TheVersionNum[0], TheVersionNum[1], CurVersionNum.ToString(), TheVersionNum[3])); // ab的依赖文件 fileUrl = CreatFileUrlMd5(ABHelper.ManifestFileName); ABHelper.WriteManifestFile(CurVersionABExportPath + fileUrl, ResFolder, CurVersionManifestList); // 创建版本文件 CurVersionList = ABHelper.ReadVersionFile(PlatformABExportPath + "/" + (CurVersionNum - 1) + "/" + ABHelper.VersionFileName); List <string> filePaths = ABHelper.GetAllFilesPathInDir(CurVersionABExportPath); foreach (string path in filePaths) { if (path.EndsWith(".manifest")) { continue; } string path2 = path.Replace("\\", "/").Replace(CurVersionABExportPath, "").ToLower(); if (path2.Equals(CurVersionNum.ToString()) || path2.Equals(ABHelper.DependFileName) || path2.Equals(ABHelper.Md5FileName)) { continue; } string value = CurVersionFileUrlMd5[path2].ToLower(); if (CurVersionList.ContainsKey(value)) { CurVersionList.Remove(value); } CurVersionList.Add(value, new List <string>() { ABHelper.BuildMD5ByFile(path), CurVersionNum.ToString(), ABHelper.FileSize(path).ToString(), path2 }); } ABHelper.WriteVersionFile(CurVersionABExportPath + ABHelper.VersionFileName, CurVersionList); }