From a789a2cb95b00885c9d3da84a0b276a1890ff513 Mon Sep 17 00:00:00 2001 From: llama Date: Fri, 24 Oct 2025 19:24:10 +0800 Subject: [PATCH] add uninstall rpcs and state --- proto/anki/launcher.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/proto/anki/launcher.proto b/proto/anki/launcher.proto index 3e4f3cadb..4fa4815aa 100644 --- a/proto/anki/launcher.proto +++ b/proto/anki/launcher.proto @@ -23,6 +23,9 @@ service LauncherService { rpc GetAvailableVersions(generic.Empty) returns (Versions); rpc GetExistingVersions(generic.Empty) returns (ExistingVersions); + rpc GetUninstallInfo(generic.Empty) returns (Uninstall); + rpc UninstallAnki(UninstallRequest) returns (UninstallResponse); + rpc LaunchAnki(generic.Empty) returns (generic.Empty); rpc Exit(generic.Empty) returns (generic.Empty); } @@ -92,6 +95,23 @@ message ChooseVersionResponse { bool warming_up = 2; } +message UninstallRequest { + bool delete_base_folder = 1; +} + +message UninstallResponse { + message WindowsInstallerError { + string error = 1; + string path = 2; + } + oneof action_needed { + string unix_script = 1; + google.protobuf.Empty mac_manual = 2; + WindowsInstallerError windows_installer_failed = 3; + google.protobuf.Empty windows_installer_not_found = 4; + } +} + message ZoomWebviewRequest { float scale_factor = 1; } @@ -112,6 +132,11 @@ message ExistingVersions { bool pyproject_modified_by_user = 3; } +message Uninstall { + bool anki_program_files_exists = 1; + bool anki_base_folder_exists = 2; +} + message NormalState { Options options = 1; }