opt: merge addon
Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
parent
4a89469b84
commit
3f2aaae1ff
16
Cargo.lock
generated
16
Cargo.lock
generated
@ -4035,7 +4035,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustdesk"
|
name = "rustdesk"
|
||||||
version = "1.2.0"
|
version = "1.1.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android_logger 0.11.0",
|
"android_logger 0.11.0",
|
||||||
"arboard",
|
"arboard",
|
||||||
@ -4085,11 +4085,13 @@ dependencies = [
|
|||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json 1.0.81",
|
"serde_json 1.0.81",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
"simple_rc",
|
||||||
"sys-locale",
|
"sys-locale",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"tray-item",
|
"tray-item",
|
||||||
"trayicon",
|
"trayicon",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
"virtual_display",
|
||||||
"whoami",
|
"whoami",
|
||||||
"winapi 0.3.9",
|
"winapi 0.3.9",
|
||||||
"windows-service",
|
"windows-service",
|
||||||
@ -4257,6 +4259,7 @@ dependencies = [
|
|||||||
"quest",
|
"quest",
|
||||||
"repng",
|
"repng",
|
||||||
"serde 1.0.137",
|
"serde 1.0.137",
|
||||||
|
"serde_json 1.0.81",
|
||||||
"target_build_utils",
|
"target_build_utils",
|
||||||
"tracing",
|
"tracing",
|
||||||
"webm",
|
"webm",
|
||||||
@ -4438,6 +4441,17 @@ version = "1.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
|
checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "simple_rc"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"confy",
|
||||||
|
"hbb_common",
|
||||||
|
"serde 1.0.137",
|
||||||
|
"serde_derive",
|
||||||
|
"walkdir",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
@ -71,13 +71,6 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
if (id == '') return;
|
if (id == '') return;
|
||||||
id = id.replaceAll(' ', '');
|
id = id.replaceAll(' ', '');
|
||||||
if (isFileTransfer) {
|
if (isFileTransfer) {
|
||||||
if (!isDesktop) {
|
|
||||||
if (!await PermissionManager.check("file")) {
|
|
||||||
if (!await PermissionManager.request("file")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await rustDeskWinManager.new_file_transfer(id);
|
await rustDeskWinManager.new_file_transfer(id);
|
||||||
} else {
|
} else {
|
||||||
await rustDeskWinManager.new_remote_desktop(id);
|
await rustDeskWinManager.new_remote_desktop(id);
|
||||||
@ -180,7 +173,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
vertical: 8.0, horizontal: 8.0),
|
vertical: 8.0, horizontal: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
translate(
|
translate(
|
||||||
"File Transfer",
|
"Transfer File",
|
||||||
),
|
),
|
||||||
style: TextStyle(color: MyTheme.dark),
|
style: TextStyle(color: MyTheme.dark),
|
||||||
),
|
),
|
||||||
@ -295,7 +288,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
] +
|
] +
|
||||||
([
|
([
|
||||||
PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
child: Text(translate('File transfer')), value: 'file')
|
child: Text(translate('Transfer File')), value: 'file')
|
||||||
]),
|
]),
|
||||||
elevation: 8,
|
elevation: 8,
|
||||||
);
|
);
|
||||||
|
@ -268,7 +268,7 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
Timer(Duration(milliseconds: 200), () {
|
Timer(Duration(milliseconds: 200), () {
|
||||||
resetMobileActionsOverlay();
|
resetMobileActionsOverlay();
|
||||||
_currentOrientation = orientation;
|
_currentOrientation = orientation;
|
||||||
FFI.canvasModel.updateViewStyle();
|
gFFI.canvasModel.updateViewStyle();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return Container(
|
return Container(
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
|
||||||
|
|
||||||
|
#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
|
||||||
|
|
||||||
typedef struct wire_uint_8_list {
|
typedef struct wire_uint_8_list {
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
int32_t len;
|
int32_t len;
|
||||||
|
@ -186,9 +186,11 @@ packages:
|
|||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "../../rustdesk_desktop_multi_window"
|
path: "."
|
||||||
relative: true
|
ref: c7d97cb6615f2def34f8bad4def01af9e0077beb
|
||||||
source: path
|
resolved-ref: c7d97cb6615f2def34f8bad4def01af9e0077beb
|
||||||
|
url: "https://github.com/Kingtous/rustdesk_desktop_multi_window"
|
||||||
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
|
@ -1224,26 +1224,6 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse [`FileDirectory`] to json.
|
|
||||||
pub fn make_fd_to_json(fd: FileDirectory) -> String {
|
|
||||||
use serde_json::json;
|
|
||||||
let mut fd_json = serde_json::Map::new();
|
|
||||||
fd_json.insert("id".into(), json!(fd.id));
|
|
||||||
fd_json.insert("path".into(), json!(fd.path));
|
|
||||||
|
|
||||||
let mut entries = vec![];
|
|
||||||
for entry in fd.entries {
|
|
||||||
let mut entry_map = serde_json::Map::new();
|
|
||||||
entry_map.insert("entry_type".into(), json!(entry.entry_type.value()));
|
|
||||||
entry_map.insert("name".into(), json!(entry.name));
|
|
||||||
entry_map.insert("size".into(), json!(entry.size));
|
|
||||||
entry_map.insert("modified_time".into(), json!(entry.modified_time));
|
|
||||||
entries.push(entry_map);
|
|
||||||
}
|
|
||||||
fd_json.insert("entries".into(), json!(entries));
|
|
||||||
serde_json::to_string(&fd_json).unwrap_or("".into())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Server Side
|
// Server Side
|
||||||
// TODO connection_manager need use struct and trait,impl default method
|
// TODO connection_manager need use struct and trait,impl default method
|
||||||
#[cfg(not(any(target_os = "ios")))]
|
#[cfg(not(any(target_os = "ios")))]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use crate::client::file_trait::FileManager;
|
use crate::client::file_trait::FileManager;
|
||||||
use crate::flutter::connection_manager::{self, get_clients_length, get_clients_state};
|
use crate::flutter::connection_manager::{self, get_clients_length, get_clients_state};
|
||||||
use crate::flutter::{self, make_fd_to_json, Session, SESSIONS};
|
use crate::flutter::{self, Session, SESSIONS};
|
||||||
|
use crate::common::make_fd_to_json;
|
||||||
use crate::start_server;
|
use crate::start_server;
|
||||||
use crate::ui_interface;
|
use crate::ui_interface;
|
||||||
use flutter_rust_bridge::{StreamSink, SyncReturn, ZeroCopyBuffer};
|
use flutter_rust_bridge::{StreamSink, SyncReturn, ZeroCopyBuffer};
|
||||||
|
@ -195,7 +195,7 @@ fn main() {
|
|||||||
.about("RustDesk command line tool")
|
.about("RustDesk command line tool")
|
||||||
.args_from_usage(&args)
|
.args_from_usage(&args)
|
||||||
.get_matches();
|
.get_matches();
|
||||||
use hbb_common::env_logger::*;
|
use hbb_common::{env_logger::*, config::LocalConfig};
|
||||||
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info"));
|
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info"));
|
||||||
if let Some(p) = matches.value_of("port-forward") {
|
if let Some(p) = matches.value_of("port-forward") {
|
||||||
let options: Vec<String> = p.split(":").map(|x| x.to_owned()).collect();
|
let options: Vec<String> = p.split(":").map(|x| x.to_owned()).collect();
|
||||||
@ -222,6 +222,7 @@ fn main() {
|
|||||||
remote_host = options[3].clone();
|
remote_host = options[3].clone();
|
||||||
}
|
}
|
||||||
let key = matches.value_of("key").unwrap_or("").to_owned();
|
let key = matches.value_of("key").unwrap_or("").to_owned();
|
||||||
cli::start_one_port_forward(options[0].clone(), port, remote_host, remote_port, key);
|
let token = LocalConfig::get_option("access_token");
|
||||||
|
cli::start_one_port_forward(options[0].clone(), port, remote_host, remote_port, key, token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ impl UI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn install_me(&mut self, _options: String, _path: String) {
|
fn install_me(&mut self, _options: String, _path: String) {
|
||||||
install_me(_options, _path);
|
install_me(_options, _path, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_me(&self, _path: String) {
|
fn update_me(&self, _path: String) {
|
||||||
|
@ -69,10 +69,10 @@ pub fn goto_install() {
|
|||||||
allow_err!(crate::run_me(vec!["--install"]));
|
allow_err!(crate::run_me(vec!["--install"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn install_me(_options: String, _path: String) {
|
pub fn install_me(_options: String, _path: String, silent: bool, debug: bool) {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
allow_err!(crate::platform::windows::install_me(&_options, _path));
|
allow_err!(crate::platform::windows::install_me(&_options, _path, silent, debug));
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user