Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve version specific executable searching. #352

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EtorixDev
Copy link

I was having some issues testing v1 behavior while working on another pull request because the library couldn't find my v1 installation. I completely uninstalled AutoHotkey twice and tested two install configurations to see how it behaved and rewrote the executable searching code to accommodate it.

The first time I installed v1 then v2. In this case, v1 installed into C:\Program Files\AutoHotkey and v2 installed into C:\Program Files\AutoHotkey\v2.

The second time I installed v2 then v1 (how I originally had it installed). In this case, v2 installed into C:\Program Files\AutoHotkey\v2 and v1 installed into C:\Program Files\AutoHotkey\v1.1.37.02.

So the rewritten code will search the top level install directory if v1 is selected, otherwise it will search for v1... or v2... directories and then search there.

I put all of the executables in a single list to save a line and an if statement but can split it if necessary.

EXECUTABLES = ['AutoHotkey.exe', 'AutoHotkey64.exe', 'AutoHotkey32.exe', 'AutoHotkeyU64.exe', 'AutoHotkeyU32.exe', 'AutoHotkeyA32.exe']
# vs
V2_EXECUTABLES = ['AutoHotkey.exe', 'AutoHotkey64.exe', 'AutoHotkey32.exe']
V1_EXECUTABLES = ['AutoHotkey.exe', 'AutoHotkeyU64.exe', 'AutoHotkeyU32.exe', 'AutoHotkeyA32.exe']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant