mirror of
https://github.com/snltty/linker.git
synced 2025-12-19 18:06:47 +08:00
更新完自动关闭程序
This commit is contained in:
3
.github/workflows/dotnet.yml
vendored
3
.github/workflows/dotnet.yml
vendored
@@ -57,7 +57,8 @@ jobs:
|
|||||||
2. 自动更新,客户端和服务端
|
2. 自动更新,客户端和服务端
|
||||||
3. 更多的消息提醒,需要重启时提醒
|
3. 更多的消息提醒,需要重启时提醒
|
||||||
4. 脑抽
|
4. 脑抽
|
||||||
5. 请更新服务端
|
5. 更新完自动重启
|
||||||
|
6. 请更新服务端
|
||||||
|
|
||||||
- name: upload win x64
|
- name: upload win x64
|
||||||
id: upload-win-x64
|
id: upload-win-x64
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using linker.config;
|
using linker.config;
|
||||||
using linker.plugins.client;
|
using linker.plugins.client;
|
||||||
using linker.plugins.messenger;
|
using linker.plugins.messenger;
|
||||||
using linker.plugins.server;
|
|
||||||
using linker.plugins.updater.messenger;
|
using linker.plugins.updater.messenger;
|
||||||
using MemoryPack;
|
using MemoryPack;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|||||||
@@ -46,8 +46,9 @@ namespace linker.plugins.updater
|
|||||||
|
|
||||||
updateInfo.Status = UpdateStatus.Checked;
|
updateInfo.Status = UpdateStatus.Checked;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
LoggerHelper.Instance.Error(ex);
|
||||||
updateInfo.Status = status;
|
updateInfo.Status = status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,10 +96,7 @@ namespace linker.plugins.updater
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG)
|
LoggerHelper.Instance.Error(ex);
|
||||||
{
|
|
||||||
LoggerHelper.Instance.Error(ex);
|
|
||||||
}
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Delete("updater.zip");
|
File.Delete("updater.zip");
|
||||||
@@ -183,10 +181,7 @@ namespace linker.plugins.updater
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG)
|
LoggerHelper.Instance.Error(ex);
|
||||||
{
|
|
||||||
LoggerHelper.Instance.Error(ex);
|
|
||||||
}
|
|
||||||
updateInfo.Status = status;
|
updateInfo.Status = status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,6 +192,7 @@ namespace linker.plugins.updater
|
|||||||
{
|
{
|
||||||
await DownloadUpdate(updateInfo, version);
|
await DownloadUpdate(updateInfo, version);
|
||||||
await ExtractUpdate(updateInfo);
|
await ExtractUpdate(updateInfo);
|
||||||
|
Environment.Exit(1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user