1 Star 0 Fork 0

晓空 / SakuraFrpLauncher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
publish_1.ps1 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
$version = Get-Content "SakuraLibrary\Consts.cs" | Select-String "Version = `"(.+)`";"
$version = $version.Matches[0].Groups[1].Value
$projects = "SakuraLibrary", "SakuraLauncher", "LegacyLauncher", "SakuraFrpService"
$libraryFiles = Get-ChildItem "SakuraLibrary\bin\Release" | ForEach-Object { $_.Name }
Remove-Item -Path "_publish" -Recurse -ErrorAction SilentlyContinue
New-Item -Name "_publish" -ItemType "directory" -ErrorAction SilentlyContinue
try {
Push-Location -Path "_publish"
Remove-Item -Path "sign" -Recurse -ErrorAction SilentlyContinue
New-Item -Name "sign" -ItemType "directory" -ErrorAction SilentlyContinue
New-Item -Name "debug" -ItemType "directory" -ErrorAction SilentlyContinue
foreach ($name in $projects) {
Remove-Item -Path $name -Recurse -ErrorAction SilentlyContinue
New-Item -Name $name -ItemType "directory" -ErrorAction SilentlyContinue
Get-ChildItem -Path "..\$name\bin\Release" | Where-Object {
$_.Name -notmatch "\.(xml|pdb)$" -and (
$name -eq "SakuraLibrary" -or $libraryFiles -notcontains $_.Name
)
} | Copy-Item -Recurse -Destination $name
Get-ChildItem -Path "..\$name\bin\Release" | Where-Object {
$_.Name -match "\.pdb$"
} | Copy-Item -Destination "debug"
Move-Item -Path "$name\$name.exe", "$name\$name.dll" -Destination "sign" -ErrorAction SilentlyContinue
}
Compress-Archive -Force -CompressionLevel Optimal -Path "debug\*" -DestinationPath "DebugSymbols.zip"
Compress-Archive -Force -CompressionLevel Optimal -Path "sign\*" -DestinationPath "sign_$version.zip"
# We don't sign frpc anymore, copy them after Compress-Archive
Copy-Item "..\bin\frpc_windows_*" "sign"
}
finally {
Pop-Location
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rcraft/SakuraFrpLauncher.git
git@gitee.com:rcraft/SakuraFrpLauncher.git
rcraft
SakuraFrpLauncher
SakuraFrpLauncher
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891