From d6a36c045085080efb0b7feb22985c75a4c999a2 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Thu, 14 Nov 2024 12:11:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84CI=E6=9E=84=E5=BB=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release_windows.yaml | 2 +- Application.cpp | 2 +- resources/build.ps1 | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release_windows.yaml b/.gitea/workflows/release_windows.yaml index cd13de7..ed98329 100644 --- a/.gitea/workflows/release_windows.yaml +++ b/.gitea/workflows/release_windows.yaml @@ -20,4 +20,4 @@ jobs: with: body_path: build/CHANGELOG.txt files: |- - build/AntiClipSettings.zip \ No newline at end of file + build/视觉防夹设备上位机工具*.zip \ No newline at end of file diff --git a/Application.cpp b/Application.cpp index 493d36d..2f89a35 100644 --- a/Application.cpp +++ b/Application.cpp @@ -40,7 +40,7 @@ Application::Application(int &argc, char **argv) font.setFamily("微软雅黑"); m_app->setFont(font); m_app->setApplicationName(APPLICATION_NAME); - m_app->setApplicationVersion(QString("V%1").arg(APP_VERSION)); + m_app->setApplicationVersion(QString("v%1").arg(APP_VERSION)); m_player->open(); } diff --git a/resources/build.ps1 b/resources/build.ps1 index 8a0b5de..8fb443a 100644 --- a/resources/build.ps1 +++ b/resources/build.ps1 @@ -1,4 +1,5 @@ -param($type) +param($type) +# 该脚本设置为 UTF8-bom 编码即可支持中文 $MsvcScript = 'D:\Program Files\Microsoft Visual Studio\2022\\Community\Common7\Tools\Launch-VsDevShell.ps1' if (!(Test-Path $MsvcScript)) { $MsvcScript = 'D:\Program Files\Microsoft Visual Studio\2022\\Professional\Common7\Tools\Launch-VsDevShell.ps1' } @@ -24,8 +25,8 @@ if ($fileContent -match 'project\([^\)]+VERSION\s+([0-9]+\.[0-9]+)') { Write-Output "未找到版本号" } -$deployPath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings_v$version" -$zipFilePath = Join-Path -Path $buildPath -ChildPath "AntiClipSettings_v$version.zip" +$deployPath = Join-Path -Path $buildPath -ChildPath "视觉防夹设备上位机工具v$version" +$zipFilePath = Join-Path -Path $buildPath -ChildPath "视觉防夹设备上位机工具v$version.zip" $changelogPath = Join-Path -Path $buildPath -ChildPath "CHANGELOG.txt" function Build() { @@ -46,8 +47,8 @@ function Deploy() { Remove-Item $deployPath -Recurse -Force } New-Item $deployPath -ItemType Directory - Copy-Item $buildPath\AntiClipSettings.exe $deployPath\AntiClipSettings.exe - & $qtHome\bin\windeployqt.exe $deployPath\AntiClipSettings.exe --qmldir=$qtHome\qml + Copy-Item $buildPath\AntiClipSettings.exe $deployPath\视觉防夹设备上位机工具v$version.exe + & $qtHome\bin\windeployqt.exe $deployPath\视觉防夹设备上位机工具v$version.exe --qmldir=$qtHome\qml Remove-Item -Path $deployPath\d3dcompiler_47.dll -Force Remove-Item -Path $deployPath\Qt5RemoteObjects.dll -Force Remove-Item -Path $deployPath\Qt5QuickTest.dll -Force