Page 1 of 3

Adding file version info, is it posible?

Posted: Tue Jul 01, 2003 2:34 pm
by Tipperton
Is there a way to have the PB compiler to put version information in an executable?

Posted: Tue Jul 01, 2003 8:20 pm
by Num3
What kind of version are you talking about?

if you want to include the version of a program just do this (amiga way)
(in amiga if you wanted to include the version on an exe, lib, whatever you only needed to place a text string in your code starting with $Version)

var.s="$Version: 1.00"

if you open an hex editor an search for $Version: 1.00 you'll find it...

Hope this helps :D

Posted: Tue Jul 01, 2003 8:26 pm
by tinman
Num3 wrote:What kind of version are you talking about?
Well, it *is* the Windows forum... ;p

Posted: Tue Jul 01, 2003 8:49 pm
by Tipperton
tinman wrote:
Num3 wrote:What kind of version are you talking about?
Well, it *is* the Windows forum... ;p
Good point, tinman. :)

In windows you could probably call it the version strings resource. When you right-click on an executable (exe, dll, etc.) and choose "Proterties", there is a tab called "Version" which displays all the version strings which can contain things like; file version, product version, product name, copyright info, etc.

Posted: Tue Jul 01, 2003 9:01 pm
by Num3
That sucks .... :mrgreen:

windows is well known to have problems identifing files types...
if you swap an extension... ehhehe

Something that's has simple has reading the file header info :P

I got the point, the amiga explanation was just an example.

But anyway I don't like that right-click on an executable and get the info thingie...

Posted: Tue Jul 01, 2003 9:32 pm
by freak
Yes, this info is stored as a recource in the executable.
You can't compile recources into the exe with PB, because the linker it
uses can't do it.´

You could use a tool like ResHacker to add the info after compiling.

Timo

Posted: Tue Jul 01, 2003 9:53 pm
by Tipperton
Num3 wrote:windows is well known to have problems identifing files types...
That's most likely a hold-over from DOS and Windows 3.1 that they can't really get away from because of backwards compatibility issues.
freak wrote:You can't compile recources into the exe with PB, because the linker it uses can't do it.´

You could use a tool like ResHacker to add the info after compiling.
Hmm... or maybe the linker could almost do it. In the compiler options you can add an icon to the executable and that too is a resource...

Oh well... I was hoping that maybe some one had figured out a way around that maybe by using in-line assembly.

Posted: Tue Jul 01, 2003 11:17 pm
by freak
Well... Fred said, it wasn't possible for now... and I kind of trust him on
that thing. He knows a bit more of all this than me :wink:

TImo

Posted: Tue Jul 01, 2003 11:44 pm
by Fred
Actually, the linker does support such resources, it just doesn't support XP manifest (don't ask me why). So if you do a little wrapper, you could link without problem your .res containing the info to your final exe.

Posted: Wed Jul 02, 2003 12:03 am
by Tipperton
Fred wrote:Actually, the linker does support such resources, it just doesn't support XP manifest (don't ask me why).
Since I'm not that concerned about XP skins at present, I won't... :)
Fred wrote:you could link without problem your .res containing the info to your final exe.
Great!
Fred wrote:So if you do a little wrapper,
Hmm.... Something new to figure out... :mrgreen: (I love learning new things)

Posted: Wed Jul 02, 2003 2:33 pm
by dige
If you're able to read german language, there is a little tool called "STupX"
Download at: http://www.Sunset-Team.de/Download

STupX can be included to the editor tool menu and compiles the
version and XP-manifest ressource to your executable.

Simple add these tags to your source code like this:

; ------------------------------------------------
; PRGNAME=STupX
; VERSION=1,0,0,5
; DESCRIP=Compile and Compress
; COMPANY=Sunset-Team Software
; AUTHOR=dige
; E-MAIL=
; WEB=
; ------------------------------------------------

Other features are: compress and scramble executables.
STupX use GORC, RessourecHacker, UPX and UPXS to this.
The binaries are already included.

regards,

dige

Posted: Wed Jul 02, 2003 3:31 pm
by Karbon
That would be a nice tool to have -- anyone know of something like it for us English speakers?

Posted: Wed Jul 02, 2003 3:39 pm
by Tipperton
dige wrote:If you're able to read german language, there is a little tool called "STupX"
I am aware of this program but since I can't read German, I passed on it.

I just heard about a program called Final Builder (www.finalbuilder.com) that can be used to automate multi-step build processes. I'll probably look into that instead. Then again maybe not... it's not free and the price is 299 euros. :(

I wonder if the author of STupX would consider making the source available for translation or update it to support multiple languages.

Thanks anyway. :)

Posted: Thu Jul 03, 2003 1:37 pm
by dige
Okay, STupX supports now english language :-)
Download: http://www.sunset-team.de/Download/STupX.zip

regards,

dige

Posted: Thu Jul 03, 2003 4:03 pm
by RJP Computing
Thanks but there seems to be a small bug. your language for English should be 1033 NOT 1031. And when I load it into ResHacker it doesn't show the VERSIONINFO. I am only using the example in your *.zip file.

Thanks