Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6574e061e | ||
|
|
b59c625e2d | ||
|
|
ce1efa105a | ||
|
|
a0d4e25446 |
74
.github/workflows/dotnet-desktop.yml
vendored
Normal file
74
.github/workflows/dotnet-desktop.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
name: Build and Release WinForms
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-release:
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
PROJECT_NAME: SpineViewer
|
||||||
|
VERSION: ${{ github.ref_name }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup .NET SDK
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
- name: Publish FrameworkDependent version
|
||||||
|
run: |
|
||||||
|
dotnet publish ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj -c Release -r win-x64 --sc false -p:PublishSingleFile=true -o publish/${{ env.PROJECT_NAME }}-${{ env.VERSION }}
|
||||||
|
|
||||||
|
- name: Publish SelfContained version
|
||||||
|
run: |
|
||||||
|
dotnet publish ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj -c Release -r win-x64 --sc true -p:PublishSingleFile=true -o publish/${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained
|
||||||
|
|
||||||
|
- name: Create release directory
|
||||||
|
run: mkdir release
|
||||||
|
|
||||||
|
- 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
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref_name }}
|
||||||
|
release_name: Release ${{ github.ref_name }}
|
||||||
|
body: 'Automated release build ${{ github.ref_name }}'
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload FrameworkDependent zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.zip
|
||||||
|
asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload SelfContained zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release/${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip
|
||||||
|
asset_name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-SelfContained.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
@@ -82,9 +82,10 @@ namespace SpineViewer.Spine
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
FragmentShader = null;
|
||||||
Program.Logger.Error(ex.ToString());
|
Program.Logger.Error(ex.ToString());
|
||||||
Program.Logger.Error("Failed to load fragment shader");
|
Program.Logger.Error("Failed to load fragment shader");
|
||||||
FragmentShader = null;
|
MessageBox.Show("Fragment shader 加载失败,预乘Alpha通道属性失效", "错误信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ namespace SpineViewer.Spine
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum Version
|
public enum Version
|
||||||
{
|
{
|
||||||
[Description("v3.6.53")] V36 = 0x0306,
|
[Description("v3.6.x")] V36 = 0x0306,
|
||||||
[Description("v3.7.94")] V37 = 0x0307,
|
[Description("v3.7.x")] V37 = 0x0307,
|
||||||
[Description("v3.8.99")] V38 = 0x0308,
|
[Description("v3.8.x")] V38 = 0x0308,
|
||||||
[Description("v4.0.64")] V40 = 0x0400,
|
[Description("v4.0.x")] V40 = 0x0400,
|
||||||
[Description("v4.1.54")] V41 = 0x0401,
|
[Description("v4.1.x")] V41 = 0x0401,
|
||||||
[Description("v4.2.74")] V42 = 0x0402,
|
[Description("v4.2.x")] V42 = 0x0402,
|
||||||
[Description("v4.3.xx")] V43 = 0x0403,
|
[Description("v4.3.x")] V43 = 0x0403,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
|
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
|
||||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||||
<Version>0.9.3</Version>
|
<Version>0.9.4</Version>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationIcon>appicon.ico</ApplicationIcon>
|
<ApplicationIcon>appicon.ico</ApplicationIcon>
|
||||||
|
|||||||
Reference in New Issue
Block a user