Commit 69622dbd authored by Alexandre Julliard's avatar Alexandre Julliard

Added support for path wildcards of the form "*dllname" in load order

specifications. Only use wildcard entry for dlls that don't specify an explicit path. Removed the old DllOverrides syntax support. Misc cleanups and optimizations.
parent ae4278ee
...@@ -7,7 +7,7 @@ wine.conf \- Wine configuration file ...@@ -7,7 +7,7 @@ wine.conf \- Wine configuration file
expects a configuration file ( expects a configuration file (
.I $WINEPREFIX/config .I $WINEPREFIX/config
(~/.wine/config) (~/.wine/config)
), which should conform to the following rules. ), which should conform to the following rules.
A sample configuration file is available as A sample configuration file is available as
.I documentation/samples/config .I documentation/samples/config
in the Wine source distribution. in the Wine source distribution.
...@@ -33,7 +33,7 @@ are listed below. ...@@ -33,7 +33,7 @@ are listed below.
.br .br
This section is used to specify the root directory and type of each emulated This section is used to specify the root directory and type of each emulated
.B DOS .B DOS
drive, since most Windows applications require a DOS/MS-Windows based drive, since most Windows applications require a DOS/MS-Windows based
disk drive & directory scheme, which is either provided by a real disk drive & directory scheme, which is either provided by a real
DOS partition mounted somewhere or by some carefully crafted directory layout DOS partition mounted somewhere or by some carefully crafted directory layout
on a Unix file system ("no-windows fake installation"). on a Unix file system ("no-windows fake installation").
...@@ -43,10 +43,10 @@ There is one such section for every drive you want to configure. ...@@ -43,10 +43,10 @@ There is one such section for every drive you want to configure.
.br .br
default: none default: none
.br .br
If you mounted your dos partition as If you mounted your dos partition as
.I /dos .I /dos
and installed Microsoft Windows in and installed Microsoft Windows in
C:\\WINDOWS (thus it shows up as /dos/WINDOWS), then you should specify C:\\WINDOWS (thus it shows up as /dos/WINDOWS), then you should specify
.I """Path""=""/dos""" .I """Path""=""/dos"""
in the in the
.I [Drive C] .I [Drive C]
...@@ -125,7 +125,7 @@ directory would be used for this. ...@@ -125,7 +125,7 @@ directory would be used for this.
.br .br
default: "C:\\\\TEMP" default: "C:\\\\TEMP"
.br .br
Used to specify a directory where Windows applications can store Used to specify a directory where Windows applications can store
temporary files. E.g. with a C: drive at /home/user/wine_c, this would be temporary files. E.g. with a C: drive at /home/user/wine_c, this would be
the /home/user/wine_c/TEMP directory. the /home/user/wine_c/TEMP directory.
.PP .PP
...@@ -178,11 +178,12 @@ Also valid as an AppDefaults setting (recommended/preferred use). ...@@ -178,11 +178,12 @@ Also valid as an AppDefaults setting (recommended/preferred use).
.I format: """modulename""=""native,so,builtin""" .I format: """modulename""=""native,so,builtin"""
.br .br
.I modulename .I modulename
can be any valid DLL module name, without extension. The specified value can be any valid DLL module name. If no extension is specified .dll is
is a comma separated list of module-types to try to load in that assumed. The specified value is a comma separated list of module-types
specific order. Case is not important and only the first letter of to try to load in that specific order. Case is not important and only
each type is enough to identify the type n[ative], s[o], the first letter of each type is enough to identify the type n[ative],
b[uiltin]. Also whitespace is ignored. See also commandline option s[o], b[uiltin]. Also whitespace is ignored. See also commandline
option
.I --dll .I --dll
for details about the allowable types. for details about the allowable types.
.br .br
...@@ -202,9 +203,24 @@ Examples: ...@@ -202,9 +203,24 @@ Examples:
.br .br
.I """*""=""builtin,native""" .I """*""=""builtin,native"""
.br .br
Changing the load order of kernel/kernel32 and gdi/gdi32 to When the specified module name does not contain a path, it matches
anything other than builtin will cause wine to fail because wine cannot only dlls loaded from the Windows system directory. If the application
use native versions for these libraries. explicitly loads a dll from a different directory, it has to be
configured separately. This can be done either by specifying the full
path in the module name, or by using a path wildcard of the form
.I """*modulename""".
.br
For instance, the following will load the native shell32 when loaded
from C:\\Program Files, and the builtin when loaded from any other
directory:
.br
.I """C:\\\\\\\\Program Files\\\\\\\\shell32"" = ""native"""
.br
.I """*shell32"" = ""builtin"""
.br
Changing the load order of low-level dlls like kernel32, gdi32 or
user32 to anything other than builtin will cause wine to fail because
wine cannot use native versions for these libraries.
.br .br
Always make sure that you have some kind of strategy in mind when you start Always make sure that you have some kind of strategy in mind when you start
fiddling with the current defaults and needless to say that you must know fiddling with the current defaults and needless to say that you must know
...@@ -245,7 +261,7 @@ default: none ...@@ -245,7 +261,7 @@ default: none
.I format: """WineLook""=""<Win31|Win95|Win98>""" .I format: """WineLook""=""<Win31|Win95|Win98>"""
.br .br
default: "Win31" default: "Win31"
.br .br
Use Win95-like window displays or Win3.1-like window displays. Use Win95-like window displays or Win3.1-like window displays.
.PP .PP
.B [Registry] .B [Registry]
...@@ -264,7 +280,7 @@ TRY to write all changes to the home registry files ...@@ -264,7 +280,7 @@ TRY to write all changes to the home registry files
.PP .PP
.I format: """LoadWindowsRegistryFiles""=""<boolean>""" .I format: """LoadWindowsRegistryFiles""=""<boolean>"""
.br .br
Load Windows registry from the current Windows directory. Load Windows registry from the current Windows directory.
.PP .PP
booleans: Y/y/T/t/1 are true, N/n/F/f/0 are false. booleans: Y/y/T/t/1 are true, N/n/F/f/0 are false.
.br .br
...@@ -293,8 +309,8 @@ section. ...@@ -293,8 +309,8 @@ section.
.br .br
The only sections that support application-specific information at the The only sections that support application-specific information at the
moment are moment are
.I DllOverrides .I DllOverrides
and and
.I x11drv. .I x11drv.
.br .br
Make sure to use double backslashes in the section name. Make sure to use double backslashes in the section name.
...@@ -308,7 +324,7 @@ in the Wine source distribution. ...@@ -308,7 +324,7 @@ in the Wine source distribution.
.I ~/.wine/config .I ~/.wine/config
User-specific configuration file User-specific configuration file
.SH ENVIRONMENT VARIABLES .SH ENVIRONMENT VARIABLES
.TP .TP
.I WINEPREFIX .I WINEPREFIX
Specifies the directory that contains the per-user Specifies the directory that contains the per-user
.I config .I config
......
...@@ -265,7 +265,6 @@ extern BOOL PE_InitDLL( HMODULE module, DWORD type, LPVOID lpReserved ); ...@@ -265,7 +265,6 @@ extern BOOL PE_InitDLL( HMODULE module, DWORD type, LPVOID lpReserved );
extern DWORD PE_fixup_imports(WINE_MODREF *wm); extern DWORD PE_fixup_imports(WINE_MODREF *wm);
/* loader/loadorder.c */ /* loader/loadorder.c */
extern void MODULE_InitLoadOrder(void);
extern void MODULE_GetLoadOrder( enum loadorder_type plo[], const char *path, BOOL win32 ); extern void MODULE_GetLoadOrder( enum loadorder_type plo[], const char *path, BOOL win32 );
extern void MODULE_AddLoadOrderOption( const char *option ); extern void MODULE_AddLoadOrderOption( const char *option );
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "drive.h" #include "drive.h"
#include "file.h" #include "file.h"
#include "options.h" #include "options.h"
#include "module.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/server.h" #include "wine/server.h"
...@@ -75,9 +74,6 @@ BOOL MAIN_MainInit(void) ...@@ -75,9 +74,6 @@ BOOL MAIN_MainInit(void)
/* Registry initialisation */ /* Registry initialisation */
SHELL_LoadRegistry(); SHELL_LoadRegistry();
/* Initialize module loadorder */
if (CLIENT_IsBootThread()) MODULE_InitLoadOrder();
/* Global boot finished, the rest is process-local */ /* Global boot finished, the rest is process-local */
CLIENT_BootDone( TRACE_ON(server) ); CLIENT_BootDone( TRACE_ON(server) );
......
...@@ -1425,6 +1425,10 @@ static void MODULE_FlushModrefs(void) ...@@ -1425,6 +1425,10 @@ static void MODULE_FlushModrefs(void)
MODULE_modref_list = wm->next; MODULE_modref_list = wm->next;
TRACE(" unloading %s\n", wm->filename); TRACE(" unloading %s\n", wm->filename);
if (!TRACE_ON(module))
TRACE_(loaddll)("Unloaded module '%s' : %s\n", wm->filename,
wm->dlhandle ? "builtin" : "native" );
if (wm->dlhandle) wine_dll_unload( wm->dlhandle ); if (wm->dlhandle) wine_dll_unload( wm->dlhandle );
else UnmapViewOfFile( (LPVOID)wm->module ); else UnmapViewOfFile( (LPVOID)wm->module );
FreeLibrary16(wm->hDummyMod); FreeLibrary16(wm->hDummyMod);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment