[wpkg-users] multiple Dependencies
Rainer Meier
r.meier at wpkg.org
Thu Apr 5 11:14:42 CEST 2012
Hi Peter,
On 05.04.2012 00:37, Peter Beck wrote:
> I am just creating a package for MS Business Contact Manager (BCM). BCM depends
> on MS Outlook. I'd like to add these dependencies, but there are different
> office 2010 versions - how can I check if _one of them_ is installed ?
>
> something like the logical "OR" checks but for dependencies
>
> <depends package-id="Microsoft Office 2010 Home and Business" OR "Microsoft
> Office Professional Plus 2010" ....
Package dependencies are there to tell WPKG that another package is to be
installed _before_ the a package which defines the dependencies.
I thought about using conditions in depends statement in a package but this
would not help too much I guess since if there is no office installed at all it
would not check the dependency but still install BCM.
> if one of them is installed, it's ok and the setup can start otherwise it should
> fail. Is that possible ?`How do you manage something like that ? Any ideas ?
I think the solution here is not to define a dependency on a package but simply
define a condition in your profile.
For example (not verified, might contain bugs) in profiles.xml:
<profiles>
<profile id="default">
<package package-id="office-2010-business" />
<package package-id="bcm">
<condition>
<check type="uninstall" condition="exists" path="Microsoft Office.*"
</condition>
<package>
</profile>
<profiles>
This would install BCM only if office is already successfully installed (any
edition). Sure you can also use complex checks including AND/OR checks to verify
specific Office versions installed where BCM is compatible with.
So during first WPKG run the profile above would install Office 2010 only. No
BCM will be installed since the condition is not met (yet). During subsequent
runs WPKG would also deploy BCM since the condition is met and BCM is therefore
added to the profile.
br,
Rainer
More information about the wpkg-users
mailing list