Compare commits

..

2 Commits

Author SHA1 Message Date
ezequielnick
199ecd26dd fix: ENOENT: no such file or directory on MacOS 2025-09-08 17:27:43 +08:00
ezequielnick
23854a9666 fix: install fail on MacOS 2025-09-08 11:23:41 +08:00
5 changed files with 12 additions and 4 deletions

2
build/pkg-scripts/postinstall Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
set -e set -e
# 设置日志文件 # 设置日志文件

2
build/pkg-scripts/preinstall Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
set -e set -e
# 检查 root 权限 # 检查 root 权限

View File

@ -12,6 +12,7 @@
- 遗失的部分翻译 - 遗失的部分翻译
- 改名后潜在的 MacOS 安装失败 - 改名后潜在的 MacOS 安装失败
- 改名后 WinGet 上传失败 - 改名后 WinGet 上传失败
- MacOS 首次启动时的 ENOENT: no such file or directory
### 优化 (Optimize) ### 优化 (Optimize)
- socket 管理防止内核通信失败 - socket 管理防止内核通信失败

View File

@ -51,7 +51,7 @@ mac:
pkg: pkg:
allowAnywhere: false allowAnywhere: false
allowCurrentUserHome: false allowCurrentUserHome: false
installLocation: /Applications isRelocatable: false
background: background:
alignment: bottomleft alignment: bottomleft
file: build/background.png file: build/background.png

View File

@ -44,6 +44,8 @@ import { startSSIDCheck } from '../sys/ssid'
import i18next from '../../shared/i18n' import i18next from '../../shared/i18n'
import { initLogger } from './logger' import { initLogger } from './logger'
let isInitBasicCompleted = false
// 安全错误处理 // 安全错误处理
export function safeShowErrorBox(titleKey: string, message: string): void { export function safeShowErrorBox(titleKey: string, message: string): void {
let title: string let title: string
@ -350,16 +352,21 @@ function initDeeplink(): void {
// 基础初始化 // 基础初始化
export async function initBasic(): Promise<void> { export async function initBasic(): Promise<void> {
if (isInitBasicCompleted) {
return
}
await initDirs() await initDirs()
await initConfig() await initConfig()
await migration() await migration()
await migrateSubStoreFiles() await migrateSubStoreFiles()
await initFiles() await initFiles()
await cleanup() await cleanup()
isInitBasicCompleted = true
} }
export async function init(): Promise<void> { export async function init(): Promise<void> {
await initBasic()
await startSubStoreFrontendServer() await startSubStoreFrontendServer()
await startSubStoreBackendServer() await startSubStoreBackendServer()
const { sysProxy } = await getAppConfig() const { sysProxy } = await getAppConfig()