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
6b8a8d75
Commit
6b8a8d75
authored
May 06, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add support for version 1.0 of the .NET runtime.
parent
bffd5e0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
assembly.c
dlls/msi/assembly.c
+29
-6
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/assembly.c
View file @
6b8a8d75
...
...
@@ -31,41 +31,48 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
static
HRESULT
(
WINAPI
*
pCreateAssemblyCacheNet10
)(
IAssemblyCache
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCreateAssemblyCacheNet11
)(
IAssemblyCache
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCreateAssemblyCacheNet20
)(
IAssemblyCache
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCreateAssemblyCacheSxs
)(
IAssemblyCache
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pLoadLibraryShim
)(
LPCWSTR
,
LPCWSTR
,
LPVOID
,
HMODULE
*
);
static
HRESULT
(
WINAPI
*
pGetFileVersion
)(
LPCWSTR
,
LPWSTR
,
DWORD
,
DWORD
*
);
static
HMODULE
hfusion11
,
hfusion20
,
hmscoree
,
hsxs
;
static
HMODULE
hfusion1
0
,
hfusion1
1
,
hfusion20
,
hmscoree
,
hsxs
;
static
BOOL
init_function_pointers
(
void
)
{
static
const
WCHAR
szFusion
[]
=
{
'f'
,
'u'
,
's'
,
'i'
,
'o'
,
'n'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
szVersion10
[]
=
{
'v'
,
'1'
,
'.'
,
'0'
,
'.'
,
'3'
,
'7'
,
'0'
,
'5'
,
0
};
static
const
WCHAR
szVersion11
[]
=
{
'v'
,
'1'
,
'.'
,
'1'
,
'.'
,
'4'
,
'3'
,
'2'
,
'2'
,
0
};
static
const
WCHAR
szVersion20
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'5'
,
'0'
,
'7'
,
'2'
,
'7'
,
0
};
if
(
pCreateAssemblyCacheNet11
||
pCreateAssemblyCacheNet20
)
return
TRUE
;
if
(
pCreateAssemblyCacheNet1
0
||
pCreateAssemblyCacheNet1
1
||
pCreateAssemblyCacheNet20
)
return
TRUE
;
if
(
!
(
hmscoree
=
LoadLibraryA
(
"mscoree.dll"
)))
return
FALSE
;
if
(
!
(
pGetFileVersion
=
(
void
*
)
GetProcAddress
(
hmscoree
,
"GetFileVersion"
)))
goto
error
;
pGetFileVersion
=
(
void
*
)
GetProcAddress
(
hmscoree
,
"GetFileVersion"
);
/* missing from v1.0.3705 */
if
(
!
(
pLoadLibraryShim
=
(
void
*
)
GetProcAddress
(
hmscoree
,
"LoadLibraryShim"
)))
goto
error
;
if
(
!
pLoadLibraryShim
(
szFusion
,
szVersion10
,
NULL
,
&
hfusion10
))
pCreateAssemblyCacheNet10
=
(
void
*
)
GetProcAddress
(
hfusion10
,
"CreateAssemblyCache"
);
if
(
!
pLoadLibraryShim
(
szFusion
,
szVersion11
,
NULL
,
&
hfusion11
))
pCreateAssemblyCacheNet11
=
(
void
*
)
GetProcAddress
(
hfusion11
,
"CreateAssemblyCache"
);
if
(
!
pLoadLibraryShim
(
szFusion
,
szVersion20
,
NULL
,
&
hfusion20
))
pCreateAssemblyCacheNet20
=
(
void
*
)
GetProcAddress
(
hfusion20
,
"CreateAssemblyCache"
);
if
(
!
pCreateAssemblyCacheNet11
&&
!
pCreateAssemblyCacheNet20
)
goto
error
;
if
(
!
pCreateAssemblyCacheNet1
0
&&
!
pCreateAssemblyCacheNet1
1
&&
!
pCreateAssemblyCacheNet20
)
goto
error
;
if
(
!
(
hsxs
=
LoadLibraryA
(
"sxs.dll"
)))
goto
error
;
if
(
!
(
pCreateAssemblyCacheSxs
=
(
void
*
)
GetProcAddress
(
hsxs
,
"CreateAssemblyCache"
)))
goto
error
;
return
TRUE
;
error:
pCreateAssemblyCacheNet10
=
NULL
;
pCreateAssemblyCacheNet11
=
NULL
;
pCreateAssemblyCacheNet20
=
NULL
;
FreeLibrary
(
hfusion10
);
FreeLibrary
(
hfusion11
);
FreeLibrary
(
hfusion20
);
FreeLibrary
(
hmscoree
);
...
...
@@ -75,16 +82,26 @@ error:
BOOL
msi_init_assembly_caches
(
MSIPACKAGE
*
package
)
{
if
(
!
init_function_pointers
())
return
FALSE
;
if
(
package
->
cache_net
[
CLR_VERSION_V11
]
||
package
->
cache_net
[
CLR_VERSION_V20
])
return
TRUE
;
if
(
package
->
cache_net
[
CLR_VERSION_V10
]
||
package
->
cache_net
[
CLR_VERSION_V11
]
||
package
->
cache_net
[
CLR_VERSION_V20
])
return
TRUE
;
if
(
pCreateAssemblyCacheSxs
(
&
package
->
cache_sxs
,
0
)
!=
S_OK
)
return
FALSE
;
if
(
pCreateAssemblyCacheNet10
)
pCreateAssemblyCacheNet11
(
&
package
->
cache_net
[
CLR_VERSION_V10
],
0
);
if
(
pCreateAssemblyCacheNet11
)
pCreateAssemblyCacheNet11
(
&
package
->
cache_net
[
CLR_VERSION_V11
],
0
);
if
(
pCreateAssemblyCacheNet20
)
pCreateAssemblyCacheNet20
(
&
package
->
cache_net
[
CLR_VERSION_V20
],
0
);
if
(
package
->
cache_net
[
CLR_VERSION_V11
]
||
package
->
cache_net
[
CLR_VERSION_V20
])
if
(
package
->
cache_net
[
CLR_VERSION_V10
]
||
package
->
cache_net
[
CLR_VERSION_V11
]
||
package
->
cache_net
[
CLR_VERSION_V20
])
{
return
TRUE
;
}
if
(
package
->
cache_net
[
CLR_VERSION_V10
])
{
IAssemblyCache_Release
(
package
->
cache_net
[
CLR_VERSION_V10
]
);
package
->
cache_net
[
CLR_VERSION_V10
]
=
NULL
;
}
if
(
package
->
cache_net
[
CLR_VERSION_V11
])
{
IAssemblyCache_Release
(
package
->
cache_net
[
CLR_VERSION_V11
]
);
...
...
@@ -117,8 +134,10 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package )
IAssemblyCache_Release
(
package
->
cache_sxs
);
package
->
cache_sxs
=
NULL
;
}
pCreateAssemblyCacheNet10
=
NULL
;
pCreateAssemblyCacheNet11
=
NULL
;
pCreateAssemblyCacheNet20
=
NULL
;
FreeLibrary
(
hfusion10
);
FreeLibrary
(
hfusion11
);
FreeLibrary
(
hfusion20
);
FreeLibrary
(
hmscoree
);
...
...
@@ -249,12 +268,14 @@ static BOOL is_assembly_installed( IAssemblyCache *cache, const WCHAR *display_n
return
(
info
.
dwAssemblyFlags
==
ASSEMBLYINFO_FLAG_INSTALLED
);
}
static
const
WCHAR
clr_version_v10
[]
=
{
'v'
,
'1'
,
'.'
,
'0'
,
'.'
,
'3'
,
'7'
,
'0'
,
'5'
,
0
};
static
const
WCHAR
clr_version_v11
[]
=
{
'v'
,
'1'
,
'.'
,
'1'
,
'.'
,
'4'
,
'3'
,
'2'
,
'2'
,
0
};
static
const
WCHAR
clr_version_v20
[]
=
{
'v'
,
'2'
,
'.'
,
'0'
,
'.'
,
'5'
,
'0'
,
'7'
,
'2'
,
'7'
,
0
};
static
const
WCHAR
clr_version_unknown
[]
=
{
'u'
,
'n'
,
'k'
,
'n'
,
'o'
,
'w'
,
'n'
,
0
};
static
const
WCHAR
*
clr_version
[]
=
{
clr_version_v10
,
clr_version_v11
,
clr_version_v20
};
...
...
@@ -339,6 +360,8 @@ static enum clr_version get_clr_version( const WCHAR *filename )
enum
clr_version
version
=
CLR_VERSION_V11
;
WCHAR
*
strW
;
if
(
!
pGetFileVersion
)
return
CLR_VERSION_V10
;
hr
=
pGetFileVersion
(
filename
,
NULL
,
0
,
&
len
);
if
(
hr
!=
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
))
return
CLR_VERSION_V11
;
if
((
strW
=
msi_alloc
(
len
*
sizeof
(
WCHAR
)
)))
...
...
dlls/msi/msipriv.h
View file @
6b8a8d75
...
...
@@ -339,6 +339,7 @@ enum platform
enum
clr_version
{
CLR_VERSION_V10
,
CLR_VERSION_V11
,
CLR_VERSION_V20
,
CLR_VERSION_MAX
...
...
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