Skip to content

Commit

Permalink
Merge pull request #261 from PCL-Community/update
Browse files Browse the repository at this point in the history
2.10.3 359
  • Loading branch information
Pigeon0v0 authored Feb 12, 2025
2 parents f11151e + ece7462 commit bdf63b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Plain Craft Launcher 2/Modules/Base/ModBase.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Public Module ModBase
Public Const CommitHash As String = "native" 'Commit Hash,由 GitHub Workflow 自动替换
Public CommitHashShort As String = If(CommitHash = "native", "native", CommitHash.Substring(0, 7)) 'Commit Hash,取前 7 位
Public Const UpstreamVersion As String = "2.8.13" '上游版本
Public Const VersionCode As Integer = 358 '内部版本号
Public Const VersionCodeString As String = "358" '内部版本号的字符串形式
Public Const VersionCode As Integer = 359 '内部版本号
Public Const VersionCodeString As String = "359" '内部版本号的字符串形式
'自动生成的版本信息
#If RELEASE Then
Public Const VersionBranchName As String = "Slow Ring"
Expand Down
17 changes: 9 additions & 8 deletions Plain Craft Launcher 2/Modules/ModSecret.vb
Original file line number Diff line number Diff line change
Expand Up @@ -445,23 +445,24 @@ PCL-Community 及其成员与龙腾猫跃无从属关系,且均不会为您的
If Setup.Get("SystemSystemServer") = 0 Then 'Pysio 源
Log("[System] 使用 Pysio 源获取版本信息")
If IsArm64System Then
Server = PysioServer + "updateARM.json"
Server = PysioServer + "updateARM_v2.json"
Else
Server = PysioServer + "update.json"
Server = PysioServer + "update_v2.json"
End If
Else 'GitHub 源
Log("[System] 使用 GitHub 源获取版本信息")
If IsArm64System Then
Server = "https://github.com/PCL-Community/PCL2_CE_Server/raw/main/updateARM.json"
Server = "https://github.com/PCL-Community/PCL2_CE_Server/raw/main/updateARM_v2.json"
Else
Server = "https://github.com/PCL-Community/PCL2_CE_Server/raw/main/update.json"
Server = "https://github.com/PCL-Community/PCL2_CE_Server/raw/main/update_v2.json"
End If
End If
LatestReleaseInfoJson = GetJson(NetRequestRetry(Server, "GET", "", "application/x-www-form-urlencoded"))
LatestVersion = LatestReleaseInfoJson(If(IsBeta, "latest-fast", "latest-slow")).ToString
LatestVersionCode = LatestReleaseInfoJson(If(IsBeta, "latest-fast-code", "latest-slow-code"))
RemoteFileName = LatestReleaseInfoJson(If(IsBeta, "fast-file", "slow-file")).ToString
LatestVersion = LatestReleaseInfoJson("latests")(If(IsBeta, "fast", "slow"))("version").ToString()
LatestVersionCode = LatestReleaseInfoJson("latests")(If(IsBeta, "fast", "slow"))("code")
RemoteFileName = LatestReleaseInfoJson("latests")(If(IsBeta, "fast", "slow"))("file").ToString()
End Sub

Public Sub NoticeUserUpdate(Optional Silent As Boolean = False)
If LatestVersionCode > VersionCode Then
If Not Val(Environment.OSVersion.Version.ToString().Split(".")(2)) >= 19042 AndAlso Not LatestVersion.StartsWithF("2.9.") Then
Expand Down Expand Up @@ -598,7 +599,7 @@ PCL-Community 及其成员与龙腾猫跃无从属关系,且均不会为您的
Select Case Setup.Get("SystemSystemUpdate")
Case 0
UpdateLatestVersionInfo()
If VersionBaseName <> LatestVersion Then
If LatestVersionCode > VersionCode Then
UpdateStart(LatestVersion, True) '静默更新
End If
Case 1
Expand Down
4 changes: 2 additions & 2 deletions Plain Craft Launcher 2/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ Imports System.Runtime.InteropServices
' 方法是按如下所示使用“*”


<Assembly: AssemblyVersion("2.10.0.0")>
<Assembly: AssemblyFileVersion("2.10.2.0")>
<Assembly: AssemblyVersion("2.10.3.0")>
<Assembly: AssemblyFileVersion("2.10.3.0")>
<Assembly: NeutralResourcesLanguage("")>

0 comments on commit bdf63b1

Please sign in to comment.