AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compile_AHK II - for those who compile!
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Thu Apr 10, 2008 2:19 pm    Post subject: Re: OUT_FILE problem Reply with quote

Trubbleguy wrote:
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? Rolling Eyes

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?

Trubbleguy wrote:
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?
Back to top
View user's profile Send private message
jfk001



Joined: 15 Mar 2006
Posts: 6

PostPosted: Thu Apr 10, 2008 3:43 pm    Post subject: Reply with quote

Razlin wrote:
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:
Code:
Gui, Add, Text, xp+10 yp+25 h20 v_INSTALL_DIR_, %s_INSTALL_DIR_ANZEIGE%


And the Line Nr. 154 with this:
Code:
   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:
Code:
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
Back to top
View user's profile Send private message
Trubbleguy



Joined: 20 Jan 2007
Posts: 73
Location: Melbourne

PostPosted: Fri Apr 11, 2008 1:06 am    Post subject: Reply with quote

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.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Sat Apr 12, 2008 5:54 pm    Post subject: Reply with quote

@Trubbleguy:

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

ladiko wrote:
...
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 / www.autohotkey.net -> Thank you Titan for the permission Smile
    + 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
Back to top
View user's profile Send private message
Trubbleguy



Joined: 20 Jan 2007
Posts: 73
Location: Melbourne

PostPosted: Sun Apr 13, 2008 1:10 am    Post subject: Reply with quote

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.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Sun Apr 13, 2008 12:00 pm    Post subject: Reply with quote

Update from 2008-04-13
    + Changed: Setup reads install directory from registry
    Code:
    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 ResHacker


Last edited by ladiko on Sun Apr 13, 2008 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
mandiom



Joined: 03 Mar 2008
Posts: 34

PostPosted: Sun Apr 13, 2008 9:34 pm    Post subject: Reply with quote

I get the following error message when I try to compile:
Quote:

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


It used to work fine before the last 2 updates....
Back to top
View user's profile Send private message
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Sun Apr 13, 2008 11:19 pm    Post subject: Reply with quote

thank you for the bug report, please see below Smile

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 Wink
Back to top
View user's profile Send private message
mandiom



Joined: 03 Mar 2008
Posts: 34

PostPosted: Sun Apr 13, 2008 11:29 pm    Post subject: Reply with quote

Thanks! It works beautifully now Very Happy
Back to top
View user's profile Send private message
ecksphore



Joined: 21 Nov 2006
Posts: 38

PostPosted: Mon Apr 14, 2008 1:55 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Trubbleguy



Joined: 20 Jan 2007
Posts: 73
Location: Melbourne

PostPosted: Mon Apr 14, 2008 4:56 am    Post subject: Reply with quote

Quote:
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
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Mon Apr 14, 2008 7:10 am    Post subject: Reply with quote

like Trubbleguy told you:


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 http://de.autohotkey.com/forum/viewtopic.php?p=22983#22983 -->
Twhyman wrote:
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 cases

edit4:
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 rights
Back to top
View user's profile Send private message
ecksphore



Joined: 21 Nov 2006
Posts: 38

PostPosted: Wed Apr 16, 2008 9:39 pm    Post subject: Reply with quote

Trubbleguy wrote:
Quote:
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!
Back to top
View user's profile Send private message
ladiko



Joined: 14 Jul 2006
Posts: 190
Location: Berlin

PostPosted: Wed Apr 16, 2008 11:19 pm    Post subject: Reply with quote

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 selectable
Back to top
View user's profile Send private message
Superfraggle



Joined: 02 Nov 2004
Posts: 770
Location: London, UK

PostPosted: Wed Apr 16, 2008 11:26 pm    Post subject: Reply with quote

Just thought id try this and got the following error.

Code:
---------------------------
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
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group