[Imlemented] PB-Constants for Version Info Fields

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

[Imlemented] PB-Constants for Version Info Fields

Post by Josh »

In Compiler>Compiler Options>Version Info i can set informations which are are shown in the file properties. To use this informations in an 'Aboutbox', would be nice to get this values in PB constants like:

Code: Select all

#PB_Version_FileVersion
#PB_Version_ProductVersion
#PB_Version_CompanyName
#PB_Version_ProductName
....
....
#PB_Version_Language
I don't see any possibility to get this informations on a other way when using PB projects. In this case the versions fields are stored in the pbp file and this file is only updated by closing the project.
sorry for my bad english
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: PB-Constants for Version Info Fields

Post by freak »

Its not ideal, but you can define those constants yourself in the compiler options under "Constants". This way there are still two places to update if you change the version, but at least both are in the compiler options and not somewhere in the source code.
quidquid Latine dictum sit altum videtur
Ramses800
User
User
Posts: 27
Joined: Wed Nov 05, 2014 3:12 pm
Location: Sweden

Re: PB-Constants for Version Info Fields

Post by Ramses800 »

Josh wrote:In Compiler>Compiler Options>Version Info i can set informations which are are shown in the file properties. To use this informations in an 'Aboutbox', would be nice to get this values in PB constants like:

Code: Select all

#PB_Version_FileVersion
#PB_Version_ProductVersion
#PB_Version_CompanyName
#PB_Version_ProductName
....
....
#PB_Version_Language
+1
Former VB6 developer adventuring in a brave, new Purebasic world!
PureGuy
Enthusiast
Enthusiast
Posts: 102
Joined: Mon Aug 30, 2010 11:51 am

Re: PB-Constants for Version Info Fields

Post by PureGuy »

+1
User avatar
glsevans
New User
New User
Posts: 4
Joined: Tue Dec 09, 2014 11:18 pm

Re: PB-Constants for Version Info Fields

Post by glsevans »

+1
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PB-Constants for Version Info Fields

Post by Little John »

+1
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: PB-Constants for Version Info Fields

Post by Rescator »

freak wrote:Its not ideal, but you can define those constants yourself in the compiler options under "Constants". This way there are still two places to update if you change the version, but at least both are in the compiler options and not somewhere in the source code.
A better solution would be if "Compiler>Compiler Options>Version Info" could use constants from "Compiler>Compiler Options>Constants>Custom constants" in addition to the compile and build constants there.
User avatar
Blue
Addict
Addict
Posts: 880
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: PB-Constants for Version Info Fields

Post by Blue »

Rescator wrote:[...]A better solution would be if "Compiler>Compiler Options>Version Info" could use constants from "Compiler>Compiler Options>Constants>Custom constants" in addition to the compile and build constants there.
+1

Until something better is implemented (and I hope something gets implemented before too long...), Freak's suggestion is an intereting and practical workaround. Besides, I'm happy to finally discover some use for those custom constants... :?
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
Korolev Michael
Enthusiast
Enthusiast
Posts: 199
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

Re: PB-Constants for Version Info Fields

Post by Korolev Michael »

+1

Why PB doesn't have version management constants?
Former user of pirated PB.
Now registered user :].
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 281
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: PB-Constants for Version Info Fields

Post by oreopa »

I haven't +1 this? ok.

+1
Proud supporter of PB! * Musician * C64/6502 Freak
Ramses800
User
User
Posts: 27
Joined: Wed Nov 05, 2014 3:12 pm
Location: Sweden

Re: [Imlemented] PB-Constants for Version Info Fields

Post by Ramses800 »

I just noticed that this topic has been renamed to [Imlemented], does this mean that this function actually exist now?
Former VB6 developer adventuring in a brave, new Purebasic world!
User avatar
Mohawk70
Enthusiast
Enthusiast
Posts: 400
Joined: Thu May 11, 2006 1:04 am
Location: Florida, USA

Re: [Imlemented] PB-Constants for Version Info Fields

Post by Mohawk70 »

Ramses800 wrote:I just noticed that this topic has been renamed to [Imlemented], does this mean that this function actually exist now?
Can we get official confirmation and details ?
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Imlemented] PB-Constants for Version Info Fields

Post by Fred »

Sure, look at "Version Information" section here: http://www.purebasic.com/documentation/ ... piler.html
User avatar
Mohawk70
Enthusiast
Enthusiast
Posts: 400
Joined: Thu May 11, 2006 1:04 am
Location: Florida, USA

Re: [Imlemented] PB-Constants for Version Info Fields

Post by Mohawk70 »

Thank you Fred ! What version is this in ?
Korolev Michael
Enthusiast
Enthusiast
Posts: 199
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

Re: [Imlemented] PB-Constants for Version Info Fields

Post by Korolev Michael »

5.4x
Former user of pirated PB.
Now registered user :].
Post Reply