mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-26 06:31:03 +03:00
plugin_framework, uninstall
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -20,7 +20,8 @@ mod plog;
|
||||
mod plugins;
|
||||
|
||||
pub use manager::{
|
||||
install::install_plugin_with_url, install_plugin, load_plugin_list, uninstall_plugin,
|
||||
install::{change_uninstall_plugin, install_plugin_with_url},
|
||||
install_plugin, load_plugin_list, remove_uninstalled, uninstall_plugin,
|
||||
};
|
||||
pub use plugins::{
|
||||
handle_client_event, handle_listen_event, handle_server_event, handle_ui_event, load_plugin,
|
||||
@@ -92,7 +93,7 @@ pub fn init() {
|
||||
if !is_server() {
|
||||
std::thread::spawn(move || manager::start_ipc());
|
||||
} else {
|
||||
if let Err(e) = manager::remove_plugins() {
|
||||
if let Err(e) = remove_uninstalled() {
|
||||
log::error!("Failed to remove plugins: {}", e);
|
||||
}
|
||||
}
|
||||
@@ -131,6 +132,11 @@ fn get_plugin_dir(id: &str) -> ResultType<PathBuf> {
|
||||
Ok(get_plugins_dir()?.join(id))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_uninstall_file_path() -> ResultType<PathBuf> {
|
||||
Ok(get_plugins_dir()?.join("uninstall_list"))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn cstr_to_string(cstr: *const c_char) -> ResultType<String> {
|
||||
Ok(String::from_utf8(unsafe {
|
||||
|
||||
Reference in New Issue
Block a user