diff --git a/README.md b/README.md index 026141c..0eaeb17 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ lib目录: `split -b 98M debian.tar.xz` 还需要对flutter的一些默认配置作修改,因为其与项目中build.gradle的一些设置冲突。 -- 删除`flutter\packages\flutter_tools\gradle\src\main\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。 +- 删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。 接下来就可以编译了。我使用的命令如下: diff --git a/android/app/build.gradle b/android/app/build.gradle index 870d374..0b842bf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -70,7 +70,7 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug - // remove flutter's default ShrinkResources settings at flutter\packages\flutter_tools\gradle\src\main\flutter.groovy + // remove flutter's default ShrinkResources settings at flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy postprocessing { removeUnusedCode true removeUnusedResources true diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 74b49ed..44c68d6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -21,7 +21,7 @@ android:name=".MainApplication" android:icon="@mipmap/ic_launcher" android:usesCleartextTraffic="true" - + android:launchMode="singleInstance" android:theme="@style/App.Theme"> + + @@ -94,12 +93,11 @@ + @@ -107,6 +105,8 @@ + + diff --git a/assets/patch.tar.gz b/assets/patch.tar.gz index 5380f72..314b6d8 100644 Binary files a/assets/patch.tar.gz and b/assets/patch.tar.gz differ diff --git a/extra/cross/install-box b/extra/cross/install-box deleted file mode 100644 index aeba79f..0000000 --- a/extra/cross/install-box +++ /dev/null @@ -1,77 +0,0 @@ -#!/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 - -box86_url="https://github.com/ptitSeb/box86" -box64_url="https://github.com/ptitSeb/box64" - -mirror_sites=( - "https://github.moeyy.xyz/" - "https://mirror.ghproxy.com/" - "" -) - -for mirror in "${mirror_sites[@]}"; do - url="${mirror}${box86_url}" - echo "尝试从 $url 下载box86..." - git clone "${url}" - if [ $? -eq 0 ]; then - echo "成功下载box86" - break - fi - if [ -z "$mirror" ]; then - rm -rf $HOME/.local/share/tiny/tmp - echo '仓库克隆失败...退出安装...' - exit - fi -done - -for mirror in "${mirror_sites[@]}"; do - url="${mirror}${box64_url}" - echo "尝试从 $url 下载box64..." - git clone "${url}" - if [ $? -eq 0 ]; then - echo "成功下载box64" - break - fi - if [ -z "$mirror" ]; then - rm -rf $HOME/.local/share/tiny/tmp - echo '仓库克隆失败...退出安装...' - exit - fi -done - -echo "正在编译box86..." -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 - -echo "正在编译box64..." -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 '安装完成' diff --git a/extra/cross/install-dxvk b/extra/cross/install-dxvk deleted file mode 100644 index 6026a7d..0000000 --- a/extra/cross/install-dxvk +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -rm -rf $HOME/.local/share/tiny/tmp -mkdir $HOME/.local/share/tiny/tmp -cd $HOME/.local/share/tiny/tmp - -RELEASE_PAGE=https://github.com/doitsujin/dxvk/releases -LATEST_DXVK_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Version \K[^"]*' | cut -d "<" -f 1 | head -n 1) -if [ -z "$LATEST_DXVK_TAG" ] -then - LATEST_DXVK_TAG="2.4" -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" - -mirror_sites=( - "https://github.moeyy.xyz/" - "https://mirror.ghproxy.com/" - "" -) - -for mirror in "${mirror_sites[@]}"; do - url="${mirror}$LATEST_DXVK_LINK" - echo "尝试从 $url 下载dxvk..." - wget "${url}" - if [ $? -eq 0 ]; then - echo "成功下载dxvk" - break - fi - if [ -z "$mirror" ]; then - rm -rf $HOME/.local/share/tiny/tmp - echo '下载失败...退出安装...' - exit - fi -done - -wine64 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配置更新配置。' \ No newline at end of file diff --git a/extra/cross/install-hangover b/extra/cross/install-hangover new file mode 100644 index 0000000..f1be387 --- /dev/null +++ b/extra/cross/install-hangover @@ -0,0 +1,67 @@ +#!/bin/bash + +echo "正在更新软件包..." +sudo apt update +sudo apt upgrade -y + + +REPO="AndreRH/hangover" +API_URL="https://api.github.com/repos/$REPO/releases/latest" + +# 获取最新release的版本号并储存在变量中 +latest_version=$(wget -qO- $API_URL | grep -oP '"tag_name": "\Khangover-\K([^"]+)' ) + +# 检查是否成功获取版本号 +if [ -z "$latest_version" ]; then + echo "无法获取到最新版本号。" + exit 1 +fi + +echo "最新版本: $latest_version" + +hangover_url="https://github.com/AndreRH/hangover/releases/download/hangover-${latest_version}/hangover_${latest_version}_debian12_bookworm_arm64.tar" + +mirror_sites=( + "https://github.moeyy.xyz/" + "https://mirror.ghproxy.com/" + "" +) + +mkdir -p /tmp/hangover +cd /tmp/hangover + +for mirror in "${mirror_sites[@]}"; do + url="${mirror}${hangover_url}" + echo "尝试从 $url 下载Hangover..." + wget "${url}" -O hangover.tar + if [ $? -eq 0 ]; then + echo "成功下载Hangover" + break + fi + if [ -z "$mirror" ]; then + cd /tmp + rm -rf /tmp/hangover + echo "下载失败...退出安装..." + exit + fi +done + +echo "正在安装Hangover..." +tar xvf hangover.tar +sudo apt install -y ./hangover-wine_${latest_version}~bookworm_arm64.deb ./hangover-libarm64ecfex_${latest_version}_arm64.deb +if [ $? -ne 0 ]; then + cd /tmp + rm -rf /tmp/hangover + echo "安装失败...退出安装..." + exit 1 +fi + +echo "正在初始化Wine..." +wineboot --init + +echo "正在修复字体..." +regedit "Z:\\home\\tiny\\.local\\share\\tiny\\extra\\chn_fonts.reg" && wine reg delete "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes" /va /f + +cd /tmp +rm -rf /tmp/hangover +echo "安装完成" diff --git a/extra/cross/install-hangover-stable b/extra/cross/install-hangover-stable new file mode 100644 index 0000000..e1de7e4 --- /dev/null +++ b/extra/cross/install-hangover-stable @@ -0,0 +1,51 @@ +#!/bin/bash + +echo "正在更新软件包..." +sudo apt update +sudo apt upgrade -y + +hangover_url="https://github.com/AndreRH/hangover/releases/download/hangover-9.20.1/hangover_9.20.1_debian12_bookworm_arm64.tar" +latest_version="9.20.1" + +mirror_sites=( + "https://github.moeyy.xyz/" + "https://mirror.ghproxy.com/" + "" +) + +mkdir -p /tmp/hangover +cd /tmp/hangover + +for mirror in "${mirror_sites[@]}"; do + url="${mirror}${hangover_url}" + echo "尝试从 $url 下载Hangover..." + wget "${url}" -O hangover.tar + if [ $? -eq 0 ]; then + echo "成功下载Hangover" + break + fi + if [ -z "$mirror" ]; then + cd /tmp + rm -rf /tmp/hangover + echo "下载失败...退出安装..." + exit + fi +done + +echo "正在安装Hangover..." +tar xvf hangover.tar +sudo apt install -y ./hangover-wine_${latest_version}~bookworm_arm64.deb ./hangover-libarm64ecfex_${latest_version}_arm64.deb +if [ $? -ne 0 ]; then + cd /tmp + rm -rf /tmp/hangover + echo "安装失败...退出安装..." + exit 1 +fi + +echo "正在初始化Wine..." +wineboot --init + +echo "正在修复字体..." +regedit "Z:\\home\\tiny\\.local\\share\\tiny\\extra\\chn_fonts.reg" && wine reg delete "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes" /va /f + +echo "安装完成" diff --git a/extra/cross/install-wine b/extra/cross/install-wine deleted file mode 100644 index f5d9b9e..0000000 --- a/extra/cross/install-wine +++ /dev/null @@ -1,80 +0,0 @@ -#!/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 - -RELEASE_PAGE=https://github.com/Kron4ek/Wine-Builds/releases -#LATEST_WINE_TAG=proton-$(curl -L $RELEASE_PAGE | grep -oP 'Proton \K[^"]*' | cut -d "<" -f 1 | head -n 1) #proton -LATEST_WINE_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Wine \K[^"]*' | 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 - -mirror_sites=( - "https://github.moeyy.xyz/" - "https://mirror.ghproxy.com/" - "" -) - -for mirror in "${mirror_sites[@]}"; do - url="${mirror}$LATEST_WINE_LINK" - echo "尝试从 $url 下载wine..." - wget "${url}" - if [ $? -eq 0 ]; then - echo "成功下载wine" - break - fi - if [ -z "$mirror" ]; then - rm -rf $HOME/.local/share/tiny/tmp - echo '下载失败...退出安装...' - exit - fi -done - -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。' diff --git a/extra/cross/install-wine2 b/extra/cross/install-wine2 deleted file mode 100644 index 1657b10..0000000 --- a/extra/cross/install-wine2 +++ /dev/null @@ -1,83 +0,0 @@ -#!/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安装。请务必保持耐心。' diff --git a/lib/main.dart b/lib/main.dart index bf1ff3a..f4f5ec0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,7 +18,7 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io'; +//import 'dart:io'; import 'dart:math'; //import 'dart:convert'; @@ -71,6 +71,34 @@ class MyApp extends StatelessWidget { } +//限制最大宽高比1:1 +class AspectRatioMax1To1 extends StatelessWidget { + final Widget child; + //final double aspectRatio; + + const AspectRatioMax1To1({super.key, required this.child/*, required this.aspectRatio*/}); + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + final s = MediaQuery.of(context).size; + //double size = (s.width < s.height * aspectRatio) ? s.width : (s.height * aspectRatio); + double size = s.width < s.height ? constraints.maxWidth : s.height; + + return Center( + child: SizedBox( + width: size, + height: constraints.maxHeight, + child: child, + ), + ); + }, + ); + } +} + + class FakeLoadingStatus extends StatefulWidget { const FakeLoadingStatus({super.key}); @@ -364,7 +392,7 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)"""); const SizedBox.square(dimension: 16), const Divider(height: 2, indent: 8, endIndent: 8), const SizedBox.square(dimension: 16), - const Text("""高分辨率支持可以为大屏幕设备带来更高清的体验! + const Text("""高分辨率支持可以为拥有高分辨率屏幕的设备带来更高清的体验! 注意: 选项开启后显示会变得很大,请设置一个合适的分辨率。 @@ -551,65 +579,34 @@ Virgl可为使用OpenGL ES的应用提供加速。"""), ExpansionPanel( isExpanded: _expandState[6], headerBuilder: ((context, isExpanded) { - return const ListTile(title: Text("跨架构/跨系统支持"), subtitle: Text("实验性功能"),); + return const ListTile(title: Text("Windows应用支持"), subtitle: Text("实验性功能"),); }), body: Padding(padding: const EdgeInsets.all(12), child: Column(children: [ - const Text("""使用box86/box64运行x86/x64架构的程序,或使用wine运行windows程序。 + const Text("""使用Hangover(在原生Wine运行跨架构应用)运行Windows应用! -运行windows程序需要经过架构和系统两层模拟,不要对运行速度抱有期待!程序崩溃甚至打不开也是常有的。 +运行Windows程序需要经过架构和系统两层模拟,不要对运行速度抱有期待! + +需要速度可以尝试配合图形加速使用。当然程序崩溃甚至打不开也是正常的。 建议将要运行的Windows程序连同程序文件夹移至桌面运行。 你需要耐心。即使图形界面什么也没显示。看看终端,还在继续输出吗?还是停止在某个报错? -或者寻找该windows软件官方是否提供linux arm64版本。 - -给高级用户的注意事项: -跨架构/跨系统提供类似binfmt_misc的支持。 -你可以直接执行x86或x64的elf(系统会自动调用box86/box64),也可以直接执行exe文件(系统会自动调用wine64)。 -前提是这些文件拥有可执行权限。"""), +或者寻找该Windows软件官方是否提供Linux arm64版本。"""), const SizedBox.square(dimension: 8), Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: [ - OutlinedButton(style: D.commandButtonStyle, child: const Text("安装box86和box64"), onPressed: () { - Util.termWrite("bash ~/.local/share/tiny/extra/install-box"); + OutlinedButton(style: D.commandButtonStyle, child: const Text("安装Hangover稳定版(9.20)"), onPressed: () async { + Util.termWrite("bash ~/.local/share/tiny/extra/install-hangover-stable"); G.pageIndex.value = 0; }), - OutlinedButton(style: D.commandButtonStyle, child: const Text("安装wine"), onPressed: () async { - if (!await File("${G.dataPath}/tiny/cross/box64").exists()) { - if (!context.mounted) return; - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text("请先安装box86/box64")) - ); - return; - } - Util.termWrite("bash ~/.local/share/tiny/extra/install-wine"); + OutlinedButton(style: D.commandButtonStyle, child: const Text("安装Hangover最新版(可能出错)"), onPressed: () async { + Util.termWrite("bash ~/.local/share/tiny/extra/install-hangover"); G.pageIndex.value = 0; }), - OutlinedButton(style: D.commandButtonStyle, child: const Text("安装dxvk"), onPressed: () async { - if (!G.wasWineEnabled) { - if (!context.mounted) return; - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text("请启用wine后重试")) - ); - return; - } - Util.termWrite("bash ~/.local/share/tiny/extra/install-dxvk"); + OutlinedButton(style: D.commandButtonStyle, child: const Text("卸载Hangover"), onPressed: () async { + Util.termWrite("sudo apt autoremove --purge -y hangover-wine hangover-libarm64ecfex"); G.pageIndex.value = 0; }), - OutlinedButton(style: D.commandButtonStyle, child: const Text("移除所有安装"), onPressed: () async { - if (G.wasBoxEnabled) { - if (!context.mounted) return; - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text("请关闭跨架构支持后重试")) - ); - return; - } - Util.termWrite("rm -rf ~/.local/share/tiny/cross"); - G.pageIndex.value = 0; - }), - OutlinedButton(style: D.commandButtonStyle, child: const Text("清空wine数据"), onPressed: () async { + OutlinedButton(style: D.commandButtonStyle, child: const Text("清空Wine数据"), onPressed: () async { Util.termWrite("rm -rf ~/.wine"); G.pageIndex.value = 0; }), @@ -617,15 +614,11 @@ Virgl可为使用OpenGL ES的应用提供加速。"""), const SizedBox.square(dimension: 16), const Divider(height: 2, indent: 8, endIndent: 8), const SizedBox.square(dimension: 16), - const Text("""开启wine后的常用指令,点击后前往图形界面耐心等待。 + const Text("""Wine的常用指令。点击后前往图形界面耐心等待。 任意程序启动参考时间: 虎贲T7510 6GB 超过一分钟 骁龙870 12GB 约10秒 -骁龙8gen3 不支持32位 可能不可用 - -初始化时间: -可能比本软件初始化还长 """), const SizedBox.square(dimension: 8), Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: D.wineCommands.asMap().entries.map( @@ -641,46 +634,14 @@ Virgl可为使用OpenGL ES的应用提供加速。"""), const SizedBox.square(dimension: 16), const Text("以下选项修改后将在下次启动软件时生效。"), const SizedBox.square(dimension: 8), - SwitchListTile(title: const Text("启用box86/box64"), subtitle: const Text("运行跨架构软件"), value: Util.getGlobal("isBoxEnabled") as bool, onChanged:(value) async { - //检测box64是否存在,存在才开启 - if (value && !await File("${G.dataPath}/tiny/cross/box64").exists()) { - if (!context.mounted) return; - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text("请先安装box86/box64")) - ); - return; - } - G.prefs.setBool("isBoxEnabled", value); - if (!value && Util.getGlobal("isWineEnabled")) { - G.prefs.setBool("isWineEnabled", false); + SwitchListTile(title: const Text("切换系统到日语"), subtitle: const Text("システムを日本語に切り替える"), value: Util.getGlobal("isJpEnabled") as bool, onChanged:(value) async { + if (value) { + Util.termWrite("sudo localedef -c -i ja_JP -f UTF-8 ja_JP.UTF-8"); + G.pageIndex.value = 0; } + G.prefs.setBool("isJpEnabled", value); setState(() {}); },), - SwitchListTile(title: const Text("启用wine"), subtitle: const Text("运行windows exe软件"), value: Util.getGlobal("isWineEnabled") as bool, onChanged:(value) async { - //检测wine是否存在且box64是否开启 - if (value && !(Util.getGlobal("isBoxEnabled") && await File("${G.dataPath}/tiny/cross/wine/bin/wine").exists())) { - if (!context.mounted) return; - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text("请先安装wine并启用box86/box64")) - ); - return; - } - Util.execute(value ? """filename="${G.dataPath}/containers/${G.currentContainer}/home/tiny/.bashrc" -command="export PATH=\\\$HOME/.local/share/tiny/cross/wine/bin:\\\$PATH # Auto-generated, do NOT edit" -if ! ${G.dataPath}/busybox grep -qF "\$command" "\$filename"; then - echo "\$command" >> "\$filename" -fi""" : """filename="${G.dataPath}/containers/${G.currentContainer}/home/tiny/.bashrc" -command="export PATH=\\\$HOME/.local/share/tiny/cross/wine/bin:\\\$PATH # Auto-generated, do NOT edit" -if ${G.dataPath}/busybox grep -qF "\$command" "\$filename"; then - command="export PATH=\\\$HOME/.local/share/tiny/cross/wine/bin:\\\$PATH \\\\# Auto-generated, do NOT edit" - ${G.dataPath}/busybox sed -i "\\\\#\$command#d" "\$filename" -fi"""); - G.prefs.setBool("isWineEnabled", value); - setState(() {}); - },), - const SizedBox.square(dimension: 16), ],))), ],); } @@ -1163,33 +1124,35 @@ class LoadingPage extends StatelessWidget { Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8), - child: Column( - children: [ - const Padding( - padding: EdgeInsets.fromLTRB(16, 16, 16, 16), - child: FractionallySizedBox( - widthFactor: 0.4, - child: Image( - image: AssetImage("images/icon.png") - ) + child: AspectRatioMax1To1(child: + Column( + children: [ + const Padding( + padding: EdgeInsets.fromLTRB(16, 16, 16, 16), + child: FractionallySizedBox( + widthFactor: 0.4, + child: Image( + image: AssetImage("images/icon.png") + ) + ), ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 8), - child: ValueListenableBuilder(valueListenable: G.updateText, builder:(context, value, child) { - return Text(value, textScaler: const TextScaler.linear(2)); - }), - ), - const FakeLoadingStatus(), - const Expanded(child: Padding(padding: EdgeInsets.all(8), child: Card(child: Padding(padding: EdgeInsets.all(8), child: - Scrollbar(child: - SingleChildScrollView( - child: InfoPage(openFirstInfo: true) + Padding( + padding: const EdgeInsets.fromLTRB(0, 0, 0, 8), + child: ValueListenableBuilder(valueListenable: G.updateText, builder:(context, value, child) { + return Text(value, textScaler: const TextScaler.linear(2)); + }), + ), + const FakeLoadingStatus(), + const Expanded(child: Padding(padding: EdgeInsets.all(8), child: Card(child: Padding(padding: EdgeInsets.all(8), child: + Scrollbar(child: + SingleChildScrollView( + child: InfoPage(openFirstInfo: true) + ) ) - ) - )) - ,)) - ] + )) + ,)) + ] + ) ) ); } @@ -1402,7 +1365,7 @@ class _MyHomePageState extends State { ValueListenableBuilder(valueListenable: G.pageIndex, builder: (context, value, child) { return IndexedStack(index: G.pageIndex.value, children: const [TerminalPage(), Padding( padding: EdgeInsets.all(8), - child: Scrollbar(child: SingleChildScrollView(restorationId: "control-scroll", child: Column( + child: AspectRatioMax1To1(child: Scrollbar(child: SingleChildScrollView(restorationId: "control-scroll", child: Column( children: [ Padding( padding: EdgeInsets.all(16), @@ -1422,7 +1385,7 @@ class _MyHomePageState extends State { ]) ))) ] - ))) + )))) )]); }):const LoadingPage(), bottomNavigationBar: ValueListenableBuilder(valueListenable: G.pageIndex, builder:(context, value, child) { diff --git a/lib/workflow.dart b/lib/workflow.dart index 5ca6801..4ad02b8 100644 --- a/lib/workflow.dart +++ b/lib/workflow.dart @@ -84,11 +84,10 @@ class Util { //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 是否开启高分辨率 + //bool isJpEnabled = false 是否切换系统到日语 //bool useAvnc = false 是否默认使用AVNC //String defaultHidpiOpt 默认HiDPI环境变量 //? int bootstrapVersion: 启动包版本 @@ -111,13 +110,12 @@ class Util { 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 "turnip" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false); case "dri3" : 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 "isJpEnabled" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(false); case "useAvnc" : return b ? G.prefs.getBool(key)! : (value){G.prefs.setBool(key, value); return value;}(true); case "useX11" : 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"); @@ -324,7 +322,10 @@ bilibili客户端等等不可用 就可以访问设备存储 要访问整个设备存储可以访问sd文件夹 此外主文件夹的很多文件夹与设备文件夹绑定 -比如主文件夹的下载文件夹就是设备的下载文件夹"""}, +比如主文件夹的下载文件夹就是设备的下载文件夹 + +另外!任何支持SAF的安卓软件 +都可以在不打开小小电脑的情况下直接访问小小电脑的文件"""}, {"q":"如何访问SD卡文件?", "a":"""首先用其他文件管理器查看SD卡路径 (通常为/storage/xxxx...) 然后把该地址输入到小小电脑的文件管理器回车即可 @@ -335,7 +336,7 @@ bilibili客户端等等不可用 {"q":"自带的火狐浏览器无法下载文件", "a":"""检查是否授予小小电脑存储权限 火狐下载的文件会保存在设备的下载文件夹 -如果不想授予存储权限也可在火狐的设置里更改下载文件夹"""}, +如果不想授予存储权限也可在火狐的设置里更改下载文件保存位置"""}, {"q":"安装更多软件?", "a":"""本软件的初衷是作为PC应用引擎的平替 所以我不会提供安装除WPS等软件外的帮助 另外你需要一些Linux系统使用经验 @@ -366,12 +367,19 @@ VSCode、输入法 强烈建议不要使用安卓中文输入法直接输入中文 而是使用英文键盘通过容器的输入法(Ctrl+空格切换)输入中文 避免丢字错字"""}, + {"q":"外接鼠标移不到边缘", "a":"""最可能的情况是 +你的设备使用手势控制而不是三大金刚键 +边缘是系统留给你手势操作用的 +大概没什么办法 +不过也许可以双指捏合使屏幕范围稍微变小一点?"""}, {"q":"镜像正在同步", "a":"""偶尔会出现这种情况 一段时间后就会同步完成 请几个小时后再试一次"""}, {"q":"找不到sys/cdefs.h", "a":"""点击上面无法编译C语言程序的快捷指令"""}, - {"q":"安装box86/box64/wine很慢", "a":"""请尝试使用魔法"""}, + {"q":"安装一些软件很慢", "a":"""请尝试使用魔法"""}, + {"q":"联发科处理器可以用吗?", "a":"""联发科处理器只是没有成熟的开源图形驱动供加速而已 +不考虑速度的话都能用的"""}, ]; //默认快捷指令 @@ -396,31 +404,32 @@ rm /tmp/wps.deb"""}, {"name":"卸载亿图图示", "command":"sudo apt autoremove --purge -y edrawmax libldap-2.4-2"}, {"name":"安装QQ", "command":"""wget \$(curl -L https://cdn-go.cn/qq-web/im.qq.com_new/latest/rainbow/linuxQQDownload.js | grep -oP '(?<=armDownloadUrl":\\{"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":"卸载QQ", "command":"sudo apt autoremove --purge -y linuxqq"}, - {"name":"安装UOS微信", "command":"wget https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_1.0.0.241_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 && ln -sf /opt/apps/com.tencent.wechat/entries/applications/com.tencent.wechat.desktop /usr/share/applications/com.tencent.wechat.desktop && ln -sf /opt/apps/com.tencent.wechat/entries/icons/hicolor /usr/share/icons/wechat && sed -i 's#/usr/bin/wechat#/opt/apps/com.tencent.wechat/files/wechat --no-sandbox#g' /usr/share/applications/com.tencent.wechat.desktop && echo '该微信为UOS特供版,只有账号实名且在UOS系统上运行时可用。在使用前请前往全局设置开启UOS伪装。\n如果你使用微信只是为了传输文件,那么可以考虑使用支持SAF的文件管理器(如:质感文件),直接访问小小电脑所有文件。'; rm /tmp/wechat.deb"}, - {"name":"卸载UOS微信", "command":"sudo apt autoremove --purge -y com.tencent.wechat deepin-elf-verify && rm /usr/share/applications/com.tencent.wechat.desktop && rm /usr/share/icons/wechat"}, + {"name":"安装微信", "command":"wget https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.deb -O /tmp/wechat.deb && sudo apt update && sudo apt install -y /tmp/wechat.deb && echo '安装完成。如果你使用微信只是为了传输文件,那么可以考虑使用支持SAF的文件管理器(如:质感文件),直接访问小小电脑所有文件。'; rm /tmp/wechat.deb"}, + {"name":"卸载微信", "command":"sudo apt autoremove --purge -y wechat"}, {"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 libglut3.12 libglu1-mesa && 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":"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 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":"sudo apt clean"}, {"name":"关机", "command":"stopvnc\nexit\nexit"}, {"name":"???", "command":"timeout 8 cmatrix"} ]; //默认wine快捷指令 - static const wineCommands = [{"name":"wine配置", "command":"wine64 winecfg"}, - {"name":"修复方块字", "command":"wine64 regedit Z:\\\\home\\\\tiny\\\\.local\\\\share\\\\tiny\\\\extra\\\\chn_fonts.reg && wine64 reg delete \"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes\" /va /f"}, - {"name":"开始菜单文件夹", "command":"wine64 explorer \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\""}, - {"name":"我的电脑", "command":"wine64 explorer"}, - {"name":"记事本", "command":"wine64 notepad"}, - {"name":"扫雷", "command":"wine64 winemine"}, - {"name":"注册表", "command":"wine64 regedit"}, - {"name":"控制面板", "command":"wine64 control"}, - {"name":"文件管理器", "command":"wine64 winefile"}, - {"name":"任务管理器", "command":"wine64 taskmgr"}, - {"name":"ie浏览器", "command":"wine64 iexplore"}, - {"name":"强制关闭wine", "command":"wineserver -k"} + static const wineCommands = [{"name":"Wine配置", "command":"winecfg"}, + {"name":"修复方块字", "command":"regedit Z:\\\\home\\\\tiny\\\\.local\\\\share\\\\tiny\\\\extra\\\\chn_fonts.reg && wine reg delete \"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes\" /va /f"}, + {"name":"开始菜单文件夹", "command":"wine explorer \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\""}, + {"name":"我的电脑", "command":"wine explorer"}, + {"name":"记事本", "command":"notepad"}, + {"name":"扫雷", "command":"winemine"}, + {"name":"注册表", "command":"regedit"}, + {"name":"控制面板", "command":"wine control"}, + {"name":"文件管理器", "command":"winefile"}, + {"name":"任务管理器", "command":"wine taskmgr"}, + {"name":"IE浏览器", "command":"wine iexplore"}, + {"name":"强制关闭Wine", "command":"wineserver -k"} ]; //默认小键盘 @@ -543,9 +552,6 @@ class G { 常见问题:"""); //帮助页的说明文字 static String postCommand = ""; //第一次进入容器时额外运行的命令 - - static bool wasBoxEnabled = false; //本次启动时是否启用了box86/64 - static bool wasWineEnabled = false; //本次启动时是否启用了wine static bool wasAvncEnabled = false; static bool wasX11Enabled = false; @@ -736,10 +742,6 @@ exit } static Future launchCurrentContainer() async { - String box86BinPath = ""; - String box64BinPath = ""; - String box86LibraryPath = ""; - String box64LibraryPath = ""; String extraMount = ""; //mount options and other proot options String extraOpt = ""; if (Util.getGlobal("getifaddrsBridge")) { @@ -766,29 +768,10 @@ ${G.dataPath}/bin/virgl_test_server ${Util.getGlobal("defaultVirglCommand")}""") extraOpt += "MESA_VK_WSI_DEBUG=sw "; } } - 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/extra/XiaolaiMonoSC-Regular.ttf:/usr/share/fonts/truetype/XiaolaiMonoSC-Regular.ttf "; - //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 "; + if (Util.getGlobal("isJpEnabled")) { + extraOpt += "LANG=ja_JP.UTF-8 "; } + extraMount += "--mount=\$DATA_DIR/tiny/extra/XiaolaiMonoSC-Regular.ttf:/usr/share/fonts/truetype/XiaolaiMonoSC-Regular.ttf "; Util.termWrite( """ export DATA_DIR=${G.dataPath} @@ -802,7 +785,7 @@ export PROOT_LOADER=\$DATA_DIR/libexec/proot/loader export PROOT_LOADER_32=\$DATA_DIR/libexec/proot/loader32 ${Util.getCurrentProp("boot")} ${G.postCommand} -${(Util.getGlobal("autoLaunchVnc") as bool)?((Util.getGlobal("useX11") as bool)?"bash /etc/X11/xinit/Xsession &>~/.vnc/x.log &":Util.getCurrentProp("vnc")):""} +${(Util.getGlobal("autoLaunchVnc") as bool)?((Util.getGlobal("useX11") as bool)?"""mkdir -p "\$HOME/.vnc" && bash /etc/X11/xinit/Xsession &> "\$HOME/.vnc/x.log" &""":Util.getCurrentProp("vnc")):""} clear"""); } diff --git a/pubspec.lock b/pubspec.lock index 037a51d..8527e40 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" dbus: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: a7fd703482b391a87d60b6061d04dfdeab07826b96f9abd8f5ed98068acc0074 + sha256: f545ffbadee826f26f2e1a0f0cbd667ae9a6011cc0f77c0f8f00a969655e6e95 url: "https://pub.dev" source: hosted - version: "10.1.2" + version: "11.1.1" device_info_plus_platform_interface: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" flutter: dependency: "direct main" description: flutter @@ -154,10 +154,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_pty: dependency: "direct main" description: @@ -228,10 +228,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" matcher: dependency: transitive description: @@ -260,10 +260,10 @@ packages: dependency: "direct main" description: name: network_info_plus - sha256: "6a31fa47c1f6e240f1b60de0a57d65a092ac1af7515247660f03643576984eb8" + sha256: bf9e39e523e9951d741868dc33ac386b0bc24301e9b7c8a7d60dbc34879150a8 url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.1.1" network_info_plus_platform_interface: dependency: transitive description: @@ -284,10 +284,10 @@ packages: dependency: transitive description: name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: @@ -308,18 +308,18 @@ packages: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -364,10 +364,10 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa" + sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1" url: "https://pub.dev" source: hosted - version: "12.0.12" + version: "12.0.13" permission_handler_apple: dependency: transitive description: @@ -412,10 +412,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -444,26 +444,26 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" + sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: @@ -553,26 +553,26 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.3.10" + version: "6.3.14" url_launcher_ios: dependency: transitive description: @@ -593,10 +593,10 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.1" url_launcher_platform_interface: dependency: transitive description: @@ -617,10 +617,10 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" vector_math: dependency: transitive description: @@ -657,26 +657,26 @@ packages: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" webview_flutter: dependency: "direct main" description: name: webview_flutter - sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "4.10.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: "6e64fcb1c19d92024da8f33503aaeeda35825d77142c01d0ea2aa32edc79fdc8" + sha256: dec83a8da0a2dcd8a25418534cc59348dbc2855fa1dd0cc929c62b6029fde392 url: "https://pub.dev" source: hosted - version: "3.16.7" + version: "4.0.1" webview_flutter_platform_interface: dependency: transitive description: @@ -689,18 +689,18 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "1942a12224ab31e9508cf00c0c6347b931b023b8a4f0811e5dec3b06f94f117d" + sha256: f14ee08021772fed913da8daebcfdeb46be457081e521e93e9918fe6cd1ce9e8 url: "https://pub.dev" source: hosted - version: "3.15.0" + version: "3.16.1" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.8.0" win32_registry: dependency: transitive description: @@ -713,10 +713,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d4b08c3..b06fbc3 100644 --- a/pubspec.yaml +++ b/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 # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.18+14 +version: 1.0.19+15 environment: sdk: '>=3.1.0 <4.0.0' @@ -32,20 +32,20 @@ dependencies: sdk: flutter xterm: ^4.0.0 flutter_pty: ^0.4.1 - path_provider: ^2.1.4 - webview_flutter: ^4.9.0 + path_provider: ^2.1.5 + webview_flutter: ^4.10.0 permission_handler: ^11.3.1 http: ^1.2.2 retry: ^3.1.2 - url_launcher: ^6.3.0 - shared_preferences: ^2.3.2 + url_launcher: ^6.3.1 + shared_preferences: ^2.3.3 intl: ^0.19.0 #日期字符串转换 clipboard: ^0.1.3 ffmpeg_kit_flutter_full_gpl: ^6.0.3 wakelock_plus: ^1.2.8 dynamic_color: ^1.7.0 - network_info_plus: ^6.0.1 - device_info_plus: ^10.1.2 + network_info_plus: ^6.1.1 + device_info_plus: ^11.1.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -60,7 +60,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec