Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fd1eab7f
Commit
fd1eab7f
authored
May 21, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
May 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Add support for installing version 4.0 assemblies.
parent
0c6ab246
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
+27
-18
asmcache.c
dlls/fusion/asmcache.c
+27
-18
No files found.
dlls/fusion/asmcache.c
View file @
fd1eab7f
...
...
@@ -94,39 +94,48 @@ static BOOL create_full_path(LPCWSTR path)
return
ret
;
}
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
,
PEKIND
architecture
)
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
,
const
char
*
version
,
PEKIND
architecture
)
{
static
const
WCHAR
dotnet
[]
=
{
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'.'
,
'N'
,
'E'
,
'T'
,
'\\'
,
0
};
static
const
WCHAR
gac
[]
=
{
'\\'
,
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
'\\'
,
'G'
,
'A'
,
'C'
,
0
};
static
const
WCHAR
msil
[]
=
{
'_'
,
'M'
,
'S'
,
'I'
,
'L'
,
0
};
static
const
WCHAR
x86
[]
=
{
'_'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
amd64
[]
=
{
'_'
,
'6'
,
'4'
,
0
};
DWORD
len
=
GetWindowsDirectoryW
(
dir
,
size
);
GetWindowsDirectoryW
(
dir
,
size
);
strcatW
(
dir
,
gac
);
if
(
!
strcmp
(
version
,
"v4.0.30319"
))
{
strcpyW
(
dir
+
len
,
dotnet
);
len
+=
sizeof
(
dotnet
)
/
sizeof
(
WCHAR
)
-
1
;
strcpyW
(
dir
+
len
,
gac
+
1
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
2
;
}
else
{
strcpyW
(
dir
+
len
,
gac
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
1
;
}
switch
(
architecture
)
{
case
peNone
:
break
;
case
peMSIL
:
strc
atW
(
dir
,
msil
);
strc
pyW
(
dir
+
len
,
msil
);
break
;
case
peI386
:
strc
atW
(
dir
,
x86
);
strc
pyW
(
dir
+
len
,
x86
);
break
;
case
peAMD64
:
strc
atW
(
dir
,
amd64
);
strc
pyW
(
dir
+
len
,
amd64
);
break
;
default:
WARN
(
"unhandled architecture %u
\n
"
,
architecture
);
return
FALSE
;
}
return
TRUE
;
}
...
...
@@ -371,15 +380,11 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
static
const
WCHAR
ext_dll
[]
=
{
'.'
,
'd'
,
'l'
,
'l'
,
0
};
IAssemblyCacheImpl
*
cache
=
impl_from_IAssemblyCache
(
iface
);
ASSEMBLY
*
assembly
;
LPWSTR
filename
;
LPWSTR
name
=
NULL
;
LPWSTR
token
=
NULL
;
LPWSTR
version
=
NULL
;
LPWSTR
asmpath
=
NULL
;
WCHAR
path
[
MAX_PATH
];
WCHAR
asmdir
[
MAX_PATH
];
LPWSTR
ext
;
WCHAR
*
filename
,
*
ext
;
WCHAR
*
name
=
NULL
,
*
token
=
NULL
,
*
version
=
NULL
,
*
asmpath
=
NULL
;
WCHAR
path
[
MAX_PATH
],
asmdir
[
MAX_PATH
];
PEKIND
architecture
;
char
*
clr_version
;
HRESULT
hr
;
TRACE
(
"(%p, %d, %s, %p)
\n
"
,
iface
,
dwFlags
,
...
...
@@ -416,10 +421,14 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
if
(
FAILED
(
hr
))
goto
done
;
hr
=
assembly_get_runtime_version
(
assembly
,
&
clr_version
);
if
(
FAILED
(
hr
))
goto
done
;
cache_lock
(
cache
);
architecture
=
assembly_get_architecture
(
assembly
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
architecture
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
clr_version
,
architecture
);
sprintfW
(
path
,
format
,
asmdir
,
name
,
version
,
token
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment