打包时显示版本号。

This commit is contained in:
luocai 2024-11-13 14:54:14 +08:00
parent 0b3198c90e
commit 51f9a2af52

View File

@ -16,8 +16,16 @@ $ffmpegRoot = "$librariesPath\ffmpeg-6.1.1-full_build-shared"
$projectPath = Get-Location $projectPath = Get-Location
$buildPath = Join-Path -Path $projectPath -ChildPath "build" $buildPath = Join-Path -Path $projectPath -ChildPath "build"
$deployPath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings"
$zipFilePath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings.zip" $fileContent = (Get-Content -Path "CMakeLists.txt") -join " "
if ($fileContent -match 'project\([^\)]+VERSION\s+([0-9]+\.[0-9]+)') {
$version = $Matches[1]
} else {
Write-Output "未找到版本号"
}
$deployPath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings_v$version"
$zipFilePath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings_v$version.zip"
$changelogPath = Join-Path -Path $buildPath -ChildPath "CHANGELOG.txt" $changelogPath = Join-Path -Path $buildPath -ChildPath "CHANGELOG.txt"
function Build() { function Build() {