You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ba...@goodconsultants.com on 2004/01/16 02:24:09 UTC

os.name for windows return "Windows XP"?

Hi,

There must be someone who is dealing with the same issue. I am trying to take 
multiplatform builds with different ${os.name}.properties file. Linux is not a 
problem, Linux.properties. What about Windows? It becomes Windows 
XP.properties files. 

Can someone enlight me the better way to do this with one word .properties 
name?

Thanks

Barry




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


Re: os.name for windows return "Windows XP"?

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Fri, 16 Jan 2004 12:24 pm, barry@goodconsultants.com wrote:
> Hi,
>
> There must be someone who is dealing with the same issue. I am trying to
> take multiplatform builds with different ${os.name}.properties file. Linux
> is not a problem, Linux.properties. What about Windows? It becomes Windows
> XP.properties files.
>
> Can someone enlight me the better way to do this with one word .properties
> name?
>

I've used this approach in the past

  <target name="set-conditions">
    <condition property="linux">
      <os name="linux"/>
    </condition>

    <condition property="solaris">
      <os name="SunOS"/>
    </condition>

    <condition property="windows">
      <os family="windows"/>
    </condition>
  </target>

You could probably use a single property name and different value attributes 
and load the properties that way. Depends if you want to use if attributes 
later on.

Conor



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


Re: os.name for windows return "Windows XP"?

Posted by Baz ¤Ñª° <sk...@yahoo.com>.
I think this is causing problems during the copying in rpmbuild 
process.

B.

--- In apache-ant@yahoogroups.com, Thorbjørn Ravn Andersen 
<no...@c...> wrote:
> barry@g... wrote:
> 
> >Hi,
> >
> >There must be someone who is dealing with the same issue. I am 
trying to take 
> >multiplatform builds with different ${os.name}.properties file. 
Linux is not a 
> >problem, Linux.properties. What about Windows? It becomes Windows 
> >XP.properties files. 
> >  
> >
> All modern platforms that I know of, which supports Java, can 
accept 
> filenames with an embedded space, so you may be able to work with 
the 
> generated filename directly.
> 
> Is there any particular technical reason that you must have single 
word 
> filenames?
> 
> -- 
>   Thorbjoern Ravn Andersen      "...plus...Tubular Bells!"
> 
> 
> 
> -------------------------------------------------------------------
--
> To unsubscribe, e-mail: user-unsubscribe@a...
> For additional commands, e-mail: user-help@a...


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


Re: os.name for windows return "Windows XP"?

Posted by Thorbjørn Ravn Andersen <no...@c.dk>.
barry@goodconsultants.com wrote:

>Hi,
>
>There must be someone who is dealing with the same issue. I am trying to take 
>multiplatform builds with different ${os.name}.properties file. Linux is not a 
>problem, Linux.properties. What about Windows? It becomes Windows 
>XP.properties files. 
>  
>
All modern platforms that I know of, which supports Java, can accept 
filenames with an embedded space, so you may be able to work with the 
generated filename directly.

Is there any particular technical reason that you must have single word 
filenames?

-- 
  Thorbjoern Ravn Andersen      "...plus...Tubular Bells!"



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


Re: os.name for windows return "Windows XP"?

Posted by Baz <ba...@goodconsultants.com>.
Anderson, Conor and all,

Thanks for the inputs.

I will see what i can do now.

Barry

----- Original Message ----- 
From: <ba...@goodconsultants.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, January 15, 2004 5:24 PM
Subject: os.name for windows return "Windows XP"?


> Hi,
>
> There must be someone who is dealing with the same issue. I am trying to
take
> multiplatform builds with different ${os.name}.properties file. Linux is
not a
> problem, Linux.properties. What about Windows? It becomes Windows
> XP.properties files.
>
> Can someone enlight me the better way to do this with one word .properties
> name?
>
> Thanks
>
> Barry
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



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