ci(workflow): 用批处理脚本替换powershell脚本复制libcore文件

简化CI流程中的文件复制操作,使用更简洁的批处理脚本替代原有的powershell脚本
This commit is contained in:
2025-11-07 00:39:16 -08:00
parent 51ed02de1a
commit b47e0e984e
2 changed files with 35 additions and 33 deletions
+2 -33
View File
@@ -128,39 +128,8 @@ jobs:
path: .
- name: 🔧 复制 libcore 文件到正确位置并重命名
shell: powershell
run: |
Write-Host "📋 复制 libcore 文件..."
# 创建目标目录
New-Item -ItemType Directory -Force -Path libcore/bin
$exeFiles = Get-ChildItem -Recurse -Filter "HiddifyCli.exe" -ErrorAction SilentlyContinue
if ($exeFiles) {
$sourceExe = $exeFiles[0].FullName
Write-Host "✅ 找到 HiddifyCli.exe: $sourceExe"
Write-Host "📝 复制并重命名为 BearVPNCli.exe"
Copy-Item $sourceExe libcore/bin/BearVPNCli.exe
Write-Host "✅ 重命名完成:HiddifyCli.exe → BearVPNCli.exe"
} else {
Write-Host "⚠️ 未找到 HiddifyCli.exe"
}
# 复制 libcore.dll
$dllFiles = Get-ChildItem -Recurse -Filter "libcore.dll" -ErrorAction SilentlyContinue
if ($dllFiles) {
$sourceDll = $dllFiles[0].FullName
Write-Host "✅ 找到 libcore.dll: $sourceDll"
Copy-Item $sourceDll libcore/bin/libcore.dll
} else {
Write-Host "⚠️ 未找到 libcore.dll"
}
Write-Host ""
Write-Host "📄 验证文件:"
if (Test-Path libcore/bin) {
Get-ChildItem libcore/bin -ErrorAction SilentlyContinue | Format-Table Name, Length
}
shell: cmd
run: call copy_libcore.bat
- name: Setup Flutter
uses: subosito/flutter-action@v2