CheckHotUpdateRes.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEditor;
  5. using Game.Config;
  6. using System;
  7. using System.Reflection;
  8. using System.IO;
  9. using System.IO.Compression;
  10. using System.Security.Cryptography;
  11. using System.Text;
  12. using System.Linq;
  13. public class CheckHotUpdateRes : EditorWindow
  14. {
  15. public class VersionInfoData:GameData<VersionInfoData>
  16. {
  17. public string FullName;
  18. public string MD5;
  19. public ulong Size;
  20. public VersionInfoData()
  21. {
  22. FullName = "";
  23. MD5 = "";
  24. Size = 0;
  25. }
  26. private static void OnCsvLoad(CsvReader csvReader)
  27. {
  28. VersionInfoData.Onload(csvReader);
  29. }
  30. }
  31. [MenuItem("AssetBundle/创建最大Version")]
  32. public static void CreateVersion()
  33. {
  34. #if UNITY_IOS
  35. FileHelper.WirteStringToFile(Application.dataPath+ "/StreamingAssets/unityRes/afivs", "99.99.99.99");
  36. #else
  37. FileHelper.WirteStringToFile(Application.dataPath + "/StreamingAssets/AssetsAndroid/Version", "99.99.99.99");
  38. #endif
  39. }
  40. [MenuItem("AssetBundle/热更相关")]
  41. public static void OpenCheckHotUpdateWindow()
  42. {
  43. CheckHotUpdateRes window = GetWindow<CheckHotUpdateRes>("热更相关");
  44. window.maxSize = new Vector2(800, 600);
  45. window.minSize = new Vector2(600, 400);
  46. window.Init();
  47. window.Show();
  48. }
  49. private string oldPath = "";
  50. private string newPath = "";
  51. private CheckResWindowInfo info;
  52. private ResInfo curResInfo;
  53. private List<VersionInfoData> needResList;
  54. private GameDataFormatInfo downloadFormatInfo;
  55. public void Init()
  56. {
  57. string path = "Assets/Editor/AssetBundle/CheckHotResWindownInfo.asset";
  58. //Debug.Log();
  59. info = AssetDatabase.LoadAssetAtPath<CheckResWindowInfo>(path);
  60. info.InitTags();
  61. curResInfo = info.GetResInfo();
  62. if (curResInfo == null)
  63. {
  64. curResInfo = new ResInfo();
  65. }
  66. #if UNITY_IOS
  67. info.VersionFileName = "afivs";
  68. info.mainfestFileName = "afimft";
  69. info.NewPath = Application.dataPath + "/StreamingAssets/unityRes";
  70. //#else
  71. // versionFileName = "Version";
  72. // assetsFileName = "mainfest";
  73. #endif
  74. needResList = new List<VersionInfoData>();
  75. }
  76. private void OnGUI()
  77. {
  78. DrowSelectFolder("旧版本文件", "选择文件路径", "选择旧版本资源MD5文件路径", ref curResInfo.OldPath);
  79. DrowSelectFolder("新版本文件", "选择文件路径", "选择新版本资源MD5文件路径", ref curResInfo.NewPath);
  80. DrowSelectFolder("需跟新文件输出路径", "选择文件路径", "选择需跟新文件输出路径", ref curResInfo.OutputPath);
  81. DrowSelectFolder("ab包名基础名字文件路径", "选择文件路径", "选择ab包名基础名字文件路径", ref curResInfo.BaseNameFileInfoPath);
  82. DrawInfo();
  83. DrawCheckBtn();
  84. }
  85. private void DrowSelectFolder(string name, string btnName, string savepath, ref string path)
  86. {
  87. GUILayout.Box("", GUILayout.Width(790));
  88. GUILayout.BeginHorizontal();
  89. GUILayout.Space(10);
  90. GUILayout.Label(name, GUILayout.Width(120));
  91. GUILayout.Space(10);
  92. path = GUILayout.TextField(path, GUILayout.Width(360));
  93. if (GUILayout.Button(btnName, GUILayout.Width(100)))
  94. {
  95. string getstr = EditorUtility.SaveFolderPanel(savepath, path, "");
  96. if(!string.IsNullOrEmpty(getstr))
  97. {
  98. path = getstr;
  99. }
  100. }
  101. GUILayout.Space(10);
  102. GUILayout.EndHorizontal();
  103. }
  104. private void DrawInfo()
  105. {
  106. GUILayout.Box("", GUILayout.Width(790));
  107. GUILayout.BeginHorizontal();
  108. GUILayout.Label("平台", GUILayout.Width(65));
  109. int TagIndex = EditorGUILayout.Popup(info.buildTag, info.Tags, GUILayout.Width(100));
  110. if (TagIndex != info.buildTag)
  111. {
  112. info.buildTag = TagIndex;
  113. ResInfo ri = info.GetResInfo();
  114. if (ri != null)
  115. {
  116. curResInfo = ri;
  117. }
  118. }
  119. GUILayout.EndHorizontal();
  120. GUILayout.Box("", GUILayout.Width(790));
  121. GUILayout.BeginHorizontal();
  122. GUILayout.Space(10);
  123. GUILayout.Label("版本文件名:", GUILayout.Width(65));
  124. GUILayout.Space(10);
  125. curResInfo.VersionFileName = GUILayout.TextField(curResInfo.VersionFileName, GUILayout.Width(160));
  126. GUILayout.Space(60);
  127. GUILayout.Label("版本文件信息文件名:", GUILayout.Width(120));
  128. GUILayout.Space(10);
  129. curResInfo.mainfestFileName = GUILayout.TextField(curResInfo.mainfestFileName, GUILayout.Width(160));
  130. GUILayout.EndHorizontal();
  131. GUILayout.Box("", GUILayout.Width(790));
  132. GUILayout.BeginHorizontal();
  133. GUILayout.Space(10);
  134. GUILayout.Label("资源版本:", GUILayout.Width(65));
  135. GUILayout.Space(10);
  136. curResInfo.ResVersion = GUILayout.TextField(curResInfo.ResVersion, GUILayout.Width(160));
  137. GUILayout.Space(10);
  138. if (GUILayout.Button("读取版本", GUILayout.Width(100)))
  139. {
  140. curResInfo.ResVersion = File.ReadAllText($"{curResInfo.OldPath}/{curResInfo.VersionFileName}");
  141. }
  142. GUILayout.Space(10);
  143. if (GUILayout.Button("版本+1", GUILayout.Width(100)))
  144. {
  145. VersionCode lVersionCode = curResInfo.ResVersion;
  146. lVersionCode.patch += 1;
  147. curResInfo.ResVersion = lVersionCode.ToString();
  148. }
  149. GUILayout.Space(10);
  150. GUILayout.EndHorizontal();
  151. GUILayout.BeginHorizontal();
  152. GUILayout.Label("语言:", GUILayout.Width(65));
  153. GUILayout.Space(10);
  154. curResInfo.Language = (BuildLanguage)EditorGUILayout.EnumPopup(curResInfo.Language, GUILayout.Width(100));
  155. GUILayout.Space(10);
  156. GUILayout.EndHorizontal();
  157. }
  158. private void DrawCheckBtn()
  159. {
  160. GUILayout.Box("", GUILayout.Width(790));
  161. GUILayout.BeginHorizontal();
  162. GUILayout.Space(10);
  163. if (GUILayout.Button("生成MD5资源版本文件"))
  164. {
  165. BundleBuilderZ.CreateMD5File(curResInfo.ResVersion);
  166. }
  167. GUILayout.Space(60);
  168. if (GUILayout.Button("对比新旧资源"))
  169. {
  170. CheckRes();
  171. }
  172. GUILayout.EndHorizontal();
  173. GUILayout.Box("", GUILayout.Width(790));
  174. if (GUILayout.Button("复制所以资源到输出路径"))
  175. {
  176. CopyFiles();
  177. }
  178. if (GUILayout.Button("复制图片资源到输出路径"))
  179. {
  180. CopyTexture();
  181. }
  182. if (GUILayout.Button("复制mainfest资源到输出路径"))
  183. {
  184. CopyMainfestFile();
  185. }
  186. if (GUILayout.Button("删除mainfest没有的资源"))
  187. {
  188. DelateNoFile();
  189. }
  190. if (GUILayout.Button("Tolua"))
  191. {
  192. ChangeLuaWrapCs();
  193. }
  194. GUILayout.Box("", GUILayout.Width(790));
  195. GUILayout.BeginHorizontal();
  196. GUILayout.Space(60);
  197. curResInfo.IsIgnore =GUILayout.Toggle(curResInfo.IsIgnore, "是否开启忽略某些文件") ;
  198. GUILayout.Space(60);
  199. if (GUILayout.Button("制作混淆信息"))
  200. {
  201. MakeAbHxNameAssets();
  202. }
  203. GUILayout.EndHorizontal();
  204. }
  205. private List<VersionInfoData> SerizlizeResList(byte[] data)
  206. {
  207. CsvReader csvReader = new CsvReader(curResInfo.mainfestFileName, data);
  208. if (downloadFormatInfo == null)
  209. {
  210. downloadFormatInfo = new GameDataFormatInfo(csvReader.Fields(), csvReader.Types());
  211. }
  212. Type type = typeof(VersionInfoData);
  213. MethodInfo methodInfo = type.GetMethod("OnCsvLoad", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
  214. methodInfo?.Invoke(null, new object[] { csvReader });
  215. List<VersionInfoData> resList = VersionInfoData.AllData();
  216. VersionInfoData.Clear();
  217. return resList;
  218. }
  219. private void CheckRes()
  220. {
  221. needResList.Clear();
  222. oldPath = $"{curResInfo.OldPath}/{ curResInfo.mainfestFileName}";
  223. List<VersionInfoData> Oldlist = GetInfoDatas(oldPath);
  224. newPath = $"{curResInfo.NewPath}/{ curResInfo.mainfestFileName}";
  225. List<VersionInfoData> newlist = GetInfoDatas(newPath);
  226. ChangeResMD5(newlist);
  227. Dictionary<string, string> abNamedic = null;
  228. if (curResInfo.IsHx)
  229. {
  230. abNamedic= GetCurInfoAbNameInfos();
  231. }
  232. if (Oldlist != null && newlist != null)
  233. {
  234. int size = newlist.Count;
  235. for (int i = 0; i < size; i++)
  236. {
  237. if (newlist[i].FullName == curResInfo.mainfestFileName || newlist[i].FullName == curResInfo.VersionFileName)
  238. {
  239. continue;
  240. }
  241. bool isignore = false;
  242. string baseName = newlist[i].FullName; ;
  243. RG_Ignore_Info rG_Ignore_Info = null;
  244. if (curResInfo.IsHx && abNamedic.ContainsKey(newlist[i].FullName))
  245. {
  246. baseName = abNamedic[newlist[i].FullName];
  247. }
  248. rG_Ignore_Info = curResInfo.Rg_Essential_Infos.FindFirst(it => !it.IsIgnore && baseName.Contains(it.Field));
  249. bool isEssential = rG_Ignore_Info != null;
  250. if (curResInfo.IsIgnore && !isEssential)
  251. {
  252. string igstr = curResInfo.IgnoreFiles.FindFirst(it => it == baseName);
  253. rG_Ignore_Info = curResInfo.rG_Ignore_Infos.FindFirst(it => it.IsIgnore && baseName.Contains( it.Field));
  254. if (!string.IsNullOrEmpty(igstr) || rG_Ignore_Info != null)
  255. {
  256. isignore = true;
  257. Debug.Log("=========忽略=============" + baseName);
  258. }
  259. }
  260. VersionInfoData ores = Oldlist.FindFirst(it=> it.FullName == newlist[i].FullName);
  261. if (ores != null )
  262. {
  263. if (isignore)
  264. {
  265. newlist[i].MD5 = ores.MD5;
  266. newlist[i].Size = ores.Size;
  267. }
  268. else if (newlist[i].MD5 != ores.MD5)
  269. {
  270. Debug.Log($"新 {newlist[i].FullName} MD5=[{newlist[i].MD5}] Base = [{baseName}]");
  271. Debug.Log($"旧 {ores.FullName} MD5=[{ores.MD5}]");
  272. needResList.Add(newlist[i]);
  273. }
  274. }
  275. else
  276. {
  277. Debug.Log($"新 {newlist[i].FullName} MD5=[{newlist[i].MD5}] Base = [{baseName}]");
  278. needResList.Add(newlist[i]);
  279. }
  280. }
  281. }
  282. CsvWriter<VersionInfoData> csvWriter = new CsvWriter<VersionInfoData>(newPath, "", newlist, downloadFormatInfo);
  283. csvWriter.Write();
  284. CopyFile();
  285. string FiletempPath = $"{curResInfo.OutputPath}/../ZipTempPath";
  286. if(Directory.Exists(FiletempPath))
  287. Directory.Delete(FiletempPath,true);
  288. Directory.CreateDirectory(FiletempPath);
  289. CopyFile(FiletempPath);
  290. string zipName = $"{curResInfo.CN_Name}-热更资源---{curResInfo.ResVersion}---{DateTime.Now.Month}.{DateTime.Now.Day}--{DateTime.Now.Hour}.{DateTime.Now.Minute}.zip";
  291. ZipFile.CreateFromDirectory(FiletempPath,$"{curResInfo.OutputPath}/{zipName}");
  292. Directory.Delete(FiletempPath,true);
  293. needResList.Clear();
  294. Debug.Log($"资源检查完成 输出路径 : 【{curResInfo.OutputPath}】【{zipName}】");
  295. }
  296. private void CopyFile(string outP = "")
  297. {
  298. if (needResList == null)
  299. {
  300. return;
  301. }
  302. if (string.IsNullOrEmpty(outP))
  303. {
  304. outP = curResInfo.OutputPath;
  305. }
  306. int size = needResList.Count;
  307. string datapath = $"{curResInfo.NewPath}/";
  308. for (int i = 0; i < size; i++)
  309. {
  310. if (needResList[i].FullName == "Version")
  311. {
  312. continue;
  313. }
  314. byte[] fdatas = File.ReadAllBytes(datapath + needResList[i].FullName);
  315. FileHelper.WirteToFile( $"{outP}/{needResList[i].FullName}" ,fdatas);
  316. }
  317. FileHelper.WirteStringToFile($"{outP}/{curResInfo.VersionFileName}",curResInfo.ResVersion);
  318. byte[] mdatas = File.ReadAllBytes(datapath + curResInfo.mainfestFileName);
  319. FileHelper.WirteToFile($"{outP}/{curResInfo.mainfestFileName}", mdatas);
  320. }
  321. private void CopyMainfestFile()
  322. {
  323. newPath = $"{info.NewPath}/{ info.mainfestFileName}";
  324. List<VersionInfoData> newlist = GetInfoDatas(newPath);
  325. if (newlist == null)
  326. {
  327. return;
  328. }
  329. int size = newlist.Count;
  330. string datapath = $"{info.NewPath}/";
  331. for (int i = 0; i < size; i++)
  332. {
  333. if (newlist[i].FullName == "Version")
  334. {
  335. continue;
  336. }
  337. byte[] fdatas = File.ReadAllBytes(datapath + newlist[i].FullName);
  338. FileHelper.WirteToFile($"{info.OutputPath}/{newlist[i].FullName}", fdatas);
  339. }
  340. }
  341. private void DelateNoFile()
  342. {
  343. newPath = $"{info.NewPath}/{ info.mainfestFileName}";
  344. string[] files1 = FileHelper.GetAllFileNmae(info.NewPath, "meta");
  345. List<VersionInfoData> newlist = GetInfoDatas(newPath);
  346. int size = files1.Length;
  347. string datapath = $"{info.NewPath}/";
  348. for (int i = 0; i < size; i++)
  349. {
  350. if (files1[i] == "afivs" || files1[i] == "afimft")
  351. {
  352. continue;
  353. }
  354. if (newlist.FindFirst(it => it.FullName == files1[i]) == null)
  355. {
  356. FileHelper.DeleteFile(datapath + files1[i]);
  357. }
  358. }
  359. }
  360. private List<VersionInfoData> GetInfoDatas(string path)
  361. {
  362. List<VersionInfoData> list = null;
  363. byte[] datas = null;
  364. if (FileSystem.Exists(path))
  365. {
  366. datas = File.ReadAllBytes(path);
  367. }
  368. if (datas != null)
  369. {
  370. list = SerizlizeResList(datas);
  371. }
  372. else
  373. {
  374. Debug.LogError($"请选择正确路径;[{path}]文件不存在!!!!");
  375. }
  376. return list;
  377. }
  378. private void ChangeResMD5(List<VersionInfoData> datas)
  379. {
  380. int[] ids = GenerateRandomArray(curResInfo.ChangeNum, 1, datas.Count);
  381. for (int i = 0; i < ids.Length; i++)
  382. {
  383. Debug.Log($"{ datas[ids[i]].FullName} 改===={ datas[ids[i]].MD5}=====");
  384. datas[ids[i]].MD5 = datas[ids[i]].MD5.Substring(0,6);
  385. //Debug.Log($"{ datas[ids[i]].FullName} 改===={ datas[ids[i]].MD5}=====eeee");
  386. }
  387. }
  388. int[] GenerateRandomArray(int size, int min, int max)
  389. {
  390. List<int> array = new List<int>(size);
  391. if (size >= max - min)
  392. {
  393. for (int i = min; i < max; i++)
  394. {
  395. array.Add(i);
  396. }
  397. }
  398. else
  399. {
  400. while (size > 0)
  401. {
  402. int a = UnityEngine.Random.Range(min, max);
  403. if (!array.Contains(a))
  404. {
  405. array.Add(a);
  406. size--;
  407. }
  408. }
  409. }
  410. return array.ToArray();
  411. }
  412. private void CopyFiles()
  413. {
  414. string[] files1 = FileHelper.GetAllFileNmae(curResInfo.NewPath, "meta");
  415. int size = files1.Length;
  416. string datapath = $"{curResInfo.NewPath}/";
  417. for (int i = 0; i < size; i++)
  418. {
  419. byte[] fdatas = File.ReadAllBytes(datapath + files1[i]);
  420. FileHelper.WirteToFile($"{curResInfo.OutputPath}/{files1[i]}", fdatas);
  421. }
  422. }
  423. private void CopyTexture()
  424. {
  425. string datapath = $"{Application.dataPath}/Content/Icons/";
  426. FileHelper.CopyDir(datapath, curResInfo.OutputPath, "meta");
  427. }
  428. private void ChangeLuaWrapCs()
  429. {
  430. //ChangeLuaWrapCs("ToLua/BaseType");
  431. ChangeLuaWrapCs("ToLua/Source/Generate");
  432. }
  433. private void ChangeLuaWrapCs(string path)
  434. {
  435. string luapath = $"{Application.dataPath}/{path}";//ToLua/BaseType//ToLua/Source/Generate
  436. string[] files1 = FileHelper.GetAllFileNmae(luapath, "meta");
  437. int size = files1.Length;
  438. string datapath = $"{luapath}/";
  439. for (int i = 0; i < size; i++)
  440. {
  441. //AddLuaWrapBenginClassType(datapath + files1[i]);
  442. AddLuaWrapBenginClassType(datapath + files1[i], "BeginEnum");
  443. }
  444. }
  445. //L.BeginClass(typeof(SingletonMono<LuaMgr>), typeof(MonoBase), \"SingletonMono_LuaMgr\");
  446. private void AddLuaWrapBenginClassType(string path,string ckStr = "BeginClass")
  447. {
  448. if (String.IsNullOrEmpty(path)) return;
  449. string[] fdatas = File.ReadAllLines(path); //new string[] { "L.BeginClass(typeof(SingletonMono<LuaMgr>), typeof(MonoBase), \"SingletonMono_LuaMgr\");" };//
  450. int length = fdatas.Length;
  451. string newstr = "";
  452. for (int i = 0; i < length; i++)
  453. {
  454. if (fdatas[i].Contains(ckStr))
  455. {
  456. string[] strarr = fdatas[i].Split("typeof(",StringSplitOptions.RemoveEmptyEntries);
  457. string classname = strarr[1].Substring(0, strarr[1].IndexOf(")"));
  458. if (classname.Contains("."))
  459. {
  460. int stid = classname.LastIndexOf('.');
  461. classname = classname.Substring(stid+1);
  462. }
  463. if (classname.Contains("<"))
  464. {
  465. string[] names = classname.Split(new char[]{ '<','>'},StringSplitOptions.RemoveEmptyEntries);
  466. if (names.Length == 1)
  467. {
  468. classname = names[0];
  469. }
  470. else if (names[1].Contains(','))
  471. {
  472. string[] subNames = names[1].Split(',',StringSplitOptions.RemoveEmptyEntries);
  473. classname = names[0];
  474. foreach (var item in subNames)
  475. {
  476. classname = $"{classname}_{item}";
  477. }
  478. }
  479. else
  480. {
  481. classname = $"{names[0]}_{names[1]}";
  482. }
  483. }
  484. Debug.Log($"Class Name = {classname}");
  485. string nameStr = $"\"{classname}\"";
  486. if (!fdatas[i].Contains(nameStr))
  487. {
  488. int endid = fdatas[i].LastIndexOf(")");
  489. newstr = fdatas[i].Substring(0, endid);
  490. newstr += $", {nameStr});";
  491. fdatas[i] = newstr;
  492. Debug.Log($"New String = {newstr}");
  493. }
  494. break;
  495. }
  496. }
  497. if (newstr != "")
  498. {
  499. //Debug.Log("写");
  500. File.WriteAllLines(path,fdatas);
  501. }
  502. }
  503. public static string GetABFileName(string abName,string s_ObscureKey)
  504. {
  505. try
  506. {
  507. using (var md5 = new MD5CryptoServiceProvider())
  508. {
  509. UTF8Encoding encoding = new UTF8Encoding(false);
  510. byte[] bytes = encoding.GetBytes((abName + s_ObscureKey).ToLower());
  511. bytes = md5.ComputeHash(bytes);
  512. StringBuilder sb = new StringBuilder();
  513. for (int i = 0; i < bytes.Length; i++)
  514. {
  515. sb.Append(bytes[i].ToString("x2"));
  516. }
  517. return sb.ToString();
  518. }
  519. }
  520. catch (Exception e)
  521. {
  522. Debug.LogException(e);
  523. }
  524. return abName;
  525. }
  526. private void MakeAbHxNameAssets()
  527. {
  528. List<VersionInfoData> baseData = GetInfoDatas(curResInfo.BaseNameFileInfoPath);
  529. AbNameHxInfo hxInfo = curResInfo.abNameHxInfo == null? new AbNameHxInfo():curResInfo.abNameHxInfo;
  530. if (hxInfo.Infos == null)
  531. hxInfo.Infos = new List<abNameInfo>();
  532. foreach (var item in baseData)
  533. {
  534. string hxName = GetABFileName(item.FullName,curResInfo.hxKey);
  535. abNameInfo nameInfo = new abNameInfo()
  536. {
  537. BaseName = item.FullName,
  538. HxName = hxName,
  539. };
  540. hxInfo.Infos.Add(nameInfo);
  541. }
  542. curResInfo.abNameHxInfo = hxInfo;
  543. }
  544. public Dictionary<string,string> GetCurInfoAbNameInfos()
  545. {
  546. Dictionary<string, string> abinfos = new Dictionary<string, string>();
  547. foreach (var item in curResInfo.abNameHxInfo.Infos)
  548. {
  549. abinfos.Add(item.HxName,item.BaseName);
  550. }
  551. return abinfos;
  552. }
  553. }