mirror of
https://github.com/netchx/netch.git
synced 2026-05-07 22:44:03 +08:00
Move bin folder check before create directories exist.
cleanup Core.bin strings
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
public const string AioDnsRuleFile = "bin\\aiodns.conf";
|
||||
public const string NFDriver = "bin\\nfdriver.sys";
|
||||
public const string NFCore = "bin\\core.bin";
|
||||
public const string STUNServersFile = "bin\\stun.txt";
|
||||
|
||||
public const string LogFile = "logging\\application.log";
|
||||
|
||||
@@ -45,6 +45,13 @@ namespace Netch
|
||||
var binPath = Path.Combine(Global.NetchDir, "bin");
|
||||
Environment.SetEnvironmentVariable("PATH", $"{Environment.GetEnvironmentVariable("PATH")};{binPath}");
|
||||
|
||||
if (!Directory.Exists("bin") || !Directory.EnumerateFileSystemEntries("bin").Any())
|
||||
{
|
||||
i18N.Load("System");
|
||||
MessageBoxX.Show(i18N.Translate("Please extract all files then run the program!"));
|
||||
Environment.Exit(2);
|
||||
}
|
||||
|
||||
Updater.CleanOld(Global.NetchDir);
|
||||
|
||||
// 预创建目录
|
||||
@@ -86,12 +93,6 @@ namespace Netch
|
||||
// 加载语言
|
||||
i18N.Load(Global.Settings.Language);
|
||||
|
||||
if (!Directory.Exists("bin") || !Directory.EnumerateFileSystemEntries("bin").Any())
|
||||
{
|
||||
MessageBoxX.Show(i18N.Translate("Please extract all files then run the program!"));
|
||||
Environment.Exit(2);
|
||||
}
|
||||
|
||||
Task.Run(LogEnvironment).Forget();
|
||||
CheckClr();
|
||||
CheckOS();
|
||||
@@ -137,8 +138,11 @@ namespace Netch
|
||||
{
|
||||
Log.Information("CLR: {Version}", Environment.Version);
|
||||
Flags.NoSupport = true;
|
||||
if(!Global.Settings.NoSupportDialog)
|
||||
MessageBoxX.Show(i18N.TranslateFormat("{0} won't get developers' support, Please do not report any issues or seek help from developers.", "CLR " + Environment.Version), LogLevel.WARNING);
|
||||
if (!Global.Settings.NoSupportDialog)
|
||||
MessageBoxX.Show(
|
||||
i18N.TranslateFormat("{0} won't get developers' support, Please do not report any issues or seek help from developers.",
|
||||
"CLR " + Environment.Version),
|
||||
LogLevel.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +151,11 @@ namespace Netch
|
||||
if (Environment.OSVersion.Version.Build < 17763)
|
||||
{
|
||||
Flags.NoSupport = true;
|
||||
if(!Global.Settings.NoSupportDialog)
|
||||
MessageBoxX.Show(i18N.TranslateFormat("{0} won't get developers' support, Please do not report any issues or seek help from developers.", Environment.OSVersion), LogLevel.WARNING);
|
||||
if (!Global.Settings.NoSupportDialog)
|
||||
MessageBoxX.Show(
|
||||
i18N.TranslateFormat("{0} won't get developers' support, Please do not report any issues or seek help from developers.",
|
||||
Environment.OSVersion),
|
||||
LogLevel.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,8 +178,7 @@
|
||||
|
||||
"The {0} port is in use.": "{0} 端口已被占用",
|
||||
"The {0} port is reserved by system.": "{0} 端口是系统保留端口",
|
||||
|
||||
"\"Core.bin\" is missing. Please check your Antivirus software": "找不到 \"Core.bin\" 文件!请检查你的杀毒软件。",
|
||||
|
||||
"{0} won't get developers' support, Please do not report any issues or seek help from developers.": "{0} 将不会得到开发者的支持,请不要报告任何问题或寻求开发人员的帮助。",
|
||||
"No Support": "不受支持"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user