Adding file version info, is it posible?

Windows specific forum
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Adding file version info, is it posible?

Post by Tipperton »

Is there a way to have the PB compiler to put version information in an executable?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Num3 wrote:What kind of version are you talking about?
Well, it *is* the Windows forum... ;p
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post 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.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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...
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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
quidquid Latine dictum sit altum videtur
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post 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.
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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
quidquid Latine dictum sit altum videtur
Fred
Administrator
Administrator
Posts: 18357
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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.
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post 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)
dige
Addict
Addict
Posts: 1417
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post 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
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

That would be a nice tool to have -- anyone know of something like it for us English speakers?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post 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. :)
dige
Addict
Addict
Posts: 1417
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Okay, STupX supports now english language :-)
Download: http://www.sunset-team.de/Download/STupX.zip

regards,

dige
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post 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
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
Post Reply