Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from PCL-Community:main #35

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 3 additions & 1 deletion Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.vb
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ NextInner:
End Sub

#End Region

#Region "分方式登录模块"

'各个登录方式的主对象与输入构造
Expand Down Expand Up @@ -1486,7 +1487,8 @@ NextVersion:

'添加 Java Wrapper 作为主 Jar
If McLaunchJavaSelected.VersionCode >= 9 Then DataList.Add("--add-exports cpw.mods.bootstraplauncher/cpw.mods.bootstraplauncher=ALL-UNNAMED")
If Not IsArm64System AndAlso (Not Setup.Get("LaunchAdvanceDisableJlw") AndAlso Not Setup.Get("VersionAdvanceDisableJlw", Version)) Then '检查禁用 Java Wrapper 设置项
Dim JWLEnabled = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage = 65001 AndAlso Not (Setup.Get("LaunchAdvanceDisableJlw") Or Setup.Get("VersionAdvanceDisableJlw", Version))
If JWLEnabled Then '检查禁用 Java Wrapper 设置项
DataList.Add("-Doolloo.jlw.tmpdir=""" & PathPure.TrimEnd("\") & """")
DataList.Add("-jar """ & ExtractJavaWrapper() & """")
End If
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("")>
Loading