Merge branch 'rustdesk:master' into master
This commit is contained in:
commit
85fd228803
@ -1263,23 +1263,23 @@ StreamSubscription? listenUniLinks() {
|
|||||||
bool checkArguments() {
|
bool checkArguments() {
|
||||||
// bootArgs:[--connect, 362587269, --switch_uuid, e3d531cc-5dce-41e0-bd06-5d4a2b1eec05]
|
// bootArgs:[--connect, 362587269, --switch_uuid, e3d531cc-5dce-41e0-bd06-5d4a2b1eec05]
|
||||||
// check connect args
|
// check connect args
|
||||||
final connectIndex = bootArgs.indexOf("--connect");
|
final connectIndex = kBootArgs.indexOf("--connect");
|
||||||
if (connectIndex == -1) {
|
if (connectIndex == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String? id =
|
String? id =
|
||||||
bootArgs.length < connectIndex + 1 ? null : bootArgs[connectIndex + 1];
|
kBootArgs.length < connectIndex + 1 ? null : kBootArgs[connectIndex + 1];
|
||||||
final switchUuidIndex = bootArgs.indexOf("--switch_uuid");
|
final switchUuidIndex = kBootArgs.indexOf("--switch_uuid");
|
||||||
String? switchUuid = bootArgs.length < switchUuidIndex + 1
|
String? switchUuid = kBootArgs.length < switchUuidIndex + 1
|
||||||
? null
|
? null
|
||||||
: bootArgs[switchUuidIndex + 1];
|
: kBootArgs[switchUuidIndex + 1];
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
if (id.startsWith(kUniLinksPrefix)) {
|
if (id.startsWith(kUniLinksPrefix)) {
|
||||||
return parseRustdeskUri(id);
|
return parseRustdeskUri(id);
|
||||||
} else {
|
} else {
|
||||||
// remove "--connect xxx" in the `bootArgs` array
|
// remove "--connect xxx" in the `bootArgs` array
|
||||||
bootArgs.removeAt(connectIndex);
|
kBootArgs.removeAt(connectIndex);
|
||||||
bootArgs.removeAt(connectIndex);
|
kBootArgs.removeAt(connectIndex);
|
||||||
// fallback to peer id
|
// fallback to peer id
|
||||||
Future.delayed(Duration.zero, () {
|
Future.delayed(Duration.zero, () {
|
||||||
rustDeskWinManager.newRemoteDesktop(id, switch_uuid: switchUuid);
|
rustDeskWinManager.newRemoteDesktop(id, switch_uuid: switchUuid);
|
||||||
@ -1617,3 +1617,23 @@ Widget dialogButton(String text,
|
|||||||
int version_cmp(String v1, String v2) {
|
int version_cmp(String v1, String v2) {
|
||||||
return bind.versionToNumber(v: v1) - bind.versionToNumber(v: v2);
|
return bind.versionToNumber(v: v1) - bind.versionToNumber(v: v2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getWindowName({WindowType? overrideType}) {
|
||||||
|
switch (overrideType ?? kWindowType) {
|
||||||
|
case WindowType.Main:
|
||||||
|
return "RustDesk";
|
||||||
|
case WindowType.FileTransfer:
|
||||||
|
return "File Transfer - RustDesk";
|
||||||
|
case WindowType.PortForward:
|
||||||
|
return "Port Forward - RustDesk";
|
||||||
|
case WindowType.RemoteDesktop:
|
||||||
|
return "Remote Desktop - RustDesk";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return "RustDesk";
|
||||||
|
}
|
||||||
|
|
||||||
|
String getWindowNameWithId(String id, {WindowType? overrideType}) {
|
||||||
|
return "${DesktopTab.labelGetterAlias(id).value} - ${getWindowName(overrideType: overrideType)}";
|
||||||
|
}
|
||||||
|
@ -31,6 +31,10 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
|
|||||||
|
|
||||||
_FileManagerTabPageState(Map<String, dynamic> params) {
|
_FileManagerTabPageState(Map<String, dynamic> params) {
|
||||||
Get.put(DesktopTabController(tabType: DesktopTabType.fileTransfer));
|
Get.put(DesktopTabController(tabType: DesktopTabType.fileTransfer));
|
||||||
|
tabController.onSelected = (_, id) {
|
||||||
|
WindowController.fromWindowId(windowId())
|
||||||
|
.setTitle(getWindowNameWithId(id));
|
||||||
|
};
|
||||||
tabController.add(TabInfo(
|
tabController.add(TabInfo(
|
||||||
key: params['id'],
|
key: params['id'],
|
||||||
label: params['id'],
|
label: params['id'],
|
||||||
|
@ -31,6 +31,10 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
|
|||||||
isRDP = params['isRDP'];
|
isRDP = params['isRDP'];
|
||||||
tabController =
|
tabController =
|
||||||
Get.put(DesktopTabController(tabType: DesktopTabType.portForward));
|
Get.put(DesktopTabController(tabType: DesktopTabType.portForward));
|
||||||
|
tabController.onSelected = (_, id) {
|
||||||
|
WindowController.fromWindowId(windowId())
|
||||||
|
.setTitle(getWindowNameWithId(id));
|
||||||
|
};
|
||||||
tabController.add(TabInfo(
|
tabController.add(TabInfo(
|
||||||
key: params['id'],
|
key: params['id'],
|
||||||
label: params['id'],
|
label: params['id'],
|
||||||
|
@ -39,8 +39,7 @@ class ConnectionTabPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||||
final tabController = Get.put(DesktopTabController(
|
final tabController = Get.put(DesktopTabController(
|
||||||
tabType: DesktopTabType.remoteScreen,
|
tabType: DesktopTabType.remoteScreen));
|
||||||
onSelected: (_, id) => bind.setCurSessionId(id: id)));
|
|
||||||
static const IconData selectedIcon = Icons.desktop_windows_sharp;
|
static const IconData selectedIcon = Icons.desktop_windows_sharp;
|
||||||
static const IconData unselectedIcon = Icons.desktop_windows_outlined;
|
static const IconData unselectedIcon = Icons.desktop_windows_outlined;
|
||||||
|
|
||||||
@ -54,6 +53,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
final peerId = params['id'];
|
final peerId = params['id'];
|
||||||
if (peerId != null) {
|
if (peerId != null) {
|
||||||
ConnectionTypeState.init(peerId);
|
ConnectionTypeState.init(peerId);
|
||||||
|
tabController.onSelected = (_, id) {
|
||||||
|
bind.setCurSessionId(id: id);
|
||||||
|
WindowController.fromWindowId(windowId())
|
||||||
|
.setTitle(getWindowNameWithId(id));
|
||||||
|
};
|
||||||
tabController.add(TabInfo(
|
tabController.add(TabInfo(
|
||||||
key: peerId,
|
key: peerId,
|
||||||
label: peerId,
|
label: peerId,
|
||||||
@ -77,6 +81,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
|
|
||||||
tabController.onRemoved = (_, id) => onRemoveId(id);
|
tabController.onRemoved = (_, id) => onRemoveId(id);
|
||||||
|
|
||||||
|
|
||||||
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
|
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
|
||||||
print(
|
print(
|
||||||
"[Remote Page] call ${call.method} with args ${call.arguments} from window $fromWindowId");
|
"[Remote Page] call ${call.method} with args ${call.arguments} from window $fromWindowId");
|
||||||
|
@ -30,7 +30,12 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
|||||||
void initState() {
|
void initState() {
|
||||||
gFFI.ffiModel.updateEventListener("");
|
gFFI.ffiModel.updateEventListener("");
|
||||||
windowManager.addListener(this);
|
windowManager.addListener(this);
|
||||||
tabController.onRemoved = (_, id) => onRemoveId(id);
|
tabController.onRemoved = (_, id) {
|
||||||
|
onRemoveId(id);
|
||||||
|
};
|
||||||
|
tabController.onSelected = (_, id) {
|
||||||
|
windowManager.setTitle(getWindowNameWithId(id));
|
||||||
|
};
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class RefreshWrapperState extends State<RefreshWrapper> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rebuild() {
|
rebuild() {
|
||||||
debugPrint("=====Global State Rebuild (win-${windowId ?? 'main'})=====");
|
debugPrint("=====Global State Rebuild (win-${kWindowId ?? 'main'})=====");
|
||||||
if (Get.context != null) {
|
if (Get.context != null) {
|
||||||
(context as Element).visitChildren(_rebuildElement);
|
(context as Element).visitChildren(_rebuildElement);
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
final wc = WindowController.fromWindowId(windowId!);
|
final wc = WindowController.fromWindowId(kWindowId!);
|
||||||
wc.isMaximized().then((maximized) {
|
wc.isMaximized().then((maximized) {
|
||||||
debugPrint("isMaximized $maximized");
|
debugPrint("isMaximized $maximized");
|
||||||
if (widget.isMaximized.value != maximized) {
|
if (widget.isMaximized.value != maximized) {
|
||||||
@ -534,10 +534,10 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
await windowManager.hide();
|
await windowManager.hide();
|
||||||
} else {
|
} else {
|
||||||
// it's safe to hide the subwindow
|
// it's safe to hide the subwindow
|
||||||
await WindowController.fromWindowId(windowId!).hide();
|
await WindowController.fromWindowId(kWindowId!).hide();
|
||||||
await Future.wait([
|
await Future.wait([
|
||||||
rustDeskWinManager
|
rustDeskWinManager
|
||||||
.call(WindowType.Main, kWindowEventHide, {"id": windowId!}),
|
.call(WindowType.Main, kWindowEventHide, {"id": kWindowId!}),
|
||||||
widget.onClose?.call() ?? Future.microtask(() => null)
|
widget.onClose?.call() ?? Future.microtask(() => null)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -563,7 +563,7 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
if (widget.isMainWindow) {
|
if (widget.isMainWindow) {
|
||||||
windowManager.minimize();
|
windowManager.minimize();
|
||||||
} else {
|
} else {
|
||||||
WindowController.fromWindowId(windowId!).minimize();
|
WindowController.fromWindowId(kWindowId!).minimize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isClose: false,
|
isClose: false,
|
||||||
@ -593,7 +593,7 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
if (widget.isMainWindow) {
|
if (widget.isMainWindow) {
|
||||||
await windowManager.close();
|
await windowManager.close();
|
||||||
} else {
|
} else {
|
||||||
await WindowController.fromWindowId(windowId!)
|
await WindowController.fromWindowId(kWindowId!)
|
||||||
.close();
|
.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -622,7 +622,7 @@ void startDragging(bool isMainWindow) {
|
|||||||
if (isMainWindow) {
|
if (isMainWindow) {
|
||||||
windowManager.startDragging();
|
windowManager.startDragging();
|
||||||
} else {
|
} else {
|
||||||
WindowController.fromWindowId(windowId!).startDragging();
|
WindowController.fromWindowId(kWindowId!).startDragging();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ Future<bool> toggleMaximize(bool isMainWindow) async {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final wc = WindowController.fromWindowId(windowId!);
|
final wc = WindowController.fromWindowId(kWindowId!);
|
||||||
if (await wc.isMaximized()) {
|
if (await wc.isMaximized()) {
|
||||||
wc.unmaximize();
|
wc.unmaximize();
|
||||||
return false;
|
return false;
|
||||||
|
@ -26,13 +26,15 @@ import 'mobile/pages/home_page.dart';
|
|||||||
import 'mobile/pages/server_page.dart';
|
import 'mobile/pages/server_page.dart';
|
||||||
import 'models/platform_model.dart';
|
import 'models/platform_model.dart';
|
||||||
|
|
||||||
int? windowId;
|
/// Basic window and launch properties.
|
||||||
late List<String> bootArgs;
|
int? kWindowId;
|
||||||
|
WindowType? kWindowType;
|
||||||
|
late List<String> kBootArgs;
|
||||||
|
|
||||||
Future<void> main(List<String> args) async {
|
Future<void> main(List<String> args) async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
debugPrint("launch args: $args");
|
debugPrint("launch args: $args");
|
||||||
bootArgs = List.from(args);
|
kBootArgs = List.from(args);
|
||||||
|
|
||||||
if (!isDesktop) {
|
if (!isDesktop) {
|
||||||
runMobileApp();
|
runMobileApp();
|
||||||
@ -40,10 +42,10 @@ Future<void> main(List<String> args) async {
|
|||||||
}
|
}
|
||||||
// main window
|
// main window
|
||||||
if (args.isNotEmpty && args.first == 'multi_window') {
|
if (args.isNotEmpty && args.first == 'multi_window') {
|
||||||
windowId = int.parse(args[1]);
|
kWindowId = int.parse(args[1]);
|
||||||
stateGlobal.setWindowId(windowId!);
|
stateGlobal.setWindowId(kWindowId!);
|
||||||
if (!Platform.isMacOS) {
|
if (!Platform.isMacOS) {
|
||||||
WindowController.fromWindowId(windowId!).showTitleBar(false);
|
WindowController.fromWindowId(kWindowId!).showTitleBar(false);
|
||||||
}
|
}
|
||||||
final argument = args[2].isEmpty
|
final argument = args[2].isEmpty
|
||||||
? <String, dynamic>{}
|
? <String, dynamic>{}
|
||||||
@ -51,35 +53,32 @@ Future<void> main(List<String> args) async {
|
|||||||
int type = argument['type'] ?? -1;
|
int type = argument['type'] ?? -1;
|
||||||
// to-do: No need to parse window id ?
|
// to-do: No need to parse window id ?
|
||||||
// Because stateGlobal.windowId is a global value.
|
// Because stateGlobal.windowId is a global value.
|
||||||
argument['windowId'] = windowId;
|
argument['windowId'] = kWindowId;
|
||||||
WindowType wType = type.windowType;
|
kWindowType = type.windowType;
|
||||||
switch (wType) {
|
final windowName = getWindowName();
|
||||||
|
switch (kWindowType) {
|
||||||
case WindowType.RemoteDesktop:
|
case WindowType.RemoteDesktop:
|
||||||
desktopType = DesktopType.remote;
|
desktopType = DesktopType.remote;
|
||||||
runMultiWindow(
|
runMultiWindow(
|
||||||
argument,
|
argument,
|
||||||
kAppTypeDesktopRemote,
|
kAppTypeDesktopRemote,
|
||||||
'RustDesk - Remote Desktop',
|
windowName,
|
||||||
);
|
);
|
||||||
WindowController.fromWindowId(windowId!)
|
|
||||||
.setTitle('RustDesk - Remote Desktop');
|
|
||||||
break;
|
break;
|
||||||
case WindowType.FileTransfer:
|
case WindowType.FileTransfer:
|
||||||
desktopType = DesktopType.fileTransfer;
|
desktopType = DesktopType.fileTransfer;
|
||||||
runMultiWindow(
|
runMultiWindow(
|
||||||
argument,
|
argument,
|
||||||
kAppTypeDesktopFileTransfer,
|
kAppTypeDesktopFileTransfer,
|
||||||
'RustDesk - File Transfer',
|
windowName,
|
||||||
);
|
);
|
||||||
WindowController.fromWindowId(windowId!)
|
|
||||||
.setTitle('RustDesk - File Transfer');
|
|
||||||
break;
|
break;
|
||||||
case WindowType.PortForward:
|
case WindowType.PortForward:
|
||||||
desktopType = DesktopType.portForward;
|
desktopType = DesktopType.portForward;
|
||||||
runMultiWindow(
|
runMultiWindow(
|
||||||
argument,
|
argument,
|
||||||
kAppTypeDesktopPortForward,
|
kAppTypeDesktopPortForward,
|
||||||
'RustDesk - Port Forward',
|
windowName,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -139,7 +138,7 @@ void runMainApp(bool startService) async {
|
|||||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
windowManager.setOpacity(1);
|
windowManager.setOpacity(1);
|
||||||
});
|
});
|
||||||
windowManager.setTitle("RustDesk");
|
windowManager.setTitle(getWindowName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void runMobileApp() async {
|
void runMobileApp() async {
|
||||||
@ -155,7 +154,7 @@ void runMultiWindow(
|
|||||||
) async {
|
) async {
|
||||||
await initEnv(appType);
|
await initEnv(appType);
|
||||||
// set prevent close to true, we handle close event manually
|
// set prevent close to true, we handle close event manually
|
||||||
WindowController.fromWindowId(windowId!).setPreventClose(true);
|
WindowController.fromWindowId(kWindowId!).setPreventClose(true);
|
||||||
late Widget widget;
|
late Widget widget;
|
||||||
switch (appType) {
|
switch (appType) {
|
||||||
case kAppTypeDesktopRemote:
|
case kAppTypeDesktopRemote:
|
||||||
@ -184,26 +183,26 @@ void runMultiWindow(
|
|||||||
);
|
);
|
||||||
// we do not hide titlebar on win7 because of the frame overflow.
|
// we do not hide titlebar on win7 because of the frame overflow.
|
||||||
if (kUseCompatibleUiMode) {
|
if (kUseCompatibleUiMode) {
|
||||||
WindowController.fromWindowId(windowId!).showTitleBar(true);
|
WindowController.fromWindowId(kWindowId!).showTitleBar(true);
|
||||||
}
|
}
|
||||||
switch (appType) {
|
switch (appType) {
|
||||||
case kAppTypeDesktopRemote:
|
case kAppTypeDesktopRemote:
|
||||||
await restoreWindowPosition(WindowType.RemoteDesktop,
|
await restoreWindowPosition(WindowType.RemoteDesktop,
|
||||||
windowId: windowId!);
|
windowId: kWindowId!);
|
||||||
break;
|
break;
|
||||||
case kAppTypeDesktopFileTransfer:
|
case kAppTypeDesktopFileTransfer:
|
||||||
await restoreWindowPosition(WindowType.FileTransfer, windowId: windowId!);
|
await restoreWindowPosition(WindowType.FileTransfer,
|
||||||
|
windowId: kWindowId!);
|
||||||
break;
|
break;
|
||||||
case kAppTypeDesktopPortForward:
|
case kAppTypeDesktopPortForward:
|
||||||
await restoreWindowPosition(WindowType.PortForward, windowId: windowId!);
|
await restoreWindowPosition(WindowType.PortForward, windowId: kWindowId!);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// no such appType
|
// no such appType
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
// show window from hidden status
|
// show window from hidden status
|
||||||
WindowController.fromWindowId(windowId!).show();
|
WindowController.fromWindowId(kWindowId!).show();
|
||||||
WindowController.fromWindowId(windowId!).setTitle(title);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void runConnectionManagerScreen(bool hide) async {
|
void runConnectionManagerScreen(bool hide) async {
|
||||||
|
@ -62,7 +62,8 @@ class RustDeskMultiWindowManager {
|
|||||||
remoteDesktopController
|
remoteDesktopController
|
||||||
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
||||||
..center()
|
..center()
|
||||||
..setTitle("rustdesk - remote desktop")
|
..setTitle(getWindowNameWithId(remoteId,
|
||||||
|
overrideType: WindowType.RemoteDesktop))
|
||||||
..show();
|
..show();
|
||||||
registerActiveWindow(remoteDesktopController.windowId);
|
registerActiveWindow(remoteDesktopController.windowId);
|
||||||
_remoteDesktopWindowId = remoteDesktopController.windowId;
|
_remoteDesktopWindowId = remoteDesktopController.windowId;
|
||||||
@ -88,7 +89,8 @@ class RustDeskMultiWindowManager {
|
|||||||
fileTransferController
|
fileTransferController
|
||||||
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
||||||
..center()
|
..center()
|
||||||
..setTitle("rustdesk - file transfer")
|
..setTitle(getWindowNameWithId(remoteId,
|
||||||
|
overrideType: WindowType.FileTransfer))
|
||||||
..show();
|
..show();
|
||||||
registerActiveWindow(fileTransferController.windowId);
|
registerActiveWindow(fileTransferController.windowId);
|
||||||
_fileTransferWindowId = fileTransferController.windowId;
|
_fileTransferWindowId = fileTransferController.windowId;
|
||||||
@ -114,7 +116,8 @@ class RustDeskMultiWindowManager {
|
|||||||
portForwardController
|
portForwardController
|
||||||
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
..setFrame(const Offset(0, 0) & const Size(1280, 720))
|
||||||
..center()
|
..center()
|
||||||
..setTitle("rustdesk - port forward")
|
..setTitle(
|
||||||
|
getWindowNameWithId(remoteId, overrideType: WindowType.PortForward))
|
||||||
..show();
|
..show();
|
||||||
registerActiveWindow(portForwardController.windowId);
|
registerActiveWindow(portForwardController.windowId);
|
||||||
_portForwardWindowId = portForwardController.windowId;
|
_portForwardWindowId = portForwardController.windowId;
|
||||||
|
@ -78,6 +78,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.3.1"
|
||||||
|
build_cli_annotations:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_cli_annotations
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -169,6 +176,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
cli_util:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cli_util
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.5"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -190,6 +204,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.16.0"
|
||||||
|
colorize:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: colorize
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.0"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -339,6 +360,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
ffigen:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: ffigen
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "7.2.4"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -429,12 +457,10 @@ packages:
|
|||||||
flutter_rust_bridge:
|
flutter_rust_bridge:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: frb_dart
|
name: flutter_rust_bridge
|
||||||
ref: master
|
url: "https://pub.dartlang.org"
|
||||||
resolved-ref: e5adce55eea0b74d3680e66a2c5252edf17b07e1
|
source: hosted
|
||||||
url: "https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge"
|
version: "1.61.1"
|
||||||
source: git
|
|
||||||
version: "1.32.0"
|
|
||||||
flutter_svg:
|
flutter_svg:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -846,6 +872,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.1"
|
||||||
|
puppeteer:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: puppeteer
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.12.0"
|
||||||
qr_code_scanner:
|
qr_code_scanner:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -853,6 +886,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
|
quiver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: quiver
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.1"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -890,6 +930,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.0"
|
||||||
|
shelf_static:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_static
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.1"
|
||||||
shelf_web_socket:
|
shelf_web_socket:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1256,6 +1303,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "3.1.1"
|
||||||
|
yaml_edit:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yaml_edit
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3"
|
||||||
zxing2:
|
zxing2:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -96,10 +96,10 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
|
|
||||||
flutter::DartProject project(L"data");
|
flutter::DartProject project(L"data");
|
||||||
// connection manager hide icon from taskbar
|
// connection manager hide icon from taskbar
|
||||||
bool showOnTaskBar = true;
|
bool is_cm_page = false;
|
||||||
auto cmParam = std::string("--cm");
|
auto cmParam = std::string("--cm");
|
||||||
if (!command_line_arguments.empty() && command_line_arguments.front().compare(0, cmParam.size(), cmParam.c_str()) == 0) {
|
if (!command_line_arguments.empty() && command_line_arguments.front().compare(0, cmParam.size(), cmParam.c_str()) == 0) {
|
||||||
showOnTaskBar = false;
|
is_cm_page = true;
|
||||||
}
|
}
|
||||||
command_line_arguments.insert(command_line_arguments.end(), rust_args.begin(), rust_args.end());
|
command_line_arguments.insert(command_line_arguments.end(), rust_args.begin(), rust_args.end());
|
||||||
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
||||||
@ -107,8 +107,9 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
FlutterWindow window(project);
|
FlutterWindow window(project);
|
||||||
Win32Window::Point origin(10, 10);
|
Win32Window::Point origin(10, 10);
|
||||||
Win32Window::Size size(800, 600);
|
Win32Window::Size size(800, 600);
|
||||||
if (!window.CreateAndShow(L"RustDesk", origin, size, showOnTaskBar))
|
if (!window.CreateAndShow(
|
||||||
{
|
is_cm_page ? L"RustDesk - Connection Manager" : L"RustDesk", origin,
|
||||||
|
size, !is_cm_page)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
window.SetQuitOnClose(true);
|
window.SetQuitOnClose(true);
|
||||||
|
@ -50,7 +50,7 @@ lazy_static::lazy_static! {
|
|||||||
static ref LOCAL_CONFIG: Arc<RwLock<LocalConfig>> = Arc::new(RwLock::new(LocalConfig::load()));
|
static ref LOCAL_CONFIG: Arc<RwLock<LocalConfig>> = Arc::new(RwLock::new(LocalConfig::load()));
|
||||||
pub static ref ONLINE: Arc<Mutex<HashMap<String, i64>>> = Default::default();
|
pub static ref ONLINE: Arc<Mutex<HashMap<String, i64>>> = Default::default();
|
||||||
pub static ref PROD_RENDEZVOUS_SERVER: Arc<RwLock<String>> = Arc::new(RwLock::new(match option_env!("RENDEZVOUS_SERVER") {
|
pub static ref PROD_RENDEZVOUS_SERVER: Arc<RwLock<String>> = Arc::new(RwLock::new(match option_env!("RENDEZVOUS_SERVER") {
|
||||||
Some(key) => key,
|
Some(key) if !key.is_empty() => key,
|
||||||
_ => "",
|
_ => "",
|
||||||
}.to_owned()));
|
}.to_owned()));
|
||||||
pub static ref APP_NAME: Arc<RwLock<String>> = Arc::new(RwLock::new("RustDesk".to_owned()));
|
pub static ref APP_NAME: Arc<RwLock<String>> = Arc::new(RwLock::new("RustDesk".to_owned()));
|
||||||
@ -87,8 +87,8 @@ const RENDEZVOUS_SERVERS: &'static [&'static str] = &[
|
|||||||
];
|
];
|
||||||
|
|
||||||
pub const RS_PUB_KEY: &'static str = match option_env!("RS_PUB_KEY") {
|
pub const RS_PUB_KEY: &'static str = match option_env!("RS_PUB_KEY") {
|
||||||
Some(key) => key,
|
Some(key) if !key.is_empty() => key,
|
||||||
None => "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=",
|
_ => "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=",
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RENDEZVOUS_PORT: i32 = 21116;
|
pub const RENDEZVOUS_PORT: i32 = 21116;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user