add uninstall rpcs and state

This commit is contained in:
llama 2025-10-24 19:24:10 +08:00
parent c0eedbc2a4
commit a789a2cb95
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -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;
}