Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Stephan Bergmann

Jorge Marques Pelizzoni wrote:

Thing is: once I developed a UNO package that worked fine for version 1.5
but would crash 2.0. So it seems to me that OOo version numbers may come
handy for installers/updaters.


In theory, it should not happen that a well-behaved UNO application or 
component fails with later OOo versions.  (So much for theory.)  Out of 
curiosity, do you have a quick summary of what made it fail for you?


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Mathias Bauer
Jorge Marques Pelizzoni wrote:

 Thank you very much for your reply, John! Anyway, I'm amazed that this
 must be so complicated. I mean, I wouldn't expect to have to dig into the
 UNO framework to get that. I thought something like a -v option should do
 the job :o)
 
 Thing is: once I developed a UNO package that worked fine for version 1.5
 but would crash 2.0. So it seems to me that OOo version numbers may come
 handy for installers/updaters.

UNO packages (we nowadays call them extensions) meanwhile have a
versioning feature where the extension can tell which versions of OOo it
needs to work properly. This works at least for the min version. I'm
not sure if this feature supports a max version. If nobody in the know
showed up here you could try on the dev@udk.openoffice.org list.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to [EMAIL PROTECTED].
I use it for the OOo lists and only rarely read other mails sent to it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Stephan Bergmann

Mathias Bauer wrote:

Jorge Marques Pelizzoni wrote:


Thank you very much for your reply, John! Anyway, I'm amazed that this
must be so complicated. I mean, I wouldn't expect to have to dig into the
UNO framework to get that. I thought something like a -v option should do
the job :o)

Thing is: once I developed a UNO package that worked fine for version 1.5
but would crash 2.0. So it seems to me that OOo version numbers may come
handy for installers/updaters.


UNO packages (we nowadays call them extensions) meanwhile have a
versioning feature where the extension can tell which versions of OOo it
needs to work properly. This works at least for the min version. I'm
not sure if this feature supports a max version. If nobody in the know
showed up here you could try on the dev@udk.openoffice.org list.


There is only a min version, see 
http://udk.openoffice.org/servlets/ReadMsg?list=featuresmsgNo=40. 
The rationale for not having a max version is that OOo's UNO interface 
should generally be backward compatible.


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Laurent Godard

Hi


I'd like to know what is the easiest way for an external application (say,
an ebuild binary) to find out OOo's version number (e.g. 2.0.2).



the information is stored in the ooo/share/registry/.../Setup.xcu file 
(Node Product/ooSetupVersion)


here is a macro i usualy use from inside OOo

HTH

Laurent

'-

function RecupereVersionOOO() as string
'recupère version de OOo
Dim aSettings, aConfigProvider
Dim aParams2(0) As new com.sun.star.beans.PropertyValue
aConfigProvider = createUnoService( 
com.sun.star.configuration.ConfigurationProvider )

aParams2(0).Name = nodepath
aParams2(0).Value = /org.openoffice.Setup/Product
aSettings = aConfigProvider.createInstanceWithArguments( 
com.sun.star.configuration.ConfigurationAccess, aParams2() )


RecupereVersionOOO=aSettings.getbyname(ooSetupVersion)

end function


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Christian Lohmaier
On Thu, Mar 22, 2007 at 03:23:10PM +0100, Laurent Godard wrote:
 Hi
 
 I'd like to know what is the easiest way for an external application (say,
 an ebuild binary) to find out OOo's version number (e.g. 2.0.2).
 
 
 the information is stored in the ooo/share/registry/.../Setup.xcu file 
 (Node Product/ooSetupVersion)
 
That won't work if you want to detect the minor version.

ciao
Christian
-- 
NP: Pantera - Hollow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Laurent Godard

Hi

the information is stored in the ooo/share/registry/.../Setup.xcu file 
(Node Product/ooSetupVersion)
 
That won't work if you want to detect the minor version.


this a bug IMHO as it worked in the OOo 1.1.x branch
could it be solved ?

btw, you'll have the minor version but not the third number (build)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Christian Lohmaier
On Thu, Mar 22, 2007 at 05:38:29PM +0100, Laurent Godard wrote:
 the information is stored in the ooo/share/registry/.../Setup.xcu file 
 (Node Product/ooSetupVersion)
  
 That won't work if you want to detect the minor version.
 
 this a bug IMHO as it worked in the OOo 1.1.x branch
 could it be solved ?
 
 btw, you'll have the minor version but not the third number (build)

I meant the micro version, sorry... You cannot tell whehter it is 2.0.1
or 2.0.4, and you won't be able to tell whether it is 2.2.0 or 2.2.1

ciao
Chrisitan
-- 
NP: Pantera - Hollow

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [api-dev] external application getting OOo version number

2007-03-21 Thread John Sisson
Hi
The thread/subject 'How to get the Version?' has a way that a java client that 
has a hook to OO can do this. Previous posts on other similar threads have 
discussed how OO Basic can do the same.
John Sisson

-Original Message-
From: Jorge Marques Pelizzoni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 21, 2007 3:12 PM
To: dev@api.openoffice.org
Subject: [api-dev] external application getting OOo version number


Hi, all!

I'd like to know what is the easiest way for an external application (say,
an ebuild binary) to find out OOo's version number (e.g. 2.0.2).

Thanks in advance. Cheers,

Jorge M. Pelizzoni
ICMC - Universidade de São Paulo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [api-dev] external application getting OOo version number

2007-03-21 Thread Jorge Marques Pelizzoni

Thank you very much for your reply, John! Anyway, I'm amazed that this
must be so complicated. I mean, I wouldn't expect to have to dig into the
UNO framework to get that. I thought something like a -v option should do
the job :o)

Thing is: once I developed a UNO package that worked fine for version 1.5
but would crash 2.0. So it seems to me that OOo version numbers may come
handy for installers/updaters.

Cheers,

Jorge.

John Sisson escreveu:
 Hi
 The thread/subject 'How to get the Version?' has a way that a java client
 that has a hook to OO can do this. Previous posts on other similar threads
 have discussed how OO Basic can do the same.
 John Sisson

 -Original Message-
 From: Jorge Marques Pelizzoni [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 21, 2007 3:12 PM
 To: dev@api.openoffice.org
 Subject: [api-dev] external application getting OOo version number


 Hi, all!

 I'd like to know what is the easiest way for an external application (say,
 an ebuild binary) to find out OOo's version number (e.g. 2.0.2).

 Thanks in advance. Cheers,

 Jorge M. Pelizzoni
 ICMC - Universidade de São Paulo

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



Jorge M. Pelizzoni
ICMC - Universidade de São Paulo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] external application getting OOo version number

2007-03-21 Thread Jim Watson


On 22/03/2007, at 11:08 AM, Jorge Marques Pelizzoni wrote:



Thank you very much for your reply, John! Anyway, I'm amazed that this
must be so complicated. I mean, I wouldn't expect to have to dig  
into the
UNO framework to get that. I thought something like a -v option  
should do

the job :o)

Thing is: once I developed a UNO package that worked fine for  
version 1.5
but would crash 2.0. So it seems to me that OOo version numbers may  
come

handy for installers/updaters.

Cheers,

Jorge.

John Sisson escreveu:

Hi
The thread/subject 'How to get the Version?' has a way that a java  
client
that has a hook to OO can do this. Previous posts on other similar  
threads

have discussed how OO Basic can do the same.
John Sisson

-Original Message-
From: Jorge Marques Pelizzoni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 21, 2007 3:12 PM
To: dev@api.openoffice.org
Subject: [api-dev] external application getting OOo version number


Hi, all!

I'd like to know what is the easiest way for an external  
application (say,

an ebuild binary) to find out OOo's version number (e.g. 2.0.2).

Thanks in advance. Cheers,


I went into OOo/program/ and did
grep -r Build *

This revealed various info about the build in text file program/ 
versionrc

But there is no guarantee all files are from the same build ?


jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]