diff --git a/resources/build.ps1 b/resources/build.ps1 index 1aa109e..42d1c51 100644 --- a/resources/build.ps1 +++ b/resources/build.ps1 @@ -16,8 +16,16 @@ $ffmpegRoot = "$librariesPath\ffmpeg-6.1.1-full_build-shared" $projectPath = Get-Location $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" function Build() {