From 9be217fe12ae435a11eb25dae4e58bdc511879aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E7=8C=AB=E8=B7=83?= <1043137532@qq.com> Date: Sun, 24 May 2026 19:16:19 +0800 Subject: [PATCH] 2.12.8.2 --- MeloongCore | 2 +- PCLCS/Constants.cs | 2 +- Plain Craft Launcher 2/Application.xaml.vb | 3 ++ Plain Craft Launcher 2/FormMain.xaml.vb | 10 +++++ .../Modules/Base/ModBase.vb | 6 +-- .../Modules/Resource/ResourceVersion.vb | 14 ++++--- .../My Project/AssemblyInfo.vb | 4 +- .../Pages/PageOther/PageOtherAbout.xaml | 41 +++++++++++++++++++ 8 files changed, 69 insertions(+), 13 deletions(-) diff --git a/MeloongCore b/MeloongCore index f30c861..4d389f4 160000 --- a/MeloongCore +++ b/MeloongCore @@ -1 +1 @@ -Subproject commit f30c861f6ea5ae9a52a93ffa71357d20ce0090ab +Subproject commit 4d389f4375aa60e977f512690219a1fa4476838a diff --git a/PCLCS/Constants.cs b/PCLCS/Constants.cs index 597d637..6607fcc 100644 --- a/PCLCS/Constants.cs +++ b/PCLCS/Constants.cs @@ -71,5 +71,5 @@ public static class Versions { /// /// Minecraft 本地实例信息缓存的版本号。 /// - public const int MCINSTANCE_CACHE_VERSION = 37; + public const int MCINSTANCE_CACHE_VERSION = 38; } diff --git a/Plain Craft Launcher 2/Application.xaml.vb b/Plain Craft Launcher 2/Application.xaml.vb index 851baf0..9d8d067 100644 --- a/Plain Craft Launcher 2/Application.xaml.vb +++ b/Plain Craft Launcher 2/Application.xaml.vb @@ -106,6 +106,9 @@ RetryCacheCheck: ServicePointManager.UseNagleAlgorithm = False ServicePointManager.EnableDnsRoundRobin = True ServicePointManager.ReusePort = True + If Environment.OSVersion.Version < New Version(6, 2) Then 'Windows 7 回退(#8519) + ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12 + End If '设置初始窗口 If Settings.Get(Of Boolean)("UiLauncherLogo") Then FrmStart = New SplashScreen("Images\icon.ico") diff --git a/Plain Craft Launcher 2/FormMain.xaml.vb b/Plain Craft Launcher 2/FormMain.xaml.vb index 1d7d171..279cab1 100644 --- a/Plain Craft Launcher 2/FormMain.xaml.vb +++ b/Plain Craft Launcher 2/FormMain.xaml.vb @@ -11,6 +11,11 @@ Public Class FormMain Dim FeatureList As New List(Of KeyValuePair(Of Integer, String)) '统计更新日志条目 If BuildType = BuildTypes.Release Then + If LastVersion < 404 Then 'Release 2.12.8.2 + FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复:Windows 7 无法正常联网")) + FeatureCount += 1 + BugCount += 2 + End If If LastVersion < 402 Then 'Release 2.12.8.1 FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "优化:升级框架到 .NET Framework 4.8")) FeatureCount += 35 @@ -74,6 +79,11 @@ Public Class FormMain '3:BUG+ IMP* FEAT- '2:BUG* IMP- '1:BUG- + If LastVersion < 403 Then 'Snapshot 2.12.8.2 + FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复:Windows 7 无法正常联网")) + FeatureCount += 1 + BugCount += 2 + End If If LastVersion < 401 Then 'Snapshot 2.12.8.1 FeatureList.Add(New KeyValuePair(Of Integer, String)(1, "修复:可能无法更换披风")) FeatureCount += 8 diff --git a/Plain Craft Launcher 2/Modules/Base/ModBase.vb b/Plain Craft Launcher 2/Modules/Base/ModBase.vb index b51d89c..e5239af 100644 --- a/Plain Craft Launcher 2/Modules/Base/ModBase.vb +++ b/Plain Craft Launcher 2/Modules/Base/ModBase.vb @@ -10,12 +10,12 @@ Public Module ModBase #Region "声明" '下列版本信息由更新器自动修改 - Public Const VersionBaseName As String = "2.12.8.1" '显示用版本名 + Public Const VersionBaseName As String = "2.12.8.2" '显示用版本名 Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换 #If RELEASE Then - Public Const VersionCode As Integer = 402 '正式版 + Public Const VersionCode As Integer = 404 '正式版 #Else - Public Const VersionCode As Integer = 401 '快照版 + Public Const VersionCode As Integer = 403 '快照版 #End If '版本信息 diff --git a/Plain Craft Launcher 2/Modules/Resource/ResourceVersion.vb b/Plain Craft Launcher 2/Modules/Resource/ResourceVersion.vb index 201a4d2..f405260 100644 --- a/Plain Craft Launcher 2/Modules/Resource/ResourceVersion.vb +++ b/Plain Craft Launcher 2/Modules/Resource/ResourceVersion.vb @@ -178,19 +178,21 @@ Public Class ResourceVersion .Size = File("size") .Hash = File("hashes")("sha1") End If - 'Loaders + '类别 '结果可能混杂着 Mod、数据包和服务端插件 Dim RawLoaders As List(Of String) = Data("loaders").Select(Function(v) v.ToString).ToList .ModLoaders = ModLoaders.None If .ResourceType.HasFlag(ResourceTypes.Mod) OrElse .ResourceType.HasFlag(ResourceTypes.DataPack) Then If RawLoaders.Intersect({"bukkit", "folia", "paper", "purpur", "spigot"}).Any() Then .ResourceType = ResourceTypes.Plugin 'Veinminer Enchantment 同时支持服务端与 Fabric If RawLoaders.Contains("datapack") Then .ResourceType = ResourceTypes.DataPack - For Each Loader As ModLoaders In EnumUtils.GetAllFlags(Of ModLoaders)() - If RawLoaders.Contains(Loader.ToString.Lower) Then .ModLoaders = .ModLoaders Or Loader : .ResourceType = ResourceTypes.Mod - Next + If EnumUtils.GetAllFlags(Of ModLoaders)().Any() Then .ResourceType = ResourceTypes.Mod Else '使用传入的类别,不作修改(#8377) End If + 'Loaders + For Each Loader As ModLoaders In EnumUtils.GetAllFlags(Of ModLoaders)() + If RawLoaders.Contains(Loader.ToString.Lower) Then .ModLoaders = .ModLoaders Or Loader + Next 'Dependencies If Data.ContainsKey("dependencies") Then .RawDependencies = Data("dependencies"). @@ -350,14 +352,14 @@ Public Class ResourceVersion .Title = If(IsBadDisplay, FileName, Display) .Logo = $"{PathImage}ReleaseTypes/{ReleaseType}.png" AddHandler .Click, ClickHandler - '描述 .Info = Iterator Function() + If ModLoaders <> ModLoaders.None Then Yield ModLoaders.Flags.Join("、"c) If .Title <> FileName.BeforeLast(".") Then Yield FileName.BeforeLast(".") If Dependencies.Any Then Yield $"{Dependencies.Count} 项前置" If GameVersions.All(Function(v) Not v.Contains(".") OrElse {"w", "snapshot", "rc", "pre", "experimental", "-"}.Any(Function(s) v.ContainsIgnoreCase(s))) Then Yield $"游戏版本 {GameVersions.Join("、"c)}" - If DownloadCount > 0 Then Yield $"下载 {If(DownloadCount > 100000, Math.Round(DownloadCount / 10000) & " 万", DownloadCount)} 次" 'CurseForge 的下载次数经常错误地返回 0 + If DownloadCount > 0 Then Yield $"下载 {If(DownloadCount > 100000, Math.Round(DownloadCount / 10000) & " 万", DownloadCount & " ")}次" 'CurseForge 的下载次数经常错误地返回 0 Yield $"更新于 {GetTimeSpanString(ReleaseDate - Date.Now, False)}" If ReleaseType <> ReleaseTypes.Release Then Yield ReleaseTypeDisplay End Function().Join(","c) diff --git a/Plain Craft Launcher 2/My Project/AssemblyInfo.vb b/Plain Craft Launcher 2/My Project/AssemblyInfo.vb index c39a58e..76330d3 100644 --- a/Plain Craft Launcher 2/My Project/AssemblyInfo.vb +++ b/Plain Craft Launcher 2/My Project/AssemblyInfo.vb @@ -51,6 +51,6 @@ Imports System.Runtime.InteropServices ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 ' 方法是按如下所示使用“*” - - + + diff --git a/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml b/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml index 2f1aeb3..24b99b9 100644 --- a/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml +++ b/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml @@ -125,6 +125,7 @@ + @@ -153,6 +154,8 @@ + + @@ -165,9 +168,12 @@ + + + @@ -178,6 +184,7 @@ + @@ -250,6 +257,13 @@ + + + + + + + @@ -271,6 +285,7 @@ + @@ -280,6 +295,7 @@ + @@ -348,6 +364,7 @@ + @@ -361,11 +378,20 @@ + + + + + + + + + @@ -398,10 +424,13 @@ + + + @@ -477,6 +506,9 @@ + + + @@ -503,6 +535,7 @@ + @@ -510,6 +543,7 @@ + @@ -552,6 +586,8 @@ + + @@ -561,6 +597,7 @@ + @@ -599,6 +636,7 @@ + @@ -614,6 +652,7 @@ + @@ -635,11 +674,13 @@ + +