https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a70868a539098a249627d...
commit 9a70868a539098a249627defd3e6d28e24a739aa Author: winesync ros-dev@reactos.org AuthorDate: Sun Mar 13 00:16:44 2022 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Sun Mar 20 19:28:13 2022 +0100
[WINESYNC] msi: Link directly to sxs.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id aaead3e433239898c0747bab32a2d2dfe63e5b3c by Hans Leidekker hans@codeweavers.com --- dll/win32/msi/CMakeLists.txt | 5 +++-- dll/win32/msi/assembly.c | 15 ++------------- 2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt index 60f6d8f1e1b..ec30aa8913c 100644 --- a/dll/win32/msi/CMakeLists.txt +++ b/dll/win32/msi/CMakeLists.txt @@ -87,9 +87,10 @@ set_module_type(msi win32dll) target_link_libraries(msi uuid ${PSEH_LIB} wine) add_dependencies(msi msi_idlheader) add_delay_importlibs(msi odbccp32 crypt32 wintrust) -add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi rpcrt4 urlmon user32 version wininet mspatcha - #FIXME : should be in delayed imports +add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi rpcrt4 urlmon user32 version wininet sxs + #FIXME : imagehlp, mspatcha should be in delayed imports imagehlp + mspatcha msvcrt kernel32_vista kernel32 diff --git a/dll/win32/msi/assembly.c b/dll/win32/msi/assembly.c index cb406111c9b..73977ee8ac1 100644 --- a/dll/win32/msi/assembly.c +++ b/dll/win32/msi/assembly.c @@ -35,19 +35,17 @@ static HRESULT (WINAPI *pCreateAssemblyCacheNet10)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheNet11)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheNet20)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheNet40)( IAssemblyCache **, DWORD ); -static HRESULT (WINAPI *pCreateAssemblyCacheSxs)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pGetFileVersion)( LPCWSTR, LPWSTR, DWORD, DWORD * ); static HRESULT (WINAPI *pCreateAssemblyNameObject)( IAssemblyName **, LPCWSTR, DWORD, LPVOID ); static HRESULT (WINAPI *pCreateAssemblyEnum)( IAssemblyEnum **, IUnknown *, IAssemblyName *, DWORD, LPVOID );
-static HMODULE hfusion10, hfusion11, hfusion20, hfusion40, hmscoree, hsxs; +static HMODULE hfusion10, hfusion11, hfusion20, hfusion40, hmscoree; static BOOL assembly_caches_initialized;
static BOOL init_function_pointers( void ) { static const WCHAR szFusion[] = {'f','u','s','i','o','n','.','d','l','l',0}; static const WCHAR szMscoree[] = {'\','m','s','c','o','r','e','e','.','d','l','l',0}; - static const WCHAR szSxs[] = {'s','x','s','.','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}; @@ -56,13 +54,6 @@ static BOOL init_function_pointers( void ) WCHAR path[MAX_PATH]; DWORD len = GetSystemDirectoryW( path, MAX_PATH );
- if (!hsxs && !(hsxs = LoadLibraryW( szSxs ))) return FALSE; - if (!(pCreateAssemblyCacheSxs = (void *)GetProcAddress( hsxs, "CreateAssemblyCache" ))) - { - FreeLibrary( hsxs ); - hsxs = NULL; - return FALSE; - } strcpyW( path + len, szMscoree ); if (hmscoree || !(hmscoree = LoadLibraryW( path ))) return TRUE; pGetFileVersion = (void *)GetProcAddress( hmscoree, "GetFileVersion" ); /* missing from v1.0.3705 */ @@ -95,7 +86,7 @@ BOOL msi_init_assembly_caches( MSIPACKAGE *package ) if (assembly_caches_initialized) return TRUE; if (!init_function_pointers()) return FALSE;
- if (pCreateAssemblyCacheSxs( &package->cache_sxs, 0 ) != S_OK) return FALSE; + if (CreateAssemblyCache( &package->cache_sxs, 0 ) != S_OK) return FALSE; if (pCreateAssemblyCacheNet10) pCreateAssemblyCacheNet10( &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 ); @@ -134,13 +125,11 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package ) FreeLibrary( hfusion20 ); FreeLibrary( hfusion40 ); FreeLibrary( hmscoree ); - FreeLibrary( hsxs ); hfusion10 = NULL; hfusion11 = NULL; hfusion20 = NULL; hfusion40 = NULL; hmscoree = NULL; - hsxs = NULL; }
static MSIRECORD *get_assembly_record( MSIPACKAGE *package, const WCHAR *comp )