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

OUT_FILE= in the ini file is being a pain for me, i write a main exe for one company, and then copy it to another folder with the ini file, where the same exe compiles with different plugins, which is for a different company...

you copy an executable to another folder and compile it? :roll:

or you copy the ahk-file + ini-file to another folder? did you realize, that i did a change that goes with your needs:

1.)
your script is f.e.:
D:\AHK\MyProgramFolder\MyScript.ahk
and your outgoing file is:
D:\AHK\MyProgramFolder\MyProgram.exe

2.)
compile it once again and in the ini-file you found a new outgoing path:
OUT_FILE=%IN_DIR%\MyProgram.exe

2.)
this means, if you copy the folder to X:\OTHER_AHK_THINGS the script will be:
X:\OTHER_AHK_THINGS\MyProgramFolder\MyScript.ahk
and the outgoing file now will be:
X:\OTHER_AHK_THINGS\MyProgramFolder\MyProgram.exe

isnt it what you want?

I need NO path set for OUT_FILE as they are always in %A_WorkingDir%, can you remove the path and just leave the filename please, if i dont manually change the ini file for that ahk it fails on compile or overwrites the main exe i created in the original folder (where original ini pointed).because sometimes i do this for 5 or 6 different compiles of the original ahk, i dont want to have to setup the ini file for each company every time i copy the ahk and its compile ini file.


your program is in %A_WorkingDir% ? so your program is in the same folder as the compile_ahk.exe?

jfk001
  • Members
  • 6 posts
  • Last active: Mar 02 2010 05:39 AM
  • Joined: 15 Mar 2006

I just noticed an error in your
Compile_AHK_Setup.ahk

I dont know if this can cause errors in the compile_ahk.ahk but when it asks you where to save the compiler in
c:\ decs settings \all user\ ... ... there is a [...] button to select folder.

just a note that this button doesnt actually change the path

I dont have "rights" at work to save stuff in all users and the [...] doesnt work.. Ill see if I can change it hopefully it wont affect other parts of the script.


Argh!

Please Replase the Line Nr. 145 with thies:
Gui, Add, Text, xp+10 yp+25 h20 v_INSTALL_DIR_, %s_INSTALL_DIR_ANZEIGE%

And the Line Nr. 154 with this:
Gui, Add, Text, xp+10 yp+25 h20 v_INSTALL_DIR_, %s_INSTALL_DIR_ANZEIGE%

And at last the Line Nr. 198 - 200 with this:
s_INSTALL_DIR := s_INSTALL_DIR_ANZEIGE_NEW
		StringSplit, s_INSTALL_DIR_, s_INSTALL_DIR_ANZEIGE_NEW, \
		s_INSTALL_DIR_ANZEIGE = %s_INSTALL_DIR_1%\%s_INSTALL_DIR_2%...`n%A_Tab%%A_Tab%\%s_INSTALL_DIR_3%\%s_INSTALL_DIR_4%...`n%A_Tab%%A_Tab%%A_Tab%%A_Tab%\AutoHotKey\Compiler


Trubbleguy
  • Members
  • 122 posts
  • Last active: Jan 15 2017 10:50 AM
  • Joined: 20 Jan 2007
the problem lies in the out_path saved in the ini
because the ini lies in the same folder with the ahk file i want to compile, it does not need a path, just the filename (does it need even the filename in there)

if the path is incorrect (i moved the ahk and ini) i get
Error: Error opening the destination file. if the path was missing it would default to local folder.

if i remove the path from the ini i get
Compilation error

see if you can remove the path but leave just the exe name and get it to compile, you should be able to get the current path using splitpath on %1% and adding the correct path later in your code and not save the path in the ini at all.

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

maybe my english isnt the best, but did you read my last post?

...
2.)
compile it once again and in the ini-file you find a new outgoing path:
OUT_FILE=%IN_DIR%\MyProgram.exe
...

isnt it what you wanted?

so once again:
if the outfile is saved in the same folder as the ahk file, compile ahk uses OUT_FILE=%IN_DIR%\Compile_AHK.exe instead of a hard path, since the last version!
%IN_DIR% means the path of the ahk-file. so if you move the ini and the ahk file, compile_ahk still uses the folder of this copied ahk file as output path. on next comping your old ini file is changed according to the descripted manner.

Update 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
+ Chaged: default installation folder is now afresh %A_ProgramFiles%\Autohotkey\Compiler
+ Fixed: Compile_AHK can be installed to wherever you want
+ Fixed: Compile_AHK now works 100% with enabled Data Execution Prevention (DEP) -> Thank you Lexikos

Trubbleguy
  • Members
  • 122 posts
  • Last active: Jan 15 2017 10:50 AM
  • Joined: 20 Jan 2007
Getting latest version to test 04/12/08
does the installer test registry for location of last installed version so that it can overwrite old one?
Thanks.

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
Update from 2008-04-13+ Changed: Setup reads install directory from registry
first: HKCR\AutoHotkeyScript\Shell\Compile_AHK\Command
second: HKCR\AutoHotkeyScript\Shell\Compile\Command
third: %ProgramFiles%\AutoHotkey\Compiler
+ 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 ResHackerDownload Compile_AHK

mandiom
  • Members
  • 34 posts
  • Last active: May 25 2008 05:12 PM
  • Joined: 03 Mar 2008
I get the following error message when I try to compile:

Error while deleting old log file!
Couldn't delete "Compile_AHK.log"


It used to work fine before the last 2 updates....

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
thank you for the bug report, please see below :-)

Update 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 ;-)Download Compile_AHK

mandiom
  • Members
  • 34 posts
  • Last active: May 25 2008 05:12 PM
  • Joined: 03 Mar 2008
Thanks! It works beautifully now :D

ecksphore
  • Members
  • 252 posts
  • Last active: Jul 20 2015 03:25 AM
  • Joined: 21 Nov 2006
I'm still having trouble with this.

When I try to double click the file - Compile_AHK.exe in the compiler folder, I keep getting a popup that shows:

Command Line Parameter Error!
Wrong Number of Parameters: 0

Any idea how to solve this?

Trubbleguy
  • Members
  • 122 posts
  • Last active: Jan 15 2017 10:50 AM
  • Joined: 20 Jan 2007

When I try to double click the file - Compile_AHK.exe in the compiler folder, I keep getting a popup that shows:

Command Line Parameter Error!
Wrong Number of Parameters: 0

the ahk is not designed to be run directly
right click on the ahk u want to compile and select COMPILE WITH OPTIONS

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
like Trubbleguy told you:
Posted Image

Update 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 menu
edit:

Question in the german thread <!-- m -->http://de.autohotkey... ... 2983#22983<!-- m --> -->

Hi,
I just tried the compiler, i nstalled it on vista using the exe setup.
It comiles great including custom icon.

The only thing not working is the version number and file details on the "version info" tab.

how can i fix that?

Thanks
Twhyman

please send me a personal message with the content of these files:
C:\Users\<username>\AppData\Local\Temp\Autohotkey\Compiler\
Compile_AHK.txt
VersionInfo.rc (open it with notepad)

you can open the folder if you open vista's start menu and input the following line into the input box at the end of the start menu:
%temp%\Autohotkey\Compiler

edit2:
is it possible, that the file version and product version are always the same as your autohotkey version? 1.0.47.6 if you've the newest version of autohotkey!?! and all other fields are empty except the language which is english (usa) ?

if that's the problem you dont have to send me the files cause i've hot the same problem on a xp-pc here =/
have to take a look on what went wrong when i'm back at home.

edit3:
fixed -->

Update from 2008-04-16+ Fixed: cause of a wrong set comma, the versioninfo wasnt written.
+ Fixed: error detection for Reshacker was without result in most casesedit4:
Update from 2008-04-16 v2+ New: Hint on words in the executable's file name, which cause Vista to force the need of admin rightsDownload Compile_AHK

ecksphore
  • Members
  • 252 posts
  • Last active: Jul 20 2015 03:25 AM
  • Joined: 21 Nov 2006

When I try to double click the file - Compile_AHK.exe in the compiler folder, I keep getting a popup that shows:

Command Line Parameter Error!
Wrong Number of Parameters: 0

the ahk is not designed to be run directly
right click on the ahk u want to compile and select COMPILE WITH OPTIONS


Thank you!

ladiko
  • Members
  • 290 posts
  • Last active: Jan 16 2012 11:46 PM
  • Joined: 13 Jul 2006
since the last versions, you can run compile_ahk by double clicking. see my entry above your last one.

Update from 2008-04-17+ Changed: All three Vista execution levels selectableDownload Compile_AHK

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004
Just thought id try this and got the following error.

---------------------------
Compile_AHK.exe
---------------------------
Error at line 1677.

Line Text: Local , elevated
Error: This line does not contain a recognized action.

The program will exit.
---------------------------
OK   
---------------------------

Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle