Добавлена настройка пути updater.exe
This commit is contained in:
@@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade
|
||||
/// Обновление через внешний Updater.exe.
|
||||
/// </summary>
|
||||
public static async Task UpdateWithExternalAsync(
|
||||
string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest")
|
||||
string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest", string? updaterExePath = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -88,12 +88,12 @@ public static class ReleaseUpdaterFacade
|
||||
|
||||
BeforeInstall?.Invoke();
|
||||
|
||||
var updaterExe = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe");
|
||||
if (updaterExePath == null) updaterExePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe");
|
||||
var args = $"--zip \"{zipPath}\" --installPath \"{installPath}\" --appExe \"{appExe}\"";
|
||||
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = updaterExe,
|
||||
FileName = updaterExePath,
|
||||
Arguments = args,
|
||||
UseShellExecute = true,
|
||||
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory
|
||||
|
||||
Reference in New Issue
Block a user