Implement self-update recovery (T-403)

This commit is contained in:
ila
2026-07-19 22:00:38 +08:00
parent 2900deba4f
commit 13004218cf
35 changed files with 1754 additions and 16 deletions
+4
View File
@@ -6,6 +6,7 @@ import (
"time"
"softbox.local/core/application/launch"
"softbox.local/core/updater"
)
// Edition identifies the application build channel shown by the UI.
@@ -26,6 +27,9 @@ type Platform interface {
IsRunning(appID, entrypoint string) (bool, error)
WaitForExit(ctx context.Context, appID, entrypoint string, timeout time.Duration) error
Start(command launch.Command) (int, error)
WaitForProcessExit(ctx context.Context, pid int, timeout time.Duration) error
StartSelfUpdate(command updater.StartCommand) (int, error)
SyncDirectory(path string) error
}
// New returns the platform implementation selected by build tags.