mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 16:01:23 +00:00
Hard-coded DllPairs configuration; there is no need for the user to
change it.
This commit is contained in:
parent
00377a78b7
commit
431cf32450
|
@ -62,6 +62,23 @@ static struct tagDllOverride {
|
||||||
{NULL,NULL},
|
{NULL,NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct tagDllPair {
|
||||||
|
const char *dll1, *dll2;
|
||||||
|
} DllPairs[] = {
|
||||||
|
{ "krnl386", "kernel32" },
|
||||||
|
{ "gdi", "gdi32" },
|
||||||
|
{ "user", "user32" },
|
||||||
|
{ "commdlg", "comdlg32" },
|
||||||
|
{ "commctrl", "comctl32" },
|
||||||
|
{ "ver", "version" },
|
||||||
|
{ "shell", "shell32" },
|
||||||
|
{ "lzexpand", "lz32" },
|
||||||
|
{ "mmsystem", "winmm" },
|
||||||
|
{ "msvideo", "msvfw32" },
|
||||||
|
{ "winsock", "wsock32" },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* cmp_sort_func (internal, static)
|
* cmp_sort_func (internal, static)
|
||||||
*
|
*
|
||||||
|
@ -343,23 +360,6 @@ endit:
|
||||||
* commdlg = native, builtin
|
* commdlg = native, builtin
|
||||||
* version, ver = elfdll, native, builtin
|
* version, ver = elfdll, native, builtin
|
||||||
*
|
*
|
||||||
* Section:
|
|
||||||
* [DllPairs]
|
|
||||||
*
|
|
||||||
* Keys:
|
|
||||||
* This is a simple pairing in the form 'name1 = name2'. It is supposed to
|
|
||||||
* identify the dlls that cannot live without eachother unless they are
|
|
||||||
* loaded in the same format. Examples are common dialogs and controls,
|
|
||||||
* shell, kernel, gdi, user, etc...
|
|
||||||
* The code will issue a warning if the loadorder of these pairs are different
|
|
||||||
* and might cause hard-to-find bugs due to incompatible pairs loaded at
|
|
||||||
* run-time. Note that this pairing gives *no* guarantee that the pairs
|
|
||||||
* actually get loaded as the same type, nor that the correct versions are
|
|
||||||
* loaded (might be implemented later). It merely notes obvious trouble.
|
|
||||||
* Examples:
|
|
||||||
* kernel = kernel32
|
|
||||||
* commdlg = comdlg32
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BUFFERSIZE 1024
|
#define BUFFERSIZE 1024
|
||||||
|
@ -367,7 +367,10 @@ endit:
|
||||||
BOOL MODULE_InitLoadOrder(void)
|
BOOL MODULE_InitLoadOrder(void)
|
||||||
{
|
{
|
||||||
char buffer[BUFFERSIZE];
|
char buffer[BUFFERSIZE];
|
||||||
|
char key[256];
|
||||||
int nbuffer;
|
int nbuffer;
|
||||||
|
int idx;
|
||||||
|
const struct tagDllPair *dllpair;
|
||||||
|
|
||||||
#if defined(HAVE_DL_API)
|
#if defined(HAVE_DL_API)
|
||||||
/* Get/set the new LD_LIBRARY_PATH */
|
/* Get/set the new LD_LIBRARY_PATH */
|
||||||
|
@ -405,41 +408,14 @@ BOOL MODULE_InitLoadOrder(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the explicitely defined orders for specific modules as an entire section */
|
/* Read the explicitely defined orders for specific modules as an entire section */
|
||||||
nbuffer = PROFILE_GetWineIniString("DllOverrides", NULL, "", buffer, sizeof(buffer));
|
idx = 0;
|
||||||
if(nbuffer == BUFFERSIZE-2)
|
while (PROFILE_EnumWineIniString( "DllOverrides", idx++, key, sizeof(key),
|
||||||
|
buffer, sizeof(buffer)))
|
||||||
{
|
{
|
||||||
ERR("BUFFERSIZE %d is too small to read [DllOverrides]. Needs to grow in the source\n", BUFFERSIZE);
|
TRACE("Key '%s' uses override '%s'\n", key, buffer);
|
||||||
|
if(!AddLoadOrderSet(key, buffer, TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if(nbuffer)
|
|
||||||
{
|
|
||||||
/* We only have the keys in the buffer, not the values */
|
|
||||||
char *key;
|
|
||||||
char value[BUFFERSIZE];
|
|
||||||
char *next;
|
|
||||||
|
|
||||||
for(key = buffer; *key; key = next)
|
|
||||||
{
|
|
||||||
next = key + strlen(key) + 1;
|
|
||||||
|
|
||||||
nbuffer = PROFILE_GetWineIniString("DllOverrides", key, "", value, sizeof(value));
|
|
||||||
if(!nbuffer)
|
|
||||||
{
|
|
||||||
ERR("Module(s) '%s' will always fail to load. Are you sure you want this?\n", key);
|
|
||||||
value[0] = '\0'; /* Just in case */
|
|
||||||
}
|
|
||||||
if(nbuffer == BUFFERSIZE-2)
|
|
||||||
{
|
|
||||||
ERR("BUFFERSIZE %d is too small to read [DllOverrides] key '%s'. Needs to grow in the source\n", BUFFERSIZE, key);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("Key '%s' uses override '%s'\n", key, value);
|
|
||||||
|
|
||||||
if(!AddLoadOrderSet(key, value, TRUE))
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the commandline overrides to the pool */
|
/* Add the commandline overrides to the pool */
|
||||||
if(!ParseCommandlineOverrides())
|
if(!ParseCommandlineOverrides())
|
||||||
|
@ -460,44 +436,16 @@ BOOL MODULE_InitLoadOrder(void)
|
||||||
qsort(module_loadorder, nmodule_loadorder, sizeof(module_loadorder[0]), cmp_sort_func);
|
qsort(module_loadorder, nmodule_loadorder, sizeof(module_loadorder[0]), cmp_sort_func);
|
||||||
|
|
||||||
/* Check the pairs of dlls */
|
/* Check the pairs of dlls */
|
||||||
nbuffer = PROFILE_GetWineIniString("DllPairs", NULL, "", buffer, sizeof(buffer));
|
dllpair = DllPairs;
|
||||||
if(nbuffer == BUFFERSIZE-2)
|
while (dllpair->dll1)
|
||||||
{
|
|
||||||
ERR("BUFFERSIZE %d is too small to read [DllPairs]. Needs to grow in the source\n", BUFFERSIZE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if(nbuffer)
|
|
||||||
{
|
|
||||||
/* We only have the keys in the buffer, not the values */
|
|
||||||
char *key;
|
|
||||||
char value[BUFFERSIZE];
|
|
||||||
char *next;
|
|
||||||
|
|
||||||
for(key = buffer; *key; key = next)
|
|
||||||
{
|
{
|
||||||
module_loadorder_t *plo1, *plo2;
|
module_loadorder_t *plo1, *plo2;
|
||||||
|
plo1 = MODULE_GetLoadOrder(dllpair->dll1);
|
||||||
next = key + strlen(key) + 1;
|
plo2 = MODULE_GetLoadOrder(dllpair->dll2);
|
||||||
|
|
||||||
nbuffer = PROFILE_GetWineIniString("DllPairs", key, "", value, sizeof(value));
|
|
||||||
if(!nbuffer)
|
|
||||||
{
|
|
||||||
ERR("Module pair '%s' is not associated with another module?\n", key);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(nbuffer == BUFFERSIZE-2)
|
|
||||||
{
|
|
||||||
ERR("BUFFERSIZE %d is too small to read [DllPairs] key '%s'. Needs to grow in the source\n", BUFFERSIZE, key);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
plo1 = MODULE_GetLoadOrder(key);
|
|
||||||
plo2 = MODULE_GetLoadOrder(value);
|
|
||||||
assert(plo1 && plo2);
|
assert(plo1 && plo2);
|
||||||
|
|
||||||
if(memcmp(plo1->loadorder, plo2->loadorder, sizeof(plo1->loadorder)))
|
if(memcmp(plo1->loadorder, plo2->loadorder, sizeof(plo1->loadorder)))
|
||||||
MESSAGE("Warning: Modules '%s' and '%s' have different loadorder which may cause trouble\n", key, value);
|
MESSAGE("Warning: Modules '%s' and '%s' have different loadorder which may cause trouble\n", dllpair->dll1, dllpair->dll2);
|
||||||
}
|
dllpair++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(TRACE_ON(module))
|
if(TRACE_ON(module))
|
||||||
|
|
14
wine.ini
14
wine.ini
|
@ -63,19 +63,6 @@ SymbolTableFile=./wine.sym
|
||||||
EXTRA_LD_LIBRARY_PATH=${HOME}/wine/cvs/lib
|
EXTRA_LD_LIBRARY_PATH=${HOME}/wine/cvs/lib
|
||||||
DefaultLoadOrder = native, builtin, elfdll, so
|
DefaultLoadOrder = native, builtin, elfdll, so
|
||||||
|
|
||||||
[DllPairs]
|
|
||||||
krnl386 = kernel32
|
|
||||||
gdi = gdi32
|
|
||||||
user = user32
|
|
||||||
commdlg = comdlg32
|
|
||||||
commctrl= comctl32
|
|
||||||
ver = version
|
|
||||||
shell = shell32
|
|
||||||
lzexpand= lz32
|
|
||||||
mmsystem= winmm
|
|
||||||
msvideo = msvfw32
|
|
||||||
winsock = wsock32
|
|
||||||
|
|
||||||
[DllOverrides]
|
[DllOverrides]
|
||||||
kernel32, gdi32, user32 = builtin
|
kernel32, gdi32, user32 = builtin
|
||||||
krnl386, gdi, user = builtin
|
krnl386, gdi, user = builtin
|
||||||
|
@ -169,6 +156,7 @@ Default=
|
||||||
Startup=
|
Startup=
|
||||||
|
|
||||||
[Console]
|
[Console]
|
||||||
|
;Drivers=tty
|
||||||
;XtermProg=nxterm
|
;XtermProg=nxterm
|
||||||
;InitialRows=25
|
;InitialRows=25
|
||||||
;InitialColumns=80
|
;InitialColumns=80
|
||||||
|
|
Loading…
Reference in a new issue