mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Add launch service
This commit is contained in:
22
src/ui.rs
22
src/ui.rs
@@ -363,6 +363,20 @@ impl UI {
|
||||
options.insert(key, value);
|
||||
}
|
||||
ipc::set_options(options.clone()).ok();
|
||||
|
||||
#[cfg(macos)]
|
||||
if key == "stop-service" {
|
||||
let mut service_script = "./privileges_scripts/stop_service.scpt";
|
||||
if value == "Y" {
|
||||
command = "./privileges_scripts/launch_service.scpt";
|
||||
}
|
||||
|
||||
std::process::Command::new("osascript")
|
||||
.arg(service_script)
|
||||
.status()
|
||||
.unwrap()
|
||||
.success();
|
||||
}
|
||||
}
|
||||
|
||||
fn install_path(&mut self) -> String {
|
||||
@@ -525,6 +539,13 @@ impl UI {
|
||||
return true;
|
||||
}
|
||||
|
||||
fn is_installed_daemon(&mut self, _prompt: bool) -> bool {
|
||||
#[cfg(target_os = "macos")]
|
||||
return crate::platform::macos::is_installed_daemon(_prompt);
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
return true;
|
||||
}
|
||||
|
||||
fn get_error(&mut self) -> String {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
@@ -668,6 +689,7 @@ impl sciter::EventHandler for UI {
|
||||
fn goto_install();
|
||||
fn is_process_trusted(bool);
|
||||
fn is_can_screen_recording(bool);
|
||||
fn is_installed_daemon(bool);
|
||||
fn get_error();
|
||||
fn is_login_wayland();
|
||||
fn fix_login_wayland();
|
||||
|
||||
Reference in New Issue
Block a user