Skip to content

Commit

Permalink
Merge branch 'main' into patch-2-patch-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build.yml
  • Loading branch information
Silverteal committed Jun 14, 2024
2 parents 7b45aef + f1fedfc commit 0d7735a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,20 @@ on:
# 定义工作列表
jobs:
# 唯一的工作:build

build:

strategy:
# 定义矩阵,矩阵中每组都会单独执行,并使矩阵本身成为可用的上下文
# 由于一些奇葩的原因,Artifacts使用中文作为名称会导致它无法被下载,因此此处使用英文名。
# 或许后续可以试着直接发Release?
matrix:
include:
- name: 'Debug with symbols'
configuration: Debug
- name: 'Debug'
configuration: Snapshot
- name: 'Snapshot'
configuration: Release
- name: 'Snapshot from update'
configuration: ReleaseUpdate
- name: 'Release'
configuration: BETA

matrix:
# 五个编译选项
configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate]

# 显然,只有Windows才能构建.NET Framework程序
runs-on: windows-latest

# 定义步骤列表
steps:

# 第一步,签出仓库到本地
- name: 签出仓库
# 调用actions/checkout仓库的调用预设工作流
uses: actions/checkout@v4
Expand All @@ -53,14 +41,18 @@ jobs:
# 只签出第一层
fetch-depth: 0

# 第二步,配置生成工具
- name: 导出提交哈希
shell: bash
run: |
Describe=`git describe --tags`
echo "Describe=$Describe" >> $GITHUB_ENV
- name: 配置 MSBuild
uses: microsoft/setup-msbuild@v2
with:
# 生成工具使用64位架构
msbuild-architecture: x64

# 第三步,编译
- name: 编译源代码
# 直接运行Powershell命令
# ${{}}括号内的是工作流表达式,此处即当前运行的矩阵的参数,运行时将直接替换
Expand All @@ -71,12 +63,10 @@ jobs:
# 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法
Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj

# 第四步,打包并上传编译产物到Artifacts
- name: 打包并上传编译产物
uses: actions/upload-artifact@v4
with:
# Artifact压缩包名称,此处命名为友好名称
name: ${{ matrix.name }}
# 将要上传的对象,将被压缩为Artifact压缩包
# 文件名格式示例:pcl2_autobuild_a1b23c4_Snapshot.zip
name: pcl2_autobuild_${{ env.Describe }}_${{ matrix.configuration }}
path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe

2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ SystemBrowser:
'自定义
Do Until McSkinSex(Uuid) = If(Setup.Get("LaunchSkinSlim"), "Alex", "Steve")
If Uuid.EndsWithF("FFFFF") Then Uuid = Mid(Uuid, 1, 32 - 5) & "00000"
Uuid = Mid(Uuid, 1, 32 - 5) & (Long.Parse(Right(Uuid, 5), Globalization.NumberStyles.AllowHexSpecifier) + 1).ToString("X")
Uuid = Mid(Uuid, 1, 32 - 5) & (Long.Parse(Right(Uuid, 5), Globalization.NumberStyles.AllowHexSpecifier) + 1).ToString("X").PadLeft(5, "0")
Loop
End Select
Return Uuid
Expand Down

0 comments on commit 0d7735a

Please sign in to comment.