Fixed Auto Update Check/Install from Gitea functionality

pull/2/head
Yuriy 2 years ago
parent a626ff1763
commit 092786bc27

@ -29,7 +29,7 @@ global ScriptVersion
global FullScriptName global FullScriptName
ScriptName = Freedomain Video Uploader ScriptName = Freedomain Video Uploader
ScriptVersion = 3.0 ScriptVersion = 3.1
FullScriptName := ScriptName . " - " . ScriptVersion FullScriptName := ScriptName . " - " . ScriptVersion
@ -553,6 +553,22 @@ else, {
SecondaryButtonHeights := 35 SecondaryButtonHeights := 35
} }
;---Check for Update---
;------------------------------------------------
if(AutoUpdateCheck AND !UpdateAvailable){
; DevModeMsgBox("checking for updates")
; msgbox, checkin for update
; DevModeMsgBox(GitReleasesAPIURL)
UpdateAvailable := CheckForUpdates(GitReleasesAPIURL)
}
; DevModeMsgBox(AutoUpdateCheck)
; DevModeMsgBox(UpdateAvailable)
; -------------------------------GUI------------------------------- ; -------------------------------GUI-------------------------------
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
@ -784,16 +800,6 @@ if(SkipToDBInfo){
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
;---Check for Update---
;------------------------------------------------
if(AutoUpdateCheck AND !UpdateAvailable And !SkipUpdateCheckThisRun){
; msgbox, checkin for update
; DevModeMsgBox(GitReleasesAPIURL)
CheckForUpdates(GitReleasesAPIURL)
}
Return Return
; -------------------------------GUI GoSubs------------------------------- ; -------------------------------GUI GoSubs-------------------------------

@ -37,12 +37,13 @@ CheckForUpdates(GitReleasesAPIURL){
UpdateVersionNumber := parsed.1.name UpdateVersionNumber := parsed.1.name
; DevModeMsgBox(UpdateVersionNumber) Message = UpdateVersionNumber: %UpdateVersionNumber%
DevModeMsgBox(Message)
if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){ if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){
ToolTip ToolTip
return return 0
} }
else, { else, {
UpdateAvailable := 1 UpdateAvailable := 1
@ -51,7 +52,7 @@ CheckForUpdates(GitReleasesAPIURL){
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile") SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable ; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable
; ToolTip ; ToolTip
return return 1
} }
} }

Loading…
Cancel
Save