wine commandline options

Tony Lambregts tony_lambregts at
Mon Nov 18 11:40:20 CST 2002

Rick Romero wrote:

>I was playing with Pegasus Mail (silver list) to see what I could get
>working.  It looks like it doesn't detect winsock.dll using it's own
>'search algorythm, so the TCP/IP options don't get enabled - hence the
>(paraphrased) 'wtf?' in the silver list description.
>So, I tried to force Pegasus Mail to load winsock explicitly using the
>-Z 128 option:
>$wine winpm-32 -Z 128


wine -- winpm-32 -Z 128

>but wine comes back with 'Unknown option -Z'.
>I'm not quite sure how these are getting parsed, but I see in
>misc/options.c parse_options()
>	if (*p++ != '-') continue;  /* not an option */
> Should exit if the 2nd char isn't a - (am I right?)
> BUT, when parse_options returns to OPTIONS_ParseOptions()
>The following:
>  /* check if any option remains */
>    for (i = 1; argv[i]; i++)
>    {
>        if (!strcmp( argv[i], "--" ))
This is testing for "--" which tells wine to treat arguments after the 
first (program name) as command line arguments.

>        {
>            remove_options( argv, i, 1, 0 );
>            break;
>        }
>        if (argv[i][0] == '-')
>        {
>            MESSAGE( "Unknown option '%s'\n\n", argv[i] );
>        //    OPTIONS_Usage();
>        }
>    }
>Still picks up '-' as an invalid option.  My first thought would be to
>stop checking for options after the 1st and 2nd chars are not '-' (ie.
>after the Win32 program name), but I'm not sure if that's correct.
>Any thoughts?  (FYI, no, the option didn't make Pmail work.)
You have misread what the function is doing it looks for "--" to tell it 
that there are command line arguments to be passed onto the programs. 
Hope this helps (TM.)


Tony Lambregts

More information about the wine-devel mailing list