public override void Enter(AutoUpdateMgr target) { // 解压 string zipFileMd5 = target.CurrUpdateZipFileMd5; string writePath = target.WritePath; if (string.IsNullOrEmpty(zipFileMd5) || string.IsNullOrEmpty(writePath)) { AutoUpdateMgr.Instance.EndAutoUpdate(); } string zipFileName = string.Format("{0}/{1}", writePath, zipFileMd5); if (!File.Exists(zipFileName)) { target.Error(AutoUpdateErrorType.auError_ResZipVerReq, 0); return; } // 未写完, 解压完要改名,删除冗余的 ZipTools.UnCompress(zipFileMd5); if (m_UnZipTimer == null) { m_UnZipTimer = TimerMgr.Instance.CreateTimer(false, 0, true, true); m_UnZipTimer.AddListener(OnUnZipTimer); } else { m_UnZipTimer.Start(); } }
public override void Enter(AutoUpdateMgr target) { // 解压 string zipFileMd5 = target.CurrUpdateZipFileMd5; string writePath = target.WritePath; if (string.IsNullOrEmpty(zipFileMd5) || string.IsNullOrEmpty(writePath)) { AutoUpdateMgr.Instance.EndAutoUpdate(); } string zipFileName = string.Format("{0}/{1}", writePath, zipFileMd5); if (!File.Exists(zipFileName)) { target.Error(AutoUpdateErrorType.auError_ResZipVerReq, 0); return; } // 未写完, 解压完要改名,删除冗余的 ZipTools.UnCompress(zipFileMd5); }