From e6bf6f5091caf3b4366894643671bc4586794cda Mon Sep 17 00:00:00 2001
From: 魏曹先生 <1992414357@qq.com>
Date: Mon, 22 Jun 2026 06:15:44 +0800
Subject: feat: add GUI manager and integrate into build pipeline
---
Cargo.toml | 1 -
build.ps1 | 25 +++++++++++++++++++++++++
dmvop.sln | 34 ++++++++++++++++++++++++++++++++++
manager/.gitignore | 3 +++
manager/App.axaml | 10 ++++++++++
manager/App.axaml.cs | 23 +++++++++++++++++++++++
manager/MainWindow.axaml | 9 +++++++++
manager/MainWindow.axaml.cs | 11 +++++++++++
manager/Program.cs | 21 +++++++++++++++++++++
manager/app.manifest | 18 ++++++++++++++++++
manager/launcher/dmvop-gui.exe | Bin 0 -> 393728 bytes
manager/manager.csproj | 22 ++++++++++++++++++++++
run-manager.ps1 | 1 +
13 files changed, 177 insertions(+), 1 deletion(-)
create mode 100644 dmvop.sln
create mode 100644 manager/.gitignore
create mode 100644 manager/App.axaml
create mode 100644 manager/App.axaml.cs
create mode 100644 manager/MainWindow.axaml
create mode 100644 manager/MainWindow.axaml.cs
create mode 100644 manager/Program.cs
create mode 100644 manager/app.manifest
create mode 100644 manager/launcher/dmvop-gui.exe
create mode 100644 manager/manager.csproj
create mode 100644 run-manager.ps1
diff --git a/Cargo.toml b/Cargo.toml
index ac781be..b6778b1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,4 +37,3 @@ debug = false
panic = "abort"
incremental = false
codegen-units = 1
-lto = "fat"
diff --git a/build.ps1 b/build.ps1
index 05a77d7..12b63ee 100644
--- a/build.ps1
+++ b/build.ps1
@@ -20,6 +20,15 @@ if ($LASTEXITCODE -ne 0) {
exit 1
}
+# Build manager GUI
+Write-Host "=== Building dmvop-gui ===" -ForegroundColor Cyan
+dotnet publish manager/manager.csproj -c Release -o manager/publish
+if ($LASTEXITCODE -ne 0) {
+ Write-Host "GUI build failed!" -ForegroundColor Red
+ Set-Location $OrigDir
+ exit 1
+}
+
# Create build directory
if (-not (Test-Path $BuildDir)) {
New-Item -ItemType Directory -Path $BuildDir | Out-Null
@@ -31,6 +40,22 @@ Write-Host "=== Copying files ===" -ForegroundColor Cyan
Copy-Item (Join-Path $ReleaseDir "dmvop.exe") (Join-Path $BuildDir "dmvop.exe") -Force
Write-Host " [OK] dmvop.exe"
+# 1.5. gui launcher
+$LauncherSrc = Join-Path (Get-Location) "manager\launcher\dmvop-gui.exe"
+if (Test-Path $LauncherSrc) {
+ Copy-Item $LauncherSrc (Join-Path $BuildDir "dmvop-gui.exe") -Force
+ Write-Host " [OK] dmvop-gui.exe"
+}
+
+# 1.6. gui
+$GuiSrc = Join-Path (Get-Location) "manager\publish"
+$GuiDst = Join-Path $BuildDir "gui"
+if (Test-Path (Join-Path $GuiSrc "manager.exe")) {
+ if (-not (Test-Path $GuiDst)) { New-Item -ItemType Directory -Path $GuiDst | Out-Null }
+ Copy-Item "$GuiSrc\*" $GuiDst -Recurse -Force
+ Write-Host " [OK] gui\"
+}
+
# 2. CUDA backend
$CudaSrc = Join-Path $ReleaseDir "cuda"
$CudaDst = Join-Path $BuildDir "cuda"
diff --git a/dmvop.sln b/dmvop.sln
new file mode 100644
index 0000000..9beed64
--- /dev/null
+++ b/dmvop.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "manager", "manager\manager.csproj", "{EA777682-06EE-464F-8609-EF37F586FD3C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|x64.Build.0 = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Debug|x86.Build.0 = Debug|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|x64.ActiveCfg = Release|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|x64.Build.0 = Release|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|x86.ActiveCfg = Release|Any CPU
+ {EA777682-06EE-464F-8609-EF37F586FD3C}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/manager/.gitignore b/manager/.gitignore
new file mode 100644
index 0000000..df1d0c9
--- /dev/null
+++ b/manager/.gitignore
@@ -0,0 +1,3 @@
+bin
+obj
+publish
diff --git a/manager/App.axaml b/manager/App.axaml
new file mode 100644
index 0000000..d9eaaee
--- /dev/null
+++ b/manager/App.axaml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/manager/App.axaml.cs b/manager/App.axaml.cs
new file mode 100644
index 0000000..814a7de
--- /dev/null
+++ b/manager/App.axaml.cs
@@ -0,0 +1,23 @@
+using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Markup.Xaml;
+
+namespace manager;
+
+public partial class App : Application
+{
+ public override void Initialize()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+
+ public override void OnFrameworkInitializationCompleted()
+ {
+ if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ {
+ desktop.MainWindow = new MainWindow();
+ }
+
+ base.OnFrameworkInitializationCompleted();
+ }
+}
\ No newline at end of file
diff --git a/manager/MainWindow.axaml b/manager/MainWindow.axaml
new file mode 100644
index 0000000..1aa61b8
--- /dev/null
+++ b/manager/MainWindow.axaml
@@ -0,0 +1,9 @@
+
+ Welcome to Avalonia!
+
diff --git a/manager/MainWindow.axaml.cs b/manager/MainWindow.axaml.cs
new file mode 100644
index 0000000..82d8dc2
--- /dev/null
+++ b/manager/MainWindow.axaml.cs
@@ -0,0 +1,11 @@
+using Avalonia.Controls;
+
+namespace manager;
+
+public partial class MainWindow : Window
+{
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/manager/Program.cs b/manager/Program.cs
new file mode 100644
index 0000000..c2f6e74
--- /dev/null
+++ b/manager/Program.cs
@@ -0,0 +1,21 @@
+using Avalonia;
+using System;
+
+namespace manager;
+
+class Program
+{
+ // Initialization code. Don't use any Avalonia, third-party APIs or any
+ // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
+ // yet and stuff might break.
+ [STAThread]
+ public static void Main(string[] args) => BuildAvaloniaApp()
+ .StartWithClassicDesktopLifetime(args);
+
+ // Avalonia configuration, don't remove; also used by visual designer.
+ public static AppBuilder BuildAvaloniaApp()
+ => AppBuilder.Configure()
+ .UsePlatformDetect()
+ .WithInterFont()
+ .LogToTrace();
+}
diff --git a/manager/app.manifest b/manager/app.manifest
new file mode 100644
index 0000000..b22c3d2
--- /dev/null
+++ b/manager/app.manifest
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manager/launcher/dmvop-gui.exe b/manager/launcher/dmvop-gui.exe
new file mode 100644
index 0000000..56a7f39
Binary files /dev/null and b/manager/launcher/dmvop-gui.exe differ
diff --git a/manager/manager.csproj b/manager/manager.csproj
new file mode 100644
index 0000000..e21a361
--- /dev/null
+++ b/manager/manager.csproj
@@ -0,0 +1,22 @@
+
+
+ WinExe
+ net9.0
+ enable
+ true
+ app.manifest
+ true
+
+
+
+
+
+
+
+
+
+ None
+ All
+
+
+
diff --git a/run-manager.ps1 b/run-manager.ps1
new file mode 100644
index 0000000..76d5c2f
--- /dev/null
+++ b/run-manager.ps1
@@ -0,0 +1 @@
+dotnet run --project .\manager
--
cgit