Skip to content

Commit

Permalink
修复更新功能
Browse files Browse the repository at this point in the history
  • Loading branch information
Silverteal committed Jan 26, 2025
1 parent b200f13 commit 0cf4a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plain Craft Launcher 2/Modules/ModSecret.vb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Friend Module ModSecret
RunInNewThread(Sub()
Try
LatestReleaseInfoJson = GetJson(NetRequestRetry("https://api.github.com/repos/" & GithubRepository & "/releases/latest", "GET", "", "application/x-www-form-urlencoded"))
LatestVersion = LatestReleaseInfoJson("tag_name").ToString
LatestVersion = LatestReleaseInfoJson("name").ToString
If Not LatestVersion = VersionBaseName Then
If MyMsgBox($"发现了启动器更新(版本 {LatestVersion}),是否更新?", "启动器更新", "更新", "取消") = 1 Then
UpdateStart(LatestVersion, False)
Expand All @@ -301,7 +301,7 @@ Friend Module ModSecret
End Sub)
End Sub
Public Sub UpdateStart(VersionStr As String, Slient As Boolean, Optional ReceivedKey As String = Nothing, Optional ForceValidated As Boolean = False)
Dim DlLink As String = "https://github.com/" & GithubRepository & "/releases/download/" + VersionStr + "/PCL2_WYSIWYG.exe"
Dim DlLink As String = "https://github.com/" & GithubRepository & "/releases/download/v" + VersionStr + "/PCL2_WYSIWYG.exe"
Dim DlTargetPath As String = Path + "PCL\Plain Craft Launcher 2.exe"
RunInNewThread(Sub()
Try
Expand Down

0 comments on commit 0cf4a2c

Please sign in to comment.