mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09bf75beed | ||
|
|
b00ede9483 | ||
|
|
b8393dacfd | ||
|
|
ce5ad3b758 | ||
|
|
cf15e2e07d | ||
|
|
938745036d | ||
|
|
b3428555c6 | ||
|
|
2a19c5eb78 | ||
|
|
54a941da63 | ||
|
|
87beedef68 | ||
|
|
c6afc4d468 | ||
|
|
6dbe710fdc | ||
|
|
cf8ce47662 | ||
|
|
86ce2315d4 | ||
|
|
6e51e5b2d2 |
67
README.md
67
README.md
@@ -2,55 +2,70 @@
|
|||||||
|
|
||||||
<img decoding="async" src="readme/cover0.png" width="50%">
|
<img decoding="async" src="readme/cover0.png" width="50%">
|
||||||
|
|
||||||
即开即用的类PC环境,内置火狐浏览器和fcitx输入法等常用软件
|
给所有安卓arm64设备的“PC应用引擎”平替
|
||||||
|
|
||||||
Click-to-run debian bookworm xfce on android for Chinese users, with fcitx pinyin input method preinstalled. No termux required.
|
Click-to-run debian bookworm xfce on android for Chinese users, with fcitx pinyin input method preinstalled. No termux required.
|
||||||
|
|
||||||
|
## 特点
|
||||||
|
|
||||||
|
- 一键安装,即开即用
|
||||||
|
- 来自kali-undercover的win10主题(仅xfce版本),友好的界面
|
||||||
|
|
||||||
|
<img decoding="async" src="readme/img1.png" width="50%">
|
||||||
|
|
||||||
|
- 提供常用软件的一键安装指令
|
||||||
|
|
||||||
|
<img decoding="async" src="readme/img2.png" width="50%">
|
||||||
|
|
||||||
|
- 可方便地改变屏幕缩放,不用担心屏幕过大或过小
|
||||||
|
|
||||||
|
<img decoding="async" src="readme/img3.gif" width="50%">
|
||||||
|
|
||||||
|
- 便捷访问设备文件,或通过设备SAF访问软件文件
|
||||||
|
|
||||||
|
<img decoding="async" src="readme/img4.png" width="50%">
|
||||||
|
|
||||||
|
- 提供终端和众多可调节参数供高级用户使用
|
||||||
|
|
||||||
|
<img decoding="async" src="readme/img5.png" width="50%">
|
||||||
|
|
||||||
## 原理
|
## 原理
|
||||||
|
|
||||||
使用proot运行debian环境
|
使用proot运行debian环境
|
||||||
|
|
||||||
内置[noVNC](https://github.com/novnc/noVNC)显示图形界面
|
内置[noVNC](https://github.com/novnc/noVNC)显示图形界面
|
||||||
|
|
||||||
初次启动由于解压的缘故要点时间
|
|
||||||
以后点开就能用
|
|
||||||
|
|
||||||
只支持arm64安卓
|
|
||||||
|
|
||||||
## 项目结构
|
## 项目结构
|
||||||
|
|
||||||
assets的文件来源如下:
|
assets的文件来源信息可以在[这里](extra/readme.md)找到。
|
||||||
|
|
||||||
- [proot](https://github.com/Cateners/proot), 使用[build-proot-android](https://github.com/green-green-avk/build-proot-android)脚本编译
|
完整的容器制作过程可以在[这里](extra/build-tiny-rootfs.md)看到。
|
||||||
- [busybox](https://github.com/meefik/busybox)
|
|
||||||
- [mediamtx相关](https://github.com/bluenviron/mediamtx)
|
|
||||||
- [tar](https://github.com/Rprop/tar-android-static)
|
|
||||||
- [Xserver XSDL, pulseaudio相关文件](https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/xserver)
|
|
||||||
- [Tmoe Linux, debian包来源](https://github.com/2moe/tmoe)
|
|
||||||
|
|
||||||
其中tar、busybox和pulseaudio相关文件都是直接用了二进制文件。
|
|
||||||
|
|
||||||
对debian容器进行了如下修改:
|
|
||||||
- 使用tmoe安装了xfce环境和全套VNC;
|
|
||||||
- 使用kali-undercover提供的Win10主题美化xfce;
|
|
||||||
- (使用tmoe)安装了fcitx输入法和云拼音组件。按<Ctrl+空格>切换输入法。
|
|
||||||
- 强烈建议**不要**使用安卓中文输入法直接输入中文,而是使用英文键盘通过容器的输入法输入中文,避免丢字错字。
|
|
||||||
- 对noVNC进行[修改](https://github.com/Cateners/noVNC),添加了scale factor滑块控制缩放(scale_factor分支),添加了上下左右shift等按键(arrow_key分支),添加了强制显示原系统光标的功能(force_cursor分支),添加了中文翻译(translation_zh_cn分支);
|
|
||||||
- 在主目录下可以方便地访问手机存储(如果提供了存储权限的话);
|
|
||||||
- 启动时会尝试挂载手机的一些字体目录(AppFiles/Fonts、Fonts和/system/fonts), 如果这些目录下有字体文件的话会一并加载到系统中,无需额外安装;
|
|
||||||
- 最后采用tar.xz压缩,用split命令分成了xa*等多个文件(低内存设备一次性拷贝大文件会导致软件闪退)。
|
|
||||||
|
|
||||||
数据包不再在assets中更新,而是随releases提供,主要是为了避免git越来越大
|
数据包不再在assets中更新,而是随releases提供,主要是为了避免git越来越大
|
||||||
|
|
||||||
lib目录:
|
lib目录:
|
||||||
|
|
||||||
- main.dart文件,页面布局,老实说已经有点乱了
|
- main.dart文件,页面布局,有点乱
|
||||||
- workflow.dart文件,逻辑部分,目前也还可以理解
|
- workflow.dart文件,逻辑部分,目前也还可以理解
|
||||||
- Util 工具类
|
- Util 工具类
|
||||||
- TermPty 一个终端
|
- TermPty 一个终端
|
||||||
- G 全局变量类
|
- G 全局变量类
|
||||||
- Workflow 从软件点开到容器启动的所有步骤
|
- Workflow 从软件点开到容器启动的所有步骤
|
||||||
|
|
||||||
|
## 编译
|
||||||
|
|
||||||
|
你需要配置好flutter和安卓sdk,然后克隆此项目。
|
||||||
|
|
||||||
|
在编译之前,需要在release中下载系统rootfs(或者[自行制作](extra/build-tiny-rootfs.md)),之后使用split命令分割,拷贝到assets。一般我将其分为98MB。
|
||||||
|
|
||||||
|
`split -b 98M debian.tar.xz`
|
||||||
|
|
||||||
|
然后修改workflow的代码,找到复制资源的部分,把生成的xa\*名字写进去(我还不知道怎么写代码识别有多少个xa*文件)
|
||||||
|
|
||||||
|
接下来就可以编译了。我使用的命令如下:
|
||||||
|
|
||||||
|
`flutter build apk --target-platform android-arm64 --split-per-abi --obfuscate --split-debug-info=tiny_computer/sdi`
|
||||||
|
|
||||||
## 目前已知bug
|
## 目前已知bug
|
||||||
|
|
||||||
多用户/分身情形无法sudo, 其它见issue
|
多用户/分身情形无法sudo, 其它见issue
|
||||||
|
|||||||
@@ -64,6 +64,13 @@ android {
|
|||||||
//checkReleaseBuilds false
|
//checkReleaseBuilds false
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packagingOptions {
|
||||||
|
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||||
|
pickFirst 'lib/x86_64/libc++_shared.so'
|
||||||
|
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||||||
|
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
assets/patch.tar.gz
Normal file
BIN
assets/patch.tar.gz
Normal file
Binary file not shown.
196
extra/build-tiny-rootfs.md
Normal file
196
extra/build-tiny-rootfs.md
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
# build-tiny-rootfs
|
||||||
|
对小小电脑项目rootfs制作的说明
|
||||||
|
|
||||||
|
### 为什么不直接制作一个脚本呢?
|
||||||
|
|
||||||
|
因为我不会,所以只能用自然语言记录一下制作步骤。
|
||||||
|
|
||||||
|
## 制作步骤
|
||||||
|
|
||||||
|
### 安装Debian容器
|
||||||
|
|
||||||
|
- 安装Termux
|
||||||
|
- 在Termux内安装tmoe
|
||||||
|
- 在tmoe内安装Debian Bookworm的proot容器
|
||||||
|
- 是否新建sudo用户-是-用户名tiny-密码tiny
|
||||||
|
- 是否设置tiny为默认用户-是
|
||||||
|
- 是否为root配置zsh-否
|
||||||
|
- 是否删除zsh.sh等-是
|
||||||
|
- 是否启动tmoe tools-是
|
||||||
|
- 其余对话框默认直接按回车
|
||||||
|
- 来到tmoe tool界面时取消,退出
|
||||||
|
|
||||||
|
### 安装其他软件
|
||||||
|
|
||||||
|
安装xfce部分是根据记忆写的,如果有误请指出。
|
||||||
|
|
||||||
|
桌面环境只安装一个。
|
||||||
|
|
||||||
|
#### 安装桌面环境(lxqt)
|
||||||
|
|
||||||
|
- 输入debian-i进入tmoe tools
|
||||||
|
- 图形界面-rootless-lxqt-core
|
||||||
|
- 不安装electron apps
|
||||||
|
- 不安装chromium
|
||||||
|
|
||||||
|
- 按需调整
|
||||||
|
|
||||||
|
#### 安装桌面环境(xfce)
|
||||||
|
|
||||||
|
前面的部分和lxqt一致,只是选桌面环境时选了xfce-lite。
|
||||||
|
|
||||||
|
下面是额外的美化部分。推荐先安装软件再做这个,因为使用kali-undercover时可能有依赖报错,但我忘记是哪些依赖了。但后面安装的某个软件会帮我们把依赖补上。
|
||||||
|
|
||||||
|
- xfce美化
|
||||||
|
- 前往kali源下载kali-undercover包并apt install安装
|
||||||
|
- 修改kali-undercover脚本中检测xfce环境的地方,强制允许
|
||||||
|
- 即注释第一个if里的exit 1
|
||||||
|
- 执行kali-undercover
|
||||||
|
- 按需调整
|
||||||
|
- 注释.bashrc中把bash风格改为windows风格的语句
|
||||||
|
- 调整状态栏
|
||||||
|
- ......
|
||||||
|
|
||||||
|
#### 安装VNC
|
||||||
|
|
||||||
|
安装桌面环境后会自动进行这一步,使用tmoe tools全部安装即可。
|
||||||
|
|
||||||
|
- 选择tigervnc
|
||||||
|
- 密码12345678
|
||||||
|
|
||||||
|
安装完成后,输入debian-i回到tmoe继续修改一些参数,主要目的是避免与termux的容器端口一致产生冲突
|
||||||
|
|
||||||
|
- 修改显示端口到5904
|
||||||
|
- 远程桌面-tigervnc-显示端口-4
|
||||||
|
- 修改novnc端口到36082
|
||||||
|
- 远程桌面-novnc-端口-36082
|
||||||
|
- 修改startnovnc启动脚本(避免每次启动novnc时打开浏览器,虽然不是windows)
|
||||||
|
- 注释start_win10_edge_novnc_addr(大概在倒数第五行)
|
||||||
|
|
||||||
|
接下来对novnc应用补丁,以添加"通过滑块修改分辨率"等功能
|
||||||
|
|
||||||
|
- [下载novnc.patch](https://github.com/Cateners/noVNC/releases/tag/1.2)
|
||||||
|
- 切换目录到/usr/local/etc/tmoe-linux/novnc
|
||||||
|
- `patch -p1 < novnc.patch`
|
||||||
|
- ```bash
|
||||||
|
find . '(' \
|
||||||
|
-name \*-baseline -o \
|
||||||
|
-name \*-merge -o \
|
||||||
|
-name \*-original -o \
|
||||||
|
-name \*.orig -o \
|
||||||
|
-name \*.rej \
|
||||||
|
')' -delete
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### 修复tmoe不能下载软件
|
||||||
|
|
||||||
|
在我发布的xfce版本中,我给每个aria2c调用都添加了--async-dns=false参数。
|
||||||
|
|
||||||
|
先切换到tmoe目录`/usr/local/etc/tmoe-linux/git/share`,然后执行脚本`./replace.sh old-version`:
|
||||||
|
```shell
|
||||||
|
#!/bin/bash
|
||||||
|
# 用法: ./replace.sh 目录
|
||||||
|
# 该脚本会递归地在给定目录下的所有文件中替换文本
|
||||||
|
# 原文本: aria2c --console-log-level
|
||||||
|
# 新文本: aria2c --async-dns=false --console-log-level
|
||||||
|
|
||||||
|
# 检查参数是否正确
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "错误: 需要一个目录作为参数"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 检查目录是否存在
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "错误: 目录 $1 不存在"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 遍历目录下的所有文件
|
||||||
|
find "$1" -type f | while read file; do
|
||||||
|
# 使用sed命令替换文本
|
||||||
|
sed -i 's/aria2c --console-log-level/aria2c --async-dns=false --console-log-level/g' "$file"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
用完后删除replace.sh;
|
||||||
|
|
||||||
|
另外现在tmoe官方给出了[解决办法](https://gitee.com/mo2/linux/issues/I8BQG3),不过我测试似乎还是不行,所以就先这样了
|
||||||
|
|
||||||
|
#### 修改apt源
|
||||||
|
|
||||||
|
按需修改/etc/apt/sources.list,另外把non-free改为non-free-firmware
|
||||||
|
|
||||||
|
#### 安装火狐浏览器
|
||||||
|
|
||||||
|
`sudo apt install firefox-esr firefox-esr-l10n-zh-cn`
|
||||||
|
|
||||||
|
#### 安装输入法
|
||||||
|
|
||||||
|
- debian-i
|
||||||
|
- 03秘密花园-10输入法-fcitx4-安装4libpinyin和6云拼音模块
|
||||||
|
- 在图形界面应用找到fcitx配置-附加组件-云拼音-配置-云拼音来源,把Google改为百度,确认
|
||||||
|
- 启动图形界面:输入startnovnc,会出现一个类似xxx.xxx.xxx.xxx:36082/vnc.html的网址,复制到本机的浏览器中输入vnc密码12345678就可以访问了。
|
||||||
|
|
||||||
|
#### 安装gdebi
|
||||||
|
|
||||||
|
这个软件包能使用户通过图形界面安装deb安装包
|
||||||
|
|
||||||
|
安装:`sudo apt install gdebi`
|
||||||
|
|
||||||
|
修改启动器:在/usr/share/applications/gdebi.desktop的Exec=后加上sudo
|
||||||
|
|
||||||
|
#### 安装VSCode
|
||||||
|
|
||||||
|
VSCode使用tmoe安装,正好测试一下不能下载软件的问题是否存在
|
||||||
|
|
||||||
|
- 2软件-2开发-1VSCode-1Official
|
||||||
|
|
||||||
|
tmoe还会安装gnome-keyring,由于之前我做xfce包时会造成VSCode反复弹窗更新密钥环所以被我卸载了,这个按需决定是否保留吧
|
||||||
|
|
||||||
|
#### 安装ffmpeg
|
||||||
|
|
||||||
|
这个是为了预览推流用的,按需安装
|
||||||
|
|
||||||
|
`sudo apt install ffmpeg`
|
||||||
|
|
||||||
|
### 其他修补
|
||||||
|
|
||||||
|
#### cmatrix
|
||||||
|
|
||||||
|
这个是给快捷指令的彩蛋。下载cmatrix的包,并将cmatrix文件提取放到/home/tiny/.local/bin里即可,记得添加执行权限
|
||||||
|
|
||||||
|
#### WPS
|
||||||
|
|
||||||
|
- 软件设置修改
|
||||||
|
- 从官网下载WPS linux arm64 deb安装包,直接在图形界面点开用gdebi安装(正好测试一下gdebi是否能用)
|
||||||
|
- 打开WPS-右上角设置-其他-切换窗口管理模式-整合模式改为多组件模式(否则一些设备在新建文档等操作时卡死,目前原因不明)
|
||||||
|
- 使用gdebi(或自行)卸载WPS
|
||||||
|
- 字体修补
|
||||||
|
- 在你的Windows电脑里的C:\Windows\Fonts文件夹找到symbol.ttf、webdings.ttf、wingding.ttf、WINGDNG2.TTF、WINGDNG3.TTF、MTEXTRA.TTF字体并放到容器/usr/share/fonts的某个文件夹下(我新建了extra文件夹并把这些字体放到里面)
|
||||||
|
- libtiff.so.5库修补
|
||||||
|
- 切换到/lib/aarch64-linux-gnu文件夹,创建软链把libtiff.so.6链接到libtiff.so.5
|
||||||
|
- 或者找libtiff.so.5的包并安装,这样可能更好一些
|
||||||
|
|
||||||
|
### 打包
|
||||||
|
|
||||||
|
- 首先退出容器,在容器挂载选项里取消对sd和termux的挂载,之后进入容器删除termux软连接
|
||||||
|
- 在后面使用tar打包时,即使指定了exclude,tar也会尝试把它们打包进去
|
||||||
|
- 这个很可能因为我自己没用对参数,如果你非常自信的话就不需要这么做,自行打包即可=v=
|
||||||
|
- 在[这里](https://github.com/meefik/busybox/releases)下载提取busybox的可执行文件,并放到系统根目录
|
||||||
|
- 我使用busybox的tar来打包,而不是容器自带的tar,原因是容器自带的tar会把硬链接打包成单独的文件,导致打包解包后占用多出1GB
|
||||||
|
- 这个也很可能是我自己没用对参数,如果你非常自信就不用这么做......
|
||||||
|
- 尽可能多地删除使用痕迹,包括但不限于
|
||||||
|
- apt clean
|
||||||
|
- /tmp下的文件,退出容器后删
|
||||||
|
- tiny和root目录下的
|
||||||
|
- .cache
|
||||||
|
- .vnc/vnc.log, .vnc/x.log
|
||||||
|
- .bash_history
|
||||||
|
- .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.*" /`
|
||||||
|
|
||||||
56
extra/cross/install-box
Normal file
56
extra/cross/install-box
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo dpkg --add-architecture armhf
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade -y
|
||||||
|
sudo apt install -y cmake gcc-arm-linux-gnueabihf libc6:armhf
|
||||||
|
sudo apt reinstall -y libc6-dev
|
||||||
|
|
||||||
|
mkdir $HOME/.local/share/tiny/cross
|
||||||
|
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
mkdir $HOME/.local/share/tiny/tmp
|
||||||
|
cd $HOME/.local/share/tiny/tmp
|
||||||
|
|
||||||
|
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box86
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
git clone https://github.com/ptitSeb/box86
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
echo '仓库克隆失败...退出安装...'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box64
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
git clone https://github.com/ptitSeb/box64
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
echo '仓库克隆失败...退出安装...'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd box86
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
|
make -j
|
||||||
|
cd ../..
|
||||||
|
mv box86/build/box86 ../cross
|
||||||
|
mv box86/x86lib ../cross
|
||||||
|
|
||||||
|
cd box64
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
|
make -j
|
||||||
|
cd ../..
|
||||||
|
mv box64/build/box64 ../cross
|
||||||
|
mv box64/x64lib ../cross
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf tmp
|
||||||
|
|
||||||
|
echo '安装完成'
|
||||||
35
extra/cross/install-dxvk
Normal file
35
extra/cross/install-dxvk
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
mkdir $HOME/.local/share/tiny/tmp
|
||||||
|
cd $HOME/.local/share/tiny/tmp
|
||||||
|
|
||||||
|
MIRROR_SITE=https://mirror.ghproxy.com
|
||||||
|
RELEASE_PAGE=https://github.com/doitsujin/dxvk/releases
|
||||||
|
LATEST_DXVK_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Version \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1)
|
||||||
|
if [ -z "$LATEST_DXVK_TAG" ]
|
||||||
|
then
|
||||||
|
LATEST_DXVK_TAG="2.3"
|
||||||
|
fi
|
||||||
|
LATEST_DXVK_NAME="dxvk-$LATEST_DXVK_TAG.tar.gz"
|
||||||
|
LATEST_DXVK_LINK="https://github.com/doitsujin/dxvk/releases/download/v$LATEST_DXVK_TAG/$LATEST_DXVK_NAME"
|
||||||
|
|
||||||
|
wget $MIRROR_SITE/$LATEST_DXVK_LINK
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
wget $LATEST_DXVK_LINK
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
echo '下载失败...退出安装...'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
wineboot
|
||||||
|
tar xvf $LATEST_DXVK_NAME
|
||||||
|
mv dxvk-$LATEST_DXVK_TAG/x32/* ~/.wine/drive_c/windows/syswow64
|
||||||
|
mv dxvk-$LATEST_DXVK_TAG/x64/* ~/.wine/drive_c/windows/system32
|
||||||
|
|
||||||
|
cd ~
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
|
||||||
|
echo '安装完成,建议前往wine配置更新配置。'
|
||||||
70
extra/cross/install-wine
Normal file
70
extra/cross/install-wine
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade -y
|
||||||
|
|
||||||
|
# Wine的64位依赖。box64会将amd64调用转换为arm64,所以只需安装arm64库即可
|
||||||
|
# 依赖来自 dpkg-deb -I wine-stable-amd64_8.0.2~bookworm-1_amd64.deb
|
||||||
|
sudo apt install -y libasound2:arm64 libc6:arm64 libglib2.0-0:arm64 libgphoto2-6:arm64 libgphoto2-port12:arm64 \
|
||||||
|
libgstreamer-plugins-base1.0-0:arm64 libgstreamer1.0-0:arm64 libpcap0.8:arm64 libpulse0:arm64 libsane1:arm64 \
|
||||||
|
libudev1:arm64 libunwind8:arm64 libusb-1.0-0:arm64 libx11-6:arm64 libxext6:arm64 ocl-icd-libopencl1:arm64 \
|
||||||
|
libasound2-plugins:arm64 libncurses6:arm64 libcapi20-3:arm64 libcups2:arm64 libdbus-1-3:arm64 libfontconfig1:arm64 \
|
||||||
|
libfreetype6:arm64 libglu1-mesa:arm64 libgnutls30:arm64 libgsm1:arm64 libgssapi-krb5-2:arm64 libjpeg62-turbo:arm64 \
|
||||||
|
libkrb5-3:arm64 libodbc1:arm64 libosmesa6:arm64 libpng16-16:arm64 libsdl2-2.0-0:arm64 libv4l-0:arm64 \
|
||||||
|
libxcomposite1:arm64 libxcursor1:arm64 libxfixes3:arm64 libxi6:arm64 libxinerama1:arm64 libxrandr2:arm64 \
|
||||||
|
libxrender1:arm64 libxslt1.1:arm64 libxxf86vm1:arm64
|
||||||
|
|
||||||
|
# Wine的32位依赖。同理安装armhf而不是i386
|
||||||
|
# 依赖来自 dpkg-deb -I wine-stable-i386_8.0.2~bookworm-1_i386.deb
|
||||||
|
sudo apt install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
|
||||||
|
libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libpcap0.8:armhf libpulse0:armhf libsane1:armhf \
|
||||||
|
libudev1:armhf libusb-1.0-0:armhf libx11-6:armhf libxext6:armhf ocl-icd-libopencl1:armhf libasound2-plugins:armhf \
|
||||||
|
libncurses6:armhf libcapi20-3:armhf libcups2:armhf libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf \
|
||||||
|
libglu1-mesa:armhf libgnutls30:armhf libgsm1:armhf libgssapi-krb5-2:armhf libjpeg62-turbo:armhf libkrb5-3:armhf \
|
||||||
|
libodbc1:armhf libosmesa6:armhf libpng16-16:armhf libsdl2-2.0-0:armhf libv4l-0:armhf libxcomposite1:armhf \
|
||||||
|
libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf libxrender1:armhf libxslt1.1:armhf \
|
||||||
|
libxxf86vm1:armhf
|
||||||
|
|
||||||
|
# 其他测试时认为可能需要的依赖
|
||||||
|
sudo apt install -y libvulkan1 libvulkan1:armhf
|
||||||
|
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
mkdir $HOME/.local/share/tiny/tmp
|
||||||
|
cd $HOME/.local/share/tiny/tmp
|
||||||
|
|
||||||
|
MIRROR_SITE=https://mirror.ghproxy.com
|
||||||
|
RELEASE_PAGE=https://github.com/Kron4ek/Wine-Builds/releases
|
||||||
|
LATEST_WINE_TAG=proton-$(curl -L $RELEASE_PAGE | grep -oP 'Proton \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1) #proton
|
||||||
|
#LATEST_WINE_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Wine \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1) #vanilla
|
||||||
|
if [ -z "$LATEST_WINE_TAG" ] || [ "$LATEST_WINE_TAG" == "proton-" ]
|
||||||
|
then
|
||||||
|
LATEST_WINE_TAG=proton-8.0-4
|
||||||
|
fi
|
||||||
|
LATEST_WINE_NAME=wine-$LATEST_WINE_TAG-amd64.tar.xz
|
||||||
|
LATEST_WINE_LINK=$RELEASE_PAGE/download/$LATEST_WINE_TAG/$LATEST_WINE_NAME
|
||||||
|
|
||||||
|
wget $MIRROR_SITE/$LATEST_WINE_LINK
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
wget $LATEST_WINE_LINK
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
echo '下载失败...退出安装...'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar xvf $LATEST_WINE_NAME
|
||||||
|
mv wine-$LATEST_WINE_TAG-amd64 ../cross/wine
|
||||||
|
cd ..
|
||||||
|
rm -rf tmp
|
||||||
|
|
||||||
|
echo '[Desktop Entry]
|
||||||
|
Name=Wine 启动器
|
||||||
|
Exec=wine64 start /unix %f
|
||||||
|
Icon=wine
|
||||||
|
Type=Application' > $HOME/.local/share/tiny/cross/wine.desktop
|
||||||
|
chmod +x $HOME/.local/share/tiny/cross/wine.desktop
|
||||||
|
|
||||||
|
echo '安装完成,在启用wine后可以点击exe文件选择用wine启动。'
|
||||||
|
echo '初次运行时会自动进行一段时间的初始化工作。'
|
||||||
|
echo '程序的运行可能依赖一些配置或组件。比如,一些使用directx的游戏可能需要安装dxvk。'
|
||||||
83
extra/cross/install-wine2
Normal file
83
extra/cross/install-wine2
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade -y
|
||||||
|
|
||||||
|
# Wine的64位依赖。box64会将amd64调用转换为arm64,所以只需安装arm64库即可
|
||||||
|
# 依赖来自 dpkg-deb -I wine-stable-amd64_8.0.2~bookworm-1_amd64.deb
|
||||||
|
sudo apt install -y libasound2:arm64 libc6:arm64 libglib2.0-0:arm64 libgphoto2-6:arm64 libgphoto2-port12:arm64 \
|
||||||
|
libgstreamer-plugins-base1.0-0:arm64 libgstreamer1.0-0:arm64 libpcap0.8:arm64 libpulse0:arm64 libsane1:arm64 \
|
||||||
|
libudev1:arm64 libunwind8:arm64 libusb-1.0-0:arm64 libx11-6:arm64 libxext6:arm64 ocl-icd-libopencl1:arm64 \
|
||||||
|
libasound2-plugins:arm64 libncurses6:arm64 libcapi20-3:arm64 libcups2:arm64 libdbus-1-3:arm64 libfontconfig1:arm64 \
|
||||||
|
libfreetype6:arm64 libglu1-mesa:arm64 libgnutls30:arm64 libgsm1:arm64 libgssapi-krb5-2:arm64 libjpeg62-turbo:arm64 \
|
||||||
|
libkrb5-3:arm64 libodbc1:arm64 libosmesa6:arm64 libpng16-16:arm64 libsdl2-2.0-0:arm64 libv4l-0:arm64 \
|
||||||
|
libxcomposite1:arm64 libxcursor1:arm64 libxfixes3:arm64 libxi6:arm64 libxinerama1:arm64 libxrandr2:arm64 \
|
||||||
|
libxrender1:arm64 libxslt1.1:arm64 libxxf86vm1:arm64
|
||||||
|
|
||||||
|
# Wine的32位依赖。同理安装armhf而不是i386
|
||||||
|
# 依赖来自 dpkg-deb -I wine-stable-i386_8.0.2~bookworm-1_i386.deb
|
||||||
|
sudo apt install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
|
||||||
|
libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libpcap0.8:armhf libpulse0:armhf libsane1:armhf \
|
||||||
|
libudev1:armhf libusb-1.0-0:armhf libx11-6:armhf libxext6:armhf ocl-icd-libopencl1:armhf libasound2-plugins:armhf \
|
||||||
|
libncurses6:armhf libcapi20-3:armhf libcups2:armhf libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf \
|
||||||
|
libglu1-mesa:armhf libgnutls30:armhf libgsm1:armhf libgssapi-krb5-2:armhf libjpeg62-turbo:armhf libkrb5-3:armhf \
|
||||||
|
libodbc1:armhf libosmesa6:armhf libpng16-16:armhf libsdl2-2.0-0:armhf libv4l-0:armhf libxcomposite1:armhf \
|
||||||
|
libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf libxrender1:armhf libxslt1.1:armhf \
|
||||||
|
libxxf86vm1:armhf
|
||||||
|
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
mkdir $HOME/.local/share/tiny/tmp
|
||||||
|
cd $HOME/.local/share/tiny/tmp
|
||||||
|
|
||||||
|
LNKA="https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/dists/bookworm/main/binary-amd64/"
|
||||||
|
DEB_A1="wine-stable-amd64_8.0.2~bookworm-1_amd64.deb"
|
||||||
|
DEB_A2="wine-stable_8.0.2~bookworm-1_amd64.deb"
|
||||||
|
|
||||||
|
LNKB="https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/dists/bookworm/main/binary-i386/"
|
||||||
|
DEB_B1="wine-stable-i386_8.0.2~bookworm-1_i386.deb"
|
||||||
|
|
||||||
|
# Install amd64-wine (64-bit) alongside i386-wine (32-bit)
|
||||||
|
echo -e "下载wine..."
|
||||||
|
wget ${LNKA}${DEB_A1}
|
||||||
|
wget ${LNKA}${DEB_A2}
|
||||||
|
wget ${LNKB}${DEB_B1}
|
||||||
|
|
||||||
|
wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
rm -rf $HOME/.local/share/tiny/tmp
|
||||||
|
echo '下载失败...退出安装...'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "解压wine..."
|
||||||
|
dpkg-deb -x ${DEB_A1} wine-installer
|
||||||
|
dpkg-deb -x ${DEB_A2} wine-installer
|
||||||
|
dpkg-deb -x ${DEB_B1} wine-installer
|
||||||
|
echo -e "安装wine..."
|
||||||
|
mv wine-installer/opt/wine* ../cross/wine
|
||||||
|
|
||||||
|
mv winetricks ../cross
|
||||||
|
chmod +x $HOME/.local/share/tiny/cross/winetricks
|
||||||
|
cd ..
|
||||||
|
rm -rf tmp
|
||||||
|
|
||||||
|
echo '[Desktop Entry]
|
||||||
|
Name=Wine 启动器
|
||||||
|
Exec=wine start /unix %f
|
||||||
|
Icon=wine
|
||||||
|
Type=Application' > $HOME/.local/share/tiny/cross/wine.desktop
|
||||||
|
chmod +x $HOME/.local/share/tiny/cross/wine.desktop
|
||||||
|
|
||||||
|
echo '[Desktop Entry]
|
||||||
|
Name=winetricks 实用工具
|
||||||
|
Exec=winetricks
|
||||||
|
Icon=wine
|
||||||
|
Type=Application' > $HOME/.local/share/tiny/cross/winetricks.desktop
|
||||||
|
chmod +x $HOME/.local/share/tiny/cross/winetricks.desktop
|
||||||
|
|
||||||
|
echo '安装完成,在启用wine后可以点击exe文件选择用wine启动。'
|
||||||
|
echo '程序的运行可能依赖一些配置或组件。比如,一些使用directx的游戏可能需要安装dxvk。'
|
||||||
|
echo '如果缺失可以尝试使用winetricks安装。请务必保持耐心。'
|
||||||
243
extra/getifaddrs_bridge/getifaddrs_bridge_client_lib.c
Normal file
243
extra/getifaddrs_bridge/getifaddrs_bridge_client_lib.c
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
// getifaddrs_bridge_client_lib.c -- This file is part of tiny_computer.
|
||||||
|
|
||||||
|
// Copyright (C) 2023 Caten Hu
|
||||||
|
|
||||||
|
// Tiny Computer is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published
|
||||||
|
// by the Free Software Foundation, either version 3 of the License,
|
||||||
|
// or any later version.
|
||||||
|
|
||||||
|
// Tiny Computer is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
|
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
/* this file is mainly generated by Bing */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <ifaddrs.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
|
||||||
|
#define BUFSIZE 1024 // 定义缓冲区大小
|
||||||
|
|
||||||
|
// 定义一个反序列化函数,将字节数组转换为ifaddrs结构体
|
||||||
|
int TINY_deserialize_ifaddrs(char *buf, int size, struct ifaddrs **ifap) {
|
||||||
|
int len = 0; // 记录已经读取的字节数
|
||||||
|
struct ifaddrs *head = NULL; // 链表头指针
|
||||||
|
struct ifaddrs *tail = NULL; // 链表尾指针
|
||||||
|
while (len < size) {
|
||||||
|
// 为当前接口分配内存
|
||||||
|
struct ifaddrs *ifa = (struct ifaddrs *)malloc(sizeof(struct ifaddrs));
|
||||||
|
if (ifa == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
// 读取接口名称
|
||||||
|
int namelen = strlen(buf + len) + 1; // 包括结束符
|
||||||
|
if (len + namelen > size) break; // 缓冲区不足
|
||||||
|
ifa->ifa_name = (char *)malloc(namelen); // 为名称分配内存
|
||||||
|
if (ifa->ifa_name == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
free(ifa);
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
memcpy(ifa->ifa_name, buf + len, namelen); // 复制名称
|
||||||
|
len += namelen;
|
||||||
|
// 读取接口标志
|
||||||
|
if (len + sizeof(unsigned int) > size) break; // 缓冲区不足
|
||||||
|
memcpy(&ifa->ifa_flags, buf + len, sizeof(unsigned int)); // 复制标志
|
||||||
|
len += sizeof(unsigned int);
|
||||||
|
// 读取接口地址
|
||||||
|
if (buf[len] != '\0') {
|
||||||
|
// 如果有地址
|
||||||
|
int addrlen = sizeof(struct sockaddr); // 地址结构体长度
|
||||||
|
if (len + addrlen > size) break; // 缓冲区不足
|
||||||
|
ifa->ifa_addr = (struct sockaddr *)malloc(addrlen); // 为地址分配内存
|
||||||
|
if (ifa->ifa_addr == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
free(ifa->ifa_name);
|
||||||
|
free(ifa);
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
memcpy(ifa->ifa_addr, buf + len, addrlen); // 复制地址
|
||||||
|
len += addrlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有地址,跳过一个空字节
|
||||||
|
ifa->ifa_addr = NULL;
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 读取接口掩码
|
||||||
|
if (buf[len] != '\0') {
|
||||||
|
// 如果有掩码
|
||||||
|
int masklen = sizeof(struct sockaddr); // 掩码结构体长度
|
||||||
|
if (len + masklen > size) break; // 缓冲区不足
|
||||||
|
ifa->ifa_netmask = (struct sockaddr *)malloc(masklen); // 为掩码分配内存
|
||||||
|
if (ifa->ifa_netmask == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
free(ifa->ifa_addr);
|
||||||
|
free(ifa->ifa_name);
|
||||||
|
free(ifa);
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
memcpy(ifa->ifa_netmask, buf + len, masklen); // 复制
|
||||||
|
len += masklen;
|
||||||
|
} else {
|
||||||
|
// 如果没有掩码,跳过一个空字节
|
||||||
|
ifa->ifa_netmask = NULL;
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 读取接口广播地址或点对点地址
|
||||||
|
if (ifa->ifa_flags & IFF_BROADCAST) {
|
||||||
|
// 如果有广播地址
|
||||||
|
if (buf[len] != '\0') {
|
||||||
|
// 如果有广播地址
|
||||||
|
int broadlen = sizeof(struct sockaddr); // 广播地址结构体长度
|
||||||
|
if (len + broadlen > size) break; // 缓冲区不足
|
||||||
|
ifa->ifa_broadaddr = (struct sockaddr *)malloc(broadlen); // 为广播地址分配内存
|
||||||
|
if (ifa->ifa_broadaddr == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
free(ifa->ifa_netmask);
|
||||||
|
free(ifa->ifa_addr);
|
||||||
|
free(ifa->ifa_name);
|
||||||
|
free(ifa);
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
memcpy(ifa->ifa_broadaddr, buf + len, broadlen); // 复制广播地址
|
||||||
|
len += broadlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有广播地址,跳过一个空字节
|
||||||
|
ifa->ifa_broadaddr = NULL;
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
} else if (ifa->ifa_flags & IFF_POINTOPOINT) {
|
||||||
|
// 如果有点对点地址
|
||||||
|
if (buf[len] != '\0') {
|
||||||
|
// 如果有点对点地址
|
||||||
|
int dstlen = sizeof(struct sockaddr); // 点对点地址结构体长度
|
||||||
|
if (len + dstlen > size) break; // 缓冲区不足
|
||||||
|
ifa->ifa_dstaddr = (struct sockaddr *)malloc(dstlen); // 为点对点地址分配内存
|
||||||
|
if (ifa->ifa_dstaddr == NULL) {
|
||||||
|
// 分配失败,释放已分配的内存
|
||||||
|
free(ifa->ifa_netmask);
|
||||||
|
free(ifa->ifa_addr);
|
||||||
|
free(ifa->ifa_name);
|
||||||
|
free(ifa);
|
||||||
|
freeifaddrs(head);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
memcpy(ifa->ifa_dstaddr, buf + len, dstlen); // 复制点对点地址
|
||||||
|
len += dstlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有点对点地址,跳过一个空字节
|
||||||
|
ifa->ifa_dstaddr = NULL;
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有广播地址或点对点地址,跳过两个空字节
|
||||||
|
ifa->ifa_broadaddr = NULL;
|
||||||
|
ifa->ifa_dstaddr = NULL;
|
||||||
|
len += 2;
|
||||||
|
}
|
||||||
|
// 读取接口数据
|
||||||
|
if (buf[len] != '\0') {
|
||||||
|
// 如果有数据
|
||||||
|
// TODO: 根据不同的地址族,读取不同的数据
|
||||||
|
// 这里暂时省略,只跳过一个空字节
|
||||||
|
ifa->ifa_data = NULL;
|
||||||
|
len += 1;
|
||||||
|
} else {
|
||||||
|
// 如果没有数据,跳过一个空字节
|
||||||
|
ifa->ifa_data = NULL;
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 将当前接口插入链表
|
||||||
|
ifa->ifa_next = NULL;
|
||||||
|
if (head == NULL) {
|
||||||
|
// 如果是第一个接口,设置头指针
|
||||||
|
head = ifa;
|
||||||
|
} else {
|
||||||
|
// 如果不是第一个接口,设置尾指针的下一个指针
|
||||||
|
tail->ifa_next = ifa;
|
||||||
|
}
|
||||||
|
// 更新尾指针
|
||||||
|
tail = ifa;
|
||||||
|
}
|
||||||
|
*ifap = head; // 返回链表头指针
|
||||||
|
return len; // 返回读取的总字节数
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义一个发送信号的函数,向服务器发送一个信号
|
||||||
|
int TINY_send_signal(int sockfd) {
|
||||||
|
char sig = 'S'; // 定义信号为一个字符S
|
||||||
|
int n = write(sockfd, &sig, 1); // 向套接字写入一个字节
|
||||||
|
if (n < 0) {
|
||||||
|
perror("write");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
return 0; // 返回成功
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义一个接收数据的函数,从服务器接收数据并反序列化
|
||||||
|
int TINY_receive_data(int sockfd, struct ifaddrs **ifap) {
|
||||||
|
char buf[BUFSIZE]; // 定义缓冲区
|
||||||
|
int n = read(sockfd, buf, BUFSIZE); // 从套接字读取数据
|
||||||
|
if (n < 0) {
|
||||||
|
perror("read");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
int len = TINY_deserialize_ifaddrs(buf, n, ifap); // 反序列化数据
|
||||||
|
if (len < 0) {
|
||||||
|
fprintf(stderr, "deserialize_ifaddrs failed\n");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
return 0; // 返回成功
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主函数
|
||||||
|
int getifaddrs(struct ifaddrs **ifap) {
|
||||||
|
// 创建一个套接字
|
||||||
|
int sockfd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||||
|
if (sockfd < 0) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 定义服务器地址结构体
|
||||||
|
struct sockaddr_un un;
|
||||||
|
memset(&un, 0, sizeof(un));
|
||||||
|
un.sun_family = AF_UNIX;
|
||||||
|
snprintf(un.sun_path, sizeof(un.sun_path), "%s", "/tmp/.getifaddrs-bridge");
|
||||||
|
// 连接到服务器
|
||||||
|
if (connect(sockfd, (struct sockaddr *)&un, sizeof(un)) < 0) {
|
||||||
|
perror("connect");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 发送信号给服务器
|
||||||
|
if (TINY_send_signal(sockfd) < 0) {
|
||||||
|
fprintf(stderr, "send_signal failed\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 接收数据并反序列化
|
||||||
|
if (TINY_receive_data(sockfd, ifap) < 0) {
|
||||||
|
fprintf(stderr, "receive_data failed\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 关闭套接字
|
||||||
|
close(sockfd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
222
extra/getifaddrs_bridge/getifaddrs_bridge_server.c
Normal file
222
extra/getifaddrs_bridge/getifaddrs_bridge_server.c
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
// getifaddrs_bridge_server.c -- This file is part of tiny_computer.
|
||||||
|
|
||||||
|
// Copyright (C) 2023 Caten Hu
|
||||||
|
|
||||||
|
// Tiny Computer is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published
|
||||||
|
// by the Free Software Foundation, either version 3 of the License,
|
||||||
|
// or any later version.
|
||||||
|
|
||||||
|
// Tiny Computer is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
|
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
/* this file is mainly generated by Bing */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <ifaddrs.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
|
||||||
|
#define BUFSIZE 1024 // 定义缓冲区大小
|
||||||
|
|
||||||
|
// 定义一个序列化函数,将ifaddrs结构体转换为字节数组
|
||||||
|
int serialize_ifaddrs(struct ifaddrs *ifa, char *buf, int size) {
|
||||||
|
int len = 0; // 记录已经写入的字节数
|
||||||
|
while (ifa != NULL && len < size) {
|
||||||
|
// 写入接口名称
|
||||||
|
int namelen = strlen(ifa->ifa_name) + 1; // 包括结束符
|
||||||
|
if (len + namelen > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, ifa->ifa_name, namelen);
|
||||||
|
len += namelen;
|
||||||
|
// 写入接口标志
|
||||||
|
if (len + sizeof(unsigned int) > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, &ifa->ifa_flags, sizeof(unsigned int));
|
||||||
|
len += sizeof(unsigned int);
|
||||||
|
// 写入接口地址
|
||||||
|
if (ifa->ifa_addr != NULL) {
|
||||||
|
int addrlen = sizeof(struct sockaddr); // 地址结构体长度
|
||||||
|
if (len + addrlen > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, ifa->ifa_addr, addrlen);
|
||||||
|
len += addrlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有地址,写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 写入接口掩码
|
||||||
|
if (ifa->ifa_netmask != NULL) {
|
||||||
|
int masklen = sizeof(struct sockaddr); // 掩码结构体长度
|
||||||
|
if (len + masklen > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, ifa->ifa_netmask, masklen);
|
||||||
|
len += masklen;
|
||||||
|
} else {
|
||||||
|
// 如果没有掩码,写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 写入接口广播地址或点对点地址
|
||||||
|
if (ifa->ifa_flags & IFF_BROADCAST) {
|
||||||
|
// 如果有广播地址
|
||||||
|
if (ifa->ifa_broadaddr != NULL) {
|
||||||
|
int broadlen = sizeof(struct sockaddr); // 广播地址结构体长度
|
||||||
|
if (len + broadlen > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, ifa->ifa_broadaddr, broadlen);
|
||||||
|
len += broadlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有广播地址,写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
} else if (ifa->ifa_flags & IFF_POINTOPOINT) {
|
||||||
|
// 如果有点对点地址
|
||||||
|
if (ifa->ifa_dstaddr != NULL) {
|
||||||
|
int dstlen = sizeof(struct sockaddr); // 点对点地址结构体长度
|
||||||
|
if (len + dstlen > size) break; // 缓冲区不足
|
||||||
|
memcpy(buf + len, ifa->ifa_dstaddr, dstlen);
|
||||||
|
len += dstlen;
|
||||||
|
} else {
|
||||||
|
// 如果没有点对点地址,写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有广播地址或点对点地址,写入两个空字节
|
||||||
|
if (len + 2 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
buf[len + 1] = '\0';
|
||||||
|
len += 2;
|
||||||
|
}
|
||||||
|
// 写入接口数据
|
||||||
|
if (ifa->ifa_data != NULL) {
|
||||||
|
// TODO: 根据不同的地址族,写入不同的数据
|
||||||
|
// 这里暂时省略,只写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
} else {
|
||||||
|
// 如果没有数据,写入一个空字节
|
||||||
|
if (len + 1 > size) break; // 缓冲区不足
|
||||||
|
buf[len] = '\0';
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
// 跳到下一个接口
|
||||||
|
ifa = ifa->ifa_next;
|
||||||
|
}
|
||||||
|
return len; // 返回写入的总字节数
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义一个接收信号的函数,从客户端接收一个信号
|
||||||
|
int receive_signal(int sockfd) {
|
||||||
|
char sig; // 定义信号变量
|
||||||
|
int n = read(sockfd, &sig, 1); // 从套接字读取一个字节
|
||||||
|
if (n < 0) {
|
||||||
|
perror("read");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
if (sig == 'S') {
|
||||||
|
// 如果收到信号S,表示客户端需要数据
|
||||||
|
return 0; // 返回成功
|
||||||
|
} else {
|
||||||
|
// 如果收到其他信号,表示无效信号
|
||||||
|
fprintf(stderr, "invalid signal: %c\n", sig);
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义一个发送数据的函数,向客户端发送数据并序列化
|
||||||
|
int send_data(int sockfd) {
|
||||||
|
struct ifaddrs *ifap = NULL; // 定义ifaddrs结构体指针
|
||||||
|
// 调用getifaddrs函数,获取本地接口信息
|
||||||
|
if (getifaddrs(&ifap) < 0) {
|
||||||
|
perror("getifaddrs");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
char buf[BUFSIZE]; // 定义缓冲区
|
||||||
|
// 调用序列化函数,将ifaddrs结构体转换为字节数组
|
||||||
|
int len = serialize_ifaddrs(ifap, buf, BUFSIZE);
|
||||||
|
if (len < 0) {
|
||||||
|
fprintf(stderr, "serialize_ifaddrs failed\n");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
// 向套接字写入数据
|
||||||
|
int n = write(sockfd, buf, len);
|
||||||
|
if (n < 0) {
|
||||||
|
perror("write");
|
||||||
|
return -1; // 返回错误
|
||||||
|
}
|
||||||
|
// 释放ifaddrs结构体
|
||||||
|
freeifaddrs(ifap);
|
||||||
|
return 0; // 返回成功
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主函数
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
if (argc != 2) {
|
||||||
|
printf("usage: %s <socket_path>\n", argv[0]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 创建一个套接字
|
||||||
|
int sockfd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||||
|
if (sockfd < 0) {
|
||||||
|
perror("socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 定义服务器地址结构体
|
||||||
|
struct sockaddr_un un;
|
||||||
|
memset(&un, 0, sizeof(un));
|
||||||
|
un.sun_family = AF_UNIX;
|
||||||
|
snprintf(un.sun_path, sizeof(un.sun_path), "%s", argv[1]);
|
||||||
|
unlink(un.sun_path);
|
||||||
|
// 绑定套接字到服务器地址
|
||||||
|
if (bind(sockfd, (struct sockaddr *)&un, sizeof(un)) < 0) {
|
||||||
|
perror("bind");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 监听套接字
|
||||||
|
if (listen(sockfd, 5) < 0) {
|
||||||
|
perror("listen");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
// 循环接受客户端连接
|
||||||
|
while (1) {
|
||||||
|
int connfd = accept(sockfd, NULL, NULL);
|
||||||
|
if (connfd < 0) {
|
||||||
|
perror("accept");
|
||||||
|
continue; // 如果接受失败,继续循环
|
||||||
|
}
|
||||||
|
// 循环接收和发送数据
|
||||||
|
while (1) {
|
||||||
|
// 接收信号
|
||||||
|
if (receive_signal(connfd) < 0) {
|
||||||
|
fprintf(stderr, "receive_signal failed\n");
|
||||||
|
close(connfd); // 如果接收失败,关闭连接套接字
|
||||||
|
break; // 跳出循环
|
||||||
|
}
|
||||||
|
// 发送数据
|
||||||
|
if (send_data(connfd) < 0) {
|
||||||
|
fprintf(stderr, "send_data failed\n");
|
||||||
|
close(connfd); // 如果发送失败,关闭连接套接字
|
||||||
|
break; // 跳出循环
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 关闭监听套接字
|
||||||
|
close(sockfd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
19
extra/getifaddrs_bridge/readme.md
Normal file
19
extra/getifaddrs_bridge/readme.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
### 编译
|
||||||
|
|
||||||
|
使用NDK编译getifaddrs_bridge_server.c:
|
||||||
|
|
||||||
|
`aarch64-linux-android-clang getifaddrs_bridge_server.c -o getifaddrs_bridge_server`
|
||||||
|
|
||||||
|
在小小电脑上编译getifaddrs_bridge_client_lib.c:
|
||||||
|
|
||||||
|
`gcc getifaddrs_bridge_client_lib.c -o getifaddrs_bridge_client_lib.so -shared`
|
||||||
|
|
||||||
|
### 使用
|
||||||
|
|
||||||
|
在安卓端:
|
||||||
|
|
||||||
|
`getifaddrs_bridge_server /path/to/container/tmp/.getifaddrs-bridge`
|
||||||
|
|
||||||
|
在proot容器:
|
||||||
|
|
||||||
|
`LD_PRELOAD=/path/to/getifaddrs_bridge_client_lib.so <your_program>`
|
||||||
43
extra/readme.md
Normal file
43
extra/readme.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
## 这个readme介绍assets文件夹中文件的制作方式。
|
||||||
|
|
||||||
|
### assets.zip中的文件:
|
||||||
|
|
||||||
|
- [busybox](https://github.com/meefik/busybox)
|
||||||
|
- [mediamtx相关](https://github.com/bluenviron/mediamtx)
|
||||||
|
- [tar](https://github.com/Rprop/tar-android-static)
|
||||||
|
- [Xserver XSDL, pulseaudio相关文件](https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/xserver)
|
||||||
|
- [virgl](https://github.com/termux/termux-packages/tree/master/x11-packages/virglrenderer-android)
|
||||||
|
|
||||||
|
以上文件没有经过更改。
|
||||||
|
一般是使用了仓库直接提供的二进制文件,或者是使用了仓库提供的patch编译而来。
|
||||||
|
|
||||||
|
- [proot](https://github.com/Cateners/proot), 使用[build-proot-android](https://github.com/green-green-avk/build-proot-android)脚本编译
|
||||||
|
- [Tmoe Linux, debian包来源](https://github.com/2moe/tmoe),制作了[容器文件xa*](build-tiny-rootfs.md)
|
||||||
|
- getifaddrs_bridge_server,见下面的介绍和getifaddrs_bridge子文件夹
|
||||||
|
|
||||||
|
### patch.tar.gz中的文件:
|
||||||
|
|
||||||
|
#### extra/getifaddrs_bridge_client_lib.so:
|
||||||
|
|
||||||
|
在安卓13以上的系统中,proot容器无权使用默认的getifaddrs,而这个库包含了一个getifaddrs实现。
|
||||||
|
|
||||||
|
linux在需要数据时,使用socket通知位于安卓的getifaddrs_bridge_server,让getifaddrs_bridge_server执行getifaddrs函数,并将结构体数据序列化后发送回linux端,这边接收数据并反序列化还原成指针结构体。简单来说就是用安卓的getifaddrs代替linux的getifaddrs。
|
||||||
|
|
||||||
|
源码和编译信息在getifaddrs_bridge文件夹查看。
|
||||||
|
|
||||||
|
#### extra/install-box, extra/install-wine:
|
||||||
|
|
||||||
|
这些是用于跨架构/跨系统支持的box86/box64和wine安装脚本。
|
||||||
|
|
||||||
|
#### caj, edraw
|
||||||
|
|
||||||
|
这些分别是cajviewer,亿图图示的补丁
|
||||||
|
|
||||||
|
- 亿图图示补丁的库文件是在小小电脑上下载了Qt对应版本源码后编译得到的;
|
||||||
|
- 编译进行了两次,第一次直接编译,可以得到Gui和Widgets两个库。第二次编译带上XcbQpa,虽然会编译失败,但在这之前就可以得到XcbQpa的库。
|
||||||
|
|
||||||
|
#### wechat
|
||||||
|
|
||||||
|
微信的补丁。license, uos-lsb和uos-release来自星火的微信包或arch的wechat-uos打包(嗯,我忘记到底是哪的了。不过都差不多)。
|
||||||
|
|
||||||
|
libssl1.1来自debian官方源。deepin-elf-verifier是我打的空包。
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 163 KiB |
1318
lib/main.dart
1318
lib/main.dart
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,8 @@ import 'package:unity_ads_plugin/unity_ads_plugin.dart';
|
|||||||
|
|
||||||
import 'package:clipboard/clipboard.dart';
|
import 'package:clipboard/clipboard.dart';
|
||||||
|
|
||||||
|
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||||
|
|
||||||
class Util {
|
class Util {
|
||||||
|
|
||||||
static Future<void> copyAsset(String src, String dst) async {
|
static Future<void> copyAsset(String src, String dst) async {
|
||||||
@@ -56,12 +58,12 @@ class Util {
|
|||||||
Directory.fromRawPath(const Utf8Encoder().convert(dir)).createSync(recursive: true);
|
Directory.fromRawPath(const Utf8Encoder().convert(dir)).createSync(recursive: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> execute(String str) async {
|
static Future<int> execute(String str) async {
|
||||||
Pty pty = Pty.start(
|
Pty pty = Pty.start(
|
||||||
"/system/bin/sh"
|
"/system/bin/sh"
|
||||||
);
|
);
|
||||||
pty.write(const Utf8Encoder().convert("$str\nexit\n"));
|
pty.write(const Utf8Encoder().convert("$str\nexit \$?\n"));
|
||||||
await pty.exitCode;
|
return await pty.exitCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void termWrite(String str) {
|
static void termWrite(String str) {
|
||||||
@@ -85,14 +87,23 @@ class Util {
|
|||||||
//int vip = 0 用户等级,vip免广告,你要改吗?(ToT)
|
//int vip = 0 用户等级,vip免广告,你要改吗?(ToT)
|
||||||
//bool isStickyKey = true 终端ctrl, shift, alt键是否粘滞
|
//bool isStickyKey = true 终端ctrl, shift, alt键是否粘滞
|
||||||
//String defaultFFmpegCommand 默认推流命令
|
//String defaultFFmpegCommand 默认推流命令
|
||||||
|
//String defaultVirglCommand 默认virgl参数
|
||||||
|
//String defaultVirglOpt 默认virgl环境变量
|
||||||
|
//bool reinstallBootstrap = false 下次启动是否重装引导包
|
||||||
|
//bool getifaddrsBridge = false 下次启动是否桥接getifaddrs
|
||||||
|
//bool uos = false 下次启动是否伪装UOS
|
||||||
|
//bool isBoxEnabled = false 下次启动是否开启box86/box64
|
||||||
|
//bool isWineEnabled = false 下次启动是否开启wine
|
||||||
|
//bool virgl = false 下次启动是否启用virgl
|
||||||
|
//bool wakelock = false 屏幕常亮
|
||||||
|
//bool isHidpiEnabled = false 是否开启高分辨率
|
||||||
|
//String defaultHidpiOpt 默认HiDPI环境变量
|
||||||
//? int bootstrapVersion: 启动包版本
|
//? int bootstrapVersion: 启动包版本
|
||||||
//String[] containersInfo: 所有容器信息(json)
|
//String[] containersInfo: 所有容器信息(json)
|
||||||
//{name, boot:"\$DATA_DIR/bin/proot ...", vnc:"startnovnc", vncUrl:"...", commands:[{name:"更新和升级", command:"apt update -y && apt upgrade -y"},
|
//{name, boot:"\$DATA_DIR/bin/proot ...", vnc:"startnovnc", vncUrl:"...", commands:[{name:"更新和升级", command:"apt update -y && apt upgrade -y"},
|
||||||
// bind:[{name:"U盘", src:"/storage/xxxx", dst:"/media/meow"}]...]}
|
// bind:[{name:"U盘", src:"/storage/xxxx", dst:"/media/meow"}]...]}
|
||||||
//String[] adsBonus: 观看广告获取的奖励(json)
|
//String[] adsBonus: 观看广告获取的奖励(json)
|
||||||
//{name: "xxx", amount: xxx}
|
//{name: "xxx", amount: xxx}
|
||||||
//String[] customMounts: 自定义挂载地址(json)
|
|
||||||
//{name: "xxx", path: "xxx", isEnabled: true}
|
|
||||||
//TODO: 这么写还是不对劲,有空改成类试试?
|
//TODO: 这么写还是不对劲,有空改成类试试?
|
||||||
static dynamic getGlobal(String key) {
|
static dynamic getGlobal(String key) {
|
||||||
bool b = G.prefs.containsKey(key);
|
bool b = G.prefs.containsKey(key);
|
||||||
@@ -110,10 +121,20 @@ class Util {
|
|||||||
case "termFontScale" : return b ? G.prefs.getDouble(key)! : (value){G.prefs.setDouble(key, value); return value;}(1.0);
|
case "termFontScale" : return b ? G.prefs.getDouble(key)! : (value){G.prefs.setDouble(key, value); return value;}(1.0);
|
||||||
case "vip" : return b ? G.prefs.getInt(key)! : (value){G.prefs.setInt(key, value); return value;}(0);
|
case "vip" : return b ? G.prefs.getInt(key)! : (value){G.prefs.setInt(key, value); return value;}(0);
|
||||||
case "isStickyKey" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(true);
|
case "isStickyKey" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(true);
|
||||||
case "defaultFFmpegCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("-hide_banner -an -max_delay 1000000 -r 30 -f android_camera -i 0:0 -vf scale=iw/2:-1 -rtsp_transport udp -f rtsp rtsp://127.0.0.1:8554/stream");
|
case "reinstallBootstrap" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "getifaddrsBridge" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "uos" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "isBoxEnabled" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "isWineEnabled" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "virgl" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "wakelock" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "isHidpiEnabled" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false);
|
||||||
|
case "defaultFFmpegCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("-hide_banner -an -max_delay 1000000 -r 30 -f android_camera -camera_index 0 -i 0:0 -vf scale=iw/2:-1 -rtsp_transport udp -f rtsp rtsp://127.0.0.1:8554/stream");
|
||||||
|
case "defaultVirglCommand" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("--socket-path=\$CONTAINER_DIR/tmp/.virgl_test");
|
||||||
|
case "defaultVirglOpt" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.0");
|
||||||
|
case "defaultHidpiOpt" : return b ? G.prefs.getString(key)! : (value){G.prefs.setString(key, value); return value;}("GDK_SCALE=2 QT_FONT_DPI=192");
|
||||||
case "containersInfo" : return G.prefs.getStringList(key)!;
|
case "containersInfo" : return G.prefs.getStringList(key)!;
|
||||||
case "adsBonus" : return b ? G.prefs.getStringList(key)! : (value){G.prefs.setStringList(key, value); return value;}([].cast<String>());
|
case "adsBonus" : return b ? G.prefs.getStringList(key)! : (value){G.prefs.setStringList(key, value); return value;}([].cast<String>());
|
||||||
case "customMounts" : return b ? G.prefs.getStringList(key)! : (value){G.prefs.setStringList(key, value); return value;}([].cast<String>());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,16 +156,16 @@ class Util {
|
|||||||
//返回单个G.bonusTable定义的item
|
//返回单个G.bonusTable定义的item
|
||||||
static Map<String, dynamic> getRandomBonus() {
|
static Map<String, dynamic> getRandomBonus() {
|
||||||
final random = Random();
|
final random = Random();
|
||||||
final totalWeight = G.bonusTable.fold(0.0, (sum, item) => sum + item['weight']);
|
final totalWeight = D.bonusTable.fold(0.0, (sum, item) => sum + item['weight']);
|
||||||
final randomIndex = random.nextDouble() * totalWeight;
|
final randomIndex = random.nextDouble() * totalWeight;
|
||||||
var cumulativeWeight = 0.0;
|
var cumulativeWeight = 0.0;
|
||||||
for (final item in G.bonusTable) {
|
for (final item in D.bonusTable) {
|
||||||
cumulativeWeight += item['weight'];
|
cumulativeWeight += item['weight'];
|
||||||
if (randomIndex <= cumulativeWeight) {
|
if (randomIndex <= cumulativeWeight) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return G.bonusTable[0];
|
return D.bonusTable[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//由getRandomBonus返回的数据
|
//由getRandomBonus返回的数据
|
||||||
@@ -166,7 +187,7 @@ class Util {
|
|||||||
|
|
||||||
//根据已看广告量判断是否应该继续看广告
|
//根据已看广告量判断是否应该继续看广告
|
||||||
static bool shouldWatchAds(int expectNum) {
|
static bool shouldWatchAds(int expectNum) {
|
||||||
return ((Util.getGlobal("adsWatchedTotal") as int) < expectNum) && ((Util.getGlobal("vip") as int) < 1) && ((Util.getGlobal("adsWatchedToday") as int) < G.adsRequired["unlockToday"]!) && (G.adsWatchedThisTime < G.adsRequired["unlockOnce"]!);
|
return ((Util.getGlobal("adsWatchedTotal") as int) < expectNum) && ((Util.getGlobal("vip") as int) < 1) && ((Util.getGlobal("adsWatchedToday") as int) < D.adsRequired["unlockToday"]!) && (G.adsWatchedThisTime < D.adsRequired["unlockOnce"]!);
|
||||||
}
|
}
|
||||||
|
|
||||||
//限定字符串在min和max之间, 给文本框的validator
|
//限定字符串在min和max之间, 给文本框的validator
|
||||||
@@ -184,6 +205,7 @@ class Util {
|
|||||||
opr();
|
opr();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//来自xterms关于操作ctrl, shift, alt键的示例
|
//来自xterms关于操作ctrl, shift, alt键的示例
|
||||||
@@ -233,7 +255,7 @@ class VirtualKeyboard extends TerminalInputHandler with ChangeNotifier {
|
|||||||
shift: event.shift || _shift,
|
shift: event.shift || _shift,
|
||||||
alt: event.alt || _alt,
|
alt: event.alt || _alt,
|
||||||
));
|
));
|
||||||
G.maybeCtrlJ = event.key.name == "keyJ";
|
G.maybeCtrlJ = event.key.name == "keyJ"; //这个是为了稍后区分按键到底是Enter还是Ctrl+J
|
||||||
if (!(Util.getGlobal("isStickyKey") as bool)) {
|
if (!(Util.getGlobal("isStickyKey") as bool)) {
|
||||||
G.keyboard.ctrl = false;
|
G.keyboard.ctrl = false;
|
||||||
G.keyboard.shift = false;
|
G.keyboard.shift = false;
|
||||||
@@ -270,12 +292,13 @@ class TermPty {
|
|||||||
Navigator.push(G.homePageStateContext, MaterialPageRoute(builder: (context) {
|
Navigator.push(G.homePageStateContext, MaterialPageRoute(builder: (context) {
|
||||||
const TextStyle ts = TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.normal);
|
const TextStyle ts = TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.normal);
|
||||||
const String helperLink = "https://www.vmos.cn/zhushou.htm";
|
const String helperLink = "https://www.vmos.cn/zhushou.htm";
|
||||||
|
const String helperLink2 = "https://b23.tv/WwqOqW6";
|
||||||
return Scaffold(backgroundColor: Colors.deepPurple,
|
return Scaffold(backgroundColor: Colors.deepPurple,
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Scrollbar(child:
|
child: Scrollbar(child:
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
const Text(":(\n发生了什么?", textScaleFactor: 2, style: ts, textAlign: TextAlign.center,),
|
const Text(":(\n发生了什么?", textScaler: TextScaler.linear(2), style: ts, textAlign: TextAlign.center,),
|
||||||
const Text("终端异常退出, 返回错误码9\n此错误通常是高版本安卓系统(12+)限制进程造成的, \n可以使用以下工具修复:", style: ts, textAlign: TextAlign.center),
|
const Text("终端异常退出, 返回错误码9\n此错误通常是高版本安卓系统(12+)限制进程造成的, \n可以使用以下工具修复:", style: ts, textAlign: TextAlign.center),
|
||||||
const SelectableText(helperLink, style: ts, textAlign: TextAlign.center),
|
const SelectableText(helperLink, style: ts, textAlign: TextAlign.center),
|
||||||
const Text("(复制链接到浏览器查看)", style: ts, textAlign: TextAlign.center),
|
const Text("(复制链接到浏览器查看)", style: ts, textAlign: TextAlign.center),
|
||||||
@@ -288,7 +311,18 @@ class TermPty {
|
|||||||
},))
|
},))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}, child: const Text("复制", style: ts, textAlign: TextAlign.center))
|
}, child: const Text("复制", style: ts, textAlign: TextAlign.center)),
|
||||||
|
const Text("如果不能解决请参考此教程: ", style: ts, textAlign: TextAlign.center),
|
||||||
|
OutlinedButton(onPressed: () {
|
||||||
|
FlutterClipboard.copy(helperLink2).then(( value ) {
|
||||||
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(content: const Text("已复制"), action: SnackBarAction(label: "跳转", onPressed: () {
|
||||||
|
launchUrl(Uri.parse(helperLink2), mode: LaunchMode.externalApplication);
|
||||||
|
},))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}, child: const Text("查看", style: ts, textAlign: TextAlign.center))
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -321,49 +355,75 @@ class TermPty {
|
|||||||
class D {
|
class D {
|
||||||
//默认快捷指令
|
//默认快捷指令
|
||||||
static const commands = [{"name":"检查更新并升级", "command":"sudo apt update && sudo apt upgrade -y"},
|
static const commands = [{"name":"检查更新并升级", "command":"sudo apt update && sudo apt upgrade -y"},
|
||||||
{"name":"查看系统信息", "command":"neofetch -L && neofetch --off"},
|
{"name":"查看系统信息", "command":"neofetch -L && neofetch --off"},
|
||||||
{"name":"清屏", "command":"clear"},
|
{"name":"清屏", "command":"clear"},
|
||||||
{"name":"安装图形处理软件Krita", "command":"sudo apt update && sudo apt install -y krita krita-l10n"},
|
{"name":"查看IP", "command":"hostname -I # 如果显示无权限(Permission denied),请在全局设置里开启getifaddrs桥接"},
|
||||||
{"name":"卸载图形处理软件Krita", "command":"sudo apt autoremove --purge -y krita krita-l10n"},
|
{"name":"中断任务", "command":"\x03"},
|
||||||
{"name":"安装视频剪辑软件Kdenlive", "command":"sudo apt update && sudo apt install -y kdenlive"},
|
{"name":"安装图形处理软件Krita", "command":"sudo apt update && sudo apt install -y krita krita-l10n"},
|
||||||
{"name":"卸载视频剪辑软件Kdenlive", "command":"sudo apt autoremove --purge -y kdenlive"},
|
{"name":"卸载Krita", "command":"sudo apt autoremove --purge -y krita krita-l10n"},
|
||||||
{"name":"安装科学计算软件Octave", "command":"sudo apt update && sudo apt install -y octave"},
|
{"name":"安装视频剪辑软件Kdenlive", "command":"sudo apt update && sudo apt install -y kdenlive"},
|
||||||
{"name":"卸载科学计算软件Octave", "command":"sudo apt autoremove --purge -y octave"},
|
{"name":"卸载Kdenlive", "command":"sudo apt autoremove --purge -y kdenlive"},
|
||||||
{"name":"安装WPS", "command":"wget https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11704/wps-office_11.1.0.11704_arm64.deb -O /tmp/wps.deb && sudo apt update && sudo apt install -y /tmp/wps.deb; rm /tmp/wps.deb"},
|
{"name":"安装科学计算软件Octave", "command":"sudo apt update && sudo apt install -y octave"},
|
||||||
{"name":"卸载WPS", "command":"sudo apt autoremove --purge -y wps-office"},
|
{"name":"卸载Octave", "command":"sudo apt autoremove --purge -y octave"},
|
||||||
{"name":"安装CAJViewer", "command":"wget https://download.cnki.net/net.cnki.cajviewer_1.3.20-1_arm64.deb -O /tmp/caj.deb && sudo apt update && sudo apt install -y /tmp/caj.deb && bash /home/tiny/.local/share/tiny/caj/postinst; rm /tmp/caj.deb"},
|
{"name":"安装WPS", "command":"""wget --referer="https://www.wps.cn/product/wpslinux" \$(curl -L https://linux.wps.cn/ | grep -oP 'href="\\K[^"]*arm64\\.deb' | head -n 1) -O /tmp/wps.deb && sudo apt update && sudo apt install -y /tmp/wps.deb; rm /tmp/wps.deb"""},
|
||||||
{"name":"卸载CAJViewer", "command":"sudo apt autoremove --purge -y net.cnki.cajviewer && bash /home/tiny/.local/share/tiny/caj/postrm"},
|
{"name":"卸载WPS", "command":"sudo apt autoremove --purge -y wps-office"},
|
||||||
{"name":"安装亿图图示", "command":"wget https://www.edrawsoft.cn/2download/aarch64/edrawmax_11.5.6-3_arm64.deb -O /tmp/edraw.deb && sudo apt update && sudo apt install -y /tmp/edraw.deb && bash /home/tiny/.local/share/tiny/edraw/postinst; rm /tmp/edraw.deb"},
|
{"name":"安装CAJViewer", "command":"wget https://download.cnki.net/net.cnki.cajviewer_1.3.20-1_arm64.deb -O /tmp/caj.deb && sudo apt update && sudo apt install -y /tmp/caj.deb && bash /home/tiny/.local/share/tiny/caj/postinst; rm /tmp/caj.deb"},
|
||||||
{"name":"卸载亿图图示", "command":"sudo apt autoremove --purge -y edrawmax libldap-2.4-2"},
|
{"name":"卸载CAJViewer", "command":"sudo apt autoremove --purge -y net.cnki.cajviewer && bash /home/tiny/.local/share/tiny/caj/postrm"},
|
||||||
{"name":"安装QQ", "command":"wget https://dldir1.qq.com/qqfile/qq/QQNT/b69de82d/linuxqq_3.2.1-17153_arm64.deb -O /tmp/qq.deb && sudo apt update && sudo apt install -y /tmp/qq.deb && sed -i 's#Exec=/opt/QQ/qq %U#Exec=/opt/QQ/qq --no-sandbox %U#g' /usr/share/applications/qq.desktop; rm /tmp/qq.deb"},
|
{"name":"安装亿图图示", "command":"wget https://www.edrawsoft.cn/2download/aarch64/edrawmax_11.5.6-3_arm64.deb -O /tmp/edraw.deb && sudo apt update && sudo apt install -y /tmp/edraw.deb && bash /home/tiny/.local/share/tiny/edraw/postinst; rm /tmp/edraw.deb"},
|
||||||
{"name":"卸载QQ", "command":"sudo apt autoremove --purge -y linuxqq"},
|
{"name":"卸载亿图图示", "command":"sudo apt autoremove --purge -y edrawmax libldap-2.4-2"},
|
||||||
{"name":"修复无法编译C语言程序", "command":"sudo apt update && sudo apt reinstall -y libc6-dev"},
|
{"name":"安装QQ", "command":"""wget \$(curl -L https://cdn-go.cn/qq-web/im.qq.com_new/latest/rainbow/linuxQQDownload.js | grep -oP 'deb":"\\K[^"]*arm64\\.deb' | head -n 1) -O /tmp/qq.deb && sudo apt update && sudo apt install -y /tmp/qq.deb && sed -i 's#Exec=/opt/QQ/qq %U#Exec=/opt/QQ/qq --no-sandbox %U#g' /usr/share/applications/qq.desktop; rm /tmp/qq.deb"""},
|
||||||
{"name":"修复系统语言到中文", "command":"sudo localedef -c -i zh_CN -f UTF-8 zh_CN.UTF-8"},
|
{"name":"卸载QQ", "command":"sudo apt autoremove --purge -y linuxqq"},
|
||||||
{"name":"启用回收站", "command":"sudo apt update && sudo apt install -y gvfs && echo '安装完成, 重启软件即可使用回收站。'"},
|
{"name":"安装UOS微信", "command":"wget https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.9_arm64.deb -O /tmp/wechat.deb && sudo apt update && sudo apt install -y /tmp/wechat.deb /home/tiny/.local/share/tiny/wechat/deepin-elf-verify_all.deb /home/tiny/.local/share/tiny/wechat/libssl1.1_1.1.1n-0+deb10u6_arm64.deb && sed -i 's#/opt/apps/com.tencent.weixin/files/weixin/weixin#/opt/apps/com.tencent.weixin/files/weixin/weixin --no-sandbox#g' /opt/apps/com.tencent.weixin/files/weixin/weixin.sh && echo '该微信为UOS特供版,只有账号实名且在UOS系统上运行时可用。在使用前请前往全局设置开启UOS伪装。\n如果你使用微信只是为了传输文件,那么可以考虑使用支持SAF的文件管理器(如:质感文件),直接访问小小电脑所有文件。'; rm /tmp/wechat.deb"},
|
||||||
{"name":"拉流测试", "command":"ffplay rtsp://127.0.0.1:8554/stream &"},
|
{"name":"卸载UOS微信", "command":"sudo apt autoremove --purge -y com.tencent.weixin libssl1.1 deepin-elf-verify"},
|
||||||
{"name":"关机", "command":"stopvnc\nexit\nexit"},
|
{"name":"安装钉钉", "command":"""wget \$(curl -L https://g.alicdn.com/dingding/h5-home-download/0.2.4/js/index.js | grep -oP 'url:"\\K[^"]*arm64\\.deb' | head -n 1) -O /tmp/dingtalk.deb && sudo apt update && sudo apt install -y /tmp/dingtalk.deb && sed -i 's#\\./com.alibabainc.dingtalk#\\./com.alibabainc.dingtalk --no-sandbox#g' /opt/apps/com.alibabainc.dingtalk/files/Elevator.sh; rm /tmp/dingtalk.deb"""},
|
||||||
{"name":"???", "command":"timeout 8 cmatrix"}];
|
{"name":"卸载钉钉", "command":"sudo apt autoremove --purge -y com.alibabainc.dingtalk"},
|
||||||
}
|
{"name":"修复无法编译C语言程序", "command":"sudo apt update && sudo apt reinstall -y libc6-dev"},
|
||||||
|
{"name":"修复系统语言到中文", "command":"sudo localedef -c -i zh_CN -f UTF-8 zh_CN.UTF-8"},
|
||||||
|
{"name":"启用回收站", "command":"sudo apt update && sudo apt install -y gvfs && echo '安装完成, 重启软件即可使用回收站。'"},
|
||||||
|
{"name":"拉流测试", "command":"ffplay rtsp://127.0.0.1:8554/stream &"},
|
||||||
|
{"name":"关机", "command":"stopvnc\nexit\nexit"},
|
||||||
|
{"name":"???", "command":"timeout 8 cmatrix"}
|
||||||
|
];
|
||||||
|
|
||||||
// Global variables
|
//默认wine快捷指令
|
||||||
class G {
|
static const wineCommands = [{"name":"wine配置", "command":"wine64 winecfg"},
|
||||||
static late final String dataPath;
|
{"name":"我的电脑", "command":"wine64 explorer"},
|
||||||
static Pty? audioPty;
|
{"name":"记事本", "command":"wine64 notepad"},
|
||||||
static late WebViewController controller;
|
{"name":"扫雷", "command":"wine64 winemine"},
|
||||||
static late BuildContext homePageStateContext;
|
{"name":"注册表", "command":"wine64 regedit"},
|
||||||
static late int currentContainer; //目前运行第几个容器
|
{"name":"控制面板", "command":"wine64 control"},
|
||||||
static late Map<int, TermPty> termPtys; //为容器<int>存放TermPty数据
|
{"name":"文件管理器", "command":"wine64 winefile"},
|
||||||
static late AdManager ads; //广告实例
|
{"name":"任务管理器", "command":"wine64 taskmgr"},
|
||||||
static late VirtualKeyboard keyboard; //存储ctrl, shift, alt状态
|
{"name":"ie浏览器", "command":"wine64 iexplore"},
|
||||||
static bool maybeCtrlJ = false; //为了区分按下的ctrl+J和enter而准备的变量
|
{"name":"强制关闭wine", "command":"wineserver -k"}
|
||||||
static double termFontScale = 1; //终端字体大小,存储为G.prefs的termFontScale
|
];
|
||||||
static int adsWatchedThisTime = 0; //本次启动应用看的广告数
|
|
||||||
static bool isStreamServerStarted = false;
|
|
||||||
static bool isStreaming = false;
|
|
||||||
static int? streamingId;
|
|
||||||
static String streamingOutput = "";
|
|
||||||
static late Pty streamServerPty;
|
|
||||||
|
|
||||||
|
//默认小键盘
|
||||||
|
static const termCommands = [
|
||||||
|
{"name": "Esc", "key": TerminalKey.escape},
|
||||||
|
{"name": "Tab", "key": TerminalKey.tab},
|
||||||
|
{"name": "↑", "key": TerminalKey.arrowUp},
|
||||||
|
{"name": "↓", "key": TerminalKey.arrowDown},
|
||||||
|
{"name": "←", "key": TerminalKey.arrowLeft},
|
||||||
|
{"name": "→", "key": TerminalKey.arrowRight},
|
||||||
|
{"name": "Del", "key": TerminalKey.delete},
|
||||||
|
{"name": "PgUp", "key": TerminalKey.pageUp},
|
||||||
|
{"name": "PgDn", "key": TerminalKey.pageDown},
|
||||||
|
{"name": "Home", "key": TerminalKey.home},
|
||||||
|
{"name": "End", "key": TerminalKey.end},
|
||||||
|
{"name": "F1", "key": TerminalKey.f1},
|
||||||
|
{"name": "F2", "key": TerminalKey.f2},
|
||||||
|
{"name": "F3", "key": TerminalKey.f3},
|
||||||
|
{"name": "F4", "key": TerminalKey.f4},
|
||||||
|
{"name": "F5", "key": TerminalKey.f5},
|
||||||
|
{"name": "F6", "key": TerminalKey.f6},
|
||||||
|
{"name": "F7", "key": TerminalKey.f7},
|
||||||
|
{"name": "F8", "key": TerminalKey.f8},
|
||||||
|
{"name": "F9", "key": TerminalKey.f9},
|
||||||
|
{"name": "F10", "key": TerminalKey.f10},
|
||||||
|
{"name": "F11", "key": TerminalKey.f11},
|
||||||
|
{"name": "F12", "key": TerminalKey.f12},
|
||||||
|
];
|
||||||
|
|
||||||
//看广告可以获得的奖励。
|
//看广告可以获得的奖励。
|
||||||
//weight抽奖权重,singleUse使用一次花费的数量,amount抽中可以获得的数量
|
//weight抽奖权重,singleUse使用一次花费的数量,amount抽中可以获得的数量
|
||||||
@@ -385,12 +445,64 @@ class G {
|
|||||||
"enableTerminalCommands" : 3,
|
"enableTerminalCommands" : 3,
|
||||||
"changeTermMaxLines" : 6,
|
"changeTermMaxLines" : 6,
|
||||||
"changeFFmpegCommand" : 8,
|
"changeFFmpegCommand" : 8,
|
||||||
|
"enableVirgl" : 10,
|
||||||
|
"changeHidpiOpt" : 12,
|
||||||
|
|
||||||
"unlockOnce" : 1, //临时解锁需要看的广告数
|
"unlockOnce" : 1, //临时解锁需要看的广告数
|
||||||
"unlockToday" : 2, //当日解锁需要看的广告数
|
"unlockToday" : 2, //当日解锁需要看的广告数
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const String boot = "\$DATA_DIR/bin/proot -H --change-id=1000:1000 --pwd=/home/tiny --rootfs=\$CONTAINER_DIR --mount=/system --mount=/apex --mount=/sys --kill-on-exit --mount=/storage:/storage --sysvipc -L --link2symlink --mount=/proc:/proc --mount=/dev:/dev --mount=\$CONTAINER_DIR/tmp:/dev/shm --mount=/dev/urandom:/dev/random --mount=/proc/self/fd:/dev/fd --mount=/proc/self/fd/0:/dev/stdin --mount=/proc/self/fd/1:/dev/stdout --mount=/proc/self/fd/2:/dev/stderr --mount=/dev/null:/dev/tty0 --mount=/dev/null:/proc/sys/kernel/cap_last_cap --mount=/storage/self/primary:/media/sd --mount=\$DATA_DIR/share:/home/tiny/公共 --mount=\$DATA_DIR/tiny:/home/tiny/.local/share/tiny --mount=/storage/self/primary/Fonts:/usr/share/fonts/wpsm --mount=/storage/self/primary/AppFiles/Fonts:/usr/share/fonts/yozom --mount=/system/fonts:/usr/share/fonts/androidm --mount=/storage/self/primary/Pictures:/home/tiny/图片 --mount=/storage/self/primary/Music:/home/tiny/音乐 --mount=/storage/self/primary/Movies:/home/tiny/视频 --mount=/storage/self/primary/Download:/home/tiny/下载 --mount=/storage/self/primary/DCIM:/home/tiny/照片 --mount=/storage/self/primary/Documents:/home/tiny/文档 --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.stat:/proc/stat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.version:/proc/version --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/bus:/proc/bus --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/buddyinfo:/proc/buddyinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/cgroups:/proc/cgroups --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/consoles:/proc/consoles --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/crypto:/proc/crypto --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/devices:/proc/devices --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/diskstats:/proc/diskstats --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/execdomains:/proc/execdomains --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/fb:/proc/fb --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/filesystems:/proc/filesystems --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/interrupts:/proc/interrupts --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/iomem:/proc/iomem --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/ioports:/proc/ioports --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kallsyms:/proc/kallsyms --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/keys:/proc/keys --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/key-users:/proc/key-users --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kpageflags:/proc/kpageflags --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/loadavg:/proc/loadavg --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/locks:/proc/locks --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/misc:/proc/misc --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/modules:/proc/modules --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/pagetypeinfo:/proc/pagetypeinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/partitions:/proc/partitions --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/sched_debug:/proc/sched_debug --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/softirqs:/proc/softirqs --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/timer_list:/proc/timer_list --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/uptime:/proc/uptime --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmallocinfo:/proc/vmallocinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmstat:/proc/vmstat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/zoneinfo:/proc/zoneinfo \$EXTRA_MOUNT /usr/bin/env -i HOSTNAME=TINY HOME=/home/tiny USER=tiny TERM=xterm-256color SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx TMOE_CHROOT=false TMOE_PROOT=true TMPDIR=/tmp MOZ_FAKE_NO_SANDBOX=1 DISPLAY=:4 PULSE_SERVER=tcp:127.0.0.1:4718 LANG=zh_CN.UTF-8 SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games \$EXTRA_OPT /bin/bash -l";
|
||||||
|
|
||||||
|
static final ButtonStyle commandButtonStyle = OutlinedButton.styleFrom(
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
minimumSize: const Size(0, 0),
|
||||||
|
padding: const EdgeInsets.fromLTRB(4, 2, 4, 2)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
static final ButtonStyle controlButtonStyle = OutlinedButton.styleFrom(
|
||||||
|
textStyle: const TextStyle(fontWeight: FontWeight.w400),
|
||||||
|
side: const BorderSide(color: Color(0x1F000000)),
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
minimumSize: const Size(0, 0),
|
||||||
|
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global variables
|
||||||
|
class G {
|
||||||
|
static late final String dataPath;
|
||||||
|
static Pty? audioPty;
|
||||||
|
static late WebViewController controller;
|
||||||
|
static late BuildContext homePageStateContext;
|
||||||
|
static late int currentContainer; //目前运行第几个容器
|
||||||
|
static late Map<int, TermPty> termPtys; //为容器<int>存放TermPty数据
|
||||||
|
static late AdManager ads; //广告实例
|
||||||
|
static late VirtualKeyboard keyboard; //存储ctrl, shift, alt状态
|
||||||
|
static bool maybeCtrlJ = false; //为了区分按下的ctrl+J和enter而准备的变量
|
||||||
|
static ValueNotifier<double> termFontScale = ValueNotifier(1); //终端字体大小,存储为G.prefs的termFontScale
|
||||||
|
static int adsWatchedThisTime = 0; //本次启动应用看的广告数
|
||||||
|
static bool isStreamServerStarted = false;
|
||||||
|
static bool isStreaming = false;
|
||||||
|
//static int? streamingPid;
|
||||||
|
static String streamingOutput = "";
|
||||||
|
static late Pty streamServerPty;
|
||||||
|
static bool isVirglServerStarted = false;
|
||||||
|
static late Pty virglServerPty;
|
||||||
|
//static int? virglPid;
|
||||||
|
static ValueNotifier<int> pageIndex = ValueNotifier(0); //主界面索引
|
||||||
|
static ValueNotifier<bool> terminalPageChange = ValueNotifier(true); //更改值,用于刷新小键盘
|
||||||
|
static ValueNotifier<bool> bannerAdsChange = ValueNotifier(true); //更改值,用于刷新banner广告
|
||||||
|
static ValueNotifier<bool> bootTextChange = ValueNotifier(true); //更改值,用于刷新启动命令
|
||||||
|
static ValueNotifier<String> updateText = ValueNotifier("小小电脑"); //加载界面的说明文字
|
||||||
|
|
||||||
|
static bool wasBoxEnabled = false; //本次启动时是否启用了box86/64
|
||||||
|
static bool wasWineEnabled = false; //本次启动时是否启用了wine
|
||||||
|
|
||||||
|
|
||||||
static late SharedPreferences prefs;
|
static late SharedPreferences prefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,6 +592,8 @@ class Workflow {
|
|||||||
Util.createDirFromString("${G.dataPath}/tmp");
|
Util.createDirFromString("${G.dataPath}/tmp");
|
||||||
//给proot的tmp文件夹,虽然我不知道为什么proot要这个
|
//给proot的tmp文件夹,虽然我不知道为什么proot要这个
|
||||||
Util.createDirFromString("${G.dataPath}/proot_tmp");
|
Util.createDirFromString("${G.dataPath}/proot_tmp");
|
||||||
|
//给pulseaudio的tmp文件夹
|
||||||
|
Util.createDirFromString("${G.dataPath}/pulseaudio_tmp");
|
||||||
//解压后得到bin文件夹和libexec文件夹
|
//解压后得到bin文件夹和libexec文件夹
|
||||||
//bin存放了proot, pulseaudio, tar等
|
//bin存放了proot, pulseaudio, tar等
|
||||||
//libexec存放了proot loader
|
//libexec存放了proot loader
|
||||||
@@ -487,6 +601,12 @@ class Workflow {
|
|||||||
"assets/assets.zip",
|
"assets/assets.zip",
|
||||||
"${G.dataPath}/assets.zip",
|
"${G.dataPath}/assets.zip",
|
||||||
);
|
);
|
||||||
|
//patch.tar.gz存放了tiny文件夹
|
||||||
|
//里面是一些补丁,会被挂载到~/.local/share/tiny
|
||||||
|
await Util.copyAsset(
|
||||||
|
"assets/patch.tar.gz",
|
||||||
|
"${G.dataPath}/patch.tar.gz",
|
||||||
|
);
|
||||||
//dddd
|
//dddd
|
||||||
await Util.copyAsset(
|
await Util.copyAsset(
|
||||||
"assets/busybox",
|
"assets/busybox",
|
||||||
@@ -497,33 +617,40 @@ class Workflow {
|
|||||||
export DATA_DIR=${G.dataPath}
|
export DATA_DIR=${G.dataPath}
|
||||||
cd \$DATA_DIR
|
cd \$DATA_DIR
|
||||||
chmod +x busybox
|
chmod +x busybox
|
||||||
\$DATA_DIR/busybox unzip assets.zip
|
\$DATA_DIR/busybox unzip -o assets.zip
|
||||||
chmod -R +x bin/*
|
chmod -R +x bin/*
|
||||||
chmod -R +x libexec/proot/*
|
chmod -R +x libexec/proot/*
|
||||||
chmod 1777 tmp
|
chmod 1777 tmp
|
||||||
ln -s \$DATA_DIR/busybox \$DATA_DIR/bin/xz
|
ln -sf \$DATA_DIR/busybox \$DATA_DIR/bin/xz
|
||||||
\$DATA_DIR/busybox rm -rf assets.zip
|
ln -sf \$DATA_DIR/busybox \$DATA_DIR/bin/gzip
|
||||||
|
\$DATA_DIR/bin/tar zxf patch.tar.gz
|
||||||
|
\$DATA_DIR/busybox rm -rf assets.zip patch.tar.gz
|
||||||
""");
|
""");
|
||||||
}
|
}
|
||||||
|
|
||||||
//初次启动要做的事情
|
//初次启动要做的事情
|
||||||
static Future<void> initForFirstTime() async {
|
static Future<void> initForFirstTime() async {
|
||||||
//首先设置bootstrap
|
//首先设置bootstrap
|
||||||
|
G.updateText.value = "正在安装引导包";
|
||||||
await setupBootstrap();
|
await setupBootstrap();
|
||||||
|
|
||||||
|
G.updateText.value = "正在复制容器系统";
|
||||||
//存放容器的文件夹0和存放硬链接的文件夹.l2s
|
//存放容器的文件夹0和存放硬链接的文件夹.l2s
|
||||||
Util.createDirFromString("${G.dataPath}/containers/0/.l2s");
|
Util.createDirFromString("${G.dataPath}/containers/0/.l2s");
|
||||||
//这个是容器rootfs,被split命令分成了xa*
|
//这个是容器rootfs,被split命令分成了xa*
|
||||||
//首次启动,就用这个,别让用户另选了
|
//首次启动,就用这个,别让用户另选了
|
||||||
//TODO: 这个字符串列表太丑陋了
|
//TODO: 这个字符串列表太丑陋了
|
||||||
for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai"]) {
|
for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj"]) {
|
||||||
//for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj", "xak", "xal", "xam", "xan", "xao", "xap", "xaq"]) {
|
//for (String name in ["xaa", "xab", "xac", "xad", "xae", "xaf", "xag", "xah", "xai", "xaj", "xak", "xal", "xam", "xan", "xao", "xap", "xaq"]) {
|
||||||
await Util.copyAsset("assets/$name", "${G.dataPath}/$name");
|
await Util.copyAsset("assets/$name", "${G.dataPath}/$name");
|
||||||
}
|
}
|
||||||
//-J
|
//-J
|
||||||
|
G.updateText.value = "正在安装容器系统";
|
||||||
await Util.execute(
|
await Util.execute(
|
||||||
"""
|
"""
|
||||||
export DATA_DIR=${G.dataPath}
|
export DATA_DIR=${G.dataPath}
|
||||||
export CONTAINER_DIR=\$DATA_DIR/containers/0
|
export CONTAINER_DIR=\$DATA_DIR/containers/0
|
||||||
|
export EXTRA_OPT=""
|
||||||
cd \$DATA_DIR
|
cd \$DATA_DIR
|
||||||
export PATH=\$DATA_DIR/bin:\$PATH
|
export PATH=\$DATA_DIR/bin:\$PATH
|
||||||
export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp
|
export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp
|
||||||
@@ -551,23 +678,12 @@ done
|
|||||||
//$DATA_DIR是数据文件夹, $CONTAINER_DIR是容器根目录
|
//$DATA_DIR是数据文件夹, $CONTAINER_DIR是容器根目录
|
||||||
await G.prefs.setStringList("containersInfo", ["""{
|
await G.prefs.setStringList("containersInfo", ["""{
|
||||||
"name":"Debian Bookworm",
|
"name":"Debian Bookworm",
|
||||||
"boot":"\$DATA_DIR/bin/proot -H --change-id=1000:1000 --pwd=/home/tiny --rootfs=\$CONTAINER_DIR --mount=/system --mount=/apex --kill-on-exit --mount=/storage:/storage --sysvipc -L --link2symlink --mount=/proc:/proc --mount=/dev:/dev --mount=\$CONTAINER_DIR/tmp:/dev/shm --mount=/dev/urandom:/dev/random --mount=/proc/self/fd:/dev/fd --mount=/proc/self/fd/0:/dev/stdin --mount=/proc/self/fd/1:/dev/stdout --mount=/proc/self/fd/2:/dev/stderr --mount=/dev/null:/dev/tty0 --mount=/dev/null:/proc/sys/kernel/cap_last_cap --mount=/storage/self/primary:/media/sd --mount=\$DATA_DIR/share:/home/tiny/公共 --mount=/storage/self/primary/Fonts:/usr/share/fonts/wpsm --mount=/storage/self/primary/AppFiles/Fonts:/usr/share/fonts/yozom --mount=/system/fonts:/usr/share/fonts/androidm --mount=/storage/self/primary/Pictures:/home/tiny/图片 --mount=/storage/self/primary/Music:/home/tiny/音乐 --mount=/storage/self/primary/Movies:/home/tiny/视频 --mount=/storage/self/primary/Download:/home/tiny/下载 --mount=/storage/self/primary/DCIM:/home/tiny/照片 --mount=/storage/self/primary/Documents:/home/tiny/文档 --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.stat:/proc/stat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.version:/proc/version --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/bus:/proc/bus --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/buddyinfo:/proc/buddyinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/cgroups:/proc/cgroups --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/consoles:/proc/consoles --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/crypto:/proc/crypto --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/devices:/proc/devices --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/diskstats:/proc/diskstats --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/execdomains:/proc/execdomains --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/fb:/proc/fb --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/filesystems:/proc/filesystems --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/interrupts:/proc/interrupts --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/iomem:/proc/iomem --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/ioports:/proc/ioports --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kallsyms:/proc/kallsyms --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/keys:/proc/keys --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/key-users:/proc/key-users --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/kpageflags:/proc/kpageflags --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/loadavg:/proc/loadavg --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/locks:/proc/locks --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/misc:/proc/misc --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/modules:/proc/modules --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/pagetypeinfo:/proc/pagetypeinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/partitions:/proc/partitions --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/sched_debug:/proc/sched_debug --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/softirqs:/proc/softirqs --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/timer_list:/proc/timer_list --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/uptime:/proc/uptime --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmallocinfo:/proc/vmallocinfo --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/vmstat:/proc/vmstat --mount=\$CONTAINER_DIR/usr/local/etc/tmoe-linux/proot_proc/zoneinfo:/proc/zoneinfo /usr/bin/env -i HOSTNAME=TINY HOME=/home/tiny USER=tiny TERM=xterm-256color SDL_IM_MODULE=fcitx XMODIFIERS=@im=fcitx QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx TMOE_CHROOT=false TMOE_PROOT=true TMPDIR=/tmp MOZ_FAKE_NO_SANDBOX=1 DISPLAY=:4 PULSE_SERVER=tcp:127.0.0.1:4718 LANG=zh_CN.UTF-8 SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games /bin/bash -l",
|
"boot":"${D.boot}",
|
||||||
"vnc":"startnovnc &",
|
"vnc":"startnovnc &",
|
||||||
"vncUrl":"http://localhost:36082/vnc.html?host=localhost&port=36082&autoconnect=true&resize=remote&password=12345678",
|
"vncUrl":"http://localhost:36082/vnc.html?host=localhost&port=36082&autoconnect=true&resize=remote&password=12345678",
|
||||||
"commands":${jsonEncode(D.commands)}
|
"commands":${jsonEncode(D.commands)}
|
||||||
}"""]);
|
}"""]);
|
||||||
// await G.prefs.setStringList("adsBonus", []);
|
G.updateText.value = "安装完成";
|
||||||
// await G.prefs.setInt("adsWatchedTotal", 0);
|
|
||||||
// await G.prefs.setBool("isTerminalCommandsEnabled", false);
|
|
||||||
// await G.prefs.setBool("isTerminalWriteEnabled", false);
|
|
||||||
// await G.prefs.setBool("isBannerAdsClosed", false);
|
|
||||||
// await G.prefs.setBool("autoLaunchVnc", true);
|
|
||||||
// await G.prefs.setInt("defaultAudioPort", 4718);
|
|
||||||
// await G.prefs.setInt("defaultContainer", 0);
|
|
||||||
// await G.prefs.setInt("termMaxLines", 4095);
|
|
||||||
// await G.prefs.setDouble("termFontScale", 1);
|
|
||||||
// await G.prefs.setInt("vip", 0);
|
|
||||||
// await G.prefs.setBool("isStickyKey", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> initData() async {
|
static Future<void> initData() async {
|
||||||
@@ -593,27 +709,42 @@ done
|
|||||||
}
|
}
|
||||||
G.currentContainer = Util.getGlobal("defaultContainer") as int;
|
G.currentContainer = Util.getGlobal("defaultContainer") as int;
|
||||||
|
|
||||||
G.termFontScale = Util.getGlobal("termFontScale") as double;
|
//是否需要重新安装引导包?
|
||||||
|
if (Util.getGlobal("reinstallBootstrap")) {
|
||||||
|
G.updateText.value = "正在重新安装引导包";
|
||||||
|
await setupBootstrap();
|
||||||
|
G.prefs.setBool("reinstallBootstrap", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
G.termFontScale.value = Util.getGlobal("termFontScale") as double;
|
||||||
|
|
||||||
G.controller = WebViewController()..setJavaScriptMode(JavaScriptMode.unrestricted);
|
G.controller = WebViewController()..setJavaScriptMode(JavaScriptMode.unrestricted);
|
||||||
|
|
||||||
//恢复临时开启的功能
|
//恢复临时开启的功能
|
||||||
if (Util.shouldWatchAds(G.adsRequired["changeFFmpegCommand"]!)) {
|
if (Util.shouldWatchAds(D.adsRequired["changeFFmpegCommand"]!)) {
|
||||||
await G.prefs.remove("defaultFFmpegCommand");
|
await G.prefs.remove("defaultFFmpegCommand");
|
||||||
}
|
}
|
||||||
if (Util.shouldWatchAds(G.adsRequired["changeTermMaxLines"]!)) {
|
if (Util.shouldWatchAds(D.adsRequired["changeHidpiOpt"]!)) {
|
||||||
|
await G.prefs.remove("defaultHidpiOpt");
|
||||||
|
}
|
||||||
|
if (Util.shouldWatchAds(D.adsRequired["changeTermMaxLines"]!)) {
|
||||||
await G.prefs.setInt("termMaxLines", 4095);
|
await G.prefs.setInt("termMaxLines", 4095);
|
||||||
}
|
}
|
||||||
if (Util.shouldWatchAds(G.adsRequired["closeBannerAds"]!)) {
|
if (Util.shouldWatchAds(D.adsRequired["closeBannerAds"]!)) {
|
||||||
await G.prefs.setBool("isBannerAdsClosed", false);
|
await G.prefs.setBool("isBannerAdsClosed", false);
|
||||||
}
|
}
|
||||||
if (Util.shouldWatchAds(G.adsRequired["enableTerminalWrite"]!)) {
|
if (Util.shouldWatchAds(D.adsRequired["enableTerminalWrite"]!)) {
|
||||||
await G.prefs.setBool("isTerminalWriteEnabled", false);
|
await G.prefs.setBool("isTerminalWriteEnabled", false);
|
||||||
}
|
}
|
||||||
if (Util.shouldWatchAds(G.adsRequired["enableTerminalCommands"]!)) {
|
if (Util.shouldWatchAds(D.adsRequired["enableTerminalCommands"]!)) {
|
||||||
await G.prefs.setBool("isTerminalCommandsEnabled", false);
|
await G.prefs.setBool("isTerminalCommandsEnabled", false);
|
||||||
}
|
}
|
||||||
|
if (Util.shouldWatchAds(D.adsRequired["enableVirgl"]!)) {
|
||||||
|
await G.prefs.setBool("virgl", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置屏幕常亮
|
||||||
|
WakelockPlus.toggle(enable: Util.getGlobal("wakelock"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> initTerminalForCurrent() async {
|
static Future<void> initTerminalForCurrent() async {
|
||||||
@@ -639,27 +770,69 @@ done
|
|||||||
G.audioPty = Pty.start(
|
G.audioPty = Pty.start(
|
||||||
"/system/bin/sh"
|
"/system/bin/sh"
|
||||||
);
|
);
|
||||||
//pulseaudio也需要一个tmp文件夹,这里选择前面的cache,没有什么特别的原因,不行再换
|
|
||||||
//pulseaudio还需要一个文件夹放配置,这里用share
|
|
||||||
G.audioPty!.write(const Utf8Encoder().convert("""
|
G.audioPty!.write(const Utf8Encoder().convert("""
|
||||||
export DATA_DIR=${G.dataPath}
|
export DATA_DIR=${G.dataPath}
|
||||||
cd \$DATA_DIR/..
|
|
||||||
export TMPDIR=\$PWD/cache
|
|
||||||
cd \$DATA_DIR
|
|
||||||
export HOME=\$DATA_DIR/share
|
|
||||||
export LD_LIBRARY_PATH=\$DATA_DIR/bin
|
|
||||||
\$DATA_DIR/busybox sed "s/4713/${Util.getGlobal("defaultAudioPort") as int}/g" \$DATA_DIR/bin/pulseaudio.conf > \$DATA_DIR/bin/pulseaudio.conf.tmp
|
\$DATA_DIR/busybox sed "s/4713/${Util.getGlobal("defaultAudioPort") as int}/g" \$DATA_DIR/bin/pulseaudio.conf > \$DATA_DIR/bin/pulseaudio.conf.tmp
|
||||||
\$DATA_DIR/bin/pulseaudio -F \$DATA_DIR/bin/pulseaudio.conf.tmp
|
rm -rf \$DATA_DIR/pulseaudio_tmp/*
|
||||||
|
TMPDIR=\$DATA_DIR/pulseaudio_tmp HOME=\$DATA_DIR/pulseaudio_tmp XDG_CONFIG_HOME=\$DATA_DIR/pulseaudio_tmp LD_LIBRARY_PATH=\$DATA_DIR/bin \$DATA_DIR/bin/pulseaudio -F \$DATA_DIR/bin/pulseaudio.conf.tmp
|
||||||
exit
|
exit
|
||||||
"""));
|
"""));
|
||||||
await G.audioPty?.exitCode;
|
await G.audioPty?.exitCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> launchCurrentContainer() async {
|
static Future<void> launchCurrentContainer() async {
|
||||||
|
String box86BinPath = "";
|
||||||
|
String box64BinPath = "";
|
||||||
|
String box86LibraryPath = "";
|
||||||
|
String box64LibraryPath = "";
|
||||||
|
String extraMount = ""; //mount options and other proot options
|
||||||
|
String extraOpt = "";
|
||||||
|
if (Util.getGlobal("getifaddrsBridge")) {
|
||||||
|
Util.execute("${G.dataPath}/bin/getifaddrs_bridge_server ${G.dataPath}/containers/${G.currentContainer}/tmp/.getifaddrs-bridge");
|
||||||
|
extraOpt += "LD_PRELOAD=/home/tiny/.local/share/tiny/extra/getifaddrs_bridge_client_lib.so ";
|
||||||
|
}
|
||||||
|
if (Util.getGlobal("isHidpiEnabled")) {
|
||||||
|
extraOpt += "${Util.getGlobal("defaultHidpiOpt")} ";
|
||||||
|
}
|
||||||
|
if (Util.getGlobal("uos")) {
|
||||||
|
extraMount += "--mount=\$DATA_DIR/tiny/wechat/uos-lsb:/etc/lsb-release --mount=\$DATA_DIR/tiny/wechat/uos-release:/usr/lib/os-release ";
|
||||||
|
extraMount += "--mount=\$DATA_DIR/tiny/wechat/license/var/uos:/var/uos --mount=\$DATA_DIR/tiny/wechat/license/var/lib/uos-license:/var/lib/uos-license ";
|
||||||
|
}
|
||||||
|
if (Util.getGlobal("virgl")) {
|
||||||
|
Util.execute("""
|
||||||
|
export DATA_DIR=${G.dataPath}
|
||||||
|
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
|
||||||
|
${G.dataPath}/bin/virgl_test_server ${Util.getGlobal("defaultVirglCommand")}""");
|
||||||
|
extraOpt += "${Util.getGlobal("defaultVirglOpt")} ";
|
||||||
|
}
|
||||||
|
if (Util.getGlobal("isBoxEnabled")) {
|
||||||
|
G.wasBoxEnabled = true;
|
||||||
|
extraMount += "--x86=/home/tiny/.local/bin/box86 --x64=/home/tiny/.local/bin/box64 ";
|
||||||
|
extraMount += "--mount=\$DATA_DIR/tiny/cross/box86:/home/tiny/.local/bin/box86 --mount=\$DATA_DIR/tiny/cross/box64:/home/tiny/.local/bin/box64 ";
|
||||||
|
extraOpt += "BOX86_NOBANNER=1 BOX64_NOBANNER=1 ";
|
||||||
|
}
|
||||||
|
if (Util.getGlobal("isWineEnabled")) {
|
||||||
|
G.wasWineEnabled = true;
|
||||||
|
box86BinPath += "/home/tiny/.local/share/tiny/cross/wine/bin:";
|
||||||
|
box64BinPath += "/home/tiny/.local/share/tiny/cross/wine/bin:";
|
||||||
|
box86LibraryPath += "/home/tiny/.local/share/tiny/cross/wine/lib/wine/i386-unix:";
|
||||||
|
box64LibraryPath += "/home/tiny/.local/share/tiny/cross/wine/lib/wine/x86_64-unix:";
|
||||||
|
extraMount += "--wine=/home/tiny/.local/bin/wine64 ";
|
||||||
|
extraMount += "--mount=\$DATA_DIR/tiny/cross/wine.desktop:/usr/share/applications/wine.desktop ";
|
||||||
|
//extraMount += "--mount=\$DATA_DIR/tiny/cross/winetricks:/home/tiny/.local/bin/winetricks --mount=\$DATA_DIR/tiny/cross/winetricks.desktop:/usr/share/applications/winetricks.desktop ";
|
||||||
|
}
|
||||||
|
if (G.wasBoxEnabled) {
|
||||||
|
extraOpt += "BOX86_PATH=$box86BinPath/home/tiny/.local/share/tiny/cross/bin ";
|
||||||
|
extraOpt += "BOX64_PATH=$box64BinPath/home/tiny/.local/share/tiny/cross/bin ";
|
||||||
|
extraOpt += "BOX86_LD_LIBRARY_PATH=$box86LibraryPath/home/tiny/.local/share/tiny/cross/x86lib ";
|
||||||
|
extraOpt += "BOX64_LD_LIBRARY_PATH=$box64LibraryPath/home/tiny/.local/share/tiny/cross/x64lib ";
|
||||||
|
}
|
||||||
Util.termWrite(
|
Util.termWrite(
|
||||||
"""
|
"""
|
||||||
export DATA_DIR=${G.dataPath}
|
export DATA_DIR=${G.dataPath}
|
||||||
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
|
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
|
||||||
|
export EXTRA_MOUNT="$extraMount"
|
||||||
|
export EXTRA_OPT="$extraOpt"
|
||||||
#export PROOT_L2S_DIR=\$DATA_DIR/containers/0/.l2s
|
#export PROOT_L2S_DIR=\$DATA_DIR/containers/0/.l2s
|
||||||
cd \$DATA_DIR
|
cd \$DATA_DIR
|
||||||
export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp
|
export PROOT_TMP_DIR=\$DATA_DIR/proot_tmp
|
||||||
@@ -698,14 +871,16 @@ clear""");
|
|||||||
LogicalKeyboardKey.arrowLeft,
|
LogicalKeyboardKey.arrowLeft,
|
||||||
LogicalKeyboardKey.arrowRight,
|
LogicalKeyboardKey.arrowRight,
|
||||||
LogicalKeyboardKey.arrowUp,
|
LogicalKeyboardKey.arrowUp,
|
||||||
LogicalKeyboardKey.arrowDown
|
LogicalKeyboardKey.arrowDown,
|
||||||
|
LogicalKeyboardKey.tab
|
||||||
}.contains(event.logicalKey)) {
|
}.contains(event.logicalKey)) {
|
||||||
return KeyEventResult.skipRemainingHandlers;
|
return KeyEventResult.skipRemainingHandlers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return KeyEventResult.ignored;
|
return KeyEventResult.ignored;
|
||||||
},
|
},
|
||||||
child: WebViewWidget(controller: G.controller),
|
child: GestureDetector(onSecondaryTap: () {
|
||||||
|
}, child: WebViewWidget(controller: G.controller))
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,13 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <dynamic_color/dynamic_color_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
|
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
||||||
|
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
||||||
|
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
dynamic_color
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,20 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
import dynamic_color
|
||||||
import ffmpeg_kit_flutter_full_gpl
|
import ffmpeg_kit_flutter_full_gpl
|
||||||
|
import package_info_plus
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
import wakelock_plus
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||||
FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin"))
|
FFmpegKitFlutterPlugin.register(with: registry.registrar(forPlugin: "FFmpegKitFlutterPlugin"))
|
||||||
|
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
|
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
|
||||||
}
|
}
|
||||||
|
|||||||
253
pubspec.lock
253
pubspec.lock
@@ -1,6 +1,14 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.2"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -45,10 +53,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
|
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.2"
|
version: "1.18.0"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -57,6 +65,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "3.1.1"
|
||||||
|
dbus:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: dbus
|
||||||
|
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.10"
|
||||||
|
dynamic_color:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: dynamic_color
|
||||||
|
sha256: a866f1f8947bfdaf674d7928e769eac7230388a2e7a2542824fad4bb5b87be3b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.6.9"
|
||||||
equatable:
|
equatable:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -101,10 +125,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
|
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.4"
|
version: "7.0.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -114,10 +138,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
|
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "3.0.1"
|
||||||
flutter_pty:
|
flutter_pty:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -140,10 +164,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: http
|
name: http
|
||||||
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
|
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.2"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -156,18 +180,26 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: intl
|
name: intl
|
||||||
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
|
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.18.1"
|
version: "0.19.0"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
|
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "3.0.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -188,10 +220,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.10.0"
|
||||||
|
package_info_plus:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: package_info_plus
|
||||||
|
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.1"
|
||||||
|
package_info_plus_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: package_info_plus_platform_interface
|
||||||
|
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -212,10 +260,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
|
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.0"
|
version: "2.2.2"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -252,50 +300,66 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: permission_handler
|
name: permission_handler
|
||||||
sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5
|
sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.4.5"
|
version: "11.1.0"
|
||||||
permission_handler_android:
|
permission_handler_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: permission_handler_android
|
name: permission_handler_android
|
||||||
sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47"
|
sha256: "2f1bec180ee2f5665c22faada971a8f024761f632e93ddc23310487df52dcfa6"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.3.6"
|
version: "12.0.1"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: permission_handler_apple
|
name: permission_handler_apple
|
||||||
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
|
sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.1.4"
|
version: "9.2.0"
|
||||||
|
permission_handler_html:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_html
|
||||||
|
sha256: "11b762a8c123dced6461933a88ea1edbbe036078c3f9f41b08886e678e7864df"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.0+2"
|
||||||
permission_handler_platform_interface:
|
permission_handler_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: permission_handler_platform_interface
|
name: permission_handler_platform_interface
|
||||||
sha256: f2343e9fa9c22ae4fd92d4732755bfe452214e7189afcc097380950cf567b4b2
|
sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.11.5"
|
version: "4.0.2"
|
||||||
permission_handler_windows:
|
permission_handler_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: permission_handler_windows
|
name: permission_handler_windows
|
||||||
sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
|
sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.2.0"
|
||||||
|
petitparser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: petitparser
|
||||||
|
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.2"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
|
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.4"
|
||||||
platform_info:
|
platform_info:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -308,10 +372,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
|
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.6"
|
version: "2.1.8"
|
||||||
quiver:
|
quiver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -328,23 +392,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
saf:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
path: "."
|
|
||||||
ref: HEAD
|
|
||||||
resolved-ref: e3aa3fcbd031f2645688e97ebd5a4f14a014bd42
|
|
||||||
url: "https://github.com/Cateners/saf"
|
|
||||||
source: git
|
|
||||||
version: "1.0.3+3"
|
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: shared_preferences
|
name: shared_preferences
|
||||||
sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac
|
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.2"
|
||||||
shared_preferences_android:
|
shared_preferences_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -365,10 +420,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_linux
|
name: shared_preferences_linux
|
||||||
sha256: c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a
|
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.3.2"
|
||||||
shared_preferences_platform_interface:
|
shared_preferences_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -381,18 +436,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_web
|
name: shared_preferences_web
|
||||||
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf
|
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.2"
|
||||||
shared_preferences_windows:
|
shared_preferences_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_windows
|
name: shared_preferences_windows
|
||||||
sha256: f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f
|
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.1"
|
version: "2.3.2"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -410,18 +465,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.11.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -442,10 +497,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
|
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.0"
|
version: "0.6.1"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -458,74 +513,74 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: unity_ads_plugin
|
name: unity_ads_plugin
|
||||||
sha256: "2b19ff02089e5a0d1a6549a2cd9d2baf5f8733bdda296d947d411a293f0bffda"
|
sha256: "75b0b87697a9601971eacd2cd37458b88cf88f062af6f21c67c9fb28a11699d9"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.8"
|
version: "0.3.10"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27"
|
sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.14"
|
version: "6.2.2"
|
||||||
url_launcher_android:
|
url_launcher_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_android
|
name: url_launcher_android
|
||||||
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330
|
sha256: c0766a55ab42cefaa728cabc951e82919ab41a3a4fee0aaa96176ca82da8cc51
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.0"
|
version: "6.2.1"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_ios
|
name: url_launcher_ios
|
||||||
sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f"
|
sha256: "46b81e3109cbb2d6b81702ad3077540789a3e74e22795eb9f0b7d494dbaa72ea"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.5"
|
version: "6.2.2"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_linux
|
name: url_launcher_linux
|
||||||
sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e
|
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.1.1"
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_macos
|
name: url_launcher_macos
|
||||||
sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88
|
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.7"
|
version: "3.1.0"
|
||||||
url_launcher_platform_interface:
|
url_launcher_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_platform_interface
|
name: url_launcher_platform_interface
|
||||||
sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618"
|
sha256: "4aca1e060978e19b2998ee28503f40b5ba6226819c2b5e3e4d1821e8ccd92198"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.5"
|
version: "2.3.0"
|
||||||
url_launcher_web:
|
url_launcher_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_web
|
name: url_launcher_web
|
||||||
sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5"
|
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.20"
|
version: "2.2.3"
|
||||||
url_launcher_windows:
|
url_launcher_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_windows
|
name: url_launcher_windows
|
||||||
sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069"
|
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.8"
|
version: "3.1.1"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -534,62 +589,86 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
wakelock_plus:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: wakelock_plus
|
||||||
|
sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.4"
|
||||||
|
wakelock_plus_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: wakelock_plus_platform_interface
|
||||||
|
sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
|
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4-beta"
|
version: "0.3.0"
|
||||||
webview_flutter:
|
webview_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: webview_flutter
|
name: webview_flutter
|
||||||
sha256: c1ab9b81090705c6069197d9fdc1625e587b52b8d70cdde2339d177ad0dbb98e
|
sha256: "60e23976834e995c404c0b21d3b9db37ecd77d3303ef74f8b8d7a7b19947fc04"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.4.1"
|
version: "4.4.3"
|
||||||
webview_flutter_android:
|
webview_flutter_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_android
|
name: webview_flutter_android
|
||||||
sha256: b0cd33dd7d3dd8e5f664e11a19e17ba12c352647269921a3b568406b001f1dff
|
sha256: "161af93c2abaf94ef2192bffb53a3658b2d721a3bf99b69aa1e47814ee18cc96"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.12.0"
|
version: "3.13.2"
|
||||||
webview_flutter_platform_interface:
|
webview_flutter_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_platform_interface
|
name: webview_flutter_platform_interface
|
||||||
sha256: "6d9213c65f1060116757a7c473247c60f3f7f332cac33dc417c9e362a9a13e4f"
|
sha256: dbe745ee459a16b6fec296f7565a8ef430d0d681001d8ae521898b9361854943
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.0"
|
version: "2.9.0"
|
||||||
webview_flutter_wkwebview:
|
webview_flutter_wkwebview:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_wkwebview
|
name: webview_flutter_wkwebview
|
||||||
sha256: "30b9af6bdd457b44c08748b9190d23208b5165357cc2eb57914fee1366c42974"
|
sha256: "02d8f3ebbc842704b2b662377b3ee11c0f8f1bbaa8eab6398262f40049819160"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.9.1"
|
version: "3.10.1"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
|
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.9"
|
version: "5.2.0"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: xdg_directories
|
name: xdg_directories
|
||||||
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
|
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.4"
|
||||||
|
xml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xml
|
||||||
|
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.5.0"
|
||||||
xterm:
|
xterm:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -599,5 +678,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.5.0"
|
version: "3.5.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.1.0 <4.0.0"
|
dart: ">=3.2.0 <4.0.0"
|
||||||
flutter: ">=3.13.0"
|
flutter: ">=3.16.0"
|
||||||
|
|||||||
16
pubspec.yaml
16
pubspec.yaml
@@ -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
|
# 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
|
# 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.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.10+1
|
version: 1.0.12+4
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.0 <4.0.0'
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
@@ -33,19 +33,18 @@ dependencies:
|
|||||||
xterm: ^3.5.0
|
xterm: ^3.5.0
|
||||||
flutter_pty: ^0.4.0
|
flutter_pty: ^0.4.0
|
||||||
path_provider: ^2.1.0
|
path_provider: ^2.1.0
|
||||||
webview_flutter: ^4.2.3
|
webview_flutter: ^4.4.2
|
||||||
permission_handler: ^10.4.3
|
permission_handler: ^11.0.1
|
||||||
http: ^1.1.0
|
http: ^1.1.0
|
||||||
retry: ^3.1.2
|
retry: ^3.1.2
|
||||||
url_launcher: ^6.1.12
|
url_launcher: ^6.1.12
|
||||||
shared_preferences: ^2.2.1
|
shared_preferences: ^2.2.1
|
||||||
intl: ^0.18.1 #日期字符串转换
|
intl: ^0.19.0 #日期字符串转换
|
||||||
unity_ads_plugin: ^0.3.8
|
unity_ads_plugin: ^0.3.8
|
||||||
clipboard: ^0.1.3
|
clipboard: ^0.1.3
|
||||||
ffmpeg_kit_flutter_full_gpl: ^6.0.3
|
ffmpeg_kit_flutter_full_gpl: ^6.0.3
|
||||||
saf:
|
wakelock_plus: ^1.1.4
|
||||||
git: https://github.com/Cateners/saf
|
dynamic_color: ^1.6.9
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
@@ -60,7 +59,7 @@ dev_dependencies:
|
|||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^3.0.1
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
@@ -80,7 +79,6 @@ flutter:
|
|||||||
assets:
|
assets:
|
||||||
- assets/
|
- assets/
|
||||||
- images/icon.png
|
- images/icon.png
|
||||||
- images/alipay.png
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||||
|
|
||||||
|
|||||||
BIN
readme/img1.png
Normal file
BIN
readme/img1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
BIN
readme/img2.png
Normal file
BIN
readme/img2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 265 KiB |
BIN
readme/img3.gif
Normal file
BIN
readme/img3.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 MiB |
BIN
readme/img4.png
Normal file
BIN
readme/img4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
BIN
readme/img5.png
Normal file
BIN
readme/img5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 326 KiB |
@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|||||||
# https://github.com/flutter/flutter/issues/57146.
|
# https://github.com/flutter/flutter/issues/57146.
|
||||||
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
||||||
|
|
||||||
|
# Set fallback configurations for older versions of the flutter tool.
|
||||||
|
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
|
||||||
|
set(FLUTTER_TARGET_PLATFORM "windows-x64")
|
||||||
|
endif()
|
||||||
|
|
||||||
# === Flutter Library ===
|
# === Flutter Library ===
|
||||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
||||||
|
|
||||||
@@ -92,7 +97,7 @@ add_custom_command(
|
|||||||
COMMAND ${CMAKE_COMMAND} -E env
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
${FLUTTER_TOOL_ENVIRONMENT}
|
${FLUTTER_TOOL_ENVIRONMENT}
|
||||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
||||||
windows-x64 $<CONFIG>
|
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_target(flutter_assemble DEPENDS
|
add_custom_target(flutter_assemble DEPENDS
|
||||||
|
|||||||
@@ -6,10 +6,13 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
|
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
dynamic_color
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user