Skip to content

Commit

Permalink
Get Mpress more reliably in the Updater
Browse files Browse the repository at this point in the history
  • Loading branch information
TAC109 committed May 17, 2024
1 parent 2cadde3 commit 97cecb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Update.ahk
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
goto UpdateEnd ; If fall-into, skip to near end
Update:
Reqs:=[(wk:="AutoHotkey/Ahk2Exe") ",,,Ahk2Exe.exe"
,"https://www.autohotkey.com/mpress/mpress.219.zip,,,Mpress.exe"
,"UPX/UPX," (A_Is64bitOS?"64.zip":"32.zip") ",,Upx.exe", wk ",,2,BinMod.ahk"]
Reqs:=[(wk:="AutoHotkey/Ahk2Exe") ",,,Ahk2Exe.exe", "TAC109/Mpress,,,Mpress.exe"
, "UPX/UPX," (A_Is64bitOS?"64.zip":"32.zip") ",,Upx.exe", wk ",,2,BinMod.ahk"]
A2D := A_ScriptDir "\"
if !A_IsCompiled ; Compile Ahk2Exe to test updates
RunWait "%A_AhkPath%" "%A_ScriptFullPath%" /compress 0
Expand All @@ -19,8 +18,7 @@ Gui Upd:Font, norm
Gui Upd:Show, w350 h160, % " Checking ..."
for k, v in Reqs
{ Reqa := StrSplit(v,","), Text%k%T := ""
Url := Reqa.4="mpress.exe" ? Reqa.1 : GitHubDwnldUrl(Reqa.1,Reqa.2,Reqa.3)
if url
if (url := GitHubDwnldUrl(Reqa.1, Reqa.2, Reqa.3))
{ URLDownloadToFile %Url%, %UpdDir%\File.zip
FileCopyDir %UpdDir%\File.zip, %UpdDir%\%k%
IfNotExist % UpdDir "\" k (wk := "\" Reqa.4)
Expand Down Expand Up @@ -68,6 +66,8 @@ return





UpdChk:
if !(%A_GuiControl%T)
GuiControlGet %A_GuiControl%T, Upd:,%A_GuiControl%, Text
Expand Down

0 comments on commit 97cecb3

Please sign in to comment.