From 48a5cbc5527b6b2d436c0d847663aca38affdb3d Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:09:45 +0800 Subject: [PATCH] Check for standalone windows .Net version --- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 9 +++++++++ v2rayN/ServiceLib/Resx/ResUI.resx | 3 +++ v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 3 +++ v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 +++ v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | 10 ++++++++++ 5 files changed, 28 insertions(+) diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 3e13ff3a..778d30e9 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -3525,5 +3525,14 @@ namespace ServiceLib.Resx { return ResourceManager.GetString("UngroupedServers", resourceCulture); } } + + /// + /// 查找类似 You are currently running a standalone package, please manually download the SelfContained.7z file to unzip and overwrite it! 的本地化字符串。 + /// + public static string UpdateStandalonePackageTip { + get { + return ResourceManager.GetString("UpdateStandalonePackageTip", resourceCulture); + } + } } } diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 5e68a467..4b7150e4 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1273,4 +1273,7 @@ Show or hide the main window + + You are currently running a standalone package, please manually download the SelfContained.7z file to unzip and overwrite it! + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index 9585f28c..97408e05 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1270,4 +1270,7 @@ 显示或隐藏主界面 + + 您当前运行的是独立包,请手动下载 SelfContained.7z文件解压覆盖 + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index fd861acb..9b174a9f 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1150,4 +1150,7 @@ 顯示或隱藏主介面 + + 您目前運行的是獨立包,請手動下載 SelfContained.7z檔案解壓縮覆蓋 + \ No newline at end of file diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index 1c713159..e21fe4c9 100644 --- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -722,6 +722,16 @@ namespace ServiceLib.ViewModels private void CheckUpdateN() { + //Check for standalone windows .Net version + if (Utils.IsWindows() + && File.Exists(Path.Combine(Utils.StartupPath(), "wpfgfx_cor3.dll")) + && File.Exists(Path.Combine(Utils.StartupPath(), "D3DCompiler_47_cor3.dll")) + ) + { + _noticeHandler?.SendMessageAndEnqueue(ResUI.UpdateStandalonePackageTip); + return; + } + void _updateUI(bool success, string msg) { _noticeHandler?.SendMessage(msg);