Added "*" wildcard entry to DllOverrides to replace DllDefaults

section; this way it can also be specified on a per-app basis.
Removed compiled-in defaults for dlls mentioned in the sample config.
Update man page.
oldstable
Alexandre Julliard 2001-03-21 20:33:11 +00:00
parent 3ea0c073f8
commit fde1b0cb0c
3 changed files with 88 additions and 78 deletions

View File

@ -67,9 +67,6 @@ WINE REGISTRY Version 2
# <wineconf>
[DllDefaults]
"DefaultLoadOrder" = "native, builtin, so"
[DllOverrides]
"commdlg" = "builtin, native"
"comdlg32" = "builtin, native"
@ -77,6 +74,8 @@ WINE REGISTRY Version 2
"version" = "builtin, native"
"shell" = "builtin, native"
"shell32" = "builtin, native"
"shfolder" = "builtin, native"
"shlwapi" = "builtin, native"
"lzexpand" = "builtin, native"
"lz32" = "builtin, native"
"comctl32" = "builtin, native"
@ -88,7 +87,9 @@ WINE REGISTRY Version 2
"ddraw" = "builtin, native"
"dinput" = "builtin, native"
"dsound" = "builtin, native"
"opengl32" = "builtin, native"
"msvcrt" = "native, builtin"
"rpcrt4" = "native, builtin"
"msvideo" = "builtin, native"
"msvfw32" = "builtin, native"
"mcicda.drv" = "builtin, native"
@ -100,6 +101,8 @@ WINE REGISTRY Version 2
"msacm" = "builtin, native"
"msacm32" = "builtin, native"
"midimap.drv" = "builtin, native"
; default for all other dlls
"*" = "native, builtin, so"
[x11drv]
; Number of colors to allocate from the system palette

View File

@ -144,32 +144,24 @@ default: "C:\\\\WINDOWS;C:\\\\WINDOWS\\\\SYSTEM"
Used to specify the path which will be used to find executables and
dlls. Make sure to double all the backslashes.
.PP
.B [DllDefaults]
.br
.I format: """EXTRA_LD_LIBRARY_PATH""=""@prefix@/lib/wine[:/more/path/to/search[:...]]"""
.br
The path will be appended to any existing LD_LIBRARY_PATH from the
environment for the search of .so libraries.
.PP
.I format: """DefaultLoadOrder""=""native,so,builtin"""
.br
A comma separated list of module-types to try to load in that specific
order. The DefaultLoadOrder key is used as a fallback when a module is
not specified explicitely. If the DefaultLoadOrder key is not found,
then the order "native,builtin,so" is used.
.br
Case is not important and only the first letter of each type is enough
to identify the type n[ative], s[o], b[uiltin]. Also whitespace is
ignored. See also commandline option
.I --dll
for details about the allowable types.
.PP
.B [DllOverrides]
.br
There are no explicit keys defined other than module/library names. A
module namd is followed by an assignment of the load order for this
specific module. See above for possible types. You should not specify
an extension.
.I format: """modulename""=""native,so,builtin"""
.br
.I modulename
can be any valid module name, without extension. The specified value
is a comma separated list of module-types to try to load in that
specific order. Case is not important and only the first letter of
each type is enough to identify the type n[ative], s[o],
b[uiltin]. Also whitespace is ignored. See also commandline option
.I --dll
for details about the allowable types.
.br
The wildcard entry
.I """*"""
specifies the load order to use for modules not explicitly
mentioned. If the wildcard entry is not found, then the order
"native,builtin,so" is used.
.br
Examples:
.br
@ -177,18 +169,13 @@ Examples:
.br
.I """kernel""=""builtin"""
.br
.I """comdlg32""=""native, builtin"""
.I """comdlg32""=""native,builtin"""
.br
.I """commdlg""=""native, builtin"""
.I """*""=""builtin,native"""
.br
Changing the load order of kernel/kernel32 and gdi/gdi32 to
anything other than builtin will cause wine to fail because wine cannot
use native versions for these libraries (gdi[32] might work native someday,
but kernel[32] will never work native).
Note that using the native versions of user[32] isn't recommended right now,
as these modules face nearly the same problems as kernel/gdi and we only
just managed to make them work partially. But trying to use it might get
your program running.
use native versions for these libraries.
.br
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
@ -253,6 +240,33 @@ booleans: Y/y/T/t/1 are true, N/n/F/f/0 are false.
.br
Defaults are read all, write to home files.
.PP
.B [AppDefaults\\\\\\\\<appname>\\\\\\\\...]
.PP
This section allows specifying application-specific values for
the other sections described above.
.I <appname>
is the name of the application exe file, without path. The "..."
should be replaced by the name of one of the above configuration
sections.
.br
Example:
.br
.I [AppDefaults\\\\\\\\sol.exe\\\\\\\\DllOverrides]
.br
.I """shell32""" = """native"""
.br
means that Solitaire will use "native" load order for the shell32
dll. All other applications will continue to use what was specified in
the general
.I DllOverrides
section.
.br
The only section that supports application-specific information at the
moment is
.I DllOverrides.
.br
Make sure to use double backslashes in the section name.
.PP
.SH SAMPLE CONFIGURATION FILE
A sample configuration file is distributed as
.B documentation/samples/config

View File

@ -40,16 +40,7 @@ struct loadorder_list
/* the list must remain sorted by dll name */
static module_loadorder_t default_order_list[] =
{
{ "advapi32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "comctl32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "comdlg32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "commctrl", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "commdlg", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "crtdll", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "ddraw", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "dinput", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "display", { LOADORDER_BI, 0, 0, 0 } },
{ "dsound", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "gdi", { LOADORDER_BI, 0, 0, 0 } },
{ "gdi32", { LOADORDER_BI, 0, 0, 0 } },
{ "glide2x", { LOADORDER_SO, LOADORDER_DLL, 0, 0 } },
@ -59,38 +50,15 @@ static module_loadorder_t default_order_list[] =
{ "kernel32", { LOADORDER_BI, 0, 0, 0 } },
{ "keyboard", { LOADORDER_BI, 0, 0, 0 } },
{ "krnl386", { LOADORDER_BI, 0, 0, 0 } },
{ "lz32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "lzexpand", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "mcianim.drv", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
{ "mciavi.drv", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
{ "mcicda.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "mciseq.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "mciwave.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "midimap.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "mmsystem", { LOADORDER_BI, 0, 0, 0 } },
{ "mouse", { LOADORDER_BI, 0, 0, 0 } },
{ "mpr", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "msacm", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "msacm.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "msacm32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "msvcrt", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
{ "msvfw32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "msvideo", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "ntdll", { LOADORDER_BI, 0, 0, 0 } },
{ "odbc32", { LOADORDER_BI, 0, 0, 0 } },
{ "opengl32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "rpcrt4", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
{ "shell", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "shell32", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "shfolder", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "shlwapi", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
{ "system", { LOADORDER_BI, 0, 0, 0 } },
{ "toolhelp", { LOADORDER_BI, 0, 0, 0 } },
{ "ttydrv", { LOADORDER_BI, 0, 0, 0 } },
{ "user", { LOADORDER_BI, 0, 0, 0 } },
{ "user32", { LOADORDER_BI, 0, 0, 0 } },
{ "ver", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "version", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "w32skrnl", { LOADORDER_BI, 0, 0, 0 } },
{ "winaspi", { LOADORDER_BI, 0, 0, 0 } },
{ "windebug", { LOADORDER_DLL, LOADORDER_BI, 0, 0 } },
@ -99,7 +67,6 @@ static module_loadorder_t default_order_list[] =
{ "wing", { LOADORDER_BI, 0, 0, 0 } },
{ "winmm", { LOADORDER_BI, 0, 0, 0 } },
{ "winsock", { LOADORDER_BI, 0, 0, 0 } },
{ "winspool.drv", { LOADORDER_BI, LOADORDER_DLL, 0, 0 } },
{ "wnaspi32", { LOADORDER_BI, 0, 0, 0 } },
{ "wow32", { LOADORDER_BI, 0, 0, 0 } },
{ "wprocs", { LOADORDER_BI, 0, 0, 0 } },
@ -417,9 +384,10 @@ static BOOL get_list_load_order( const char *module, const struct loadorder_list
/***************************************************************************
* get_app_load_order
*
* Get the load order for a given module from the app-specific DllOverrides list
* Get the load order for a given module from the app-specific DllOverrides list.
* Also look for default '*' key if no module key found.
*/
static BOOL get_app_load_order( const char *module, enum loadorder_type lo[] )
static BOOL get_app_load_order( const char *module, enum loadorder_type lo[], BOOL *got_default )
{
HKEY hkey, appkey;
DWORD count, type, res;
@ -447,10 +415,14 @@ static BOOL get_app_load_order( const char *module, enum loadorder_type lo[] )
if (res) return FALSE;
count = sizeof(buffer);
res = RegQueryValueExA( appkey, module, NULL, &type, buffer, &count );
if ((res = RegQueryValueExA( appkey, module, NULL, &type, buffer, &count )))
{
if (!(res = RegQueryValueExA( appkey, "*", NULL, &type, buffer, &count )))
*got_default = TRUE;
}
else TRACE( "got app loadorder '%s' for '%s'\n", buffer, module );
RegCloseKey( appkey );
if (res) return FALSE;
TRACE( "got app loadorder '%s' for '%s'\n", buffer, module );
return ParseLoadOrder( buffer, lo );
}
@ -459,8 +431,10 @@ static BOOL get_app_load_order( const char *module, enum loadorder_type lo[] )
* get_standard_load_order
*
* Get the load order for a given module from the main DllOverrides list
* Also look for default '*' key if no module key found.
*/
static BOOL get_standard_load_order( const char *module, enum loadorder_type lo[] )
static BOOL get_standard_load_order( const char *module, enum loadorder_type lo[],
BOOL *got_default )
{
HKEY hkey;
DWORD count, type, res;
@ -470,10 +444,14 @@ static BOOL get_standard_load_order( const char *module, enum loadorder_type lo[
return FALSE;
count = sizeof(buffer);
res = RegQueryValueExA( hkey, module, NULL, &type, buffer, &count );
if ((res = RegQueryValueExA( hkey, module, NULL, &type, buffer, &count )))
{
if (!(res = RegQueryValueExA( hkey, "*", NULL, &type, buffer, &count )))
*got_default = TRUE;
}
else TRACE( "got standard loadorder '%s' for '%s'\n", buffer, module );
RegCloseKey( hkey );
if (res) return FALSE;
TRACE( "got standard loadorder '%s' for '%s'\n", buffer, module );
return ParseLoadOrder( buffer, lo );
}
@ -526,6 +504,8 @@ void MODULE_GetLoadOrder( enum loadorder_type loadorder[], const char *path, BOO
char *cptr;
char *name;
int len;
BOOL got_app_default = FALSE, got_std_default = FALSE;
enum loadorder_type lo_default[LOADORDER_NTYPES];
TRACE("looking for %s\n", path);
@ -568,15 +548,28 @@ void MODULE_GetLoadOrder( enum loadorder_type loadorder[], const char *path, BOO
if (get_list_load_order( fname, &cmdline_list, loadorder )) return;
/* then app-specific config */
if (get_app_load_order( fname, loadorder )) return;
if (get_app_load_order( fname, loadorder, &got_app_default ))
{
if (!got_app_default) return;
/* save the default value for later on */
memcpy( lo_default, loadorder, sizeof(lo_default) );
}
/* then standard config */
if (get_standard_load_order( fname, loadorder )) return;
if (get_standard_load_order( fname, loadorder, &got_std_default ))
{
if (!got_std_default) return;
/* save the default value for later on */
if (!got_app_default) memcpy( lo_default, loadorder, sizeof(lo_default) );
}
/* then compiled-in defaults */
if (get_list_load_order( fname, &default_list, loadorder )) return;
done:
/* last, return the default */
get_default_load_order( loadorder );
if (got_app_default || got_std_default)
memcpy( loadorder, lo_default, sizeof(lo_default) );
else
get_default_load_order( loadorder );
}