improve:自动更新

This commit is contained in:
2025-08-30 14:56:59 +08:00
parent 7095a5890c
commit 1a3130041f
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.8.1")] [assembly: AssemblyVersion("1.7.8.2")]
[assembly: AssemblyFileVersion("1.7.8.1")] [assembly: AssemblyFileVersion("1.7.8.2")]
+3 -3
View File
@@ -1851,8 +1851,8 @@ namespace Ink_Canvas.Helpers
return false; return false;
} }
// 执行安装,静默模式 // 执行安装,静默模式
InstallNewVersionApp(remoteVersion, false); InstallNewVersionApp(remoteVersion, true);
App.IsAppExitByUser = true; App.IsAppExitByUser = true;
Application.Current.Dispatcher.Invoke(() => Application.Current.Dispatcher.Invoke(() =>
{ {
@@ -1981,7 +1981,7 @@ namespace Ink_Canvas.Helpers
return false; return false;
} }
LogHelper.WriteLogToFile($"AutoUpdate | 手动安装版本: {version}"); LogHelper.WriteLogToFile($"AutoUpdate | 手动安装版本: {version}");
InstallNewVersionApp(version, false); InstallNewVersionApp(version, true);
App.IsAppExitByUser = true; App.IsAppExitByUser = true;
Application.Current.Dispatcher.Invoke(() => Application.Current.Dispatcher.Invoke(() =>
{ {
+1 -1
View File
@@ -843,7 +843,7 @@ namespace Ink_Canvas
App.IsAppExitByUser = true; App.IsAppExitByUser = true;
// 准备批处理脚本 // 准备批处理脚本
AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, false); AutoUpdateHelper.InstallNewVersionApp(AvailableLatestVersion, true); // 修改为静默模式,避免重复启动进程
// 关闭软件,让安装程序接管 // 关闭软件,让安装程序接管
Application.Current.Shutdown(); Application.Current.Shutdown();
+2 -2
View File
@@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.8.1")] [assembly: AssemblyVersion("1.7.8.2")]
[assembly: AssemblyFileVersion("1.7.8.1")] [assembly: AssemblyFileVersion("1.7.8.2")]
@@ -340,7 +340,7 @@ namespace Ink_Canvas
downloadUrl = Path.Combine(updatesFolderPath, $"InkCanvasForClass.CE.{version}.zip"); downloadUrl = Path.Combine(updatesFolderPath, $"InkCanvasForClass.CE.{version}.zip");
} }
LogHelper.WriteLogToFile($"AutoUpdate | 开始安装版本: {version}"); LogHelper.WriteLogToFile($"AutoUpdate | 开始安装版本: {version}");
AutoUpdateHelper.InstallNewVersionApp(version, false); AutoUpdateHelper.InstallNewVersionApp(version, true);
App.IsAppExitByUser = true; App.IsAppExitByUser = true;
Application.Current.Dispatcher.Invoke(() => Application.Current.Dispatcher.Invoke(() =>
{ {