Update discussion link, hint for compile/fast command/file access, fix x11, using release keystore, update code to v1.0.99

This commit is contained in:
Caten
2025-08-31 07:56:55 +08:00
parent ee22cbc1d9
commit 350f4e93ef
13 changed files with 109 additions and 51 deletions

8
.gitignore vendored
View File

@@ -55,3 +55,11 @@ android/app/src/main/jniLibs/*
devtools_options.yaml
lib/l10n/app_localizations*
# Keystore files
*.jks
*.keystore
# Configuration files
android/keystore.properties
android/local.properties

View File

@@ -79,7 +79,7 @@ lib 目录:
## 编译
你需要配置好 flutter 和安卓 sdk,还需安装 python3、bison、patch 和 gcc然后克隆此项目
你需要配置好 flutter 和安卓 sdk。
在编译之前,需要在 release 中下载 jniLibs.zip ,将里面的库文件解压后放到 android/app/src/main/jniLibs/arm64-v8a下载 patch.tar.gz 拷贝到 assets。以及下载系统 rootfs或者[自行制作](https://github.com/Cateners/tiny_computer/blob/master/extra/build-tiny-rootfs.md)),之后使用 split 命令分割,拷贝到 assets。一般我将其分为 98MB。
@@ -87,14 +87,14 @@ lib 目录:
split -b 98M debian.tar.xz
```
接下来就可以编译了。我使用的命令如下:
接下来就可以编译了。如果要编译release版本需要设置发布密钥可以参考android/keystore.properties.example文件。
我使用的编译命令如下:
```bash
flutter build apk --target-platform android-arm64 --split-per-abi --obfuscate --split-debug-info=tiny_computer/sdi
```
有一些 C 代码可能报错。比如 KeyBind.c 等文件,报错一些符号未定义。但其实包含那些符号的函数并没有被使用,所以可以把它们删掉再编译。 应该有编译选项可以避免这种情况,但我对 cmake 不熟,就先这样了:P
## 目前已知 bug
多用户/分身情形无法 sudo , 其它见 issue。

View File

@@ -22,6 +22,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('keystore.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace "com.example.tiny_computer"
compileSdkVersion flutter.compileSdkVersion
@@ -54,10 +60,18 @@ android {
buildConfigField "String", "COMMIT", "\"" + ("git rev-parse HEAD\n".execute().getText().trim() ?: (System.getenv('CURRENT_COMMIT') ?: "NO_COMMIT")) + "\""
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@@ -77,6 +91,11 @@ android {
buildConfig true
}
lint {
disable "NullSafeMutableLiveData"
}
lintOptions {
//checkReleaseBuilds false
abortOnError false

View File

@@ -9,3 +9,6 @@
-dontwarn android.content.pm.IPackageManager
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.Immutable
# 保持 Termux X11 所有内容
-keep class com.termux.x11.** { *; }
-keepclassmembers class com.termux.x11.** { *; }

View File

@@ -0,0 +1,4 @@
storePassword=your_store_password_here
keyPassword=your_key_password_here
keyAlias=upload
storeFile=../upload-keystore.jks

View File

@@ -181,6 +181,7 @@ tmoe还会安装gnome-keyring由于之前我做xfce包时会造成VSCode反
### 额外步骤
- 将桌面壁纸的配置从monitorBuiltinDisplay改为monitorbuiltinxfcev1.0.99疑似Termux:X11显示器名称改变导致壁纸失效
- 修复用vscode打开文件时只打开了vscode本身v1.0.25):去掉/usr/share/applications/code-no-sandbox.desktop的Exec的--unity-launch
- 修复选择文本时会把文本发送到剪切板v1.0.25):在/usr/local/bin/startvnc文件的start_tmoe_xvnc()的start_win10_tigervnc行前面加入`vncconfig -set SendPrimary=0 SetPrimary=0`
- 修复系统更新时变英文v1.0.19):把/etc/locale.gen文件里包含zh_CN.UTF-8的那行代码解除注释
@@ -207,7 +208,7 @@ tmoe还会安装gnome-keyring由于之前我做xfce包时会造成VSCode反
- .ICEauthority
- .Xauthority
- 等等
- 切换到root用户切换到根目录`/busybox tar -Jcpvf /debian.tar.xz --exclude=debian.tar.xz --exclude=dev --exclude=proc --exclude=system --exclude=storage --exclude=apex --exclude=sys --exclude=media/sd --exclude=busybox --exclude=".l2s.*" /`
- 切换到root用户切换到根目录`/busybox tar -Jcpvf /debian.tar.xz --exclude=".l2s.*" bin boot etc home lib media mnt opt root run sbin sd srv tmp usr var`
## 制作步骤GXDE OS

View File

@@ -52,6 +52,7 @@
"hidpiEnvVar": "HiDPI Environment Variables",
"hidpiSupport": "HiDPI Support",
"fileAccess": "File Access",
"fileAccessGuide": "File Access Guide",
"fileAccessHint": "Request additional file permissions to access special directories.",
"requestStoragePermission": "Request Storage Permission",
"requestAllFilesAccess": "Request All Files Access",
@@ -90,6 +91,7 @@
"resetCommand": "Reset Command",
"confirmResetAllCommands": "Reset all shortcut commands?",
"addShortcutCommand": "Add Shortcut Command",
"more": "More",
"terminal": "Terminal",
"control": "Control",
"enterGUI": "Enter GUI",
@@ -103,5 +105,7 @@
"issueUrl": "Issue Report",
"faqUrl": "FAQ",
"solutionUrl": "Usage Guide",
"firstLoadInstructions": "The first load may take about 5 to 10 minutes...\n\nNormally, the software will automatically redirect to the graphical interface after loading.\n\nIn the graphical interface:\n- Tap for left-click\n- Long press for right-click\n- Two-finger tap to open the keyboard\n- Two-finger swipe for mouse wheel\n\nPlease do not exit the software during installation.\n\nWhile waiting, you can click the button below to request permissions.\n\nMany folders in Tiny Computer (e.g., Downloads, Documents, Pictures) are bound to the corresponding device folders. Without these permissions, access to these folders will be denied.\n\nIf you don't need to access these folders, you can skip granting file permissions (but this may cause Firefox to fail when downloading files due to denied access to the Downloads folder)."
"discussionUrl": "Discussion",
"firstLoadInstructions": "The first load may take about 5 to 10 minutes...\n\nNormally, the software will automatically redirect to the graphical interface after loading.\n\nIn the graphical interface:\n- Tap for left-click\n- Long press for right-click\n- Two-finger tap to open the keyboard\n- Two-finger swipe for mouse wheel\n\nPlease do not exit the software during installation.\n\nWhile waiting, you can click the button below to request permissions.\n\nMany folders in Tiny Computer (e.g., Downloads, Documents, Pictures) are bound to the corresponding device folders. Without these permissions, access to these folders will be denied.\n\nIf you don't need to access these folders, you can skip granting file permissions (but this may cause Firefox to fail when downloading files due to denied access to the Downloads folder).",
"updateRequest": "Please try to use the latest version. Visit the project address to check for the latest version."
}

View File

@@ -52,7 +52,8 @@
"hidpiEnvVar": "HiDPI环境变量",
"hidpiSupport": "高分辨率支持",
"fileAccess": "文件访问",
"fileAccessHint": "通过这里获取更多文件权限,以实现对特殊目录的访问。",
"fileAccessGuide": "文件访问指南",
"fileAccessHint": "在这里获取更多文件权限,以实现对设备文件的访问。",
"requestStoragePermission": "申请存储权限",
"requestAllFilesAccess": "申请所有文件访问权限",
"ignoreBatteryOptimization": "忽略电池优化",
@@ -90,6 +91,7 @@
"resetCommand": "重置指令",
"confirmResetAllCommands": "是否重置所有快捷指令?",
"addShortcutCommand": "添加快捷指令",
"more": "更多",
"terminal": "终端",
"control": "控制",
"enterGUI": "进入图形界面",
@@ -103,5 +105,7 @@
"issueUrl": "问题反馈",
"faqUrl": "常见问题",
"solutionUrl": "典型场景使用指南",
"firstLoadInstructions": "第一次加载大概需要5到10分钟...\n\n正常情况下加载完成后软件会自动跳转到图形界面。\n\n在图形界面时\n- 点击为鼠标左键\n- 长按为鼠标右键\n- 双指点击可弹出键盘\n- 双指划动为鼠标滚轮\n\n请不要在安装时退出软件。\n\n在等待时可以点击下面的按钮申请一下权限。\n\n小小电脑的许多文件夹比如下载、文档、图片等等都和设备的对应文件夹绑定如果不授予这些权限会导致这些文件夹无权访问。\n\n但如果你不需要访问这些文件夹也可以不授予文件权限可能导致火狐浏览器下载文件失败因为无权访问下载文件夹。"
"discussionUrl": "论坛与讨论",
"firstLoadInstructions": "第一次加载大概需要5到10分钟...\n\n正常情况下加载完成后软件会自动跳转到图形界面。\n\n在图形界面时\n- 点击为鼠标左键\n- 长按为鼠标右键\n- 双指点击可弹出键盘\n- 双指划动为鼠标滚轮\n\n请不要在安装时退出软件。\n\n在等待时可以点击下面的按钮申请一下权限。\n\n小小电脑的许多文件夹比如下载、文档、图片等等都和设备的对应文件夹绑定如果不授予这些权限会导致这些文件夹无权访问。\n\n但如果你不需要访问这些文件夹也可以不授予文件权限可能导致火狐浏览器下载文件失败因为无权访问下载文件夹。",
"updateRequest": "请尽量使用最新版本。前往项目地址可查看最新版本。"
}

View File

@@ -52,6 +52,7 @@
"hidpiEnvVar": "HiDPI 環境變數",
"hidpiSupport": "高解析度支援",
"fileAccess": "檔案存取",
"fileAccessGuide": "檔案存取指南",
"fileAccessHint": "在此處取得更多檔案權限,以便存取特殊目錄。",
"requestStoragePermission": "申請儲存權限",
"requestAllFilesAccess": "申請所有檔案存取權限",
@@ -90,6 +91,7 @@
"resetCommand": "重設指令",
"confirmResetAllCommands": "是否重設所有快捷指令?",
"addShortcutCommand": "新增快捷指令",
"more": "更多",
"terminal": "終端",
"control": "控制",
"enterGUI": "進入圖形介面",
@@ -102,6 +104,8 @@
"reinstallingBootPackage": "正在重新安裝啟動套件",
"issueUrl": "問題回報",
"faqUrl": "常見問題",
"solutionUrl": "使用指南",
"firstLoadInstructions": "第一次載入大概需要5到10分鐘...\n\n正常情況下載入完成後軟體會自動跳轉到圖形介面。\n\n在圖形介面時\n- 點擊為滑鼠左鍵\n- 長按為滑鼠右鍵\n- 雙指點擊可彈出鍵盤\n- 雙指滑動為滑鼠滾輪\n\n請不要在安裝時退出軟體。\n\n在等待時可以點擊下面的按鈕申請權限。\n\n小小電腦的許多資料夾比如下載、文件、圖片等等都和裝置的這些資料夾綁定如果不授予這些權限會導致這些資料夾無權存取。\n\n但如果你不需要存取這些資料夾也可以不授予檔案權限可能導致火狐瀏覽器下載檔案失敗因為無權存取下載資料夾。"
"solutionUrl": "操作指南",
"discussionUrl": "討論",
"firstLoadInstructions": "第一次載入大概需要5到10分鐘...\n\n正常情況下載入完成後軟體會自動跳轉到圖形介面。\n\n在圖形介面時\n- 點擊為滑鼠左鍵\n- 長按為滑鼠右鍵\n- 雙指點擊可彈出鍵盤\n- 雙指滑動為滑鼠滾輪\n\n請不要在安裝時退出軟體。\n\n在等待時可以點擊下面的按鈕申請權限。\n\n小小電腦的許多資料夾比如下載、文件、圖片等等都和裝置的這些資料夾綁定如果不授予這些權限會導致這些資料夾無權存取。\n\n但如果你不需要存取這些資料夾也可以不授予檔案權限可能導致火狐瀏覽器下載檔案失敗因為無權存取下載資料夾。",
"updateRequest": "請盡量使用最新版本。前往專案網址查看最新版本。"
}

View File

@@ -444,6 +444,9 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)""");
OutlinedButton(style: D.commandButtonStyle, child: Text(AppLocalizations.of(context)!.requestAllFilesAccess), onPressed: () {
Permission.manageExternalStorage.request();
}),
OutlinedButton(style: D.commandButtonStyle, child: Text(AppLocalizations.of(context)!.fileAccessGuide), onPressed: () {
launchUrl(Uri.parse("https://gitee.com/caten/tc-hints/blob/master/pool/fileaccess.md"), mode: LaunchMode.externalApplication);
}),
]),
const SizedBox.square(dimension: 16),
],))),
@@ -607,6 +610,8 @@ class _InfoPageState extends State<InfoPage> {
}),
]),
const SizedBox.square(dimension: 16),
Text(AppLocalizations.of(context)!.updateRequest),
const SizedBox.square(dimension: 16),
Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: D.links
.asMap().entries.map<Widget>((e) {
return OutlinedButton(style: D.commandButtonStyle, child: Text(Util.getl10nText(e.value["name"]!, context)), onPressed: () {
@@ -1193,6 +1198,9 @@ class _FastCommandsState extends State<FastCommands> {
command = value;
}),
])), actions: [
TextButton(onPressed:() {
launchUrl(Uri.parse("https://gitee.com/caten/tc-hints/blob/master/pool/extracommand.md"), mode: LaunchMode.externalApplication);
}, child: Text(AppLocalizations.of(context)!.more)),
TextButton(onPressed:() {
Navigator.of(context).pop();
}, child: Text(AppLocalizations.of(context)!.cancel)),

View File

@@ -225,6 +225,8 @@ class Util {
return AppLocalizations.of(context)!.faqUrl;
case 'solutionUrl':
return AppLocalizations.of(context)!.solutionUrl;
case 'discussionUrl':
return AppLocalizations.of(context)!.discussionUrl;
default:
return AppLocalizations.of(context)!.projectUrl;
}
@@ -346,6 +348,7 @@ class D {
{"name": "issueUrl", "value": "https://github.com/Cateners/tiny_computer/issues"},
{"name": "faqUrl", "value": "https://gitee.com/caten/tc-hints/blob/master/pool/faq.md"},
{"name": "solutionUrl", "value": "https://gitee.com/caten/tc-hints/blob/master/pool/solution.md"},
{"name": "discussionUrl", "value": "https://github.com/Cateners/tiny_computer/discussions"},
];
//默认快捷指令

View File

@@ -178,10 +178,10 @@ packages:
dependency: "direct main"
description:
name: http
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.5.0"
http_parser:
dependency: transitive
description:
@@ -282,18 +282,18 @@ packages:
dependency: transitive
description:
name: package_info_plus
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191"
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.dev"
source: hosted
version: "8.3.0"
version: "8.3.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c"
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "3.2.1"
path:
dependency: transitive
description:
@@ -314,18 +314,18 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9
sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db"
url: "https://pub.dev"
source: hosted
version: "2.2.17"
version: "2.2.18"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.2"
path_provider_linux:
dependency: transitive
description:
@@ -402,10 +402,10 @@ packages:
dependency: transitive
description:
name: petitparser
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "7.0.1"
platform:
dependency: transitive
description:
@@ -450,10 +450,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
sha256: a2608114b1ffdcbc9c120eb71a0e207c71da56202852d4aab8a5e30a82269e74
url: "https://pub.dev"
source: hosted
version: "2.4.10"
version: "2.4.12"
shared_preferences_foundation:
dependency: transitive
description:
@@ -559,26 +559,26 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
url: "https://pub.dev"
source: hosted
version: "6.3.1"
version: "6.3.2"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
sha256: "69ee86740f2847b9a4ba6cffa74ed12ce500bbe2b07f3dc1e643439da60637b7"
url: "https://pub.dev"
source: hosted
version: "6.3.16"
version: "6.3.18"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7
url: "https://pub.dev"
source: hosted
version: "6.3.3"
version: "6.3.4"
url_launcher_linux:
dependency: transitive
description:
@@ -591,10 +591,10 @@ packages:
dependency: transitive
description:
name: url_launcher_macos
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f
url: "https://pub.dev"
source: hosted
version: "3.2.2"
version: "3.2.3"
url_launcher_platform_interface:
dependency: transitive
description:
@@ -671,34 +671,34 @@ packages:
dependency: transitive
description:
name: webview_flutter_android
sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678
sha256: "9a25f6b4313978ba1c2cda03a242eea17848174912cfb4d2d8ee84a556f248e3"
url: "https://pub.dev"
source: hosted
version: "4.7.0"
version: "4.10.1"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147
sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0"
url: "https://pub.dev"
source: hosted
version: "2.13.1"
version: "2.14.0"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3
sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f
url: "https://pub.dev"
source: hosted
version: "3.22.0"
version: "3.23.0"
win32:
dependency: transitive
description:
name: win32
sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03"
url: "https://pub.dev"
source: hosted
version: "5.13.0"
version: "5.14.0"
win32_registry:
dependency: transitive
description:
@@ -711,8 +711,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: e5a718b9755de9101a8ee83eb74ec1efede9d8bb
resolved-ref: e5a718b9755de9101a8ee83eb74ec1efede9d8bb
ref: "778ae0873d9bf953d1fdbbd6bc4937ccf1020bb5"
resolved-ref: "778ae0873d9bf953d1fdbbd6bc4937ccf1020bb5"
url: "https://github.com/tiny-computer/x11_flutter.git"
source: git
version: "0.0.1"
@@ -728,10 +728,10 @@ packages:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025"
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "6.6.1"
xterm:
dependency: "direct main"
description:

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.25+20
version: 1.0.99+20250831
environment:
sdk: '>=3.1.0 <4.0.0'
@@ -35,9 +35,9 @@ dependencies:
path_provider: ^2.1.5
webview_flutter: ^4.13.0
permission_handler: ^12.0.1
http: ^1.4.0
http: ^1.5.0
retry: ^3.1.2
url_launcher: ^6.3.1
url_launcher: ^6.3.2
shared_preferences: ^2.5.3
clipboard: ^2.0.2
wakelock_plus: ^1.3.2
@@ -50,7 +50,7 @@ dependencies:
x11_flutter:
git:
url: https://github.com/tiny-computer/x11_flutter.git
ref: e5a718b9755de9101a8ee83eb74ec1efede9d8bb
ref: 778ae0873d9bf953d1fdbbd6bc4937ccf1020bb5
avnc_flutter:
git:
url: https://github.com/tiny-computer/avnc_flutter.git