From 97cecb38807f2530184f2caa166425fdee8aa37d Mon Sep 17 00:00:00 2001 From: TAC109 <49378716+TAC109@users.noreply.github.com> Date: Fri, 17 May 2024 12:00:38 +1200 Subject: [PATCH] Get Mpress more reliably in the Updater --- Update.ahk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Update.ahk b/Update.ahk index 0b26e72..e696ad7 100644 --- a/Update.ahk +++ b/Update.ahk @@ -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 @@ -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) @@ -68,6 +66,8 @@ return + + UpdChk: if !(%A_GuiControl%T) GuiControlGet %A_GuiControl%T, Upd:,%A_GuiControl%, Text