[Gambas-user] Which version of Gambas installed?

Benoît Minisini gambas at ...1...
Wed Feb 20 19:29:56 CET 2013


Le 20/02/2013 16:30, Tobias Boege a écrit :
> On Tue, 19 Feb 2013, Jussi Lahtinen wrote:
>> Hmmm... I have understand that "gbx3 --version" gets version number from
>> some file?
>> So, maybe compiling could run something like "svn info | grep -w Revision"
>> to create revision file too?
>>
>> Jussi
>
> That was my idea, too. You can check if the current directory is an svn
> repository by branching:
>
> if test `svn info >/dev/null 2>&1; echo $?` -eq 0
>
> and if it is, take the revision into a variable:
>
> GAMBAS_REVISION=`svn info | sed -n 's/^Revision: \(.*\)$/\1/p'`
>
> otherwise make the variable zero.
>
> My problem was to make this variable available to gbx. If anyone helped me
> with this, I'd be glad.
>
> Regards,
> Tobi
>

The problem is that in a repository, you can have different versions for 
*each* file, so a global version may sometimes be undefined!

The software version as printed by 'gbx3 --version' is defined in the 
'acinclude.m4' file located in the root source directory and is enough 
if you are using a stable version.

-- 
Benoît Minisini




More information about the User mailing list