You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marc Collin <co...@laboiteaprog.com> on 2006/01/23 17:09:56 UTC

ant and os

hi

i search a way to do:

exec rmiregistry.exe if windows
else exec rmiregistry

any idea?

thanks
-- 
www.laboiteaprog.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant and os

Posted by Andrew Goktepe <an...@gmail.com>.
<condition property="running.on.windows">
    <os family="windows" />
</condition>

Then have the script act according to whether or not running.on.windows is
set.

You can also use the os attribute of exec, but there are multiple OS values
for multiple versions of Windows.

-Andrew

On 1/23/06, Marc Collin <co...@laboiteaprog.com> wrote:
>
> hi
>
> i search a way to do:
>
> exec rmiregistry.exe if windows
> else exec rmiregistry
>
> any idea?
>
> thanks
> --
> www.laboiteaprog.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: ant and os

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 23 Jan 2006, Marc Collin <co...@laboiteaprog.com> wrote:

> i search a way to do:
> 
> exec rmiregistry.exe if windows
> else exec rmiregistry

you'd probably want rmiregistry on OS/2 or OpenVMS as well if you are
ever going to run Ant there.

<property environment="env"/>
<condition property="rmiregistry" value="rmiregistry.exe">
  <or>
    <available file="rmiregistry.exe" filepath="${env.PATH}"/>
    <available file="rmiregistry.exe" filepath="${env.Path}"/>
  </or>
</condition>
<property name="rmiregistry" value="rmiregistry"/>

<exec executable="${rmiregistry}" .../>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org