mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
plugin_framework, manager, install plugin
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -112,7 +112,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
#[cfg(not(debug_assertions))]
|
||||
let load_plugins = crate::platform::is_installed();
|
||||
if load_plugins {
|
||||
hbb_common::allow_err!(crate::plugin::load_plugins());
|
||||
crate::plugin::init();
|
||||
}
|
||||
}
|
||||
if args.is_empty() {
|
||||
@@ -240,6 +240,18 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
crate::flutter::connection_manager::start_cm_no_ui();
|
||||
return None;
|
||||
} else {
|
||||
#[cfg(all(feature = "flutter", feature = "plugin_framework"))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
if args[0] == "--plugin-install" {
|
||||
if args.len() == 3 {
|
||||
crate::plugin::privileged_install_plugin(&args[1], &args[2]);
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--plugin-uninstall" {
|
||||
// Do nothing
|
||||
return None;
|
||||
}
|
||||
}
|
||||
}
|
||||
//_async_logger_holder.map(|x| x.flush());
|
||||
|
||||
Reference in New Issue
Block a user