Commit 8cdcbbb3 authored by Alexandre Julliard's avatar Alexandre Julliard

Tweak the load order algorithm a bit to better reflect the user's

intention, by taking into account non-wildcard module specifications for all directories.
parent fc8b376a
...@@ -605,18 +605,18 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam ...@@ -605,18 +605,18 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
goto done; goto done;
} }
/* then base name matching compiled-in defaults */ if (basename == module+1) /* module doesn't contain a path */
if (get_default_load_order( basename, loadorder ))
{
TRACE( "got compiled-in default %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) );
goto done;
}
if (basename == module+1)
{ {
static const WCHAR wildcardW[] = {'*',0}; static const WCHAR wildcardW[] = {'*',0};
/* then base name matching compiled-in defaults */
if (get_default_load_order( basename, loadorder ))
{
TRACE( "got compiled-in default %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) );
goto done;
}
/* then wildcard entry in AppDefaults (only if no explicit path) */ /* then wildcard entry in AppDefaults (only if no explicit path) */
if (app_key && get_registry_value( app_key, wildcardW, loadorder )) if (app_key && get_registry_value( app_key, wildcardW, loadorder ))
{ {
...@@ -640,6 +640,31 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam ...@@ -640,6 +640,31 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
} }
else /* module contains an explicit path */ else /* module contains an explicit path */
{ {
/* then base name without '*' in AppDefaults */
if (app_key && get_registry_value( app_key, basename, loadorder ))
{
TRACE( "got basename app defaults %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) );
goto done;
}
/* then base name without '*' in standard section */
if (std_key && get_registry_value( std_key, basename, loadorder ))
{
TRACE( "got basename standard entry %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) );
goto done;
}
/* then base name matching compiled-in defaults */
if (get_default_load_order( basename, loadorder ))
{
TRACE( "got compiled-in default %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) );
goto done;
}
/* and last the hard-coded default */
memcpy( loadorder, default_path_loadorder, sizeof(default_path_loadorder) ); memcpy( loadorder, default_path_loadorder, sizeof(default_path_loadorder) );
TRACE( "got hardcoded path default %s for %s\n", TRACE( "got hardcoded path default %s for %s\n",
debugstr_loadorder(loadorder), debugstr_w(path) ); debugstr_loadorder(loadorder), debugstr_w(path) );
......
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