@TAC109
All of those important bits look quite good to me.
To identify AHK_H, I always name my sub directories as "AutoHotkey_H", so that should be easy enough to detect by folder name.
I know you are dealing with challenges of backwards compatibility, and I'm not 100% sure what those challenges are, so please only take my words as suggestions, not expectations.
I was thinking, to identify AutoHotkey_H, wouldn't checking the Product Name field, or File Description field work? In the code below, I'm identifying the proper EXEs first, then using those folders, rather than relying on a folder name scheme to parse. I use the folder name scheme only for overall organization.
Code: Select all
Loop Files path "\*.exe", "R"
{
If (ProductName = "AutoHotkey_H")
Continue
... use folder of "valid" exe
}
I figured using this method, you can then parse the collected "valid" folders then parse for BIN files (recursively or directly in the Compiler folder) inside each valid folder.
As far as how I implement AutoHotkey_H, I do have it in the same root folder as other normal AHK folders. I use something similar to the code above to be able to tell the difference between the type of AHK I'm working with.
As for the structure, I see that a "master AHK folder" is used as the root. For easier "swapping out" I have all AHK folders in the same root folder, and that root folder is nothing special, other than it is "the root" for the setup.
Code: Select all
Root folder
\ _OLD_ <-- for old AHK versions that I want to put away
\ Compiler
\ Compiler_H
\ AutoHotkey v1.1.32
\ AutoHotkey v1.1.34
\ AutoHotkey v2-a130
\ AutoHotkey_H v1.1.33
\ AutoHotkey_H v2-a122
Currently I don't actually use those compilers in the root folder, since I find more consistent compiling operation with a separate compiler folder in each AHK folder. But I am hoping this compiler setup will be functional some day.
If I use the newly proposed compiler in this manner would it function as intended without a master AHK folder at the root?
EDIT: I also use an
_OLD_ folder to put away older versions of AHK that I don't plant to use in the near future. It would be cool to have something like this (maybe hard coded for simplicity?) to be able to move things out of the way without deleting. In my AHK Portable Installer, i have it set to ignore folders matching the regex pattern
i)_?OLD_?.
If my structure causes too many issues while trying to maintain backward compatibility I can change it.