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
4df33534
Commit
4df33534
authored
Feb 02, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Perform late initialization of the assembly caches.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51345
(cherry picked from commit
d9d700f3
)
parent
31012910
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
28 deletions
+22
-28
assembly.c
dlls/msi/assembly.c
+22
-20
msipriv.h
dlls/msi/msipriv.h
+0
-1
package.c
dlls/msi/package.c
+0
-7
No files found.
dlls/msi/assembly.c
View file @
4df33534
...
...
@@ -30,55 +30,52 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
static
BOOL
load_fusion_dlls
(
MSIPACKAGE
*
package
)
static
void
load_fusion_dlls
(
MSIPACKAGE
*
package
)
{
HRESULT
(
WINAPI
*
pLoadLibraryShim
)(
const
WCHAR
*
,
const
WCHAR
*
,
void
*
,
HMODULE
*
);
WCHAR
path
[
MAX_PATH
];
DWORD
len
=
GetSystemDirectoryW
(
path
,
MAX_PATH
);
lstrcpyW
(
path
+
len
,
L"
\\
mscoree.dll"
);
if
(
package
->
hmscoree
||
!
(
package
->
hmscoree
=
LoadLibraryW
(
path
)))
return
TRUE
;
if
(
!
package
->
hmscoree
&&
!
(
package
->
hmscoree
=
LoadLibraryW
(
path
)))
return
;
if
(
!
(
pLoadLibraryShim
=
(
void
*
)
GetProcAddress
(
package
->
hmscoree
,
"LoadLibraryShim"
)))
{
FreeLibrary
(
package
->
hmscoree
);
package
->
hmscoree
=
NULL
;
return
TRUE
;
return
;
}
pLoadLibraryShim
(
L"fusion.dll"
,
L"v1.0.3705"
,
NULL
,
&
package
->
hfusion10
);
pLoadLibraryShim
(
L"fusion.dll"
,
L"v1.1.4322"
,
NULL
,
&
package
->
hfusion11
);
pLoadLibraryShim
(
L"fusion.dll"
,
L"v2.0.50727"
,
NULL
,
&
package
->
hfusion20
);
pLoadLibraryShim
(
L"fusion.dll"
,
L"v4.0.30319"
,
NULL
,
&
package
->
hfusion40
);
return
TRUE
;
if
(
!
package
->
hfusion10
)
pLoadLibraryShim
(
L"fusion.dll"
,
L"v1.0.3705"
,
NULL
,
&
package
->
hfusion10
);
if
(
!
package
->
hfusion11
)
pLoadLibraryShim
(
L"fusion.dll"
,
L"v1.1.4322"
,
NULL
,
&
package
->
hfusion11
);
if
(
!
package
->
hfusion20
)
pLoadLibraryShim
(
L"fusion.dll"
,
L"v2.0.50727"
,
NULL
,
&
package
->
hfusion20
);
if
(
!
package
->
hfusion40
)
pLoadLibraryShim
(
L"fusion.dll"
,
L"v4.0.30319"
,
NULL
,
&
package
->
hfusion40
);
}
BOOL
msi_
init_assembly_caches
(
MSIPACKAGE
*
package
)
static
BOOL
init_assembly_caches
(
MSIPACKAGE
*
package
)
{
HRESULT
(
WINAPI
*
pCreateAssemblyCache
)(
IAssemblyCache
**
,
DWORD
);
if
(
package
->
cache_sxs
)
return
TRUE
;
if
(
CreateAssemblyCache
(
&
package
->
cache_sxs
,
0
)
!=
S_OK
)
return
FALSE
;
if
(
!
package
->
cache_sxs
&&
CreateAssemblyCache
(
&
package
->
cache_sxs
,
0
)
!=
S_OK
)
return
FALSE
;
if
(
!
load_fusion_dlls
(
package
))
return
FALSE
;
load_fusion_dlls
(
package
)
;
package
->
pGetFileVersion
=
(
void
*
)
GetProcAddress
(
package
->
hmscoree
,
"GetFileVersion"
);
/* missing from v1.0.3705 */
if
(
package
->
hfusion10
)
if
(
package
->
hfusion10
&&
!
package
->
cache_net
[
CLR_VERSION_V10
]
)
{
pCreateAssemblyCache
=
(
void
*
)
GetProcAddress
(
package
->
hfusion10
,
"CreateAssemblyCache"
);
pCreateAssemblyCache
(
&
package
->
cache_net
[
CLR_VERSION_V10
],
0
);
}
if
(
package
->
hfusion11
)
if
(
package
->
hfusion11
&&
!
package
->
cache_net
[
CLR_VERSION_V11
]
)
{
pCreateAssemblyCache
=
(
void
*
)
GetProcAddress
(
package
->
hfusion11
,
"CreateAssemblyCache"
);
pCreateAssemblyCache
(
&
package
->
cache_net
[
CLR_VERSION_V11
],
0
);
}
if
(
package
->
hfusion20
)
if
(
package
->
hfusion20
&&
!
package
->
cache_net
[
CLR_VERSION_V20
]
)
{
pCreateAssemblyCache
=
(
void
*
)
GetProcAddress
(
package
->
hfusion20
,
"CreateAssemblyCache"
);
pCreateAssemblyCache
(
&
package
->
cache_net
[
CLR_VERSION_V20
],
0
);
}
if
(
package
->
hfusion40
)
if
(
package
->
hfusion40
&&
!
package
->
cache_net
[
CLR_VERSION_V40
]
)
{
pCreateAssemblyCache
=
(
void
*
)
GetProcAddress
(
package
->
hfusion40
,
"CreateAssemblyCache"
);
pCreateAssemblyCache
(
&
package
->
cache_net
[
CLR_VERSION_V40
],
0
);
...
...
@@ -223,9 +220,9 @@ WCHAR *msi_get_assembly_path( MSIPACKAGE *package, const WCHAR *displayname )
{
HRESULT
hr
;
ASSEMBLY_INFO
info
;
IAssemblyCache
*
cache
=
package
->
cache_net
[
CLR_VERSION_V40
]
;
IAssemblyCache
*
cache
;
if
(
!
cache
)
return
NULL
;
if
(
!
init_assembly_caches
(
package
)
||
!
(
cache
=
package
->
cache_net
[
CLR_VERSION_V40
])
)
return
NULL
;
memset
(
&
info
,
0
,
sizeof
(
info
)
);
info
.
cbAssemblyInfo
=
sizeof
(
info
);
...
...
@@ -252,7 +249,8 @@ IAssemblyEnum *msi_create_assembly_enum( MSIPACKAGE *package, const WCHAR *displ
WCHAR
*
str
;
DWORD
len
=
0
;
if
(
!
package
->
pCreateAssemblyNameObject
||
!
package
->
pCreateAssemblyEnum
)
return
NULL
;
if
(
!
init_assembly_caches
(
package
)
||
!
package
->
pCreateAssemblyNameObject
||
!
package
->
pCreateAssemblyEnum
)
return
NULL
;
hr
=
package
->
pCreateAssemblyNameObject
(
&
name
,
displayname
,
CANOF_PARSE_DISPLAY_NAME
,
NULL
);
if
(
FAILED
(
hr
))
return
NULL
;
...
...
@@ -363,6 +361,8 @@ UINT msi_install_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
MSIASSEMBLY
*
assembly
=
comp
->
assembly
;
MSIFEATURE
*
feature
=
NULL
;
if
(
!
init_assembly_caches
(
package
))
return
ERROR_FUNCTION_FAILED
;
if
(
comp
->
assembly
->
feature
)
feature
=
msi_get_loaded_feature
(
package
,
comp
->
assembly
->
feature
);
...
...
@@ -406,6 +406,8 @@ UINT msi_uninstall_assembly( MSIPACKAGE *package, MSICOMPONENT *comp )
MSIASSEMBLY
*
assembly
=
comp
->
assembly
;
MSIFEATURE
*
feature
=
NULL
;
if
(
!
init_assembly_caches
(
package
))
return
ERROR_FUNCTION_FAILED
;
if
(
comp
->
assembly
->
feature
)
feature
=
msi_get_loaded_feature
(
package
,
comp
->
assembly
->
feature
);
...
...
dlls/msi/msipriv.h
View file @
4df33534
...
...
@@ -1052,7 +1052,6 @@ extern UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) DECLSPEC_
extern
MSIASSEMBLY
*
msi_load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_uninstall_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_init_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
void
msi_destroy_assembly_caches
(
MSIPACKAGE
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_is_global_assembly
(
MSICOMPONENT
*
)
DECLSPEC_HIDDEN
;
extern
IAssemblyEnum
*
msi_create_assembly_enum
(
MSIPACKAGE
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/package.c
View file @
4df33534
...
...
@@ -1502,13 +1502,6 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage)
package
->
log_file
=
CreateFileW
(
gszLogFile
,
GENERIC_WRITE
,
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
!
msi_init_assembly_caches
(
package
))
{
ERR
(
"can't initialize assembly caches
\n
"
);
msiobj_release
(
&
package
->
hdr
);
return
ERROR_FUNCTION_FAILED
;
}
/* FIXME: when should these messages be sent? */
data_row
=
MSI_CreateRecord
(
3
);
if
(
!
data_row
)
...
...
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