Add linux download url

This commit is contained in:
2dust
2024-08-27 13:06:39 +08:00
parent 6f3e4b3682
commit 43753b1b7a
9 changed files with 90 additions and 98 deletions
+17
View File
@@ -33,6 +33,22 @@ namespace ServiceLib.Common
}
}
public static void UncompressedFile(string fileName, string toPath, string? toName)
{
try
{
FileInfo fileInfo = new(fileName);
using FileStream originalFileStream = fileInfo.OpenRead();
using FileStream decompressedFileStream = File.Create(toName != null ? Path.Combine(toPath, toName) : toPath);
using GZipStream decompressionStream = new(originalFileStream, CompressionMode.Decompress);
decompressionStream.CopyTo(decompressedFileStream);
}
catch (Exception ex)
{
Logging.SaveLog(ex.Message, ex);
}
}
public static string NonExclusiveReadAllText(string path)
{
return NonExclusiveReadAllText(path, Encoding.Default);
@@ -99,5 +115,6 @@ namespace ServiceLib.Common
}
return true;
}
}
}
+5 -3
View File
@@ -593,20 +593,22 @@ namespace ServiceLib.Common
string location = GetExePath();
if (blFull)
{
return string.Format("v2rayN - V{0} - {1}",
return string.Format("{0} - V{1} - {2}",
Global.AppName,
FileVersionInfo.GetVersionInfo(location).FileVersion?.ToString(),
File.GetLastWriteTime(location).ToString("yyyy/MM/dd"));
}
else
{
return string.Format("v2rayN/{0}",
return string.Format("{0}/{1}",
Global.AppName,
FileVersionInfo.GetVersionInfo(location).FileVersion?.ToString());
}
}
catch (Exception ex)
{
Logging.SaveLog(ex.Message, ex);
return string.Empty;
return Global.AppName;
}
}