Update avnc, remove the embedded termux:x11 and import it as a flutter plugin, fix app name

This commit is contained in:
Caten
2025-08-29 01:38:16 +08:00
parent d9c4c24adc
commit 1203dcf737
134 changed files with 63 additions and 19251 deletions

View File

@@ -103,5 +103,5 @@
"issueUrl": "问题反馈",
"faqUrl": "常见问题",
"solutionUrl": "典型场景使用指南",
"firstLoadInstructions": "第一次加载大概需要5到10分钟...\n\n正常情况下加载完成后软件会自动跳转到图形界面。\n\n在图形界面时\n- 点击为鼠标左键\n- 长按为鼠标右键\n- 双指点击可弹出键盘\n- 双指划动为鼠标滚轮\n\n请不要在安装时退出软件。\n\n在等待时可以点击下面的按钮申请一下权限。\n\n小小电脑的许多文件夹比如下载、文档、图片等等都和设备的这些文件夹绑定,如果不授予这些权限会导致这些文件夹无权访问。\n\n但如果你不需要访问这些文件夹也可以不授予文件权限可能导致火狐浏览器下载文件失败因为无权访问下载文件夹。"
"firstLoadInstructions": "第一次加载大概需要5到10分钟...\n\n正常情况下加载完成后软件会自动跳转到图形界面。\n\n在图形界面时\n- 点击为鼠标左键\n- 长按为鼠标右键\n- 双指点击可弹出键盘\n- 双指划动为鼠标滚轮\n\n请不要在安装时退出软件。\n\n在等待时可以点击下面的按钮申请一下权限。\n\n小小电脑的许多文件夹比如下载、文档、图片等等都和设备的对应文件夹绑定,如果不授予这些权限会导致这些文件夹无权访问。\n\n但如果你不需要访问这些文件夹也可以不授予文件权限可能导致火狐浏览器下载文件失败因为无权访问下载文件夹。"
}

View File

@@ -36,6 +36,7 @@ import 'package:tiny_computer/l10n/app_localizations.dart';
import 'package:tiny_computer/workflow.dart';
import 'package:avnc_flutter/avnc_flutter.dart';
import 'package:x11_flutter/x11_flutter.dart';
void main() {
runApp(const MyApp());
@@ -401,7 +402,7 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)""");
const SizedBox.square(dimension: 16),
Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: [
OutlinedButton(style: D.commandButtonStyle, child: Text(AppLocalizations.of(context)!.termuxX11Preferences), onPressed: () async {
await D.androidChannel.invokeMethod("launchX11PrefsPage", {});
await X11Flutter.launchX11PrefsPage();
}),
]),
const SizedBox.square(dimension: 8),

View File

@@ -42,6 +42,7 @@ import 'package:device_info_plus/device_info_plus.dart';
import 'package:tiny_computer/l10n/app_localizations.dart';
import 'package:avnc_flutter/avnc_flutter.dart';
import 'package:x11_flutter/x11_flutter.dart';
class Util {
@@ -773,11 +774,11 @@ clear""");
}
static Future<void> launchXServer() async {
await D.androidChannel.invokeMethod("launchXServer", {"tmpdir":"${G.dataPath}/containers/${G.currentContainer}/tmp", "xkb":"${G.dataPath}/containers/${G.currentContainer}/usr/share/X11/xkb"});
await X11Flutter.launchXServer("${G.dataPath}/containers/${G.currentContainer}/tmp", "${G.dataPath}/containers/${G.currentContainer}/usr/share/X11/xkb", [":4"]);
}
static Future<void> launchX11() async {
await D.androidChannel.invokeMethod("launchX11Page", {});
await X11Flutter.launchX11Page();
}
static Future<void> workflow() async {