Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c6d34d7b
Commit
c6d34d7b
authored
Jul 19, 2010
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Install assemblies into correct directory for architecture.
parent
eb7c2061
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
+37
-5
asmcache.c
dlls/fusion/asmcache.c
+22
-5
assembly.c
dlls/fusion/assembly.c
+14
-0
fusionpriv.h
dlls/fusion/fusionpriv.h
+1
-0
No files found.
dlls/fusion/asmcache.c
View file @
c6d34d7b
...
...
@@ -91,15 +91,32 @@ static BOOL create_full_path(LPCWSTR path)
return
ret
;
}
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
)
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
,
BYTE
architecture
)
{
static
const
WCHAR
gac
[]
=
{
'\\'
,
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
'\\'
,
'G'
,
'A'
,
'C'
,
'_'
,
'M'
,
'S'
,
'I'
,
'L'
,
0
};
static
const
WCHAR
gac
[]
=
{
'\\'
,
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
'\\'
,
'G'
,
'A'
,
'C'
,
0
};
FIXME
(
"Ignoring assembly architecture
\n
"
);
static
const
WCHAR
msil
[]
=
{
'_'
,
'M'
,
'S'
,
'I'
,
'L'
,
0
};
static
const
WCHAR
x86
[]
=
{
'_'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
amd64
[]
=
{
'_'
,
'6'
,
'4'
,
0
};
GetWindowsDirectoryW
(
dir
,
size
);
strcatW
(
dir
,
gac
);
switch
(
architecture
)
{
case
peMSIL
:
strcatW
(
dir
,
msil
);
break
;
case
peI386
:
strcatW
(
dir
,
x86
);
break
;
case
peAMD64
:
strcatW
(
dir
,
amd64
);
break
;
}
return
TRUE
;
}
...
...
@@ -291,7 +308,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
if
(
FAILED
(
hr
))
goto
done
;
get_assembly_directory
(
asmdir
,
MAX_PATH
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
assembly_get_architecture
(
assembly
)
);
sprintfW
(
path
,
format
,
asmdir
,
name
,
version
,
token
);
...
...
dlls/fusion/assembly.c
View file @
c6d34d7b
...
...
@@ -811,6 +811,20 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
return
S_OK
;
}
BYTE
assembly_get_architecture
(
ASSEMBLY
*
assembly
)
{
if
((
assembly
->
corhdr
->
MajorRuntimeVersion
==
2
)
&&
(
assembly
->
corhdr
->
MinorRuntimeVersion
==
0
))
return
0
;
/* .NET 1.x assembly */
if
(
assembly
->
nthdr
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
return
peAMD64
;
/* AMD64/IA64 assembly */
if
((
assembly
->
corhdr
->
Flags
&
COMIMAGE_FLAGS_ILONLY
)
&&
!
(
assembly
->
corhdr
->
Flags
&
COMIMAGE_FLAGS_32BITREQUIRED
))
return
peMSIL
;
/* MSIL assembly */
return
peI386
;
/* x86 assembly */
}
static
BYTE
*
assembly_get_blob
(
ASSEMBLY
*
assembly
,
WORD
index
,
ULONG
*
size
)
{
return
GetData
(
&
assembly
->
blobs
[
index
],
size
);
...
...
dlls/fusion/fusionpriv.h
View file @
c6d34d7b
...
...
@@ -433,6 +433,7 @@ HRESULT assembly_release(ASSEMBLY *assembly);
HRESULT
assembly_get_name
(
ASSEMBLY
*
assembly
,
LPWSTR
*
name
);
HRESULT
assembly_get_path
(
ASSEMBLY
*
assembly
,
LPWSTR
*
path
);
HRESULT
assembly_get_version
(
ASSEMBLY
*
assembly
,
LPWSTR
*
version
);
BYTE
assembly_get_architecture
(
ASSEMBLY
*
assembly
);
HRESULT
assembly_get_pubkey_token
(
ASSEMBLY
*
assembly
,
LPWSTR
*
token
);
static
inline
LPWSTR
strdupW
(
LPCWSTR
src
)
...
...
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