Winelib apps containing upper case letters don't run
Martin Wilck
Martin.Wilck at Fujitsu-Siemens.com
Fri Sep 6 07:24:03 CDT 2002
The patch below fixes a problem introduced August 14 (process.c 1.196):
Names of "builtin" apps (into which category fall also Winelib apps) aren't
found if they aren't lowercase-only.
Explanation: Create a directory "Test" and there a file foo.cpp like this:
#include <iostream.h>
int main (void)
{
cout << "Hello world!" <<endl;
return 0;
}
In the "Test" directory, run
$ winemaker --cuiexe .; ./configure; make; ./Test
=> error.
This fails because the "Test" shell script (aka "wineloader") calls "wine Test.exe",
and this ends up searching "test.exe.so" in the DLL path. My patch below
fixes that, but I'm not sure if it is the right thing to do.
Perhaps wineloader should simply look for "Test.exe.so" rather than for "Test.exe".
This is only one of several problems I have with the current winelib/winemaker.
Martin
Patch: process.diff
Martin Wilck <Martin.Wilck at fujitsu-siemens.com>
scheduler: process.c
open_builtin_exe_file():
Allow running Winelib apps whose names contain upper case letters.
Index: scheduler/process.c
===================================================================
RCS file: /home/wine/wine/scheduler/process.c,v
retrieving revision 1.198
diff -u -r1.198 process.c
--- scheduler/process.c 27 Aug 2002 01:13:59 -0000 1.198
+++ scheduler/process.c 6 Sep 2002 12:05:17 -0000
@@ -265,11 +265,15 @@
{
char exename[MAX_PATH], *p;
const char *basename = get_basename(name);
+ void *dll = NULL;
if (strlen(basename) >= sizeof(exename)) return NULL;
strcpy( exename, basename );
for (p = exename; *p; p++) *p = FILE_tolower(*p);
- return wine_dll_load_main_exe( exename, error, error_size, test_only );
+ dll = wine_dll_load_main_exe( exename, error, error_size, test_only );
+ if (!dll)
+ dll = wine_dll_load_main_exe( basename, error, error_size, test_only );
+ return dll;
}
--
Martin Wilck Phone: +49 5251 8 15113
Fujitsu Siemens Computers Fax: +49 5251 8 20409
Heinz-Nixdorf-Ring 1 mailto:Martin.Wilck at Fujitsu-Siemens.com
D-33106 Paderborn http://www.fujitsu-siemens.com/primergy
More information about the wine-devel
mailing list