还是路径问题
(cherry picked from commit 0045992c45bcfd54db328f82d14b8bac33da9139)
This commit is contained in:
parent
ee20cc93e2
commit
4250f61345
4
.github/workflows/build-multiplatform.yml
vendored
4
.github/workflows/build-multiplatform.yml
vendored
@ -457,8 +457,10 @@ jobs:
|
||||
$exeFiles = Get-ChildItem -Path libcore_windows_temp -Recurse -Filter "HiddifyCli.exe" -ErrorAction SilentlyContinue
|
||||
if ($exeFiles) {
|
||||
$sourceExe = $exeFiles[0].FullName
|
||||
Write-Host "✅ 找到 HiddifyCli.exe: $sourceExe,重命名为 BearVPNCli.exe"
|
||||
Write-Host "✅ 找到 HiddifyCli.exe: $sourceExe"
|
||||
Write-Host "📝 复制并重命名为 BearVPNCli.exe"
|
||||
Copy-Item $sourceExe "libcore\bin\BearVPNCli.exe" -Force
|
||||
Write-Host "✅ 重命名完成:HiddifyCli.exe → BearVPNCli.exe"
|
||||
} else {
|
||||
Write-Host "⚠️ 未找到 HiddifyCli.exe(这不是致命错误)"
|
||||
}
|
||||
|
||||
37
.github/workflows/build-windows.yml
vendored
37
.github/workflows/build-windows.yml
vendored
@ -78,21 +78,38 @@ jobs:
|
||||
|
||||
- name: 🔧 复制 libcore 文件到正确位置并重命名
|
||||
run: |
|
||||
echo "📋 复制 libcore 文件..."
|
||||
Write-Host "📋 复制 libcore 文件..."
|
||||
|
||||
if (Test-Path "HiddifyCli.exe") {
|
||||
Write-Host "✅ 找到 HiddifyCli.exe,重命名为 BearVPNCli.exe"
|
||||
Copy-Item HiddifyCli.exe libcore\bin\BearVPNCli.exe
|
||||
# 创建目标目录
|
||||
New-Item -ItemType Directory -Force -Path libcore\bin
|
||||
|
||||
# 查找并复制 HiddifyCli.exe,重命名为 BearVPNCli.exe
|
||||
$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"
|
||||
}
|
||||
|
||||
if (Test-Path "libcore.dll") {
|
||||
Write-Host "✅ 找到 libcore.dll"
|
||||
New-Item -ItemType Directory -Force -Path libcore\bin
|
||||
Copy-Item libcore.dll libcore\bin\
|
||||
# 复制 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 "📄 验证文件..."
|
||||
Get-ChildItem libcore\bin\ -ErrorAction SilentlyContinue | Format-Table
|
||||
Write-Host ""
|
||||
Write-Host "📄 验证文件:"
|
||||
if (Test-Path libcore\bin) {
|
||||
Get-ChildItem libcore\bin\ -ErrorAction SilentlyContinue | Format-Table Name, Length
|
||||
}
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
|
||||
@ -102,7 +102,9 @@ install(FILES "../libcore/bin/libcore.dll"
|
||||
COMPONENT Runtime
|
||||
OPTIONAL)
|
||||
|
||||
# 安装 BearVPNCli.exe(保持原名)
|
||||
# 安装 BearVPNCli.exe(从 libcore/bin 复制并重命名)
|
||||
# 注意:libcore 编译的是 HiddifyCli.exe,打包脚本会自动重命名为 BearVPNCli.exe
|
||||
# 这里需要安装 BearVPNCli.exe,因为它已经被重命名了
|
||||
install(FILES "../libcore/bin/BearVPNCli.exe"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||
COMPONENT Runtime
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user