mirror of https://github.com/2dust/v2rayN
Bug fix
parent
f10f7b6268
commit
f0dbb6b22c
|
@ -572,14 +572,14 @@ namespace ServiceLib.Common
|
||||||
{
|
{
|
||||||
return string.Format("{0} - V{1} - {2}",
|
return string.Format("{0} - V{1} - {2}",
|
||||||
Global.AppName,
|
Global.AppName,
|
||||||
FileVersionInfo.GetVersionInfo(location).FileVersion?.ToString(),
|
GetVersionInfo(),
|
||||||
File.GetLastWriteTime(location).ToString("yyyy/MM/dd"));
|
File.GetLastWriteTime(location).ToString("yyyy/MM/dd"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return string.Format("{0}/{1}",
|
return string.Format("{0}/{1}",
|
||||||
Global.AppName,
|
Global.AppName,
|
||||||
FileVersionInfo.GetVersionInfo(location).FileVersion?.ToString());
|
GetVersionInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -589,6 +589,20 @@ namespace ServiceLib.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetVersionInfo()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string location = GetExePath();
|
||||||
|
return FileVersionInfo.GetVersionInfo(location)?.FileVersion ?? "0.0";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logging.SaveLog(ex.Message, ex);
|
||||||
|
return "0.0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 取得GUID
|
/// 取得GUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -418,7 +418,7 @@ namespace ServiceLib.Handler
|
||||||
}
|
}
|
||||||
case ECoreType.v2rayN:
|
case ECoreType.v2rayN:
|
||||||
{
|
{
|
||||||
curVersion = new SemanticVersion(FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString());
|
curVersion = new SemanticVersion(Utils.GetVersionInfo());
|
||||||
message = string.Format(ResUI.IsLatestN, type, curVersion);
|
message = string.Format(ResUI.IsLatestN, type, curVersion);
|
||||||
url = string.Format(GetUrlFromCore(coreInfo), version);
|
url = string.Format(GetUrlFromCore(coreInfo), version);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue