mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
Rename v2rayUpgrade 2 AmazTool
This commit is contained in:
parent
fea7c9fbd7
commit
3c45ef624a
8 changed files with 12 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
namespace v2rayUpgrade
|
namespace AmazTool
|
||||||
{
|
{
|
||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileName = Uri.UnescapeDataString(string.Join(" ", args));
|
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.Runtime.InteropServices;
|
||||||
using System.Text;
|
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(fileName);
|
||||||
Console.WriteLine("In progress, please wait...(正在进行中,请等待)");
|
Console.WriteLine("In progress, please wait...(正在进行中,请等待)");
|
||||||
|
@ -105,7 +105,7 @@ namespace v2rayUpgrade
|
||||||
|
|
||||||
private static string GetExePath()
|
private static string GetExePath()
|
||||||
{
|
{
|
||||||
return Environment.ProcessPath ?? string.Empty;
|
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string StartupPath()
|
private static string StartupPath()
|
|
@ -750,7 +750,7 @@ namespace ServiceLib.Common
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetExePath()
|
public static string GetExePath()
|
||||||
{
|
{
|
||||||
return Environment.ProcessPath ?? string.Empty;
|
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string StartupPath()
|
public static string StartupPath()
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace ServiceLib.ViewModels
|
||||||
var result = await CreateZipFileFromDirectory(fileBackup);
|
var result = await CreateZipFileFromDirectory(fileBackup);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -235,7 +235,7 @@ namespace ServiceLib.ViewModels
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Locator.Current.GetService<MainWindowViewModel>()?.V2rayUpgrade(fileName);
|
Locator.Current.GetService<MainWindowViewModel>()?.UpgradeApp(fileName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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()
|
Process process = new()
|
||||||
{
|
{
|
||||||
StartInfo = new ProcessStartInfo
|
StartInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "v2rayUpgrade",
|
FileName = "AmazTool",
|
||||||
Arguments = fileName.AppendQuotes(),
|
Arguments = fileName.AppendQuotes(),
|
||||||
WorkingDirectory = Utils.StartupPath()
|
WorkingDirectory = Utils.StartupPath()
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceLib", "ServiceLib\Se
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayN.Desktop", "v2rayN.Desktop\v2rayN.Desktop.csproj", "{5D16541A-F971-4C17-9315-BB8955E3F984}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "v2rayN.Desktop", "v2rayN.Desktop\v2rayN.Desktop.csproj", "{5D16541A-F971-4C17-9315-BB8955E3F984}"
|
||||||
EndProject
|
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
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
Loading…
Reference in a new issue