Build native Flutter Linux manager and deb release 0.2.5

This commit is contained in:
tongtong committed 2026-11-13 19:28:09 +08:00
1 parent 3c6c4a0e90
commit 03e729a60b
35 files changed
+757 -69

No files matched your search

+27 -12
View File
@@ -434,8 +434,11 @@ class _ManagerViewState extends State<ManagerView> {
onPressed: pending || !s.ready
? null
: () => m.deviceAction(d.id, () async {
await m.repository.screen(s, embedded: true);
if (mounted) {
await m.repository.screen(
s,
embedded: Platform.isWindows,
);
if (mounted && Platform.isWindows) {
setState(() {
s.screenPageVisible = true;
screenDevice = s.id;
@@ -444,7 +447,11 @@ class _ManagerViewState extends State<ManagerView> {
}
}),
icon: const Icon(Icons.open_in_new, size: 16),
label: Text(s.screen == null ? '内嵌投屏' : '查看投屏'),
label: Text(
Platform.isWindows
? (s.screen == null ? '内嵌投屏' : '查看投屏')
: '独立窗口投屏',
),
),
OutlinedButton(
onPressed: pending ? null : () => m.disconnect(d.id),
@@ -717,7 +724,7 @@ class _SettingsViewState extends State<SettingsView> {
s.adb = fields['adb']!.text.trim();
s.scrcpy = fields['scrcpy']!.text.trim();
s.relayOnly = relayOnly;
s.usbMode = usbMode;
s.usbMode = Platform.isWindows && usbMode;
s.usbip = fields['usbip']!.text.trim();
}
@@ -752,10 +759,10 @@ class _SettingsViewState extends State<SettingsView> {
('server', '控制中心 WSS 地址'),
('origin', '直连服务器(可留空)'),
('credential', '客户端凭据文件 client.env'),
('client', 'ads-client.exe 路径'),
('adb', 'adb.exe 路径'),
('scrcpy', 'scrcpy.exe 路径(需保留完整发行目录)'),
('usbip', 'usbip.exe 路径'),
('client', 'ads-client 路径'),
('adb', 'adb 路径'),
('scrcpy', 'scrcpy 路径(需保留完整发行目录)'),
if (Platform.isWindows) ('usbip', 'usbip.exe 路径'),
])
Padding(
padding: const EdgeInsets.only(bottom: 18),
@@ -794,20 +801,28 @@ class _SettingsViewState extends State<SettingsView> {
contentPadding: EdgeInsets.zero,
value: usbMode,
title: const Text('挂载为 USB 设备 · Windows'),
subtitle: Text('仅模拟 ADB;修改在下次连接生效。$usbStatus'),
onChanged: installingUsb ? null : changeUsb,
subtitle: Text(
Platform.isWindows
? '仅模拟 ADB;修改在下次连接生效。$usbStatus'
: 'Linux 当前使用网络 ADB;USB 模拟可在终端使用 ads-usb。',
),
onChanged: installingUsb || !Platform.isWindows
? null
: changeUsb,
),
Wrap(
spacing: 12,
children: [
OutlinedButton(
onPressed: installingUsb
onPressed: installingUsb || !Platform.isWindows
? null
: () => changeUsb(usbMode, detectOnly: true),
child: const Text('检测 USB 组件'),
),
TextButton(
onPressed: installingUsb ? null : installUsb,
onPressed: installingUsb || !Platform.isWindows
? null
: installUsb,
child: Text(installingUsb ? '等待驱动安装完成…' : '安装 USBip 驱动'),
),
],