|
|
@ -8,7 +8,12 @@ CheckForUpdates(GitReleasesAPIURL){
|
|
|
|
data := URLDownloadToVar(GitReleasesAPIURL)
|
|
|
|
data := URLDownloadToVar(GitReleasesAPIURL)
|
|
|
|
; Msgbox % "data: " data
|
|
|
|
; Msgbox % "data: " data
|
|
|
|
|
|
|
|
|
|
|
|
parsed := JSON.Load(data)
|
|
|
|
try, parsed := JSON.Load(data)
|
|
|
|
|
|
|
|
catch e {
|
|
|
|
|
|
|
|
Message = Failed to check for updates. Gitea Releases API returned blank or malformed data.
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UpdateVersionNumber := parsed.1.name
|
|
|
|
UpdateVersionNumber := parsed.1.name
|
|
|
|
|
|
|
|
|
|
|
@ -17,10 +22,10 @@ CheckForUpdates(GitReleasesAPIURL){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
|
|
|
|
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
|
|
|
|
ToolTip
|
|
|
|
ToolTip
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else, {
|
|
|
|
else, {
|
|
|
|
UpdateAvailable := 1
|
|
|
|
UpdateAvailable := 1
|
|
|
|
; msgbox, update found!
|
|
|
|
; msgbox, update found!
|
|
|
|
Message = Program Update Found
|
|
|
|
Message = Program Update Found
|
|
|
@ -36,7 +41,12 @@ CheckForUpdates(GitReleasesAPIURL){
|
|
|
|
UpdateScript(){
|
|
|
|
UpdateScript(){
|
|
|
|
data := URLDownloadToVar(GitReleasesAPIURL)
|
|
|
|
data := URLDownloadToVar(GitReleasesAPIURL)
|
|
|
|
|
|
|
|
|
|
|
|
parsed := JSON.Load(data)
|
|
|
|
try parsed := JSON.Load(data)
|
|
|
|
|
|
|
|
catch e {
|
|
|
|
|
|
|
|
Message = Failed to check for updates. Gitea Releases API returned blank or malformed data.
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UpdateVersionNumber := parsed.1.name
|
|
|
|
UpdateVersionNumber := parsed.1.name
|
|
|
|
ChangeLog := parsed.1.body
|
|
|
|
ChangeLog := parsed.1.body
|
|
|
|