Files
xianyan/scripts/fix_dart_aot_path.ps1
Developer f9c19463f9 chore: 批量更新v6.5.21版本,整合多项功能修复与优化
主要变更:
1. 新增多风格音效资源与管理文档
2. 修复翻译服务空响应处理与Dio日志异常捕获
3. 完善Web端平台适配与路径获取Stub
4. 优化设备配对与文件传输功能
5. 新增角色命名常量与摇一摇检测器
6. 修复Riverpod dispose与鸿蒙导航路由
7. 新增每日通知服务与流体着色器
8. 优化备份服务与数据管理页面
9. 新增隐私设置附近设备发现选项
10. 重构诗词提供者支持历史记录
11. 完善桌面端构建配置与开发脚本
12. 清理旧版工具部署脚本
2026-05-21 00:19:14 +08:00

42 lines
1.7 KiB
PowerShell

$ErrorActionPreference = 'Stop'
$pluginManagerPath = "$env:LOCALAPPDATA\.dartServer\.plugin_manager"
$junctionTarget = "C:\DartPluginCache"
Write-Output "=== Dart AOT 中文路径修复工具 ==="
Write-Output ""
Write-Output "问题: 用户路径包含中文字符导致 Dart 分析器 AOT 编译失败"
Write-Output " 当前路径: $pluginManagerPath"
Write-Output " 目标路径: $junctionTarget"
Write-Output ""
if (!(Test-Path $junctionTarget)) {
New-Item -ItemType Directory -Path $junctionTarget -Force | Out-Null
Write-Output "[1/3] 创建目标目录: $junctionTarget"
} else {
Write-Output "[1/3] 目标目录已存在: $junctionTarget"
}
if (Test-Path $pluginManagerPath) {
$isJunction = (Get-Item $pluginManagerPath).Attributes -band [IO.FileAttributes]::ReparsePoint
if ($isJunction) {
Write-Output "[2/3] 联接已存在,跳过"
} else {
$backupPath = "$pluginManagerPath.bak"
if (Test-Path $backupPath) { Remove-Item -Recurse -Force $backupPath }
Move-Item -Path $pluginManagerPath -Destination $backupPath -Force
Write-Output "[2/3] 备份原目录到: $backupPath"
New-Item -ItemType Junction -Path $pluginManagerPath -Target $junctionTarget | Out-Null
Write-Output "[2/3] 创建联接: $pluginManagerPath -> $junctionTarget"
}
} else {
$parentDir = Split-Path $pluginManagerPath -Parent
if (!(Test-Path $parentDir)) { New-Item -ItemType Directory -Path $parentDir -Force | Out-Null }
New-Item -ItemType Junction -Path $pluginManagerPath -Target $junctionTarget | Out-Null
Write-Output "[2/3] 创建联接: $pluginManagerPath -> $junctionTarget"
}
Write-Output "[3/3] 修复完成!"
Write-Output ""
Write-Output "请重启 VS Code / IDE 使更改生效"