Commit 5f9dd9df authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Global and local win32 assembly names are formatted differently.

parent 9e30f775
...@@ -176,6 +176,10 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI ...@@ -176,6 +176,10 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI
'%','s',',',' ','v','e','r','s','i','o','n','=','%','s',',',' ', '%','s',',',' ','v','e','r','s','i','o','n','=','%','s',',',' ',
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',',',' ', 'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',',',' ',
'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e','=','%','s',0}; 'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e','=','%','s',0};
static const WCHAR fmt_sxs_localW[] = {
'%','s',',',' ','v','e','r','s','i','o','n','=','%','s',',',' ',
'c','u','l','t','u','r','e','=','%','s',',',' ',
'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',0};
static const WCHAR queryW[] = { static const WCHAR queryW[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','M','s','i','A','s','s','e','m','b','l','y','N','a','m','e','`',' ', '`','M','s','i','A','s','s','e','m','b','l','y','N','a','m','e','`',' ',
...@@ -198,9 +202,11 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI ...@@ -198,9 +202,11 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI
if (assembly->attributes == msidbAssemblyAttributesWin32) if (assembly->attributes == msidbAssemblyAttributesWin32)
{ {
if (!assembly->application)
{
if (!name.type || !name.name || !name.version || !name.token || !name.arch) if (!name.type || !name.name || !name.version || !name.token || !name.arch)
{ {
WARN("invalid win32 assembly name\n"); WARN("invalid global win32 assembly name\n");
goto done; goto done;
} }
len = strlenW( fmt_sxsW ); len = strlenW( fmt_sxsW );
...@@ -215,6 +221,22 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI ...@@ -215,6 +221,22 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI
{ {
if (!name.name || !name.version || !name.culture || !name.token) if (!name.name || !name.version || !name.culture || !name.token)
{ {
WARN("invalid local win32 assembly name\n");
goto done;
}
len = strlenW( fmt_sxs_localW );
len += strlenW( name.name );
len += strlenW( name.version );
len += strlenW( name.culture );
len += strlenW( name.token );
if (!(display_name = msi_alloc( len * sizeof(WCHAR) ))) goto done;
sprintfW( display_name, fmt_sxs_localW, name.name, name.version, name.culture, name.token );
}
}
else
{
if (!name.name || !name.version || !name.culture || !name.token)
{
WARN("invalid assembly name\n"); WARN("invalid assembly name\n");
goto done; goto done;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment