Accidentally ignored patch?

Dustin Navea speeddymon at yahoo.com
Thu May 16 19:13:21 CDT 2002


Hopefully this was accidentally ignored.  Here it is
again, this patch fixes problems with UT-based
installers (UT, Deus Ex, etc.) and (hopefully) doesn't
break any other programs.  From my tests, everything
that I was able to run before with wine, I am able to
run now, including winelib apps. The error that I get
(about not being able to load the real installer due
to <installer file>.so not being found) is due to
open_winelib_app being called instead of the correct
function.  This doesn't correct that directly, but it
does work with open_winelib_app to open the correct
file.

-Dustin


P.S. Only one of these 2 patches needs to be applied,
feel free to apply either one, one has a comment in
the code, the other does not...only difference...




__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
-------------- next part --------------
Name: scheduler/process.c
ChangeLog: Check for .so extension in open_winelib_app to help unreal tournament-style
           installers to work.
License: Any (X11, LGPL, CodeWeavers, Lindows, AFPL)
Author: Dustin Navea
=================================================================================================
--- scheduler/process.c	Mon Apr 29 14:34:06 2002
+++ scheduler/process.c.new	Thu May 16 02:13:12 2002
@@ -464,12 +464,23 @@
             strcat( tmp, ".so" );
             /* search in PATH only if there was no '/' in argv[0] */
             ret = wine_dll_load_main_exe( tmp, (name == argv0), errStr, sizeof(errStr) );
-            if (!ret && !argv[1])
+            /* FIXME: if file attempting to be run exists without the .so extension,
+             * then we SHOULD skip past the next if to help certain installers work,
+             * this should fix it.  If you know of a better way to write it, please
+             * feel free to modify this patch and submit it, just give me credit for
+             * the original submission.
+             * --Dustin Navea
+             */
+            if (!SearchPathA( NULL, argv0, ".exe", sizeof(main_exe_name), main_exe_name, NULL) &&
+                !SearchPathA( NULL, argv0, NULL, sizeof(main_exe_name), main_exe_name, NULL))
             {
-                /* if no argv[1], this will be better than displaying usage */
-                MESSAGE( "%s: could not load library '%s' as Winelib application: %s\n",
-                         argv[0], tmp, errStr );
-                ExitProcess(1);
+                if (!ret && !argv[1])
+                {
+                    /* if no argv[1], this will be better than displaying usage */
+                    MESSAGE( "%s: could not load library '%s' as Winelib application: %s\n",
+                             argv[0], tmp, errStr );
+                    ExitProcess(1);
+                }
             }
             HeapFree( GetProcessHeap(), 0, tmp );
         }
-------------- next part --------------
Name: scheduler/process.c
ChangeLog: Check for .so extension in open_winelib_app to help unreal tournament-style
           installers to work.
License: Any (X11, LGPL, CodeWeavers, Lindows, AFPL)
Author: Dustin Navea
=================================================================================================
--- scheduler/process.c	Mon Apr 29 14:34:06 2002
+++ scheduler/process.c.new	Thu May 16 02:24:34 2002
@@ -464,12 +464,16 @@
             strcat( tmp, ".so" );
             /* search in PATH only if there was no '/' in argv[0] */
             ret = wine_dll_load_main_exe( tmp, (name == argv0), errStr, sizeof(errStr) );
-            if (!ret && !argv[1])
+            if (!SearchPathA( NULL, argv0, ".exe", sizeof(main_exe_name), main_exe_name, NULL) &&
+                !SearchPathA( NULL, argv0, NULL, sizeof(main_exe_name), main_exe_name, NULL))
             {
-                /* if no argv[1], this will be better than displaying usage */
-                MESSAGE( "%s: could not load library '%s' as Winelib application: %s\n",
-                         argv[0], tmp, errStr );
-                ExitProcess(1);
+                if (!ret && !argv[1])
+                {
+                    /* if no argv[1], this will be better than displaying usage */
+                    MESSAGE( "%s: could not load library '%s' as Winelib application: %s\n",
+                             argv[0], tmp, errStr );
+                    ExitProcess(1);
+                }
             }
             HeapFree( GetProcessHeap(), 0, tmp );
         }


More information about the wine-patches mailing list