mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-15 00:45:01 +03:00
Add linux download url
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user