fusion: Add a "v4.0_" prefix to version 4.0 assembly directories.
This commit is contained in:
parent
072c96565d
commit
0b82e28401
|
@ -375,7 +375,10 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
|
||||||
LPCWSTR pszManifestFilePath,
|
LPCWSTR pszManifestFilePath,
|
||||||
LPCFUSION_INSTALL_REFERENCE pRefData)
|
LPCFUSION_INSTALL_REFERENCE pRefData)
|
||||||
{
|
{
|
||||||
static const WCHAR format[] = {'%','s','\\','%','s','\\','%','s','_','_','%','s','\\',0};
|
static const WCHAR format[] =
|
||||||
|
{'%','s','\\','%','s','\\','%','s','_','_','%','s','\\',0};
|
||||||
|
static const WCHAR format_v40[] =
|
||||||
|
{'%','s','\\','%','s','\\','v','4','.','0','_','%','s','_','_','%','s','\\',0};
|
||||||
static const WCHAR ext_exe[] = {'.','e','x','e',0};
|
static const WCHAR ext_exe[] = {'.','e','x','e',0};
|
||||||
static const WCHAR ext_dll[] = {'.','d','l','l',0};
|
static const WCHAR ext_dll[] = {'.','d','l','l',0};
|
||||||
IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
|
IAssemblyCacheImpl *cache = impl_from_IAssemblyCache(iface);
|
||||||
|
@ -430,7 +433,10 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
|
||||||
architecture = assembly_get_architecture(assembly);
|
architecture = assembly_get_architecture(assembly);
|
||||||
get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture);
|
get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture);
|
||||||
|
|
||||||
sprintfW(path, format, asmdir, name, version, token);
|
if (!strcmp(clr_version, "v4.0.30319"))
|
||||||
|
sprintfW(path, format_v40, asmdir, name, version, token);
|
||||||
|
else
|
||||||
|
sprintfW(path, format, asmdir, name, version, token);
|
||||||
|
|
||||||
create_full_path(path);
|
create_full_path(path);
|
||||||
|
|
||||||
|
|
|
@ -291,17 +291,6 @@ static void insert_assembly(struct list *assemblies, ASMNAME *to_insert)
|
||||||
static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
|
static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
|
||||||
int depth, LPWSTR path)
|
int depth, LPWSTR path)
|
||||||
{
|
{
|
||||||
WIN32_FIND_DATAW ffd;
|
|
||||||
WCHAR buf[MAX_PATH];
|
|
||||||
WCHAR disp[MAX_PATH];
|
|
||||||
WCHAR asmpath[MAX_PATH];
|
|
||||||
ASMNAME *asmname;
|
|
||||||
HANDLE hfind;
|
|
||||||
LPWSTR ptr;
|
|
||||||
HRESULT hr = S_OK;
|
|
||||||
|
|
||||||
static WCHAR parent[MAX_PATH];
|
|
||||||
|
|
||||||
static const WCHAR dot[] = {'.',0};
|
static const WCHAR dot[] = {'.',0};
|
||||||
static const WCHAR dotdot[] = {'.','.',0};
|
static const WCHAR dotdot[] = {'.','.',0};
|
||||||
static const WCHAR search_fmt[] = {'%','s','\\','*',0};
|
static const WCHAR search_fmt[] = {'%','s','\\','*',0};
|
||||||
|
@ -311,6 +300,14 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
|
||||||
'C','u','l','t','u','r','e','=','n','e','u','t','r','a','l',',',' ',
|
'C','u','l','t','u','r','e','=','n','e','u','t','r','a','l',',',' ',
|
||||||
'P','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',0};
|
'P','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',0};
|
||||||
static const WCHAR ss_fmt[] = {'%','s','\\','%','s',0};
|
static const WCHAR ss_fmt[] = {'%','s','\\','%','s',0};
|
||||||
|
static const WCHAR v40[] = {'v','4','.','0','_'};
|
||||||
|
WIN32_FIND_DATAW ffd;
|
||||||
|
WCHAR buf[MAX_PATH], disp[MAX_PATH], asmpath[MAX_PATH];
|
||||||
|
static WCHAR parent[MAX_PATH];
|
||||||
|
ASMNAME *asmname;
|
||||||
|
HANDLE hfind;
|
||||||
|
WCHAR *ptr;
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
parse_name(name, depth, path, buf);
|
parse_name(name, depth, path, buf);
|
||||||
|
@ -337,13 +334,19 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
|
||||||
}
|
}
|
||||||
else if (depth == 1)
|
else if (depth == 1)
|
||||||
{
|
{
|
||||||
|
unsigned int prefix_len = sizeof(v40)/sizeof(WCHAR);
|
||||||
|
const WCHAR *token, *version = ffd.cFileName;
|
||||||
|
|
||||||
sprintfW(asmpath, path_fmt, path, ffd.cFileName, parent);
|
sprintfW(asmpath, path_fmt, path, ffd.cFileName, parent);
|
||||||
|
|
||||||
ptr = strstrW(ffd.cFileName, dblunder);
|
ptr = strstrW(ffd.cFileName, dblunder);
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
ptr += 2;
|
token = ptr + 2;
|
||||||
|
|
||||||
sprintfW(disp, fmt, parent, ffd.cFileName, ptr);
|
if (strlenW(ffd.cFileName) >= prefix_len &&
|
||||||
|
!memcmp(ffd.cFileName, v40, sizeof(v40))) version += prefix_len;
|
||||||
|
|
||||||
|
sprintfW(disp, fmt, parent, version, token);
|
||||||
|
|
||||||
asmname = HeapAlloc(GetProcessHeap(), 0, sizeof(ASMNAME));
|
asmname = HeapAlloc(GetProcessHeap(), 0, sizeof(ASMNAME));
|
||||||
if (!asmname)
|
if (!asmname)
|
||||||
|
|
Loading…
Reference in New Issue