123456789101112131415161718192021222324252627282930313233343536373839 |
- using FisTools;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace fis.Loader.Handlers
- {
- internal class PartUpgradeHandler : BaseHandler
- {
- private string _fisFileDir = AppDomain.CurrentDomain.BaseDirectory;
- public PartUpgradeHandler() : base(LaunchMethodEnum.PartUpgrade)
- {
- }
- internal override void Execute()
- {
- if (IsCartSystemVersion)
- {
- KillDamon();
- }
- ToolManager.Instance.UpgradeCenter.ExecutePartUpgrade(Logger.WriteLine);
- var fisFileDir = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName;
- var fileName = Path.Combine(fisFileDir, "fis.exe");
- Logger.WriteLine($"IsCartSystemVersion:{IsCartSystemVersion}");
- if (IsCartSystemVersion)
- {
- Logger.WriteLine("IsCartSystemVersion StartDamon");
- StartDamon(fileName, fisFileDir);
- }
- else
- {
- Logger.WriteLine("Normal start fis.exe");
- ToolManager.Instance.LoaderCenter.StartProcessWithWorkingDirectory(fileName, _fisFileDir);
- }
- }
- }
- }
|