Check for standalone windows .Net version

pull/5636/head
2dust 2024-08-29 10:09:45 +08:00
parent 6721d150e0
commit 48a5cbc552
5 changed files with 28 additions and 0 deletions

View File

@ -3525,5 +3525,14 @@ namespace ServiceLib.Resx {
return ResourceManager.GetString("UngroupedServers", resourceCulture);
}
}
/// <summary>
/// 查找类似 You are currently running a standalone package, please manually download the SelfContained.7z file to unzip and overwrite it! 的本地化字符串。
/// </summary>
public static string UpdateStandalonePackageTip {
get {
return ResourceManager.GetString("UpdateStandalonePackageTip", resourceCulture);
}
}
}
}

View File

@ -1273,4 +1273,7 @@
<data name="menuShowOrHideMainWindow" xml:space="preserve">
<value>Show or hide the main window</value>
</data>
<data name="UpdateStandalonePackageTip" xml:space="preserve">
<value>You are currently running a standalone package, please manually download the SelfContained.7z file to unzip and overwrite it!</value>
</data>
</root>

View File

@ -1270,4 +1270,7 @@
<data name="menuShowOrHideMainWindow" xml:space="preserve">
<value>显示或隐藏主界面</value>
</data>
<data name="UpdateStandalonePackageTip" xml:space="preserve">
<value>您当前运行的是独立包,请手动下载 SelfContained.7z文件解压覆盖</value>
</data>
</root>

View File

@ -1150,4 +1150,7 @@
<data name="menuShowOrHideMainWindow" xml:space="preserve">
<value>顯示或隱藏主介面</value>
</data>
<data name="UpdateStandalonePackageTip" xml:space="preserve">
<value>您目前運行的是獨立包,請手動下載 SelfContained.7z檔案解壓縮覆蓋</value>
</data>
</root>

View File

@ -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);