options: nuke them (take 2)

Dimitrie O. Paun dimi at intelliware.ca
Mon May 3 19:48:45 CDT 2004


                                                                                                                             
cvs rm -f include/options.h misc/options.c
                                                                                                                             
ChangeLog
    Dimitrie O. Paun <dpaun at rogers.com>
    Remove the last remaining wine options when running programs.
    Keep support for --help, and --version when they are the
    only options on the command line.
                                                                                                                             

Index: dlls/kernel/Makefile.in
===================================================================
RCS file: /var/cvs/wine/dlls/kernel/Makefile.in,v
retrieving revision 1.110
diff -u -r1.110 Makefile.in
--- dlls/kernel/Makefile.in	1 May 2004 05:25:08 -0000	1.110
+++ dlls/kernel/Makefile.in	1 May 2004 14:33:24 -0000
@@ -20,7 +20,6 @@
 C_SRCS = \
 	$(TOPOBJDIR)/files/directory.c \
 	$(TOPOBJDIR)/files/smb.c \
-	$(TOPOBJDIR)/misc/options.c \
 	$(TOPOBJDIR)/misc/registry.c \
 	actctx.c \
 	atom.c \
Index: dlls/kernel/process.c
===================================================================
RCS file: /var/cvs/wine/dlls/kernel/process.c,v
retrieving revision 1.57
diff -u -r1.57 process.c
--- dlls/kernel/process.c	1 May 2004 05:25:08 -0000	1.57
+++ dlls/kernel/process.c	3 May 2004 23:47:38 -0000
@@ -38,7 +38,6 @@
 #include "ntstatus.h"
 #include "thread.h"
 #include "module.h"
-#include "options.h"
 #include "kernel_private.h"
 #include "wine/exception.h"
 #include "wine/server.h"
@@ -586,6 +585,20 @@
     }
 }
 
+static void version(void)
+{
+    MESSAGE( "%s\n\n", PACKAGE_STRING );
+    ExitProcess(0);
+}
+
+static void usage(void)
+{
+    MESSAGE( "%s\n\n", PACKAGE_STRING );
+    MESSAGE( "Usage: wine program_name [arguments]\n" );
+    MESSAGE( "       wine [--help|--version]\n");
+    ExitProcess(0);
+}
+
 
 /***********************************************************************
  *           init_user_process_params
@@ -730,9 +743,6 @@
     /* Copy the parent environment */
     if (!build_initial_environment( environ )) return FALSE;
 
-    /* Parse command line arguments */
-    if (!info_size) OPTIONS_ParseOptions( argv );
-
     /* Create device symlinks */
     VOLUME_CreateDevices();
 
@@ -815,7 +825,12 @@
         WCHAR buffer[MAX_PATH];
         WCHAR exe_nameW[MAX_PATH];
 
-        if (!__wine_main_argv[0]) OPTIONS_Usage();
+        if (!__wine_main_argv[0]) usage();
+	if (!__wine_main_argc == 1)
+	{
+	    if (strcmp(__wine_main_argv[0], "--help") == 0) usage();
+	    if (strcmp(__wine_main_argv[0], "--version") == 0) version();
+	}
 
         MultiByteToWideChar( CP_UNIXCP, 0, __wine_main_argv[0], -1, exe_nameW, MAX_PATH );
         if (!find_exe_file( exe_nameW, buffer, MAX_PATH, &main_exe_file ))
Index: documentation/running.sgml
===================================================================
RCS file: /var/cvs/wine/documentation/running.sgml,v
retrieving revision 1.29
diff -u -r1.29 running.sgml
--- documentation/running.sgml	20 Apr 2004 04:03:42 -0000	1.29
+++ documentation/running.sgml	1 May 2004 14:55:52 -0000
@@ -73,17 +73,13 @@
       <title>How to run Wine</title>
 
       <para>
-        You can invoke the <command>wine --help</command> command to
-        get a listing of all Wine's command-line parameters:
+        You can simply invoke the <command>wine</command> command to
+        get a small help message:
       </para>
       <para>
         <screen>
-Usage: ./wine [options] program_name [arguments]
-
-Options:
-   --debugmsg name  Turn debugging-messages on or off
-   --help,-h        Show this help message
-   --version,-v     Display the Wine version
+Wine 20040405
+Usage: ./wine program_name [arguments]
         </screen>
       </para>
 
@@ -287,19 +283,6 @@
         </para>
       </sect2>
 
-      <sect2>
-        <title>--help</title>
-        <para>
-          Shows a small command line help page.
-        </para>
-      </sect2>
-
-      <sect2>
-        <title>--version</title>
-        <para>
-	  Shows the Wine version string. Useful to verify your installation.
-        </para>
-      </sect2>
     </sect1>
 
     <sect1 id="wineserver-command-line-options">
Index: documentation/wine.man.in
===================================================================
RCS file: /var/cvs/wine/documentation/wine.man.in,v
retrieving revision 1.52
diff -u -r1.52 wine.man.in
--- documentation/wine.man.in	29 Apr 2004 00:27:57 -0000	1.52
+++ documentation/wine.man.in	4 May 2004 00:43:10 -0000
@@ -3,7 +3,11 @@
 .SH NAME
 wine \- run Windows programs on Unix
 .SH SYNOPSIS
-.BI "wine " "[wine_options] " "[--] " "program " "[arguments ... ]"
+.BI "wine " "program " "[arguments ... ]"
+.br
+.B wine --help
+.br
+.B wine --version
 .PP
 For instructions on passing arguments to Windows programs, please see the
 .B
@@ -36,19 +40,19 @@
 using none at all or the ones from older Windows versions.
 A large percentage of the API has been implemented,
 although there are still several major pieces of work left to do.
+.PP
+When invoked with only
+.B --help
+or
+.B --version
+as the only argument
+.B wine
+will simply print a small help message or its version respectively and exit.
 .SH REQUIREMENTS AND INSTALLATION
 Read the README file in the Wine source distribution and the
 .BR wine.conf (5)
 man page to know what Wine requires and how it is installed from
 source.
-.SH OPTIONS
-.TP
-.I --debugmsg [xxx]#name[,[xxx1]#name1]
-Turn debugging messages on or off.  This option is deprecated, you
-should use the
-.I WINEDEBUG
-environment variable instead (see below).
-.PD 1
 .SH PROGRAM/ARGUMENTS
 The program name may be specified in DOS format (
 .I
@@ -64,45 +68,6 @@
 .PP
 wine C:\(rs\(rsProgram\(rs Files\(rs\(rsMyPrg\(rs\(rstest.exe
 .PP
-Command line processing goes as
-follows: first 
-.B wine
-checks whether one or more of the above mentioned 
-.B wine 
-options have been specified. These
-are removed from the command line, which is passed to the windows program. You can use
-the parameter 
-.I -- 
-to indicate that 
-.B wine 
-should stop command line processing. This is needed in case a windows program understands 
-an option that is usually interpreted (and thus removed from the command line) 
-by 
-.B wine. 
-For example, if you want to execute 
-.B wine 
-with the options 
-.I --debugmsg +module
-and if 
-.B wine 
-should run the program 
-.I myapp.exe
-with the arguments
-.I --display 3d somefile
-, then you could use the following command line to invoke 
-.B wine:
-.PP
-.I wine --debugmsg +module -- myapp.exe --display 3d somefile
-.PP 
-Note that in contrast to previous versions of 
-.B wine, 
-you must not pass 
-program name and program option in one argument to 
-.B wine. 
-To run more
-than one windows program, just execute 
-.B wine 
-once with the name of each program as argument. 
 .SH ENVIRONMENT VARIABLES
 .B wine
 makes the environment variables of the shell from which
@@ -323,7 +288,7 @@
 .SH BUGS
 .PP
 A status report on many applications is available from
-.I http://www.winehq.org/Apps.
+.I http://appdb.winehq.org.
 Please add entries to this list for applications you currently run.
 .PP
 Bug reports may be posted to Wine Bugzilla
@@ -350,18 +315,10 @@
 WineHQ, the
 .B wine
 development headquarters, is at
-.I http://www.winehq.org/.
+.I http://www.winehq.org.
 This website contains a great deal of information about
 .B wine.
 .PP
-The
-.B wine 
-newsgroup is 
-.I comp.emulators.ms-windows.wine.
-It is used for discussion of various 
-.B wine
-end user aspects/help.
-.PP
 For further information about 
 .B wine
 development, you might want to subscribe to the 

-- 
Dimi.




More information about the wine-patches mailing list