mirror of https://github.com/2dust/v2rayN
Rename v2rayUpgrade 2 AmazTool
parent
fea7c9fbd7
commit
3c45ef624a
|
@ -1,4 +1,4 @@
|
|||
namespace v2rayUpgrade
|
||||
namespace AmazTool
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
|
||||
var fileName = Uri.UnescapeDataString(string.Join(" ", args));
|
||||
Upgrade.UpgradeApp(fileName);
|
||||
UpgradeApp.Upgrade(fileName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,11 +3,11 @@ using System.IO.Compression;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
namespace AmazTool
|
||||
{
|
||||
internal class Upgrade
|
||||
internal class UpgradeApp
|
||||
{
|
||||
public static void UpgradeApp(string fileName)
|
||||
public static void Upgrade(string fileName)
|
||||
{
|
||||
Console.WriteLine(fileName);
|
||||
Console.WriteLine("In progress, please wait...(正在进行中,请等待)");
|
||||
|
@ -105,7 +105,7 @@ namespace v2rayUpgrade
|
|||
|
||||
private static string GetExePath()
|
||||
{
|
||||
return Environment.ProcessPath ?? string.Empty;
|
||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
}
|
||||
|
||||
private static string StartupPath()
|
|
@ -750,7 +750,7 @@ namespace ServiceLib.Common
|
|||
/// <returns></returns>
|
||||
public static string GetExePath()
|
||||
{
|
||||
return Environment.ProcessPath ?? string.Empty;
|
||||
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||
}
|
||||
|
||||
public static string StartupPath()
|
||||
|
|
|
@ -137,7 +137,7 @@ namespace ServiceLib.ViewModels
|
|||
var result = await CreateZipFileFromDirectory(fileBackup);
|
||||
if (result)
|
||||
{
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -235,7 +235,7 @@ namespace ServiceLib.ViewModels
|
|||
{
|
||||
return;
|
||||
}
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
||||
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -437,13 +437,13 @@ namespace ServiceLib.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public async Task V2rayUpgrade(string fileName)
|
||||
public async Task UpgradeApp(string fileName)
|
||||
{
|
||||
Process process = new()
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "v2rayUpgrade",
|
||||
FileName = "AmazTool",
|
||||
Arguments = fileName.AppendQuotes(),
|
||||
WorkingDirectory = Utils.StartupPath()
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceLib", "ServiceLib\Se
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayN.Desktop", "v2rayN.Desktop\v2rayN.Desktop.csproj", "{5D16541A-F971-4C17-9315-BB8955E3F984}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayUpgrade", "v2rayUpgrade\v2rayUpgrade.csproj", "{47D68B1C-601C-4C69-873B-FFF0DC13EC97}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AmazTool", "AmazTool\AmazTool.csproj", "{47D68B1C-601C-4C69-873B-FFF0DC13EC97}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
Loading…
Reference in New Issue