[1.1.34.04] ahk2exe does not include standard library when compiling for 32-bit Topic is solved

Report problems with documented functionality
Federhalter
Posts: 13
Joined: 07 Sep 2022, 04:04

[1.1.34.04] ahk2exe does not include standard library when compiling for 32-bit

07 Sep 2022, 04:30

When compiling a script for Unicode 32-bit (on a 64-bit system), the standard library directory (directory-of-the-currently-running-AutoHotkey.exe\Lib\) is not used.

Example:
HtmlClip.ahk contains

Code: Select all

#Include <WinClipAPI>
WinClipAPI.ahk is in C:\ProgramData\TH\AutoHotkey\Lib

The following command line

Code: Select all

C:\ProgramData\TH\AutoHotkey\Compiler\Ahk2Exe.exe /in .\HtmlClip.ahk /bin "c:\ProgramData\th\AutoHotkey\Compiler\Unicode 64-bit.bin"
works.

Code: Select all

C:\ProgramData\TH\AutoHotkey\Compiler\Ahk2Exe.exe /in .\HtmlClip.ahk /bin "c:\ProgramData\th\AutoHotkey\Compiler\Unicode 32-bit.bin"
fails with error message:
#include file cannot be opened. Specifically: "...\HtmlClipboard\<WinClipAPI>"
When specifying path to AutoHotkey.exe with /ahk "c:\ProgramData\th\AutoHotkey\AutoHotkey.exe", the bug does not occur.

Some debugging of ahk2exe reveals that when the line

Code: Select all

global StdLibDir := Util_GetFullPath(AhkPath "\..\Lib")
is executed, AhkPath is set to c:\ProgramData\th\AutoHotkey\Compiler\Ahk2Exe.exe and StdLibDir=c:\ProgramData\th\AutoHotkey\Compiler\Lib

This is a bug. I expect it to be in c:\ProgramData\th\AutoHotkey\Lib. Since AutoHotkey.exe is c:\ProgramData\th\AutoHotkey\AutoHotkey.exe, that is where according to https://www.autohotkey.com/docs/Functions.htm#lib the standard library is.
TAC109
Posts: 1129
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: [1.1.34.04] ahk2exe does not include standard library when compiling for 32-bit  Topic is solved

07 Sep 2022, 19:57

Thanks for the bug report. This is now fixed in Ahk2Exe v1.1.34.04a.
See this post for download details.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 9 guests