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 ... 11, 12, 13 ... 18, 19, 20  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: 281
Location: Berlin

PostPosted: Mon Dec 29, 2008 10:46 pm    Post subject: Reply with quote

Update of 2008-12-28 v2
    + Fixed: all text fields should now change correctly, when another language is selected
Back to top
View user's profile Send private message
Shocked
Guest





PostPosted: Tue Dec 30, 2008 5:20 am    Post subject: Reply with quote

Konnichiwa Ladiko-San Smile

I would really like to know, how your Compiler changes the 'Versioninformation' of the Executable.
I already studied the Source-Code, but I can't understand the half of it. Laughing
I would really appreciate it, if you could help me, because I need a small 'Compiler' for a Application of mine.

Many thanks in advance,
Shocked ed
Back to top
ladiko



Joined: 14 Jul 2006
Posts: 281
Location: Berlin

PostPosted: Tue Dec 30, 2008 9:10 am    Post subject: Reply with quote

Guten Tag Shocked Smile

What do you want your compiler to do what compile_ahk can't do? If it is a common useable feature, maybe it is easier to include it to compile_ahk instead of reinventing the wheel.

but never the less, take a look at the part starting at line 1828.

* short version:
versioninfo.txt -> versioninfo.res -> AutoHotkeySC.bin -> Compiled Script

* long version:
at first you need gorc.exe and reshacker.exe

create a text file f.e. versioninfo.txt and add the information you want / need. the default ahk-content looks like this:
Code:

1 VERSIONINFO
FILEVERSION 1,0,47,6
PRODUCTVERSION 1,0,47,6
FILEOS 0x4
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
   BLOCK "040904b0"
   {
      VALUE "FileDescription", ""
      VALUE "FileVersion", "1, 0, 47, 06"
      VALUE "InternalName", ""
      VALUE "LegalCopyright", ""
      VALUE "OriginalFilename", ""
      VALUE "ProductName", ""
      VALUE "ProductVersion", "1, 0, 47, 06"
   }
}

BLOCK "VarFileInfo"
{
   VALUE "Translation", 0x0409 0x04B0
}
}


then you call
Code:
gorc.exe /r versioninfo.txt
which produces a file named versioninfo.res which has be added to the autohotkeySC.bin via:
Code:
reshacker -addoverwrite AutoHotkeySC.bin , AutoHotkeySC.bin , Versioninfo.res , Versioninfo , 1

cause of a bug in reshacker (see line 1919), you have to call this too on non en-us systems:
Code:
reshacker -delete AutoHotkeySC.bin , AutoHotkeySC.bin , Versioninfo , 1 , 1033

now use this AutoHotkeySC.bin to compile your script and it has a changed VersionInfo.
Back to top
View user's profile Send private message
chezduong
Guest





PostPosted: Tue Dec 30, 2008 10:35 pm    Post subject: Product/File version Reply with quote

Would you be able to allow 4 digits for the first field in Product/File version? Instead of using traditional file versions, I prefer to use the current date in the form of YYYY.MM.DD.

Thank you in advance for your consideration. CD
Back to top
ladiko



Joined: 14 Jul 2006
Posts: 281
Location: Berlin

PostPosted: Tue Dec 30, 2008 11:58 pm    Post subject: Reply with quote

i changed the range to 9999 and will be available in the next version.
Back to top
View user's profile Send private message
not-logged-in-fincs
Guest





PostPosted: Wed Jan 14, 2009 7:02 pm    Post subject: Reply with quote

Hello,
I've found a bug: When Compile_AHK II reads the .ahk.ini file,
if Set_Version_Info is not set the Resource_Files key is not processed.
The problem is here (around line 1304):

Code:
Set_Version_Info := s_INI
If !Set_Version_Info {
   Return
}


Put the resource loading code before those lines to fix the problem.
Back to top
ladiko



Joined: 14 Jul 2006
Posts: 281
Location: Berlin

PostPosted: Wed Jan 14, 2009 8:41 pm    Post subject: Reply with quote

thank you fince

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 digits


Last edited by ladiko on Mon Mar 02, 2009 10:22 am; edited 1 time in total
Back to top
View user's profile Send private message
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Wed Jan 14, 2009 8:59 pm    Post subject: Reply with quote

Hoping yal can help. Just upgraded to Vista, but the scripts that I compile in Vista won't run. Well, they run, but then it says, "The application has failed to start because it's side-by-side configuration is incorrect. Please see the application event log for more detail." Or, on other occassions (and different programs) it will say that the program has stopped working, it then "tries to fix the problem", but ultimately fails and then asks me to close the program.

I didn't have this problem in XP Sad Eventually I'll compile some code on my old laptop (running XP) and see if I can't run them in Vista, but until then, hopefully yal can help.
_________________
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
ladiko



Joined: 14 Jul 2006
Posts: 281
Location: Berlin

PostPosted: Wed Jan 14, 2009 9:35 pm    Post subject: Reply with quote

at first:
is it possible to run uncompiled scripts?
is it possible to run compiled scripts?

at second:
the side-by-side configuration refers to the folder C:\Windows\WinSxS

as i understand the sense of this folder, it is like that:
cause of the problem of having the same dll used by different programs in different version and program X only works with the dll in version Y and program Z only works with the dll in version W ... instead of having the dll in C:\Windows\System32\ the side-by-side folder was introduced to separate the different version. the different versions exist side-by-side and windows manages which version is used by which program. but don't ask what's wrong with the winsxs-configuration and better don't touch the folder if you don't know what you do and off course don't delete nothing inside of WinSxS!

like the error message told you, start a application that fails and take a look at the windows event log:
Start -> eventvwr.msc -> windows logs -> application
and have a look for an entry that refers to your application.

edit:
i read your entry a second time and ... did you install vista to a fresh and clean partition/hdd or did you upgrade to vista over a existing xp installation?
Back to top
View user's profile Send private message
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Wed Jan 14, 2009 9:46 pm    Post subject: Reply with quote

yeah, I can run uncompiled fine, just not uncompiled. Haven't tested scripts compiled on XP running on vista yet. Actually... I used your compile_ahk program, isn't that a compiled script...? It ran fine, and even compiled the code - just had problems on run.

Never knew about event viewer. And, now that you showed me it, I'm not sure what to do with it. The program that closed says "faulting module ntdll.dll" and the side-by-side error one says "Error in manifest or policy file "C:\Users\Me\Documents\AutoHotKey\Test Code\BitCompress.exe" on line 0. Invalid Xml syntax."
_________________
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
darklight_tr



Joined: 29 May 2008
Posts: 16
Location: Madison, WI

PostPosted: Wed Jan 14, 2009 10:15 pm    Post subject: Reply with quote

animeaime,

Did you perform a custom Windows Vista install using a utility like vlite? You may have removed components that are required by AutoHotkey.

I use Vista at work and at home and I haven't experienced what you are reporting, but after performing a few searches on the Internet there are a few known causes of your issue.

1. Do you have Service Pack 1 installed on Windows Vista? If not, install it.
2. Try installing one of these: Visual C++ 2005 SP1 Runtime, Visual C++ 2008 Runtime, Visual C++ 2008 SP1 Runtime. They can be downloaded from the Microsoft website, I would recommend trying 2005 SP1 first.
3. Try installing .NET Framework 3.5 SP1.

Let me know if this helps.
Back to top
View user's profile Send private message
Drugwash



Joined: 08 Sep 2008
Posts: 608
Location: Ploiesti, RO

PostPosted: Wed Jan 14, 2009 11:03 pm    Post subject: Reply with quote

Try to redownload and reinstall the AutoHotkey package - it's possible the .bin that you're trying to edit may be corrupt.

To be on the safe side, I'd recommend redownloading the Compile_AHK II script/exe too.
Back to top
View user's profile Send private message Yahoo Messenger
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Wed Jan 14, 2009 11:21 pm    Post subject: Reply with quote

it works!!! thank you, thank you, thank you. Not sure if it's one of the updates or the fact I reinstalled autohotkey and the compilier, but it works!! did I mention thank you Very Happy

my guess is that i had a bad autohotkey file. I've been moving them around some and also, Embarassed I think I was using the new autohotkey but with the old bin... but, who cares, now to see if it was the update or not, and if not, remove them.

but again, thank you all so much.
_________________
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
pekkle



Joined: 20 Jan 2009
Posts: 9

PostPosted: Tue Jan 20, 2009 3:33 am    Post subject: Reply with quote

line 296
Gui , Add , Edit , Center x+0 yp h20 w509 vGui_TPV2 ,
should be
Gui , Add , Edit , Center x+0 yp h20 w50 vGui_TPV2 ,




also around line 1304
IniRead , s_INI , %s_Ini_File% , %RES_Section% , Resource_Files , ERROR
If (s_INI != "ERROR") {
Resource_Files := s_INI
}

should put before
IniRead , s_INI , %s_Ini_File% , %RES_Section% , Set_Version_Info , ERROR

otherwise Set_Version_Info would be wrong set as Resource_Files
Back to top
View user's profile Send private message
ladiko



Joined: 14 Jul 2006
Posts: 281
Location: Berlin

PostPosted: Tue Jan 20, 2009 9:14 am    Post subject: Reply with quote

Update of 2009-01-20
    + Fixed: two errors were added while fixing bugs in the last version ^^ (thank you pekkle)


Last edited by ladiko on Mon Mar 02, 2009 10:23 am; edited 2 times in total
Back to top
View user's profile Send private message
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 ... 11, 12, 13 ... 18, 19, 20  Next
Page 12 of 20

 
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