diff --git a/.gitea/workflows/build_ubuntu.yaml b/.gitea/workflows/build_ubuntu.yaml index 2a4f111..2fdf59f 100644 --- a/.gitea/workflows/build_ubuntu.yaml +++ b/.gitea/workflows/build_ubuntu.yaml @@ -6,6 +6,10 @@ on: - '**' tags-ignore: - 'v*' + paths: + - '**.cpp' + - '**.h' + - '**.conf' jobs: Build: runs-on: [ubuntu-latest, ubuntu-24.04] diff --git a/.gitea/workflows/build_windows.yaml b/.gitea/workflows/build_windows.yaml index 6f6abee..3480302 100644 --- a/.gitea/workflows/build_windows.yaml +++ b/.gitea/workflows/build_windows.yaml @@ -5,6 +5,10 @@ on: - '**' tags-ignore: - 'v*' + paths: + - '**.cpp' + - '**.h' + - '**.conf' jobs: build: diff --git a/resources/7za.exe b/resources/7za.exe new file mode 100644 index 0000000..02c3f71 Binary files /dev/null and b/resources/7za.exe differ diff --git a/resources/build.ps1 b/resources/build.ps1 index 98dafb2..9f0e7b2 100644 --- a/resources/build.ps1 +++ b/resources/build.ps1 @@ -25,8 +25,7 @@ if ($fileContent -match 'project\([^\)]+VERSION\s+([0-9]+\.[0-9]+)') { Write-Output "未找到版本号" } -$deployPath = Join-Path -Path $buildPath -ChildPath "SmartLockerTools_v$version" -$zipFilePath = Join-Path -Path $buildPath -ChildPath "SmartLockerTools_v$version.zip" +$deployPath = Join-Path -Path $buildPath -ChildPath "掌静脉工具v$version" $changelogPath = Join-Path -Path $buildPath -ChildPath "CHANGELOG.txt" function Build() { @@ -62,6 +61,9 @@ function Deploy() { & $qtHome\bin\windeployqt.exe $deployPath\$oldName --qmldir=$qtHome\qml Rename-Item -Path $deployPath\$oldName -NewName $deployPath\$newName } + Remove-Item -Path $deployPath\Qt6Quick3D* + Remove-Item -Path $deployPath\translations -Recurse -Force # 暂时不需要翻译文件 + Remove-Item -Path $deployPath\qmltooling -Recurse -Force $modules = "QmlCore" foreach ($module in $modules) { @@ -84,12 +86,14 @@ function Deploy() { Copy-Item -Path $boostRoot\lib\boost_$boost-vc143-mt-x64-1_86.dll -Destination $deployPath } - $ffmpegs = "avcodec-61", "avdevice-61", "avfilter-10", "avformat-61", "avutil-59", "postproc-58", "swresample-5", "swscale-8" + $ffmpegs = "avcodec-61", "avdevice-61", "avformat-61", "avutil-59", "postproc-58", "swresample-5", "swscale-8" # avfilter-10 foreach ($ffmpeg in $ffmpegs) { Copy-Item -Path $ffmpegRoot\bin\$ffmpeg.dll -Destination $deployPath } - Compress-Archive -Path $deployPath -DestinationPath $zipFilePath -Force + $zipFilePath = Join-Path -Path $buildPath -ChildPath "掌静脉工具v$version.7z" + # Compress-Archive -Path $deployPath -DestinationPath $zipFilePath -Force + & resources\7za.exe a -t7z -mx=9 $zipFilePath $deployPath } function Clean() {