Gert Driesen schrieb: > Hi Johannes, > > NAnt will not resolve PlatformID.Unix to its enum value. > > You can use this instead: > > > ${operating-system::get-platform(environment::get-operating-system())=='Unix > '} > > However, this will only work if you're running NAnt on .NET 2.0 and > higher (or Mono 2.0 profile). > > Or, you can use this: > > ${platform::is-unix()} > > This will work on all CLR's.
Thanks, the latter is certainly more general. > May I ask why you need to know the (class)path separator? I have the following property (new lines before the $ inserted for better formatting): <property name="antlr.classpath" value="${path::combine(sharedlibs.dir,'antlr-v3.x.jar')} ${java.classpath.separator} ${path::combine(sharedlibs.dir,'stringtemplate-v3.x.jar')} ${java.classpath.separator} ${path::combine(sharedlibs.dir,'antlr-2.7.7.jar')}"/> "${java.classpath.separator}" replaced ";" which doesn't work on Linux. As I don't want different build files for each platform I require a way to select the right separator. > Have you tried using the <path> element: > http://nant.sourceforge.net/release/latest/help/types/path.html I didn't know that there is a <path>-element. Unfortunately, I can't find a use case for this. How do I reference this: <path id="classpath-includes" > <pathelement path="${path::combine(sharedlibs.dir,'antlr-v3.x.jar')}" /> <pathelement path="${path::combine(sharedlibs.dir,'stringtemplate-v3.x.jar')}" /> <pathelement path="${path::combine(sharedlibs.dir,'antlr-v3.x.jar')}" /> </path> Thanks again! Johannes ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users