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 ... 13, 14, 15 ... 26, 27, 28  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
guiKey



Joined: 25 Nov 2006
Posts: 13

PostPosted: Sun Mar 08, 2009 5:35 am    Post subject: Error at line 0 Reply with quote

Dear ladiko,
compiling with Compile_AHK I receive the "Succesfully compiled" message.
But when I try to run my compiled script, I obtain the following:

Quote:
Error at line 0.

Line Text:
[@\compilerZ@...
Error: This line does not contain a recognized action.


Same script compiled with AHKIconChanger works fine.
Any suggestion? Thanks.
Back to top
View user's profile Send private message
ladiko



Joined: 13 Jul 2006
Posts: 290
Location: Berlin

PostPosted: Sun Mar 08, 2009 12:06 pm    Post subject: Reply with quote

compile it again with compile_ahk and post the resulting %temp%\AutoHotkey\Compiler\Compile_AHK.log
Back to top
View user's profile Send private message
guiKey



Joined: 25 Nov 2006
Posts: 13

PostPosted: Sun Mar 08, 2009 1:02 pm    Post subject: Reply with quote

Here's the file you requested:

Code:

* Set No_UPX option
FileDelete , C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\Upx.exe
# Set No_UPX option successfully

* Create resource file:
"C:\Program Files\AutoHotkey\Compiler\GoRC.exe" /r "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\VersionInfo.rc" >> "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\GoRC.log"

~~ GoRC Log Start ~~
GoRC.Exe Version 0.90.2 - Copyright Jeremy Gordon 1998/2006 - JG@JGnet.co.uk
Output file: C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\VersionInfo.res
~~ GoRC Log End ~~

# Resource file created successfully!


* Set Versioninfo (with ResHacker-fix for non-1033 systems):
"C:\Program Files\AutoHotkey\Compiler\ResHacker.exe" -script "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ChangeVersionInfo.script"

~~ Reshacker Log Start ~~
[08 mar 2009, 13.54.27]

[FileNames]
Exe=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
SaveAs=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
Log=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ResHacker.log

[Commands]
-delete Versioninfo , 1 , 1033
  Deleted: VERSIONINFO,1,1033
-addoverwrite "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\VersionInfo.res" , Versioninfo , 1 ,
  Modified: VERSIONINFO,1,1040

Commands completed
~~ Reshacker Log End ~~

# Set Versioninfo successfully!


* Replace icons:
"C:\Program Files\AutoHotkey\Compiler\ResHacker.exe" -script "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ChangeIcon.script"

~~ Reshacker Log Start ~~
[08 mar 2009, 13.54.28]

[FileNames]
Exe=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
SaveAs=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
Log=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ResHacker.log

[Commands]
-addoverwrite "E:\Design\_Soft\Script\Setup\ico\script.ico" , ICONGROUP,159,1033
  Modified: ICONGROUP,159,1033
-addoverwrite "E:\Design\_Soft\Script\Setup\ico\dot.ico" , ICONGROUP,206,1033
  Modified: ICONGROUP,206,1033
-addoverwrite "E:\Design\_Soft\Script\Setup\ico\dot.ico" , ICONGROUP,207,1033
  Modified: ICONGROUP,207,1033
-addoverwrite "E:\Design\_Soft\Script\Setup\ico\dot.ico" , ICONGROUP,208,1033
  Modified: ICONGROUP,208,1033

Commands completed
~~ Reshacker Log End ~~

# Icons replaced successfully!


* Extract Manifest from binary file:
"C:\Program Files\AutoHotkey\Compiler\ResHacker.exe" -script "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ExtractManifest.script"

~~ Reshacker Log Start ~~
[08 mar 2009, 13.54.28]

[FileNames]
Exe=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
SaveAs=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.manifest
Log=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ResHacker.log

[Commands]
-extract "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.manifest" , 24 , 1 , 1033
  Extracted: 24,1,1033

Commands completed
~~ Reshacker Log End ~~

# Manifest extracted successfully!


* Overwrite Manifest in binary file:
"C:\Program Files\AutoHotkey\Compiler\ResHacker.exe" -script "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\OverwriteManifest.script"

~~ Reshacker Log Start ~~
[08 mar 2009, 13.54.28]

[FileNames]
Exe=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
SaveAs=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.bin
Log=C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\ResHacker.log

[Commands]
-addoverwrite "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\AutoHotkeySC.manifest" , 24 , 1 , 1033
  Modified: 24,1,1033

Commands completed
~~ Reshacker Log End ~~

# Manifest overwritten successfully!


* Compile script:
"C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\Ahk2Exe.exe" /in "E:\Design\_Soft\Script\main.ahk" /out "E:\Design\_Soft\Script\Script.exe" /pass "pKB0ERUH7WL" /NoDecompile >> "C:\Users\Adm\AppData\Local\Temp\AutoHotkey\Compiler\Compile_AHK.log"
Successfully compiled: E:\Design\_Soft\Script\Script.exe

# Script Compiled successfully!

* Set new created date
FileSetTime , , E:\Design\_Soft\Script\Script.exe , C
# Set new created date successfully

Back to top
View user's profile Send private message
ladiko



Joined: 13 Jul 2006
Posts: 290
Location: Berlin

PostPosted: Sun Mar 08, 2009 1:23 pm    Post subject: Reply with quote

yes, looks good ... so you only have to trial and error every option ^^

if you want, you can zip and send me the whole folder
Back to top
View user's profile Send private message
webber



Joined: 25 Aug 2005
Posts: 129

PostPosted: Tue Mar 24, 2009 7:07 pm    Post subject: omit adding Autohotkey icons Reply with quote

is there a way to omit the addition of AutoHotkey icons to the compiled application ?
________
Drug Test Kit


Last edited by webber on Thu Mar 10, 2011 11:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
animeaime



Joined: 04 Nov 2008
Posts: 1045

PostPosted: Tue Mar 24, 2009 7:10 pm    Post subject: Reply with quote

Yes, check the "delete" checkbox for the ones you don't want.
_________________
As always, if you have any further questions, don't hesitate to ask.

Add OOP to your scripts via the Class Library. Check out my scripts.
Back to top
View user's profile Send private message Send e-mail
Lexikos



Joined: 17 Oct 2006
Posts: 7290
Location: Australia

PostPosted: Mon May 04, 2009 1:35 am    Post subject: Reply with quote

Selecting an 'Execution Level' other than 'none' inserts some XML into the manifest resource of the output executable. AutoHotkey_L and probably any other executable built with a recent version of Visual C++ already include the required key, with level="asInvoker". Compile_AHK inserts the XML anyway, and this invalidates the "side-by-side configuration", preventing the executable from launching.

Before the existing code:
Code:
   s_MANIFEST := s_LEFT
            . "<!-- Identify the application security requirements. -->`n"
            . "<!-- level can be ""asInvoker"" , ""highestAvailable"" , or ""requireAdministrator"" -->`n"
            . "   <trustInfo xmlns=""urn:schemas-microsoft-com:asm.v2"">`n"
            . "      <security>`n"
            . "         <requestedPrivileges>`n"
            . "            <requestedExecutionLevel`n"
            . "               level=""" . s_EX_LEVEL . """`n"
            . "               uiAccess=""false""`n"
            . "            />`n"
            . "         </requestedPrivileges>`n"
            . "      </security>`n"
            . "</trustInfo>`n"
            . s_RIGHT
...I would suggest inserting something simple, like:
Code:
local i_count
s_MANIFEST := RegExReplace(s_MANIFEST, "level\s*=\s*['""][^'""]*['""]", "level='" s_EX_LEVEL "'", i_count)
   if !i_count

See calculon's post for more information and screenshots of the problem.
Back to top
View user's profile Send private message Visit poster's website
ladiko



Joined: 13 Jul 2006
Posts: 290
Location: Berlin

PostPosted: Tue Jun 16, 2009 5:39 pm    Post subject: Reply with quote

aha AutoHotkey_L ... interesting!

ok i added your code snippet Lexikos to the my source code and according to NoDecimpile: if you use AutoHotkey_L simply dont use NoDecompile.

Update 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)
Back to top
View user's profile Send private message
AnAHKUser



Joined: 05 Feb 2007
Posts: 27

PostPosted: Wed Jun 17, 2009 10:45 am    Post subject: Reply with quote

Thanks for your efforts on this compiler. I use it for all my scripts Smile
Back to top
View user's profile Send private message
ii Candor ii



Joined: 17 Jun 2009
Posts: 2
Location: United States - Iowa

PostPosted: Wed Jun 17, 2009 4:04 pm    Post subject: Reply with quote

Would it be possible to allow another file/executable to be packaged with the compiled AHK executable?

What I'm trying to do is use AHK to automate program installations. RealVNC is one example.

The problem is that I have to make sure the RealVNC executable is in the designated filepath/location before running the AHK compiled executable. It would be awesome to have the RealVNC executable packaged inside the AHK compiled executable.

I was thinking maybe the Resources section was for this, but I can't seem to get it to work that way.

Can someone fill me in on how to do this? Or if it is possible?

Thanks.
Back to top
View user's profile Send private message
ladiko



Joined: 13 Jul 2006
Posts: 290
Location: Berlin

PostPosted: Wed Jun 17, 2009 4:19 pm    Post subject: Reply with quote

Use the FileInstall command: http://www.autohotkey.com/docs/commands/FileInstall.htm

The Compile_AHK_Setup is a ahk script that use FileInstall to install/extract Compile_AHK. Take a look at the source code: http://www.autohotkey.net/~ladiko/Compile_AHK/Compile_AHK_Setup.ahk

AnAHKUser wrote:
Thanks for your efforts on this compiler. I use it for all my scripts Smile
Compile_AHK isn't a compiler - it's just a "wrapper" for Ahk2exe.exe to extend the possibilities.
Back to top
View user's profile Send private message
shajul



Joined: 15 Sep 2006
Posts: 564

PostPosted: Mon Jun 29, 2009 1:54 am    Post subject: Suggestion.. Reply with quote

This is a really wonderful project of AHK and is of much use.. Many thanks to Nick and Ladiko..

Just a quick suggestion.. it would be nice for the installation script to add a readme file in the install directory stating the latest version installed.. I had to update cause i did not know which version i was using ..

thanks a ton..
_________________
If i've seen further it is by standing on the shoulders of giants

my site | ~shajul | WYSIWYG BBCode Editor
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
ladiko



Joined: 13 Jul 2006
Posts: 290
Location: Berlin

PostPosted: Mon Jun 29, 2009 5:47 am    Post subject: Reply with quote

point the mouse on the installer or the compile_ahk.exe and look for the version number. one is the ahk-version used for compiling and the other is the compile_ahk version.
Back to top
View user's profile Send private message
ii Candor ii



Joined: 17 Jun 2009
Posts: 2
Location: United States - Iowa

PostPosted: Mon Jun 29, 2009 9:28 pm    Post subject: Reply with quote

ladiko wrote:
Use the FileInstall command: http://www.autohotkey.com/docs/commands/FileInstall.htm

The Compile_AHK_Setup is a ahk script that use FileInstall to install/extract Compile_AHK. Take a look at the source code: http://www.autohotkey.net/~ladiko/Compile_AHK/Compile_AHK_Setup.ahk

AnAHKUser wrote:
Thanks for your efforts on this compiler. I use it for all my scripts Smile
Compile_AHK isn't a compiler - it's just a "wrapper" for Ahk2exe.exe to extend the possibilities.

After reading through that and seeing the examples in the source code it makes sense. Thank you.
Back to top
View user's profile Send private message
m0h4n



Joined: 22 Jul 2007
Posts: 86

PostPosted: Sun Jul 05, 2009 8:24 am    Post subject: Reply with quote

I get this error message when i add something in the resource tab



any solution for that?
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 26, 27, 28  Next
Page 14 of 28

 
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