[Mono-dev] Cross-platform command-lines

Charlie Poole charlie at nunit.com
Tue Aug 7 13:21:57 EDT 2007


Some follow-up questions, now that I've looked at mono.getOptions.

1) I like the idea of having the system provide this capablility,
rather than including it in every app. But what do people generally
do for cross-platform stuff?
  * package it with the app for windows only?
  * package it with the app but ignore it at runtime on windows?
  * package it and use the local copy on all platforms?
  * build the source right into the app?
  * something else? 

2) Has anyone tried creating a source-file based "light" version
of getOptions? One that could be used until a small app grew
to the point where it needed the whole thing? If not, I might
look at it.

3) NUnit is already using a similar, attribute-based approach
to options. The main drawback I see is with regard to localization.
Has anyone dealt with that issue?

Charlie

> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com 
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf 
> Of Charlie Poole
> Sent: Monday, August 06, 2007 10:57 AM
> To: 'Miguel de Icaza'
> Cc: 'Rafael Teixeira'; mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] Cross-platform command-lines
> 
> Hi Miguel,
> 
> > > I haven't but I'll take a look. Do you use the double-dash
> > convention
> > > as well? I wonder if that's something windows users can get
> > accustomed
> > > to?
> > 
> > It seems that the majority of the flags on Windows take the 
> form /word 
> > but they tend to accept -word.
> 
> That's true for most user-facing apps anyway. Commands like 
> xcopy take cumulative flags, but not everyone is comfortable 
> with them.
>  
> > In Unix historically options after a single dash are single 
> letters, 
> > and
> > they are cumulative.   For instance "ls -lt" does not mean 
> the option
> > "lt", it means "l" and "t".   For word options, people 
> > adopted a --word
> > scheme.
> > 
> > In Mono, when we had to be compatible with a command on Windows we 
> > kept the /word, -word convention as opposed to the Unix convention 
> > (less work
> > on changing Makefiles or existing scripts).   In a few 
> cases we still
> > recognize the Unix options.
> > 
> > You will have to adopt a naming scheme (-word or -letters) 
> and go with 
> > it.
> 
> Thanks - I'll think about a consistent scheme and look at getOptions. 
> My little utility for extracting test results from an nunit 
> xml file will be the test bed for this.
> 
> Charlie
> 
> > Miguel.
> > 
> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 






More information about the Mono-devel-list mailing list