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
Unclear error message when AutoHotkeySC.bin doesn't exist #7
Comments
I've changed the error message, and it now contains the name of the missing bin file. AutoHotkeySC.bin needs to be deployed because many programs/scripts rely on its existence, as you said. Not to mention that it is the only sensible default bin to be used when the user first runs Ahk2Exe. A choose-file dialog box would not work in a command-line situation, which can happen. |
So what do you suggest for the zip download? Even with a readme, I'm sure some users will just run the compiler and get the error message. I could name one of the files "AutoHotkeySC.bin", but that would make identifying the file more difficult and would have no benefit over Ahk2Exe choosing one of the bin files. Why require users to take extra steps to get it working?
I disagree. It's quite feasible to identify which version of AutoHotkey.exe they are using and choose a .bin file accordingly, or if they aren't using AutoHotkey.exe, choose the one which the installer defaults to. To identify the exe, my work-in-progress AutoHotkey_L installer runs a one-line script with something like the following (bit-shift is to avoid confusion with the failure exit codes): ExitApp % (A_IsUnicode=1) << 8 | (A_PtrSize=8) << 9 For future versions, I could embed string resources including (or change the version info to include) this information. |
I have an idea: have Ahk2Exe automatically copy the appropiate binary as AutoHotkeySC.bin depending on the flavor of ../AutoHotkey.exe. Is that a good idea? |
That's what I had in mind. |
Ok, see 2b3edd3. |
The error message when the bin file doesn't exist, while marginally more useful than before, is still unclear. It implicates the destination as a possible source of the error, which would lead the user in the wrong direction. Something like "Selected bin file does not exist" would be more accurate, clearer, and would lead to a solution more quickly.
However, I still think
I could ask users of the compiler download to rename their preferred file "AutoHotkeySC.bin", but it would be more intuitive for the compiler to just work in that situation. In particular, it doesn't make sense to always provide the "(Default)" option if it's not necessarily always valid.
Now that I think of it, the only reason to even have AutoHotkeySC.bin in the installation is for scripts that automate compilation which might expect it to exist. I think that includes Compile_AHK II. Edit: I was thinking the installer could simply write the bin file setting (based on the selected version) to the registry instead, but that mightn't work since the setting is per-user.
The text was updated successfully, but these errors were encountered: