From 51f9a2af5294bdd1227a33865ee029093a70e966 Mon Sep 17 00:00:00 2001 From: luocai Date: Wed, 13 Nov 2024 14:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/build.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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() {