mirror of https://github.com/2dust/v2rayN
Temporary fix for arm64 grpc issues
parent
cc3d1ff7de
commit
6114e4ff55
|
@ -1,4 +1,5 @@
|
|||
using System.Windows;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using v2rayN.Handler;
|
||||
using v2rayN.Mode;
|
||||
|
@ -64,6 +65,10 @@ namespace v2rayN
|
|||
Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
if (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.X64)
|
||||
{
|
||||
_config.guiItem.enableStatistics = false;
|
||||
}
|
||||
}
|
||||
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
|
|
|
@ -200,9 +200,9 @@ namespace v2rayN.Handler
|
|||
coreType = ECoreType.v2rayN,
|
||||
coreUrl = Global.NUrl,
|
||||
coreReleaseApiUrl = Global.NUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||
coreDownloadUrl32 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
||||
coreDownloadUrl32 = Global.NUrl + "/download/{0}/v2rayN-32.zip",
|
||||
coreDownloadUrl64 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
||||
coreDownloadUrlArm64= Global.NUrl + "/download/{0}/v2rayN.zip"
|
||||
coreDownloadUrlArm64 = Global.NUrl + "/download/{0}/v2rayN-arm64.zip"
|
||||
});
|
||||
|
||||
coreInfos.Add(new CoreInfo
|
||||
|
@ -214,7 +214,7 @@ namespace v2rayN.Handler
|
|||
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||
coreDownloadUrlArm64= Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||
coreDownloadUrlArm64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||
match = "V2Ray",
|
||||
versionArg = "-version",
|
||||
redirectInfo = true,
|
||||
|
|
|
@ -443,11 +443,18 @@ namespace v2rayN.Handler
|
|||
{
|
||||
curVersion = "v" + getCoreVersion(type);
|
||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||
|
||||
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
|
||||
string osBit = "64";
|
||||
switch (RuntimeInformation.ProcessArchitecture)
|
||||
{
|
||||
osBit = "arm64-v8a";
|
||||
case Architecture.Arm64:
|
||||
osBit = "arm64-v8a";
|
||||
break;
|
||||
case Architecture.X86:
|
||||
osBit = "32";
|
||||
break;
|
||||
default:
|
||||
osBit = "64";
|
||||
break;
|
||||
}
|
||||
|
||||
url = string.Format(coreInfo.coreDownloadUrl64, version, osBit);
|
||||
|
@ -458,27 +465,36 @@ namespace v2rayN.Handler
|
|||
{
|
||||
curVersion = getCoreVersion(type);
|
||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||
if (Environment.Is64BitProcess)
|
||||
switch (RuntimeInformation.ProcessArchitecture)
|
||||
{
|
||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||
case Architecture.Arm64:
|
||||
url = string.Format(coreInfo.coreDownloadUrlArm64, version);
|
||||
break;
|
||||
case Architecture.X86:
|
||||
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
||||
break;
|
||||
default:
|
||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
||||
}
|
||||
|
||||
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
|
||||
{
|
||||
url = string.Format(coreInfo.coreDownloadUrlArm64, version);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case ECoreType.v2rayN:
|
||||
{
|
||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||
message = string.Format(ResUI.IsLatestN, curVersion);
|
||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||
switch (RuntimeInformation.ProcessArchitecture)
|
||||
{
|
||||
case Architecture.Arm64:
|
||||
url = string.Format(coreInfo.coreDownloadUrlArm64, version);
|
||||
break;
|
||||
case Architecture.X86:
|
||||
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
||||
break;
|
||||
default:
|
||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue