This commit is contained in:
LTCat
2026-10-20 14:33:23 +08:00
parent 5ef81e490a
commit e4b0489a22
10 changed files with 79 additions and 302 deletions
@@ -6,12 +6,12 @@ Public Module ModBase
#Region "声明"
'下列版本信息由更新器自动修改
Public Const VersionBaseName As String = "2.14.0.0" '显示用版本名
Public Const VersionBaseName As String = "2.99.0.0" '显示用版本名
Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换
#If RELEASE Then
Public Const VersionCode As Integer = 411 '正式版
Public Const VersionCode As Integer = 413 '正式版
#Else
Public Const VersionCode As Integer = 412 '快照版
Public Const VersionCode As Integer = 414 '快照版
#End If
'版本信息
@@ -8,6 +8,10 @@ Public Module ModModpack
''' 弹窗要求选择一个整合包文件并进行安装。
''' </summary>
Public Sub ModpackInstall()
If RestrictMcDownload Then
Hint("为遵守相关法律法规,PCL 暂时不再提供 MC 下载功能,非常抱歉 qwq……", HintType.Red)
Return
End If
Dim File As String = Dialogs.SelectFile("选择整合包压缩文件", False, filter:={({"rar", "zip", "mrpack"}, "整合包文件")}).FirstOrDefault() '选择整合包文件
If String.IsNullOrEmpty(File) Then Return
RunInThread(
@@ -81,6 +85,7 @@ Public Module ModModpack
End If
End Try
'执行对应的安装方法
If RestrictMcDownload Then Throw New Exception("为遵守相关法律法规,PCL 暂时不再提供 MC 下载功能,非常抱歉 qwq……")
Select Case PackType
Case 0
Logger.Info("整合包种类:CurseForge")
@@ -15,6 +15,7 @@ Friend Module ModSecret
#Region "网络鉴权"
Public Const RestrictMcDownload As Boolean = True
Friend Function SecretCdnSign(UrlWithMark As String) As String
If Not UrlWithMark.EndsWithF("{CDN}") Then Return UrlWithMark
Return UrlWithMark.Replace("{CDN}", "").Replace(" ", "%20")