[Guide] Compiling Ahk_h's source step by step Topic is solved
Re: [Guide] Compiling Ahk_h's source step by step
What do you mean by ALL compilation options and what error do you get otherwise?
- manehscripts
- Posts: 126
- Joined: 03 May 2019, 16:10
Re: [Guide] Compiling Ahk_h's source step by step
Hi!
I only use the compiled x64w folder
But in order for it to be generated correctly, I need to check all options as below. If I uncheck Win32... for example, it does not work correctly.
The other files I do not use.
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
Stop to think, shut up to resist, and act to win!
Re: [Guide] Compiling Ahk_h's source step by step
What do you mean by it does not work correctly?
- manehscripts
- Posts: 126
- Joined: 03 May 2019, 16:10
Re: [Guide] Compiling Ahk_h's source step by step
When I choose only x64, in the final folder it does not create the .exe correctly, something is missing:
But when I choose ALL options (with x32) as I showed in the post above, it creates .exe the right way:
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
Stop to think, shut up to resist, and act to win!
Re: [Guide] Compiling Ahk_h's source step by step
Make sure that AutoHotkey is the startup project (bold) and tick or select AutoHotkey|MT_Release|x64 only.
- manehscripts
- Posts: 126
- Joined: 03 May 2019, 16:10
Re: [Guide] Compiling Ahk_h's source step by step
Hi, yeah, I make AutoHotkey is the startup project and tried to compile the way you said (AutoHotkey|MT_Release|x64 only) and also just choosing Release, but even so in the final file it doesn't get the right size and it doesn't work. But if I select all the options, as I mentioned above, the final file gets 2,448kb
Selecting just what you indicated and also all x64:
Selecting All Formats:
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
Stop to think, shut up to resist, and act to win!
Re: [Guide] Compiling Ahk_h's source step by step
Are you also executing CleanUpAndPack.exe afterwards? If so then you will have to compile the dlls too!
So select MT_Release + MT_ReleaseDll + MT_ReleaseDllMini (not the mbcs!!!).
So select MT_Release + MT_ReleaseDll + MT_ReleaseDllMini (not the mbcs!!!).
- manehscripts
- Posts: 126
- Joined: 03 May 2019, 16:10
Re: [Guide] Compiling Ahk_h's source step by step
Yes, I'm running the CleanUpAndPack.exe, but for me it only works when the final file gets 2.448kb, and it doesn't if I don't select ALL. I've tried several combinations and the final file is never the correct size.
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
Stop to think, shut up to resist, and act to win!
- manehscripts
- Posts: 126
- Joined: 03 May 2019, 16:10
Re: [Guide] Compiling Ahk_h's source step by step
I found a solution. I compile by selecting all the options, then later I just mark the x64 and it works.
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
Stop to think, shut up to resist, and act to win!
Re: [Guide] Compiling Ahk_h's source step by step
i just followed the steps for this right now, with the latest AHK_H commit on master v1 branch:
here are my notes after following the first post in this thread:
1.1) i never got the Retarget Projects popup when opening the .sln file.. i guess maybe the latest AHK_H doesn't need it anymore?
but, that means that i dont have an SDK number to save for Step 1.3
1.3) in fact, i dont have any of these folders: 'C:\Program Files (x86)\Windows Kits\10\Include\HERE GOES THE VERSION\shared';
i dont have ..\Windows Kits\10\Include\... i only have '..\Windows Kits\10\ExtensionSDKs\...'
and i know i checked the correct boxes to install in step 1
1.4) $(LibraryPath); was already added so i didnt have to touch these
1.5) the OP only shows 4 configs to build: Release, ReleaseDll, ReleaseDllMini, SelfContained. BUT, really you also have to build the corresponding (mbcs) for all of them too (which is the config for Win32a ansi), and then you ALSO need to build all of the MT_ variants too. otherwise, in the next step 1.6, CleanUpAndPack will complain when it can't find the ansi or MT files. (actually, i think you can skip x64 configs for mbcs, because i believe the x64 builds only support unicode)
everything builds successfully for me despite not adding the SDK lib dirs above.
2.1) i'm seeing 8 references for g_default_pwd now, not 6
2.5) similarly, its now the 8th (last) reference (not 6th) where you change the pw and can change the index offsets
thanks @kyuuuri for the guide
Ahk2Exe:
important: when you want to compile your ahk script, you must Run the Ahk2exe script with the same AHK executable type as you plan on compiling with the base file. for example, if you run Ahk2exe with Ansi version of AHK, but then you choose win32w (unicode) for your base file, the resulting .exe won't open with error "the variable name contains an invalid char". its likely because it needs the pw as a unicode string not ansi. and vice versa
973709968f5698c1f95f95d28e94e897be1780ec
Nov 29, 2019
Fix bug for compressed scripts
here are my notes after following the first post in this thread:
1.1) i never got the Retarget Projects popup when opening the .sln file.. i guess maybe the latest AHK_H doesn't need it anymore?
but, that means that i dont have an SDK number to save for Step 1.3
1.3) in fact, i dont have any of these folders: 'C:\Program Files (x86)\Windows Kits\10\Include\HERE GOES THE VERSION\shared';
i dont have ..\Windows Kits\10\Include\... i only have '..\Windows Kits\10\ExtensionSDKs\...'
and i know i checked the correct boxes to install in step 1
1.4) $(LibraryPath); was already added so i didnt have to touch these
1.5) the OP only shows 4 configs to build: Release, ReleaseDll, ReleaseDllMini, SelfContained. BUT, really you also have to build the corresponding (mbcs) for all of them too (which is the config for Win32a ansi), and then you ALSO need to build all of the MT_ variants too. otherwise, in the next step 1.6, CleanUpAndPack will complain when it can't find the ansi or MT files. (actually, i think you can skip x64 configs for mbcs, because i believe the x64 builds only support unicode)
everything builds successfully for me despite not adding the SDK lib dirs above.
2.1) i'm seeing 8 references for g_default_pwd now, not 6
2.5) similarly, its now the 8th (last) reference (not 6th) where you change the pw and can change the index offsets
thanks @kyuuuri for the guide
Ahk2Exe:
important: when you want to compile your ahk script, you must Run the Ahk2exe script with the same AHK executable type as you plan on compiling with the base file. for example, if you run Ahk2exe with Ansi version of AHK, but then you choose win32w (unicode) for your base file, the resulting .exe won't open with error "the variable name contains an invalid char". its likely because it needs the pw as a unicode string not ansi. and vice versa
Re: [Guide] Compiling Ahk_h's source step by step
Hello people!, I'm planning on updating this guide but I'm a little busy. I will need to setup a fresh win10 installation in the near future so I will try then. @HotKeyIt is there any possibility to make the cleanUpAndPack.ahk work without the need to compile all versions? (Right now if you do not compile all versions [x64w, x86w, x86A] it will complain and fail).
Re: [Guide] Compiling Ahk_h's source step by step
Updated the guide! please tell me if you see any errors. Thank you!guest3456 wrote: ↑09 Dec 2019, 00:21i just followed the steps for this right now, with the latest AHK_H commit on master v1 branch:973709968f5698c1f95f95d28e94e897be1780ec
Nov 29, 2019
Fix bug for compressed scripts
here are my notes after following the first post in this thread:
1.1) i never got the Retarget Projects popup when opening the .sln file.. i guess maybe the latest AHK_H doesn't need it anymore?
but, that means that i dont have an SDK number to save for Step 1.3
1.3) in fact, i dont have any of these folders: 'C:\Program Files (x86)\Windows Kits\10\Include\HERE GOES THE VERSION\shared';
i dont have ..\Windows Kits\10\Include\... i only have '..\Windows Kits\10\ExtensionSDKs\...'
and i know i checked the correct boxes to install in step 1
1.4) $(LibraryPath); was already added so i didnt have to touch these
1.5) the OP only shows 4 configs to build: Release, ReleaseDll, ReleaseDllMini, SelfContained. BUT, really you also have to build the corresponding (mbcs) for all of them too (which is the config for Win32a ansi), and then you ALSO need to build all of the MT_ variants too. otherwise, in the next step 1.6, CleanUpAndPack will complain when it can't find the ansi or MT files. (actually, i think you can skip x64 configs for mbcs, because i believe the x64 builds only support unicode)
everything builds successfully for me despite not adding the SDK lib dirs above.
2.1) i'm seeing 8 references for g_default_pwd now, not 6
2.5) similarly, its now the 8th (last) reference (not 6th) where you change the pw and can change the index offsets
thanks @kyuuuri for the guide
Ahk2Exe:
important: when you want to compile your ahk script, you must Run the Ahk2exe script with the same AHK executable type as you plan on compiling with the base file. for example, if you run Ahk2exe with Ansi version of AHK, but then you choose win32w (unicode) for your base file, the resulting .exe won't open with error "the variable name contains an invalid char". its likely because it needs the pw as a unicode string not ansi. and vice versa
Re: [Guide] Compiling Ahk_h's source step by step
In your updated guide I cannot fully see the names for solution config tab(on step "1.3" for the second image in "Check the following boxes"), It would be nice if you had a plain text to reference for all the requirements and not just an image(Names are cut off at the end in the image.) Please update, thank you!
I also cannot find duplicate names on my end. I think something is wrong on your guide. Please look and tell me what to do:
Re: [Guide] Compiling Ahk_h's source step by step
Hmm, they should be there unless HotKeyIt removed those. Can you send an screenshot of the options you have?
Re: [Guide] Compiling Ahk_h's source step by step
Here is the screenshot of the options I have, I can't find the duplicates unless I'm missing something, There are the same names under "lib_pcre" but not under AutoHotKey. Also, after I change the g_default password do I need to rebuild? and run cleanupAndPack.exe? The tutorial didn't mention this and I'm slightly confused as to what I do after I change the password.
Re: [Guide] Compiling Ahk_h's source step by step
Hmm now that I double checked the image, it seems that I did a bad edit hahha. You should have these for each version (x64, x32, mbcs):
Release
ReleaseDllMini
ReleaseDll
Self-contained
MT_Release
MT_ReleaseDllMini
MT_ReleaseDll
MT_Self-contained
Release
ReleaseDllMini
ReleaseDll
Self-contained
MT_Release
MT_ReleaseDllMini
MT_ReleaseDll
MT_Self-contained
Re: [Guide] Compiling Ahk_h's source step by step
@kyuuuri
Thank you for responding so quickly and letting me know, I appreciate that.
So just to confirm, it should look like this?
Thank you for responding so quickly and letting me know, I appreciate that.
So just to confirm, it should look like this?
Re: [Guide] Compiling Ahk_h's source step by step
Untick ...(mbcs) x64, there is no ANSI 64-bit version!
Re: [Guide] Compiling Ahk_h's source step by step
Okay, I did that. I'm Having an issue. I compiled my source and changed the password:
1st Reference(g_default_pwd) :
2nd Reference(g_default_pwd):
3rd Reference(g_default_pwd):
8th Reference:
1) I made sure "Spectre Mitigation" is disabled on AutoHotkey project -> properties -> C/C++ -> Spectre Mitigation -> Disabled.
2) I batch build with the recommended options posted in the above photo (but without any mbcs x64)
3) Then I run "CleanUpAndPack.exe"
4) I place all the compiled folders from "ahkdll-master\bin" into the "AutoHotKey" (AutoHotKey_L) directory.
5) I copy "AutoHotkey.exe" file from "AutoHotkey\x64w" and rename it to "Ahk2Exe.exe" and place it in "AutoHotkey\Compiler".
6) I try compiling my program with the password "7t3s9eqFWzS7Fd97VsWH" and I get this error: my AHK folder looks like this: My Compiler folder looks like this: I'm so confused as to what I am doing incorrectly. Can you please help? Am I placing the files in the incorrect directory? Why is my password not functioning?
EDIT: I recompiled everything with a password using only letters and it works now! Thank you for the responses. Is it required that the password can be only be letters? Is there a way to add numbers?
1st Reference(g_default_pwd) :
Code: Select all
TCHAR *g_default_pwd[] = { &g_default_pwd0, &g_default_pwd1, &g_default_pwd2, &g_default_pwd3, &g_default_pwd4, &g_default_pwd5, &g_default_pwd6, &g_default_pwd7, &g_default_pwd8, &g_default_pwd9, &g_default_pwd10, &g_default_pwd11, &g_default_pwd12, &g_default_pwd13, &g_default_pwd14, &g_default_pwd15, &g_default_pwd16, &g_default_pwd17, &g_default_pwd18, &g_default_pwd19, 0, 0 };
Code: Select all
extern TCHAR g_default_pwd0;
extern TCHAR g_default_pwd1;
extern TCHAR g_default_pwd2;
extern TCHAR g_default_pwd3;
extern TCHAR g_default_pwd4;
extern TCHAR g_default_pwd5;
extern TCHAR g_default_pwd6;
extern TCHAR g_default_pwd7;
extern TCHAR g_default_pwd8;
extern TCHAR g_default_pwd9;
extern TCHAR g_default_pwd10;
extern TCHAR g_default_pwd11;
extern TCHAR g_default_pwd12;
extern TCHAR g_default_pwd13;
extern TCHAR g_default_pwd14;
extern TCHAR g_default_pwd15;
extern TCHAR g_default_pwd16;
extern TCHAR g_default_pwd17;
extern TCHAR g_default_pwd18;
extern TCHAR g_default_pwd19;
extern TCHAR *g_default_pwd[];
Code: Select all
for (int i = 0; i < 20; i++)
Code: Select all
pw[i] = pwd == g_default_pwd ? (TCHAR) _T("7\0t\03\0s\09\0e\0q\0F\0W\0z\0S\07\0F\0d\09\07\0V\0s\0W\0H\0")[i*2] : (TCHAR)*pwd[i];
2) I batch build with the recommended options posted in the above photo (but without any mbcs x64)
3) Then I run "CleanUpAndPack.exe"
4) I place all the compiled folders from "ahkdll-master\bin" into the "AutoHotKey" (AutoHotKey_L) directory.
5) I copy "AutoHotkey.exe" file from "AutoHotkey\x64w" and rename it to "Ahk2Exe.exe" and place it in "AutoHotkey\Compiler".
6) I try compiling my program with the password "7t3s9eqFWzS7Fd97VsWH" and I get this error: my AHK folder looks like this: My Compiler folder looks like this: I'm so confused as to what I am doing incorrectly. Can you please help? Am I placing the files in the incorrect directory? Why is my password not functioning?
EDIT: I recompiled everything with a password using only letters and it works now! Thank you for the responses. Is it required that the password can be only be letters? Is there a way to add numbers?
Re: [Guide] Compiling Ahk_h's source step by step
Hi, is not required. Probably there was a typo somewhere.uhwok3n wrote: ↑23 May 2020, 05:05Okay, I did that. I'm Having an issue. I compiled my source and changed the password:
1st Reference(g_default_pwd) :2nd Reference(g_default_pwd):Code: Select all
TCHAR *g_default_pwd[] = { &g_default_pwd0, &g_default_pwd1, &g_default_pwd2, &g_default_pwd3, &g_default_pwd4, &g_default_pwd5, &g_default_pwd6, &g_default_pwd7, &g_default_pwd8, &g_default_pwd9, &g_default_pwd10, &g_default_pwd11, &g_default_pwd12, &g_default_pwd13, &g_default_pwd14, &g_default_pwd15, &g_default_pwd16, &g_default_pwd17, &g_default_pwd18, &g_default_pwd19, 0, 0 };
3rd Reference(g_default_pwd):Code: Select all
extern TCHAR g_default_pwd0; extern TCHAR g_default_pwd1; extern TCHAR g_default_pwd2; extern TCHAR g_default_pwd3; extern TCHAR g_default_pwd4; extern TCHAR g_default_pwd5; extern TCHAR g_default_pwd6; extern TCHAR g_default_pwd7; extern TCHAR g_default_pwd8; extern TCHAR g_default_pwd9; extern TCHAR g_default_pwd10; extern TCHAR g_default_pwd11; extern TCHAR g_default_pwd12; extern TCHAR g_default_pwd13; extern TCHAR g_default_pwd14; extern TCHAR g_default_pwd15; extern TCHAR g_default_pwd16; extern TCHAR g_default_pwd17; extern TCHAR g_default_pwd18; extern TCHAR g_default_pwd19; extern TCHAR *g_default_pwd[];
8th Reference:Code: Select all
for (int i = 0; i < 20; i++)
1) I made sure "Spectre Mitigation" is disabled on AutoHotkey project -> properties -> C/C++ -> Spectre Mitigation -> Disabled.Code: Select all
pw[i] = pwd == g_default_pwd ? (TCHAR) _T("7\0t\03\0s\09\0e\0q\0F\0W\0z\0S\07\0F\0d\09\07\0V\0s\0W\0H\0")[i*2] : (TCHAR)*pwd[i];
2) I batch build with the recommended options posted in the above photo (but without any mbcs x64)
3) Then I run "CleanUpAndPack.exe"
4) I place all the compiled folders from "ahkdll-master\bin" into the "AutoHotKey" (AutoHotKey_L) directory.
5) I copy "AutoHotkey.exe" file from "AutoHotkey\x64w" and rename it to "Ahk2Exe.exe" and place it in "AutoHotkey\Compiler".
6) I try compiling my program with the password "7t3s9eqFWzS7Fd97VsWH" and I get this error:
error_compile.png
my AHK folder looks like this:
primary_folder_ahk.png
My Compiler folder looks like this:
Lib_folder_ahk.png
I'm so confused as to what I am doing incorrectly. Can you please help? Am I placing the files in the incorrect directory? Why is my password not functioning?
EDIT: I recompiled everything with a password using only letters and it works now! Thank you for the responses. Is it required that the password can be only be letters? Is there a way to add numbers?