mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-21 00:45:49 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83a544acda | ||
|
|
c80be46909 | ||
|
|
90be3dc9ee | ||
|
|
45d60d6519 | ||
|
|
d8b4390c03 | ||
|
|
0e186e93f7 |
@@ -4,8 +4,8 @@ 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="10.6.1"
|
||||
hangover_url="https://github.com/AndreRH/hangover/releases/download/hangover-10.10.1/hangover_10.10.1_debian12_bookworm_arm64.tar"
|
||||
latest_version="10.10.1"
|
||||
|
||||
mirror_sites=(
|
||||
"https://gh.llkk.cc/"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"installHangoverLatest": "Install Hangover Latest (may fail)",
|
||||
"uninstallHangover": "Uninstall Hangover",
|
||||
"clearWineData": "Clear Wine Data",
|
||||
"wineCommandsHint": "Common Wine commands. Click to launch GUI and wait patiently.\n\nTypical launch times:\nTiger T7510 6GB: over 1 minute\nSnapdragon 870 12GB: ~10 seconds",
|
||||
"wineCommandsHint": "Common Wine commands. Click to launch GUI and wait patiently.\n\nNote: DXVK is enabled by default. If the program crashes, try disabling it.\n\nTypical launch times:\nTiger T7510 6GB: over 1 minute\nSnapdragon 870 12GB: ~10 seconds",
|
||||
"switchToJapanese": "Switch System to Japanese",
|
||||
"userManual": "User Manual",
|
||||
"openSourceLicenses": "Open Source Licenses",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"installHangoverLatest": "安装Hangover最新版(可能出错)",
|
||||
"uninstallHangover": "卸载Hangover",
|
||||
"clearWineData": "清空Wine数据",
|
||||
"wineCommandsHint": "Wine的常用指令。点击后前往图形界面耐心等待。\n\n任意程序启动参考时间:\n虎贲T7510 6GB 超过一分钟\n骁龙870 12GB 约10秒\n",
|
||||
"wineCommandsHint": "Wine的常用指令。点击后前往图形界面耐心等待。\n\n注:DXVK默认为开启状态,如程序崩溃可尝试关闭\n\n任意程序启动参考时间:\n虎贲T7510 6GB 超过一分钟\n骁龙870 12GB 约10秒\n",
|
||||
"switchToJapanese": "切换系统到日语",
|
||||
"userManual": "使用说明",
|
||||
"openSourceLicenses": "开源许可",
|
||||
|
||||
102
lib/l10n/intl_zh_Hant.arb
Normal file
102
lib/l10n/intl_zh_Hant.arb
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"appTitle": "小小電腦",
|
||||
"advancedSettings": "進階設定",
|
||||
"restartAfterChange": "修改後需重新啟動才會生效",
|
||||
"resetStartupCommand": "重設啟動指令",
|
||||
"attention": "注意",
|
||||
"confirmResetCommand": "是否重設啟動指令?",
|
||||
"cancel": "取消",
|
||||
"yes": "是",
|
||||
"signal9ErrorPage": "Signal9 錯誤頁面",
|
||||
"containerName": "容器名稱",
|
||||
"startupCommand": "啟動指令",
|
||||
"vncStartupCommand": "vnc 啟動指令",
|
||||
"shareUsageHint": "你可以在當前所有同一網路下的裝置(如:連接同一 WiFi 的手機、電腦等)裡使用小小電腦。\n\n點擊下面的按鈕分享連結到其他裝置。",
|
||||
"copyShareLink": "複製分享連結",
|
||||
"x11InvalidHint": "使用 X11 時此功能無效",
|
||||
"cannotGetIpAddress": "無法取得 IP 位址",
|
||||
"shareLinkCopied": "已複製分享連結",
|
||||
"webRedirectUrl": "網頁跳轉位址",
|
||||
"vncLink": "vnc 連結",
|
||||
"globalSettings": "全域設定",
|
||||
"enableTerminalEditing": "在這裡開啟終端編輯",
|
||||
"terminalMaxLines": "終端最大行數(重啟軟體生效)",
|
||||
"pulseaudioPort": "pulseaudio 接收端口",
|
||||
"enableTerminal": "啟用終端",
|
||||
"enableTerminalKeypad": "啟用終端小鍵盤",
|
||||
"terminalStickyKeys": "終端黏滯鍵",
|
||||
"keepScreenOn": "螢幕常亮",
|
||||
"restartRequiredHint": "以下選項修改後將於下次啟動軟體時生效。",
|
||||
"startWithGUI": "啟動時啟動圖形介面",
|
||||
"reinstallBootPackage": "重新安裝啟動套件",
|
||||
"getifaddrsBridge": "getifaddrs 橋接",
|
||||
"fixGetifaddrsPermission": "修復 Android 13 裝置 getifaddrs 無權限",
|
||||
"fakeUOSSystem": "偽裝系統為 UOS",
|
||||
"displaySettings": "顯示設定",
|
||||
"avncAdvantages": "AVNC 可帶來比 noVNC 更好的操作體驗;如觸控板觸控、雙指單擊喚出鍵盤、自動剪貼簿、畫中畫模式等。這是一個實驗性功能。",
|
||||
"avncSettings": "AVNC 設定",
|
||||
"aboutAVNC": "關於 AVNC",
|
||||
"avncResolution": "AVNC 啟動時解析度設定",
|
||||
"resolutionSettings": "解析度設定",
|
||||
"deviceScreenResolution": "你的裝置螢幕解析度為",
|
||||
"width": "寬",
|
||||
"height": "高",
|
||||
"applyOnNextLaunch": "下次啟動時生效",
|
||||
"save": "儲存",
|
||||
"useAVNCByDefault": "預設使用 AVNC",
|
||||
"termuxX11Advantages": "Termux:X11 可帶來比 VNC 更快的速度,有時兼容性也更好。\n支援使用 DRI3(需在圖形加速中開啟),可大幅提升效能。",
|
||||
"termuxX11Preferences": "Termux:X11 偏好設定",
|
||||
"useTermuxX11ByDefault": "預設使用 Termux:X11",
|
||||
"disableVNC": "停用 VNC。重啟生效",
|
||||
"hidpiAdvantages": "高解析度支援可讓有高解析度螢幕的裝置獲得更清晰的體驗!\n\n注意:\n啟用後顯示會變很大,請設定合適的解析度。",
|
||||
"hidpiEnvVar": "HiDPI 環境變數",
|
||||
"hidpiSupport": "高解析度支援",
|
||||
"fileAccess": "檔案存取",
|
||||
"fileAccessHint": "在此處取得更多檔案權限,以便存取特殊目錄。",
|
||||
"requestStoragePermission": "申請儲存權限",
|
||||
"requestAllFilesAccess": "申請所有檔案存取權限",
|
||||
"graphicsAcceleration": "圖形加速",
|
||||
"experimentalFeature": "實驗性功能",
|
||||
"graphicsAccelerationHint": "圖形加速可部分利用裝置 GPU 增強系統圖形效能,但因裝置差異可能導致容器系統與軟體執行不穩或異常退出。\n請酌情開啟。",
|
||||
"virglServerParams": "Virgl 伺服器參數",
|
||||
"virglEnvVar": "Virgl 環境變數",
|
||||
"enableVirgl": "啟用 Virgl 加速",
|
||||
"turnipAdvantages": "搭載 Adreno GPU 的裝置通常可用 Turnip 驅動加速 Vulkan 軟體。配合 Zink 驅動可加速 OpenGL 軟體。\n(即搭載不是太新的 Adreno GPU 的裝置可用)",
|
||||
"turnipEnvVar": "Turnip 環境變數",
|
||||
"enableTurnipZink": "啟用 Turnip+Zink 驅動",
|
||||
"enableDRI3": "啟用 DRI3",
|
||||
"dri3Requirement": "DRI3 必須配合 Termux:X11 與 Turnip 使用",
|
||||
"windowsAppSupport": "Windows 應用支援",
|
||||
"hangoverDescription": "使用 Hangover(於原生 Wine 執行跨架構應用)來執行 Windows 應用!\n\n執行 Windows 程式需經過架構與系統雙層模擬,請勿對速度抱太大期望。",
|
||||
"installHangoverStable": "安裝 Hangover 穩定版",
|
||||
"installHangoverLatest": "安裝 Hangover 最新版(可能有錯誤)",
|
||||
"uninstallHangover": "解除安裝 Hangover",
|
||||
"clearWineData": "清除 Wine 資料",
|
||||
"wineCommandsHint": "Wine 常用指令。點擊後進入圖形介面,請耐心等候。\n\n註:DXVK預設為開啟狀態,如程式崩潰可嘗試關閉\n\n不同裝置啟動程式參考時間:\n虎賁 T7510 6GB 超過一分鐘\n驍龍 870 12GB 約 10 秒\n",
|
||||
"switchToJapanese": "切換系統為日語",
|
||||
"userManual": "使用說明",
|
||||
"openSourceLicenses": "開源授權",
|
||||
"permissionUsage": "權限使用說明",
|
||||
"privacyStatement": "\n本軟體不會收集你的隱私資訊。\n\n當然,你在容器系統內安裝或使用的軟體行為(包括快捷指令)不在本軟體控制範圍。",
|
||||
"supportAuthor": "支持作者",
|
||||
"recommendApp": "如果覺得好用,可以推薦給其他人哦!",
|
||||
"projectUrl": "專案網址",
|
||||
"commandEdit": "指令編輯",
|
||||
"commandName": "指令名稱",
|
||||
"commandContent": "指令內容",
|
||||
"deleteItem": "刪除此項",
|
||||
"add": "新增",
|
||||
"resetCommand": "重設指令",
|
||||
"confirmResetAllCommands": "是否重設所有快捷指令?",
|
||||
"addShortcutCommand": "新增快捷指令",
|
||||
"terminal": "終端",
|
||||
"control": "控制",
|
||||
"enterGUI": "進入圖形介面",
|
||||
"enterNumber": "請輸入數字",
|
||||
"enterValidNumber": "請輸入有效數字",
|
||||
"installingBootPackage": "正在安裝啟動套件",
|
||||
"copyingContainerSystem": "正在複製容器系統",
|
||||
"installingContainerSystem": "正在安裝容器系統",
|
||||
"installationComplete": "安裝完成",
|
||||
"reinstallingBootPackage": "正在重新安裝啟動套件"
|
||||
}
|
||||
@@ -55,7 +55,30 @@ class MyApp extends StatelessWidget {
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale('en'),
|
||||
Locale('zh'),
|
||||
Locale.fromSubtags(languageCode: 'zh'), // generic Chinese 'zh'
|
||||
Locale.fromSubtags(
|
||||
languageCode: 'zh',
|
||||
scriptCode: 'Hans',
|
||||
), // generic simplified Chinese 'zh_Hans'
|
||||
Locale.fromSubtags(
|
||||
languageCode: 'zh',
|
||||
scriptCode: 'Hant',
|
||||
), // generic traditional Chinese 'zh_Hant'
|
||||
Locale.fromSubtags(
|
||||
languageCode: 'zh',
|
||||
scriptCode: 'Hans',
|
||||
countryCode: 'CN',
|
||||
), // 'zh_Hans_CN'
|
||||
Locale.fromSubtags(
|
||||
languageCode: 'zh',
|
||||
scriptCode: 'Hant',
|
||||
countryCode: 'TW',
|
||||
), // 'zh_Hant_TW'
|
||||
Locale.fromSubtags(
|
||||
languageCode: 'zh',
|
||||
scriptCode: 'Hant',
|
||||
countryCode: 'HK',
|
||||
), // 'zh_Hant_HK'
|
||||
],
|
||||
theme: ThemeData(
|
||||
colorScheme: lightDynamic,
|
||||
@@ -485,7 +508,7 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)""");
|
||||
Text(AppLocalizations.of(context)!.hangoverDescription),
|
||||
const SizedBox.square(dimension: 8),
|
||||
Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: [
|
||||
OutlinedButton(style: D.commandButtonStyle, child: Text("${AppLocalizations.of(context)!.installHangoverStable}(10.6.1)"), onPressed: () async {
|
||||
OutlinedButton(style: D.commandButtonStyle, child: Text("${AppLocalizations.of(context)!.installHangoverStable}(10.10.1)"), onPressed: () async {
|
||||
Util.termWrite("bash ~/.local/share/tiny/extra/install-hangover-stable");
|
||||
G.pageIndex.value = 0;
|
||||
}),
|
||||
|
||||
@@ -189,9 +189,27 @@ class Util {
|
||||
return null;
|
||||
}
|
||||
|
||||
//获取预制可执行文件路径
|
||||
static String elf(String value) {
|
||||
return "applib/libexec_$value.so";
|
||||
static Future<bool> isXServerReady(String host, int port, {int timeoutSeconds = 5}) async {
|
||||
try {
|
||||
final socket = await Socket.connect(host, port, timeout: Duration(seconds: timeoutSeconds));
|
||||
await socket.close();
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> waitForXServer() async {
|
||||
const host = '127.0.0.1';
|
||||
const port = 7897;
|
||||
|
||||
while (true) {
|
||||
bool isReady = await isXServerReady(host, port);
|
||||
if (isReady) {
|
||||
return;
|
||||
}
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -613,6 +631,8 @@ export DATA_DIR=${G.dataPath}
|
||||
export LD_LIBRARY_PATH=\$DATA_DIR/lib
|
||||
cd \$DATA_DIR
|
||||
ln -sf ../applib/libexec_busybox.so \$DATA_DIR/bin/busybox
|
||||
ln -sf ../applib/libexec_busybox.so \$DATA_DIR/bin/sh
|
||||
ln -sf ../applib/libexec_busybox.so \$DATA_DIR/bin/cat
|
||||
ln -sf ../applib/libexec_busybox.so \$DATA_DIR/bin/xz
|
||||
ln -sf ../applib/libexec_busybox.so \$DATA_DIR/bin/gzip
|
||||
ln -sf ../applib/libexec_proot.so \$DATA_DIR/bin/proot
|
||||
@@ -654,6 +674,7 @@ chmod 1777 tmp
|
||||
await Util.execute(
|
||||
"""
|
||||
export DATA_DIR=${G.dataPath}
|
||||
export PATH=\$DATA_DIR/bin:\$PATH
|
||||
export LD_LIBRARY_PATH=\$DATA_DIR/lib
|
||||
export CONTAINER_DIR=\$DATA_DIR/containers/0
|
||||
export EXTRA_OPT=""
|
||||
@@ -754,6 +775,7 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)""";
|
||||
);
|
||||
G.audioPty!.write(const Utf8Encoder().convert("""
|
||||
export DATA_DIR=${G.dataPath}
|
||||
export PATH=\$DATA_DIR/bin:\$PATH
|
||||
export LD_LIBRARY_PATH=\$DATA_DIR/lib
|
||||
\$DATA_DIR/bin/busybox sed "s/4713/${Util.getGlobal("defaultAudioPort") as int}/g" \$DATA_DIR/bin/pulseaudio.conf > \$DATA_DIR/bin/pulseaudio.conf.tmp
|
||||
rm -rf \$DATA_DIR/pulseaudio_tmp/*
|
||||
@@ -780,6 +802,7 @@ exit
|
||||
if (Util.getGlobal("virgl")) {
|
||||
Util.execute("""
|
||||
export DATA_DIR=${G.dataPath}
|
||||
export PATH=\$DATA_DIR/bin:\$PATH
|
||||
export LD_LIBRARY_PATH=\$DATA_DIR/lib
|
||||
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
|
||||
${G.dataPath}/bin/virgl_test_server ${Util.getGlobal("defaultVirglCommand")}""");
|
||||
@@ -799,6 +822,7 @@ ${G.dataPath}/bin/virgl_test_server ${Util.getGlobal("defaultVirglCommand")}""")
|
||||
Util.termWrite(
|
||||
"""
|
||||
export DATA_DIR=${G.dataPath}
|
||||
export PATH=\$DATA_DIR/bin:\$PATH
|
||||
export LD_LIBRARY_PATH=\$DATA_DIR/lib
|
||||
export CONTAINER_DIR=\$DATA_DIR/containers/${G.currentContainer}
|
||||
export EXTRA_MOUNT="$extraMount"
|
||||
@@ -871,6 +895,7 @@ clear""");
|
||||
launchCurrentContainer();
|
||||
if (Util.getGlobal("autoLaunchVnc") as bool) {
|
||||
if (G.wasX11Enabled) {
|
||||
await Util.waitForXServer();
|
||||
launchX11();
|
||||
return;
|
||||
}
|
||||
|
||||
10
pubspec.lock
10
pubspec.lock
@@ -77,18 +77,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53"
|
||||
sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.4.0"
|
||||
version: "11.5.0"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus_platform_interface
|
||||
sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2"
|
||||
sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.2"
|
||||
version: "7.0.3"
|
||||
dynamic_color:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -732,4 +732,4 @@ packages:
|
||||
version: "0.0.6"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
flutter: ">=3.27.0"
|
||||
flutter: ">=3.29.0"
|
||||
|
||||
@@ -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.23+18
|
||||
version: 1.0.24+19
|
||||
|
||||
environment:
|
||||
sdk: '>=3.1.0 <4.0.0'
|
||||
@@ -43,7 +43,7 @@ dependencies:
|
||||
wakelock_plus: ^1.3.2
|
||||
dynamic_color: ^1.7.0
|
||||
network_info_plus: ^6.1.4
|
||||
device_info_plus: ^11.4.0
|
||||
device_info_plus: ^11.5.0
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
intl: any
|
||||
|
||||
Reference in New Issue
Block a user