From 933165643165b1727c930d75b42dda74b2a87a4a Mon Sep 17 00:00:00 2001 From: ww-rm Date: Tue, 28 Oct 2025 22:03:39 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NLog.Windows.Wpf/NLog.Windows.Wpf.csproj | 1 + SFMLRenderer/SFMLRenderer.csproj | 1 + Spine/Spine.csproj | 3 ++- SpineRuntimes/SpineRuntime21/SpineRuntime21.csproj | 3 ++- SpineRuntimes/SpineRuntime34/SpineRuntime34.csproj | 3 ++- SpineRuntimes/SpineRuntime35/SpineRuntime35.csproj | 3 ++- SpineRuntimes/SpineRuntime36/SpineRuntime36.csproj | 3 ++- SpineRuntimes/SpineRuntime37/SpineRuntime37.csproj | 3 ++- SpineRuntimes/SpineRuntime38/SpineRuntime38.csproj | 3 ++- SpineRuntimes/SpineRuntime40/SpineRuntime40.csproj | 3 ++- SpineRuntimes/SpineRuntime41/SpineRuntime41.csproj | 3 ++- SpineRuntimes/SpineRuntime42/SpineRuntime42.csproj | 3 ++- SpineViewer/SpineViewer.csproj | 1 + SpineViewerCLI/SpineViewerCLI.csproj | 4 ++-- 14 files changed, 25 insertions(+), 12 deletions(-) diff --git a/NLog.Windows.Wpf/NLog.Windows.Wpf.csproj b/NLog.Windows.Wpf/NLog.Windows.Wpf.csproj index 48e2058..ac8d5c7 100644 --- a/NLog.Windows.Wpf/NLog.Windows.Wpf.csproj +++ b/NLog.Windows.Wpf/NLog.Windows.Wpf.csproj @@ -4,6 +4,7 @@ enable enable x64 + x64 net8.0-windows $(SolutionDir)out false diff --git a/SFMLRenderer/SFMLRenderer.csproj b/SFMLRenderer/SFMLRenderer.csproj index a6ea5e8..9d047ed 100644 --- a/SFMLRenderer/SFMLRenderer.csproj +++ b/SFMLRenderer/SFMLRenderer.csproj @@ -4,6 +4,7 @@ enable enable x64 + x64 net8.0-windows $(SolutionDir)out false diff --git a/Spine/Spine.csproj b/Spine/Spine.csproj index 1e0cc28..b0bf271 100644 --- a/Spine/Spine.csproj +++ b/Spine/Spine.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 0.16.9 diff --git a/SpineRuntimes/SpineRuntime21/SpineRuntime21.csproj b/SpineRuntimes/SpineRuntime21/SpineRuntime21.csproj index 1f8f717..e1f26a1 100644 --- a/SpineRuntimes/SpineRuntime21/SpineRuntime21.csproj +++ b/SpineRuntimes/SpineRuntime21/SpineRuntime21.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 2.1.25 diff --git a/SpineRuntimes/SpineRuntime34/SpineRuntime34.csproj b/SpineRuntimes/SpineRuntime34/SpineRuntime34.csproj index 88d1692..ca2ccf0 100644 --- a/SpineRuntimes/SpineRuntime34/SpineRuntime34.csproj +++ b/SpineRuntimes/SpineRuntime34/SpineRuntime34.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 3.4.2 diff --git a/SpineRuntimes/SpineRuntime35/SpineRuntime35.csproj b/SpineRuntimes/SpineRuntime35/SpineRuntime35.csproj index 40032ce..94b02b1 100644 --- a/SpineRuntimes/SpineRuntime35/SpineRuntime35.csproj +++ b/SpineRuntimes/SpineRuntime35/SpineRuntime35.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 3.5.51 diff --git a/SpineRuntimes/SpineRuntime36/SpineRuntime36.csproj b/SpineRuntimes/SpineRuntime36/SpineRuntime36.csproj index 19947c1..d77eba6 100644 --- a/SpineRuntimes/SpineRuntime36/SpineRuntime36.csproj +++ b/SpineRuntimes/SpineRuntime36/SpineRuntime36.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 3.6.53 diff --git a/SpineRuntimes/SpineRuntime37/SpineRuntime37.csproj b/SpineRuntimes/SpineRuntime37/SpineRuntime37.csproj index 7ccda43..8c97bc6 100644 --- a/SpineRuntimes/SpineRuntime37/SpineRuntime37.csproj +++ b/SpineRuntimes/SpineRuntime37/SpineRuntime37.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 3.7.94 diff --git a/SpineRuntimes/SpineRuntime38/SpineRuntime38.csproj b/SpineRuntimes/SpineRuntime38/SpineRuntime38.csproj index 6f1d12f..8205045 100644 --- a/SpineRuntimes/SpineRuntime38/SpineRuntime38.csproj +++ b/SpineRuntimes/SpineRuntime38/SpineRuntime38.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 3.8.99 diff --git a/SpineRuntimes/SpineRuntime40/SpineRuntime40.csproj b/SpineRuntimes/SpineRuntime40/SpineRuntime40.csproj index 92d5672..91cb0e5 100644 --- a/SpineRuntimes/SpineRuntime40/SpineRuntime40.csproj +++ b/SpineRuntimes/SpineRuntime40/SpineRuntime40.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 4.0.64 diff --git a/SpineRuntimes/SpineRuntime41/SpineRuntime41.csproj b/SpineRuntimes/SpineRuntime41/SpineRuntime41.csproj index 581e2d6..514f838 100644 --- a/SpineRuntimes/SpineRuntime41/SpineRuntime41.csproj +++ b/SpineRuntimes/SpineRuntime41/SpineRuntime41.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 4.1.54 diff --git a/SpineRuntimes/SpineRuntime42/SpineRuntime42.csproj b/SpineRuntimes/SpineRuntime42/SpineRuntime42.csproj index 4f70bf4..9a4353b 100644 --- a/SpineRuntimes/SpineRuntime42/SpineRuntime42.csproj +++ b/SpineRuntimes/SpineRuntime42/SpineRuntime42.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 4.2.74 diff --git a/SpineViewer/SpineViewer.csproj b/SpineViewer/SpineViewer.csproj index f61cea0..1a3fb94 100644 --- a/SpineViewer/SpineViewer.csproj +++ b/SpineViewer/SpineViewer.csproj @@ -4,6 +4,7 @@ enable enable x64 + x64 net8.0-windows $(SolutionDir)out false diff --git a/SpineViewerCLI/SpineViewerCLI.csproj b/SpineViewerCLI/SpineViewerCLI.csproj index 23f7aaa..5422c05 100644 --- a/SpineViewerCLI/SpineViewerCLI.csproj +++ b/SpineViewerCLI/SpineViewerCLI.csproj @@ -4,7 +4,8 @@ enable enable x64 - net8.0-windows + x64 + net8.0 $(SolutionDir)out false 0.16.9 @@ -22,7 +23,6 @@ - From 2e4a5a75c022adcdb3375ac912c9fa19e9b929f7 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 19:33:45 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9D=80=E8=89=B2?= =?UTF-8?q?=E5=99=A8=E8=AF=AD=E6=B3=95=E5=85=BC=E5=AE=B9=E6=80=A7=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Spine/Utils/SFMLShader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spine/Utils/SFMLShader.cs b/Spine/Utils/SFMLShader.cs index 31156cd..33631f4 100644 --- a/Spine/Utils/SFMLShader.cs +++ b/Spine/Utils/SFMLShader.cs @@ -14,7 +14,7 @@ namespace Spine.Utils /// private const string FRAGMENT_VertexAlpha = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + "p.rgb *= p.a * gl_Color.a;" + "gl_FragColor = gl_Color * p; }" ; @@ -24,7 +24,7 @@ namespace Spine.Utils /// private const string FRAGMENT_VertexAlphaPma = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + "p.rgb *= gl_Color.a;" + "gl_FragColor = gl_Color * p; }" ; @@ -34,8 +34,8 @@ namespace Spine.Utils /// private const string FRAGMENT_InvPma = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + - "if (p.a > 0) p.rgb /= max(max(max(p.r, p.g), p.b), p.a);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + + "if (p.a > 0.0) p.rgb /= max(max(max(p.r, p.g), p.b), p.a);" + "gl_FragColor = p; }" ; From a262538eba56f8addc159801c5eaed64e19d127f Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 19:48:23 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0linux=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Spine/Spine.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Spine/Spine.csproj b/Spine/Spine.csproj index b0bf271..e0c8b99 100644 --- a/Spine/Spine.csproj +++ b/Spine/Spine.csproj @@ -22,6 +22,10 @@ + + + + From aa4245ef2ad267e4961e104d3184c1ed82a5b36c Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 20:42:31 +0800 Subject: [PATCH 4/6] add linux release --- ...{dotnet-desktop.yml => dotnet-release.yml} | 71 +++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) rename .github/workflows/{dotnet-desktop.yml => dotnet-release.yml} (65%) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-release.yml similarity index 65% rename from .github/workflows/dotnet-desktop.yml rename to .github/workflows/dotnet-release.yml index 63d133a..e1b66cd 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-release.yml @@ -11,6 +11,10 @@ jobs: build-release: if: ${{ github.event.pull_request.merged == true }} runs-on: windows-latest + outputs: + version: ${{ steps.extract_version.outputs.version }} + upload_url: ${{ steps.create_release.outputs.upload_url }} + env: PROJECT_NAME: SpineViewer PROJ_CLI_NAME: SpineViewerCLI @@ -27,21 +31,15 @@ jobs: dotnet-version: "8.0.x" - name: Extract version from csproj + id: extract_version shell: pwsh run: | [xml]$proj = Get-Content "$env:PROJECT_NAME\$env:PROJECT_NAME.csproj" $VERSION_NUM = $proj.Project.PropertyGroup.Version $VERSION_TAG = "v$VERSION_NUM".Trim() - "VERSION=$VERSION_TAG" >> $env:GITHUB_ENV - - - name: Check Version Tag - shell: pwsh - run: | - if (-not $env:VERSION) { - Write-Error "Version tag not found in csproj file." - exit 1 - } - Write-Host "Version tag found: $env:VERSION" + echo "Version tag found: $VERSION_TAG" + echo "version=$VERSION_TAG" >> $env:GITHUB_OUTPUT + echo "VERSION=$VERSION_TAG" >> $env:GITHUB_ENV - name: Tag merge commit shell: pwsh @@ -63,19 +61,11 @@ jobs: dotnet publish "$env:PROJECT_NAME\$env:PROJECT_NAME.csproj" -c Release -r win-x64 --sc true -o "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained" dotnet publish "$env:PROJ_CLI_NAME\$env:PROJ_CLI_NAME.csproj" -c Release -r win-x64 --sc true -o "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained" - - name: Create release directory + - name: Compress Windows builds shell: pwsh run: | New-Item -ItemType Directory -Path release -Force | Out-Null - - - name: Compress FrameworkDependent version - shell: pwsh - run: | Compress-Archive -Path "publish\$env:PROJECT_NAME-$env:VERSION\*" -DestinationPath "release\$env:PROJECT_NAME-$env:VERSION.zip" -Force - - - name: Compress SelfContained version - shell: pwsh - run: | Compress-Archive -Path "publish\$env:PROJECT_NAME-$env:VERSION-SelfContained\*" -DestinationPath "release\$env:PROJECT_NAME-$env:VERSION-SelfContained.zip" -Force - name: Create GitHub Release @@ -89,7 +79,7 @@ jobs: draft: false prerelease: false - - name: Upload FrameworkDependent zip + - name: Upload Windows FrameworkDependent zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -99,7 +89,7 @@ jobs: asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}.zip asset_content_type: application/zip - - name: Upload SelfContained zip + - name: Upload Windows SelfContained zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -108,3 +98,42 @@ jobs: asset_path: release/${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip asset_content_type: application/zip + + + build-release-linux: + needs: build-release + if: ${{ github.event.pull_request.merged == true }} + runs-on: ubuntu-latest + env: + PROJ_CLI_NAME: SpineViewerCLI + VERSION: ${{ needs.build-release.outputs.version }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-tags: true + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: "8.0.x" + + - name: Publish Linux SelfContained version + run: | + dotnet publish "$PROJ_CLI_NAME/$PROJ_CLI_NAME.csproj" -c Release -r linux-x64 --sc true -o "publish/${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained" + + - name: Compress Linux build + run: | + mkdir -p release + zip -r "release/${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained.zip" "publish/${PROJ_CLI_NAME}-${VERSION}-Linux-SelfContained" + + - name: Upload Linux zip to GitHub Release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.build-release.outputs.upload_url }} + asset_path: release/${{ env.PROJ_CLI_NAME }}-${{ env.VERSION }}-Linux-SelfContained.zip + asset_name: ${{ env.PROJ_CLI_NAME }}-${{ env.VERSION }}-Linux-SelfContained.zip + asset_content_type: application/zip From e0f46f521ae23244168d4181092f429b96680e33 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 20:43:43 +0800 Subject: [PATCH 5/6] update to v0.16.10 --- Spine/Spine.csproj | 2 +- SpineViewer/SpineViewer.csproj | 2 +- SpineViewerCLI/SpineViewerCLI.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Spine/Spine.csproj b/Spine/Spine.csproj index e0c8b99..d608a48 100644 --- a/Spine/Spine.csproj +++ b/Spine/Spine.csproj @@ -8,7 +8,7 @@ net8.0 $(SolutionDir)out false - 0.16.9 + 0.16.10 diff --git a/SpineViewer/SpineViewer.csproj b/SpineViewer/SpineViewer.csproj index 1a3fb94..dbf1c3b 100644 --- a/SpineViewer/SpineViewer.csproj +++ b/SpineViewer/SpineViewer.csproj @@ -8,7 +8,7 @@ net8.0-windows $(SolutionDir)out false - 0.16.9 + 0.16.10 WinExe true diff --git a/SpineViewerCLI/SpineViewerCLI.csproj b/SpineViewerCLI/SpineViewerCLI.csproj index 5422c05..981e168 100644 --- a/SpineViewerCLI/SpineViewerCLI.csproj +++ b/SpineViewerCLI/SpineViewerCLI.csproj @@ -8,7 +8,7 @@ net8.0 $(SolutionDir)out false - 0.16.9 + 0.16.10 Exe From 733739921dc8450c5c9fdbe8cbcd91d11677ee82 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 20:44:20 +0800 Subject: [PATCH 6/6] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5980e05..b367269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v0.16.10 + +- 增加 Linux 平台 CLI 工具构建 + ## v0.16.9 - 重构 CLI 工具