Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Compile_AHK II - for those who compile!


  • Please log in to reply
467 replies to this topic
ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
By mutual consent i undertake the project Compile_AHK from nick.

> Downloads <

Setup:
+ Compile_AHK_Setup.exe

Additional Downloads:
+ AHK script of the program: Compile_AHK.ahk
+ AHK script of the setup: Compile_AHK_Setup.ahk
> Screenshots <

Posted Image Posted Image Posted Image Posted Image Posted Image

> Additional features <+ direct call from the context menu of a script
+ offers all options of the AutoHotkey compiler (change icon, compression level, NoDecompile, password protection
+ changing the version information (file properties like company name, product name, product version, file version etc.)
> Additional information <
+ What is it good for?
+ How does it work?
+ Explanations of Run Before and Run After?... you can find in the old thread: <!-- m -->http://www.autohotke...pic.php?t=14379<!-- m -->

> Updates <


Update of 2009-09-16+ New: Possibility to save settings in the script instead of a separate ini file
+ Changed: Order of of files to read settings from: Skript.ahk, Skript.ahk.ini, Defaults.iniUpdate of 2009-06-16+ Fixed: language.ini reworked
+ Fixed: error message if language.ini is missing
+ Changed: if the AutohotkeySC.bin already has a manifest with an execution level, it will be changed instead of adding a second one (AutoHotkey_L -> side-by-side error)Update of 2009-03-02+ Fixed: useless error message if addresource.script should be deleted, but doesn't existUpdate of 2009-01-20+ Fixed: two errors were added while fixing bugs in the last version ^^ (thank you pekkle)Update of 2009-01-14+ Fixed: if Set_Version_Info is not set the Resource_Files key is not processed
+ Changed: Range for all version fields raised to 4 digitsUpdate of 2008-12-28 v2+ Fixed: all text fields should now change correctly, when another language is selectedUpdate of 2008-12-28+ Changed: order of actions changed (see <!-- m -->http://www.autohotke... ... 046#240046<!-- m -->)
+ Changed: copy of lib folder is no longer deleted before the lib folder is copied again
+ Fixed: changes to the bin file were not applied if an alternative bin file was used
+ Fixed: AlwaysOnTop icons were not displayed in last version(s) cause the new function to delete icons was usedUpdate of 2008-12-27+ Changed: pathes to icon files in the defaults.ini are no longer relative
+ Changed: "cmd /c" calls removed, where not needed
+ Changed: more steps logged in the log file
+ Changed: more detailed UAC help
+ Fixed: alternative bin was not usedUpdate of 2008-12-20+ New: Option to delete the build-in icons if not needed
+ Fixed: bug, if there isnt a upx.exe in the compilier directory
+ Fixed: icon selection should now work on win9x
+ Fixed: typo "NoUPX Error`n." -> "NoUPX Error.`n" and other small changesUpdate of 2008-12-13+ Fixed: language variables updated and completed
+ Fixed: error messages fixedUpdate of 2008-11-25+ Fixed: Variable for Company_Name was brokenUpdate of 2008-11-16+ Changed: Resources are saved in ini filesUpdate of 2008-11-12+ Changed: Variable names in the file $ScriptName$.ahk.ini were changed, old and new names were read, but only new are written
+ Fixed: language.ini was not installedUpdate of 2008-11-11+ Neu: simple language selection available - a.t.m. only en-us and de-deUpdate of 2008-11-08+ New: option to choose an alternive AutoHotkeySC.bin
+ New: tooltips over gui elements (to be continued)
+ Changed: gui title is now "Compile_AHK - $ScriptName$"
+ Changed: old AlwaysOnTop(ON/OFF) tooltips removed
+ Changed: some error messages are more detailed
+ Changed: some small changes in compilation process
+ Fixed: max. size of icon preview limited (hopefully)
+ Fixed: icon extraction works without write access on the compile_ahk folder (Reshacker.log)Update of 2008-11-06+ New: parameter /nogui to supress all guis / warning
+ Changed: /auto now shows complete message.Update of 2008-11-05+ New: separate "No UPX" option (compression settings has to be reset)
+ New: option to update the "Created:" dateUpdate of 2008-11-01+ New: parameter /auto added to automatically compile with the current ini-settings
+ New: setup option for a new context menu entry "Compile with Options (Auto)"
+ Fixed: pathes were completed inernally, if a ahk file was called without a complete path from %A_ScriptDir% or %A_WorkingDir%
+ Fixed: quotation marks are only added to Run Before and Run After, if there are spaces in the given pathes
+ Fixed: Lib folder will now be copied to the folder of the AutoHotkey.exe instead of the Ahk2exe.exe (untested)Update of 2008-10-29+ Fixed: Added quotes around Run Before and After to allow pathes with spaces.Update from 2008-05-31+ New: defaults.ini can be saved in Compile_AHK's folder
+ Changed: More compact GUI
+ Changed: ini-files are read in following order / priority:[*:kwgksjy9]script folder
[*:kwgksjy9]AppData folder
[*:kwgksjy9]Compile_AHK.exe folder[/list]Update from 2008-05-26+ Changed: possibility to continue installation if A_AhkPath is empty
+ Changed: Possibility to continue compiling if ResHacker.exe or GoRC.exe is missing
+ Changed: Replaced all occurrences of "Compile AHK" to "Compile_AHK" and "Compile AHK Setup" to "Compile_AHK_Setup"
+ Changed: internal behaviour of the "Compile" button changed from WinWaitClose to a normal subroutineUpdate from 2008-05-25+ New: Installer supports command line parameters for silent installation. List of parameters with /something
+ New: PortableApp: Compile_AHK etc. should be in the same folder like AHK2EXE.exe, f.e. X:\PortableApps\AutoHotkey\Compiler
+ Fixed: If an icon file from another folder should be copied to the script folder, this task wasnt processedUpdate from 2008-05-06
+ Fixed: Added a line break to the installation path in the installer, if it is too long
+ Changed: If launched without parameters, the preset start folder isn't c:\ anymoreUpdate vom 2008-04-17 v2
+ Changed: VersionInfo Language and Codepage / Charset can be changedUpdate from 2008-04-17+ Changed: All three Vista execution levels selectableUpdate from 2008-04-16 v2+ New: Hint on words in the executable's file name, which cause Vista to force the need of admin rightsUpdate from 2008-04-16+ Fixed: cause of a wrong comma, the versioninfo wasnt written.
+ Fixed: error detection for Reshacker was without result in most casesUpdate from 2008-04-14 v2+ New: If Compile_AHK is called without parameters, you can choose a ahk file to open
+ New: Setup can create shortcut files on desktop and in the start menuUpdate from 2008-04-14 + New: Button to generate a password
+ New: If present, the folder Lib + AutoHotkey.exe will be copied too (function untested)
+ Fixed: Error message if the log file Compile_AHK.log is not available for deletion ;-)Update from 2008-04-13+ Changed: Setup reads install directory from registry
+ Changed: Reset button to set install directory to the recommended path
+ Changed: small changed in the setup gui
+ Fixed: Error while extracting an icon from a resource file cause of a missing path to the ResHackerUpdate from 2008-04-12+ New: A small log file and other debugging files are written to %A_Temp%\AutoHotkey\Compiler
+ New: New main icon by Titan / <!-- w -->www.autohotkey.net<!-- w --> -> Thank you Titan for the permission :-)
+ Changed: WorkingDir now is %A_Temp%\AutoHotkey\Compiler instead of %A_ScriptDir%
+ Changed: Defaults.ini is now saved in %A_AppData%\AutoHotkey\Compiler
+ Changed: AlwaysOnTop icons are now included in the Compile_AHK.exe
+ Changed: Updated Credits GUI with clickable URLs
+ Changed: Smaller Installer GUI --> needs further enhancement
+ Änderung: Standard-Installationsverzeichnis ist wieder unter %A_ProgramFiles%
+ Fixed: Compile_AHK can be installed to wherever you want
+ Fixed: Compile_AHK now works 100% with enabled Data Execution Prevention (DEP) -> Thank you LexikosUpdate from 2008-04-08+ Fixed: Icon settings were not saved in defaults.ini
+ Fixed: handling of double quotation marks in password correctedUpdate from 2008-04-06 v2+ New: Credits GUI by AGU & LaszloUpdate from 2008-04-06+ New: Compression level: None
+ Changed: now the ini file is only written if you compile
+ Fixed: New projects had `%IN_DIR`% in outgoing executables path
+ Fixed: compression level of Ahk2Exe.exe saved and reset after compilationUpdate from 2008-04-05:+ New: icons can be copied to the script's folder and pathes in the .ini files are now relative --> portable script folder
+ Changed: the icons on the icon tab are now sorted like inside the compiled file
+ Changed: renamed the shipped icons from AllOnTop(On/Off).ico to AlwaysOnTop(On/Off).ico
+ Changed: the values ICON_%A_Index%_SET are not longer saved in the .ini files
+ Fixed: Bug in GUI on non-Vista systems
+ Fixed: Wrong file names in error messagesUpdate from 2008-04-03:+ New: icons can be picked from resource files like dlls and executables
+ Changed: AllwaysOnTop now uses icons instead of text
+ Fixed: "Set AHK-Version" wasn't disabled on startup, if versioninfo was disabledUpdate from 2008-03-08:+ New: option to increment file and product version automaticallyUpdate from 2007-12-03:+ Fixed: visual display of target folder name in the installer on non-Vista systems
+ Changed: reworked some Messageboxes
+ Changed: other small fixes
+ New: Always-On-Top-Button
+ Thanks again to jfk001, this update is about 95% based on his work :-)Update from 2007-09-16:+ Changed: Icon settings were not saved if Version Info wasn't checked
+ Changed: Icon_1 was still saved in AHK2EXE section of the INI-files
+ Thanks to jfk001 for detecting the mistakes :-)Update from 2007-09-12:+ Fixed: Wrong interaction between Set Version Info and Set to AutoHotkey.exe version
+ Changed: New Icons-Tab to change all 7 Icons --> Icon-Settings have to be set again!
+ Changed: The buttons Compile and Abort are now available on all tabs.
+ New: Button Save Defaults saves predefined settings for (new) scripts, which don't have a scriptname.iniUpdate from 2007-09-11:+ Fixed: Set AutoHotkey.exe version doesnt work, cause two coders are not necessarily better than one :-)
+ Fixed/Workaround: On non-english systems ResHacker adds a second VersionInfo instead of overwriting the old one
+ Changed: All options of the Setup are preselected
+ New: Option to show or hide compilation passwordUpdate from 2007-09-09:+ Fixed: Vista-compatible, no need of administrator rights to compile
+ Changed: Installation to the folder %A_AppDataCommon%\AutoHotkey\Compiler or as Windows environment variable %ProgramData%\AutoHotkey\Compiler
+ New: Option to force Vista User Account Control (UAC) to popup for compiled program to avoid missing rights

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
Can you provide an option to select the install path?

-=Rob=-
  • Members
  • 1 posts
  • Last active: May 23 2009 05:16 PM
  • Joined: 21 Jul 2007
Very nice! Thank you! :p

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006

Can you provide an option to select the install path?

i can and i already tried but it's a little bit confusing to me cause i have to handle three directories:
ahk-dir with ahk2exe.exe, AutoHotkeySC.bin, upx.exe
install-dir with compile_ahk.exe, reshacker.exe and gorc.exe
working-dir to write temporary AppData (f.e. log-files, edited AutoHotkeySC.bin. resource-files, etc) to a writable directory if program-dir is not write-accessable for unprivileged users.
so i have to copy some or all files to a working dir and execute them there. f.e. autohotkeySC.bin must be edited and that cant happen in ahk-dir and ahk2exe.exe use the autohotkeysc.bin in its (ahk)directory to create the compiled program. so i have to copy both somewhere else.

i know it is only neccessary for some users to have different install- and working-dir, cause they have write access for the windows program files directory, but i wanna do it like it should be 100% correct.

AHKnow*
  • Guests
  • Last active:
  • Joined: --
Interesting and nice.

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
Small bug found, (I am NOT complaining, great work, far more than I can even understand) 8)

When I first started this program, CPULOCK, I was even more of a nooob, than I am now, :lol: :shock: I made a program that was LONG...
"Click this if you're having trouble installing a program or hardware.exe"
:roll:
I would change it but it is so deep into my programs, it would take a day!

No one else will be as dumb as me and make such a long name, but, if I use your program to compile, it errors out.
Not worth fixing, I am sure I am the only one.

daveand5
  • Members
  • 20 posts
  • Last active: Feb 10 2009 06:11 PM
  • Joined: 09 Nov 2007
says cant find install dir
says reinstall autohotkey, did that
Now says it cant write to compiler dir
changed folder parameter (on compiler and autohotkey) was read only
still cant write to folder
help?

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

says cant find install dir
says reinstall autohotkey, did that
Now says it cant write to compiler dir
changed folder parameter (on compiler and autohotkey) was read only
still cant write to folder
help?

Replace permissions, Take ownership of AHK dir, make sure you replace permisions on all sub folders, make Everyone Full..
If using Vista, turn off UAC durring install.

daveand5
  • Members
  • 20 posts
  • Last active: Feb 10 2009 06:11 PM
  • Joined: 09 Nov 2007

Replace permissions, Take ownership of AHK dir, make sure you replace permisions on all sub folders, make Everyone Full..
If using Vista, turn off UAC durring install.


I can change permissions on any server I have websites, but as far as changing permissions on my pc or laptop, I only know of changing the read only checkmark. If there is 'permissions' to change please explain that.
I already own the machine, how do I take ownership of AHK?
some of us are not 'computer whiz's' but have a decent or respectable knowledge of our machines, and still dont know everything about the machine, and hence need to be talked to at a lower level of knowledge, else we'll never get to your level.
thanks for helping in advance

Trubbleguy
  • Members
  • 122 posts
  • Last active: Jan 15 2017 10:50 AM
  • Joined: 20 Jan 2007
Great Job, im using it all the time, but can you do one thing, option the icons to be COPIED to the ahk folder with a checkbox option, when i zip up my code in backups, i like to include icons, and if the icons are copied when compiled with your compiler i dont have to hunt through my icon store for them to be added to my backup. (or if the ini is deleted by accident)

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006
Do you have Vista or XP?
Right click on the Auto Hotkey, (AHK), folder, select properties,
Posted Image

Turning off User Account Control, (UAC), may be enough, also make sure you are not logged in as a Guest, (limited User), account.
Sorry, sometimes I forget to speak English.

daveand5
  • Members
  • 20 posts
  • Last active: Feb 10 2009 06:11 PM
  • Joined: 09 Nov 2007
the file in the zip package installed, but comes up with the 0 parameter error when compile is clicked on, there is no context message to select when right clicking on an ahk file.

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006

I made a program that was LONG...
"Click this if you're having trouble installing a program or hardware.exe"

can't confirm this for me -->
Posted Image
maybe your folder name or path is also longer than mine?
maybe try to disable icon changing or version info changing, cause there are several tools involved and by disabling this option you can figure out which part of compiling fails.


says cant find install dir
says reinstall autohotkey, did that
Now says it cant write to compiler dir
changed folder parameter (on compiler and autohotkey) was read only
still cant write to folder
help?

please some screenshots!


Do you have Vista or XP?
Right click on the Auto Hotkey, (AHK), folder, select properties ...

1.) if a program needs write access to the program folder, something is wrong. then it's a fault of the programmer and he has to change this.
2.)all versions sincs september doesnt need write access to the autohotkey-folder in %A_ProgramFiles%. Please look at the first post:

Update from 2007-09-09:+ Fixed: Vista-compatible, no need of administrator rights to compile


the file in the zip package installed, but comes up with the 0 parameter error when compile is clicked on, there is no context message to select when right clicking on an ahk file.

which zip package? i've only offered an executable installer, which has the option to set the menu entry. if it would fail writing this entries, it would tell it to you.


Great Job, im using it all the time, but can you do one thing, option the icons to be COPIED to the ahk folder with a checkbox option, when i zip up my code in backups, i like to include icons, and if the icons are copied when compiled with your compiler i dont have to hunt through my icon store for them to be added to my backup. (or if the ini is deleted by accident)

somebody else thinking this would be usefull?

DeWild1
  • Members
  • 369 posts
  • Last active: Feb 28 2014 08:15 PM
  • Joined: 30 Apr 2006

maybe your folder name or path is also longer than mine?
maybe try to disable icon changing or version info changing, cause there are several tools involved and by disabling this option you can figure out which part of compiling fails.


Indeed, a very LOOOng folder name and path.. I am sure that is why..

One thing, does any one know why even when I rename UPX.exe and I have no other packer... That the files are still being compressed when i use your awesome program?
Does it have UPX.exe in it?
Or did you invent your own?
I know it modifies AutoHotkeySC.bin but I could not find any upx.exe on my hard drive...
I can not use any packers because of the dam malware makers.. The AV and AS software always seem to be lazy and block anything packed with any of the common "free" packers.

bmcclure
  • Members
  • 774 posts
  • Last active: Jan 04 2014 10:44 PM
  • Joined: 24 Nov 2007
I have Vista Ultimate 64-bit, and am experiencing an issue with this. It doesn't seem to compile in the functions from my user lib directory which I use. They work in the uncompiled version, and if I compile with the AHK compiler, but I get errors when trying to use any lib function from an exe compiled with this script (because function doesn't exist). Any ideas?