[Mono-osx] Macpack problem - or is it me?

kangaroo grompf at sublimeintervention.com
Thu Aug 31 16:17:56 EDT 2006

The macpack manpage has been updated in svn; thanks.  As for the 
directory issue I'll fix that later when I get a few minutes (not a 
difficult fix if anyone else wants to pony up a patch)


Susan Mackay wrote:
> I think I've found the answer to my problem:
> The 'man' page for macpack shows the two possible versions of the name
> option to be "-n NAME" and "-name:NAME".
> However looking at the source code, the second option is actually
> "-appname:NAME".
> However, this brings up another possible error with macpack (*): by using
> -name instead of -appname, I was, in effect, not providing macpack with a
> application name. My quick look at the code shows that this situation is
> checked for and an attempt is made to generate an application name based on
> the assembly name as in the following code:
> if (opts.appname == null){
>     string t = Path.ChangeExtension (opts.assembly, null);
>     int p = t.IndexOf (Path.DirectorySeparatorChar);
>     if (p != -1)
>         t = t.Substring (p+1);
>     opts.appname = t;
> }
> By using 't.IndexOf()', p will be set to the FIRST directory separator
> character location - on the assumption that the file will have AT MOST 1
> directory name before it. Wouldn't it be better to use 't.LastIndexOf()' to
> isolate the filename part only or, perhaps better still,
> Path.GetFileNameWithoutExtension()?
> Also, even if -appname:NAME is given, the program assumes that a simple name
> will be entered - given people like me that might not be a good idea!!! (I
> know, that's what the -output: qualifier is for...)
> Thanks
> Susan
> (*) The way I'm going with finding "errors" and then solving them myself,
> just wait a bit and I'll probably find this one is something I've done wrong
> as well!!!!!)))))
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx

More information about the Mono-osx mailing list