@@ -2,25 +2,22 @@ class DependencyInstaller extends InstallerBase {
22 name := " Dependency Installer"
33
44 __New (version, appState, cache, extraComponents := "", tmpDir := "" ) {
5+ ; TODO: Remove dependency on A_ScriptDir
6+ installDir := A_ScriptDir
57 components := []
6- dbVersion := " 1.0.2 "
8+ cleanupFiles := []
79
810 ahkUrl := " https://www.autohotkey.com/download/2.0/AutoHotkey_" . A_AhkVersion . " .zip"
911 components.Push(DownloadableInstallerComponent(A_AhkVersion , ahkUrl, true , " Vendor\AutoHotKey" , appState, " AutoHotKey" , cache, " Dependencies" , true , tmpDir, false ))
10-
11- ; mpressUrl := "https://github.com/bmcclure/launcher-db/releases/download/" . dbVersion . "/mpress.exe"
12- ; mpressPath := "Vendor\AutoHotKey\Compiler\mpress.exe"
13- ; mpressComponent := DownloadableInstallerComponent(dbVersion, mpressUrl, false, mpressPath, appState, "Mpress", cache, "AutoHotKey", true, tmpDir, false)
14- ; components.Push(mpressComponent)
15-
16- ; ahk2ExeUrl := "https://github.com/bmcclure/launcher-db/releases/download/" . dbVersion . "/Ahk2Exe.exe"
17- ; ahk2ExePath := "Vendor\AutoHotKey\Compiler\Ahk2Exe.exe"
18- ; ahk2ExeComponent := DownloadableInstallerComponent(dbVersion, ahk2ExeUrl, false, ahk2ExePath, appState, "Ahk2Exe", cache, "AutoHotKey", true, tmpDir, false)
19- ; components.Push(ahk2ExeComponent)
20-
21- ; TODO: Remove dependency on A_ScriptDir
22- ahkBins := A_ScriptDir . " \Resources\Dependencies\AHkBins.zip"
23- dest := A_ScriptDir . " \Vendor\AutoHotKey\Compiler"
12+
13+ ahkDir := installDir . " \Vendor\AutoHotKey"
14+ cleanupFiles.Push(ahkDir . " \AutoHotKeyU32.exe" )
15+ cleanupFiles.Push(ahkDir . " \AutoHotKeyU64.exe" )
16+ cleanupFiles.Push(ahkDir . " \Compiler\Unicode 32-bit.bin" )
17+ cleanupFiles.Push(ahkDir . " \Compiler\Unicode 64-bit.bin" )
18+
19+ ahkBins := installDir . " \Resources\Dependencies\AHkBins.zip"
20+ dest := ahkDir . " \Compiler"
2421 ahkBinsComponent := CopyableInstallerComponent(A_AhkVersion , ahkBins, true , dest, appState, " AhkBins" , cache, " Dependencies" , true , tmpDir, false , " Ahk2Exe.exe" )
2522 components.Push(ahkBinsComponent)
2623
@@ -38,6 +35,6 @@ class DependencyInstaller extends InstallerBase {
3835 }
3936 }
4037
41- super.__New (version, appState, " Dependencies" , cache, components, tmpDir := "" )
38+ super.__New (version, appState, " Dependencies" , cache, components, tmpDir, cleanupFiles )
4239 }
4340}
0 commit comments