Tor Lillqvist wrote:
<http://api.openoffice.org/docs/DevelopersGuide/Extensions/Extensions.xhtml#1_7_Dependencies>:
Hmm, so could I have an example of how to specify a dependency on a
feature present only in some FooBar version of OOo?
Btw, do I read the referred-to section of the specification
correctly, that "OpenOffice.org-minimal-version" is both an element
and and an optional attribute of each child element of <description>?
Yes.
Would the below example be the correct way to specify a requirement
for a specific build of OOo that recognizes and implements certain
version-specific dependencies? Let's ssume this "Foo" version of OOo
contains code so that it knows that it implements the foo:HavePatch
dependency for some foo:PatchName attribute values, and the
foo:Platform dependency with its attributes. Would a non-Foo build of
OOo then correctly reject this extension with some message like "This
extension requires the following features not present in this
version: 'The xyzzy.diff patch present in the Foo build of OOo',
'Windows XP'" ?
Yes, more or less:
- You only need the OpenOffice.org-minimal-version dependency if you
have additional reasons to depend on such a version, apart from those
reasons catered for by the other two dependencies you specify.
- Code would need to be added to OOo to detect whether it satisfies the
foo:HavePatch dependency (at least in those code branches that can
potentially satisfy it).
- I would prefer dependency formulations to be phenotypical (like
"requires a certain UNO service to be available") rather then
genotypical (like "requires the OOo to be built from code that contained
some patch").
- Code would need to be added to OOo to detect whether it satisfies the
foo:Platform dependency.
- The foo:Platform dependency has the problem that the relevant code
(see above) would only be added to OOo starting with some version, say
OOo 2.4, and all older OOo's would thus reject the extension, even on an
appropriate platform. Therefore, it would probably be better to add an
OpenOffice.org-minimal-version attribute so that the extension also
installs on older versions (where, of course, it would erroneously also
install for wrong platforms).
- Also, for platform dependencies, yet another way to specify them
(other than through dependencies) might be advantageous. (For example,
to make online discovery and update of extension platform-aware.) This
probably needs some more thought.
-Stephan
<description
xmlns="http://openoffice.org/extensions/description/2006"
xmlns:dep="http://openoffice.org/extensions/description/2006"
xmlns:foo="http://foo.whatever.org/whatever/foo/12345"
xmlns:xlink="http://www.w3.org/1999/xlink">
> <version value="1.0.6-1"/>
> <dependencies>
> <OpenOffice.org-minimal-version value="2.1"
dep:name="OpenOffice.org 2.1"/>
> <foo:HavePatch foo:PatchName="xyzzy.diff"
dep:name="The xyzzy.diff patch present in the Foo build of OOo"/>
> <foo:Platform foo:PlatformArchitecture="x86"
foo:OS="Windows" foo:MinOSVer="XP" dep:name="Windows XP"/>
</dependencies>
> </description>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]