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

Susan Mackay susanmackay at optusnet.com.au
Thu Aug 31 01:31:32 EDT 2006

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

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,

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...)



(*) 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!!!!!)))))

More information about the Mono-osx mailing list