From 6588bbd60d397bcc9290a379bbd743376c1a6377 Mon Sep 17 00:00:00 2001 From: shept Date: Wed, 24 Sep 2025 19:37:48 +0500 Subject: [PATCH 1/5] add version text --- MetaforceInstaller.UI/MainWindow.axaml | 19 +++++++++++++------ MetaforceInstaller.UI/MainWindow.axaml.cs | 5 ++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/MetaforceInstaller.UI/MainWindow.axaml b/MetaforceInstaller.UI/MainWindow.axaml index 61a426d..e3c5bbc 100644 --- a/MetaforceInstaller.UI/MainWindow.axaml +++ b/MetaforceInstaller.UI/MainWindow.axaml @@ -45,12 +45,19 @@ HorizontalAlignment="Stretch" /> - - + + + + + ()?.Version; + _adbService = new AdbService(); _adbService.ProgressChanged += OnAdbProgressChanged; From 3d90099e205d0c0244dbb210b98ab54b4ab03354 Mon Sep 17 00:00:00 2001 From: shept Date: Fri, 16 Jan 2026 17:35:51 +0500 Subject: [PATCH 2/5] probably fix adb missing error --- MetaforceInstaller.Core/MetaforceInstaller.Core.csproj | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj b/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj index 0a85bfc..bfa748c 100644 --- a/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj +++ b/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj @@ -8,8 +8,14 @@ - - + + PreserveNewest + AdbWinApi.dll + + + PreserveNewest + AdbWinUsbApi.dll + From 302d5a3807f269d47f030d387f32cb23fedaa129 Mon Sep 17 00:00:00 2001 From: shept Date: Fri, 16 Jan 2026 18:56:38 +0500 Subject: [PATCH 3/5] fix reference duplicaiton --- .../MetaforceInstaller.Core.csproj | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj b/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj index bfa748c..e1484a8 100644 --- a/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj +++ b/MetaforceInstaller.Core/MetaforceInstaller.Core.csproj @@ -7,7 +7,7 @@ - + PreserveNewest AdbWinApi.dll @@ -18,15 +18,10 @@ - - - - - - - - + + + From dc7b0660fc9a008c310a20d15e249207b00e6c51 Mon Sep 17 00:00:00 2001 From: shept Date: Fri, 16 Jan 2026 18:58:54 +0500 Subject: [PATCH 4/5] pump version to 1.2.2 --- MetaforceInstaller.UI/MetaforceInstaller.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaforceInstaller.UI/MetaforceInstaller.UI.csproj b/MetaforceInstaller.UI/MetaforceInstaller.UI.csproj index 26ffaf3..51d3fc6 100644 --- a/MetaforceInstaller.UI/MetaforceInstaller.UI.csproj +++ b/MetaforceInstaller.UI/MetaforceInstaller.UI.csproj @@ -8,7 +8,7 @@ true app.manifest true - 1.2.1 + 1.2.2 From 808826fdc94fa4cd6c55c5b8c5eff2c57b927b96 Mon Sep 17 00:00:00 2001 From: shept Date: Sat, 24 Jan 2026 12:24:57 +0500 Subject: [PATCH 5/5] probably remove startup bottleneck --- .../Services/AdbService.cs | 2 -- MetaforceInstaller.UI/MainWindow.axaml.cs | 27 +++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/MetaforceInstaller.Core/Services/AdbService.cs b/MetaforceInstaller.Core/Services/AdbService.cs index ddf790f..8ff60f7 100644 --- a/MetaforceInstaller.Core/Services/AdbService.cs +++ b/MetaforceInstaller.Core/Services/AdbService.cs @@ -53,8 +53,6 @@ public class AdbService : IAdbService if (File.Exists(adbPath)) return adbPath; ExtractResource("MetaforceInstaller.Core.adb.adb.exe", adbPath); - ExtractResource("MetaforceInstaller.Core.adb.AdbWinApi.dll", Path.Combine(tempDir, "AdbWinApi.dll")); - ExtractResource("MetaforceInstaller.Core.adb.AdbWinUsbApi.dll", Path.Combine(tempDir, "AdbWinUsbApi.dll")); return adbPath; } diff --git a/MetaforceInstaller.UI/MainWindow.axaml.cs b/MetaforceInstaller.UI/MainWindow.axaml.cs index 6c24f34..66866b9 100644 --- a/MetaforceInstaller.UI/MainWindow.axaml.cs +++ b/MetaforceInstaller.UI/MainWindow.axaml.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Reflection; +using System.Threading.Tasks; using Avalonia.Controls; using Avalonia.Interactivity; using Avalonia.Platform.Storage; @@ -30,11 +31,8 @@ public partial class MainWindow : Window LogMessage("MetaforceInstaller by slavagm"); VersionTextBlock.Text = Assembly.GetExecutingAssembly() .GetCustomAttribute()?.Version; - - - _adbService = new AdbService(); - _adbService.ProgressChanged += OnAdbProgressChanged; - _adbService.StatusChanged += OnAdbStatusChanged; + + _ = InitializeAdbAsync(); CheckAndEnableInstallButton(); @@ -43,6 +41,19 @@ public partial class MainWindow : Window InstallButton.Click += OnInstallClicked; } + private async Task InitializeAdbAsync() + { + LogMessage("Инициализация ADB сервера..."); + await Task.Run(() => + { + _adbService = new AdbService(); + _adbService.ProgressChanged += OnAdbProgressChanged; + _adbService.StatusChanged += OnAdbStatusChanged; + }); + + LogMessage("ADB сервер готов"); + } + private void OnAdbProgressChanged(object? sender, ProgressInfo e) { Dispatcher.UIThread.InvokeAsync(() => @@ -182,6 +193,12 @@ public partial class MainWindow : Window return; } + if (_adbService == null) + { + LogMessage("ADB сервис еще инициализируется, попробуйте позже"); + return; + } + _adbService.RefreshDeviceData(); InstallButton.IsEnabled = false;