* Sync with Wine 1.7.27. Dedicated to Jérôme.
CORE-8540

svn path=/trunk/; revision=64244
This commit is contained in:
Amine Khaldi 2014-09-23 18:32:48 +00:00
parent 8155a55f42
commit fd8d353ac0
12 changed files with 1442 additions and 1883 deletions

View file

@ -1650,6 +1650,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
{
LPWSTR override;
MSIFEATURE *feature;
BOOL remove = !strcmpW(property, szRemove);
BOOL reinstall = !strcmpW(property, szReinstall);
override = msi_dup_property( package->db, property );
if (!override)
@ -1657,18 +1659,18 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
if (strcmpW( property, szRemove ) && !is_feature_selected( feature, level ))
if (feature->Level <= 0)
continue;
if (!strcmpW(property, szReinstall)) state = feature->Installed;
if (reinstall)
state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : feature->Installed);
else if (remove)
state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : INSTALLSTATE_ABSENT);
if (!strcmpiW( override, szAll ))
{
if (feature->Installed != state)
{
feature->Action = state;
feature->ActionRequest = state;
}
feature->Action = state;
feature->ActionRequest = state;
}
else
{
@ -1682,11 +1684,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len))
|| (!ptr2 && !strcmpW(ptr, feature->Feature)))
{
if (feature->Installed != state)
{
feature->Action = state;
feature->ActionRequest = state;
}
feature->Action = state;
feature->ActionRequest = state;
break;
}
if (ptr2)
@ -1823,6 +1822,8 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{
FeatureList *fl;
if (!is_feature_selected( feature, level )) continue;
LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry )
{
if (fl->feature->Attributes & msidbFeatureAttributesFollowParent &&
@ -1847,8 +1848,6 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
debugstr_w(feature->Feature), feature->Level, feature->Installed,
feature->ActionRequest, feature->Action);
if (!is_feature_selected( feature, level )) continue;
/* features with components that have compressed files are made local */
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
{
@ -2340,6 +2339,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
static const WCHAR szPrimaryVolumeSpaceAvailable[] =
{'P','r','i','m','a','r','y','V','o','l','u','m','e','S','p','a','c','e',
'A','v','a','i','l','a','b','l','e',0};
static const WCHAR szOutOfNoRbDiskSpace[] =
{'O','u','t','O','f','N','o','R','b','D','i','s','k','S','p','a','c','e',0};
MSICOMPONENT *comp;
MSIQUERY *view;
WCHAR *level, *primary_key, *primary_folder;
@ -2416,6 +2417,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
/* FIXME: check volume disk space */
msi_set_property( package->db, szOutOfDiskSpace, szZero, -1 );
msi_set_property( package->db, szOutOfNoRbDiskSpace, szZero, -1 );
return MSI_SetFeatureStates(package);
}
@ -3907,7 +3909,9 @@ static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
else
{
FIXME("poorly handled shortcut format, advertised shortcut\n");
IShellLinkW_SetPath(sl,comp->FullKeypath);
path = resolve_keypath( package, comp );
IShellLinkW_SetPath( sl, path );
msi_free( path );
}
if (!MSI_RecordIsNull(row,6))
@ -4876,6 +4880,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
BOOL absent = FALSE;
MSIRECORD *uirow;
if (feature->Level <= 0) continue;
if (feature->Action != INSTALLSTATE_LOCAL &&
feature->Action != INSTALLSTATE_SOURCE &&
feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
@ -7734,7 +7740,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
static const WCHAR szDisableRollback[] = {'D','I','S','A','B','L','E','R','O','L','L','B','A','C','K',0};
static const WCHAR szAction[] = {'A','C','T','I','O','N',0};
static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0};
WCHAR *reinstall, *remove, *patch;
WCHAR *reinstall, *remove, *patch, *productcode;
BOOL ui_exists;
UINT rc;
@ -7803,6 +7809,15 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
msi_adjust_privilege_properties( package );
msi_set_context( package );
productcode = msi_dup_property( package->db, szProductCode );
if (strcmpiW( productcode, package->ProductCode ))
{
TRACE( "product code changed %s -> %s\n", debugstr_w(package->ProductCode), debugstr_w(productcode) );
msi_free( package->ProductCode );
package->ProductCode = productcode;
}
else msi_free( productcode );
if (msi_get_property_int( package->db, szDisableRollback, 0 ))
{
TRACE("disabling rollback\n");

View file

@ -438,6 +438,19 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNAT
if (sz == 0)
goto end;
/* expand if needed */
if (regType == REG_EXPAND_SZ)
{
sz = ExpandEnvironmentStringsW((LPCWSTR)value, NULL, 0);
if (sz)
{
LPWSTR buf = msi_alloc(sz * sizeof(WCHAR));
ExpandEnvironmentStringsW((LPCWSTR)value, buf, sz);
msi_free(value);
value = (LPBYTE)buf;
}
}
if ((regType == REG_SZ || regType == REG_EXPAND_SZ) &&
(ptr = strchrW((LPWSTR)value, '"')) && (end = strchrW(++ptr, '"')))
*end = '\0';

View file

@ -1443,14 +1443,14 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
{
LPWSTR extension, key;
LPWSTR extension = NULL, key;
/*
* check if the MIME is to be installed. Either as requested by an
* extension or Class
*/
if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
mt->Extension->action != INSTALLSTATE_LOCAL)
(!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL))
{
TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
continue;
@ -1458,7 +1458,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType));
extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
if (mt->Extension) extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
key = msi_alloc( (strlenW( mt->ContentType ) + strlenW( szMIMEDatabase ) + 1) * sizeof(WCHAR) );
if (extension && key)
@ -1501,7 +1501,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
LPWSTR mime_key;
if ((!mime->Class || mime->Class->action != INSTALLSTATE_ABSENT) &&
mime->Extension->action != INSTALLSTATE_ABSENT)
(!mime->Extension || mime->Extension->action != INSTALLSTATE_ABSENT))
{
TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType));
continue;

File diff suppressed because it is too large Load diff

View file

@ -830,7 +830,13 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
{
if (!wildcards)
{
destname = strdupW(sourcename);
WCHAR *p;
if (sourcename)
destname = strdupW(sourcename);
else if ((p = strrchrW(sourcedir, '\\')))
destname = strdupW(p + 1);
else
destname = strdupW(sourcedir);
if (!destname)
goto done;
}

View file

@ -2841,7 +2841,9 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent,
if (state == INSTALLSTATE_LOCAL && !*path)
state = INSTALLSTATE_NOTUSED;
msi_strcpy_to_awstring(path, -1, lpPathBuf, pcchBuf);
if (msi_strcpy_to_awstring(path, -1, lpPathBuf, pcchBuf) == ERROR_MORE_DATA)
state = INSTALLSTATE_MOREDATA;
msi_free(path);
return state;
}
@ -3355,6 +3357,7 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
HKEY hkey;
DWORD sz;
UINT rc;
INSTALLSTATE state;
rc = MSIREG_OpenUserComponentsKey(szComponent, &hkey, FALSE);
if (rc != ERROR_SUCCESS)
@ -3369,13 +3372,16 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
MsiDecomposeDescriptorW(info, product, feature, component, &sz);
if (!szProduct)
rc = MSI_GetComponentPath(product, component, lpPathBuf, pcchPathBuf);
state = MSI_GetComponentPath(product, component, lpPathBuf, pcchPathBuf);
else
rc = MSI_GetComponentPath(szProduct, component, lpPathBuf, pcchPathBuf);
state = MSI_GetComponentPath(szProduct, component, lpPathBuf, pcchPathBuf);
msi_free( info );
if (rc != INSTALLSTATE_LOCAL)
if (state == INSTALLSTATE_MOREDATA)
return ERROR_MORE_DATA;
if (state != INSTALLSTATE_LOCAL)
return ERROR_FILE_NOT_FOUND;
return ERROR_SUCCESS;

View file

@ -1156,7 +1156,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
package->ProductCode = msi_dup_property( package->db, szProductCode );
package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
set_installed_prop( package );
set_installer_properties( package );
package->ui_level = gUILevel;
@ -1631,6 +1630,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
return r;
}
msi_set_property( package->db, szDatabase, db->path, -1 );
set_installed_prop( package );
msi_set_context( package );
while (1)

View file

@ -37,54 +37,57 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid )
static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *transform )
{
WCHAR *package_product, *transform_product, *template = NULL;
UINT ret = ERROR_FUNCTION_FAILED;
MSISUMMARYINFO *si = MSI_GetSummaryInformationW( transform, 0 );
UINT valid_flags = 0, wanted_flags = 0;
package_product = msi_dup_property( package->db, szProductCode );
transform_product = msi_get_suminfo_product( transform );
if (si) wanted_flags = msi_suminfo_get_int32( si, PID_CHARCOUNT );
TRACE("validation flags %x\n", wanted_flags);
TRACE("package = %s transform = %s\n", debugstr_w(package_product), debugstr_w(transform_product));
if (wanted_flags & ~(MSITRANSFORM_VALIDATE_PRODUCT|MSITRANSFORM_VALIDATE_LANGUAGE))
FIXME("unsupported validation flags %x\n", wanted_flags);
if (!transform_product || strstrW( transform_product, package_product ))
if (wanted_flags & MSITRANSFORM_VALIDATE_PRODUCT)
{
MSISUMMARYINFO *si;
WCHAR *package_product = msi_dup_property( package->db, szProductCode );
WCHAR *transform_product = msi_get_suminfo_product( transform );
TRACE("package = %s transform = %s\n", debugstr_w(package_product), debugstr_w(transform_product));
if (!transform_product || strstrW( transform_product, package_product ))
{
valid_flags |= MSITRANSFORM_VALIDATE_PRODUCT;
}
msi_free( transform_product );
msi_free( package_product );
}
if (wanted_flags & MSITRANSFORM_VALIDATE_LANGUAGE)
{
WCHAR *template;
const WCHAR *p;
si = MSI_GetSummaryInformationW( transform, 0 );
if (!si)
{
ERR("no summary information!\n");
goto end;
}
template = msi_suminfo_dup_string( si, PID_TEMPLATE );
if (!template)
if (!(template = msi_suminfo_dup_string( si, PID_TEMPLATE )))
{
ERR("no template property!\n");
msiobj_release( &si->hdr );
goto end;
}
if (!template[0])
{
ret = ERROR_SUCCESS;
msiobj_release( &si->hdr );
goto end;
}
TRACE("template: %s\n", debugstr_w(template));
p = strchrW( template, ';' );
if (p && match_language( package, atoiW( p + 1 ) ))
if (!template[0] || ((p = strchrW( template, ';' )) && match_language( package, atoiW( p + 1 ) )))
{
TRACE("applicable transform\n");
ret = ERROR_SUCCESS;
valid_flags |= MSITRANSFORM_VALIDATE_LANGUAGE;
}
/* FIXME: check platform */
msiobj_release( &si->hdr );
msi_free( template );
}
end:
msi_free( transform_product );
msi_free( package_product );
msi_free( template );
return ret;
msiobj_release( &si->hdr );
if (valid_flags & ~wanted_flags) return ERROR_FUNCTION_FAILED;
TRACE("applicable transform\n");
return ERROR_SUCCESS;
}
static UINT apply_substorage_transform( MSIPACKAGE *package, MSIDATABASE *patch_db, LPCWSTR name )

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 3.0.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -30,85 +30,91 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
TK_ALTER = 258,
TK_AND = 259,
TK_BY = 260,
TK_CHAR = 261,
TK_COMMA = 262,
TK_CREATE = 263,
TK_DELETE = 264,
TK_DROP = 265,
TK_DISTINCT = 266,
TK_DOT = 267,
TK_EQ = 268,
TK_FREE = 269,
TK_FROM = 270,
TK_GE = 271,
TK_GT = 272,
TK_HOLD = 273,
TK_ADD = 274,
TK_ID = 275,
TK_ILLEGAL = 276,
TK_INSERT = 277,
TK_INT = 278,
TK_INTEGER = 279,
TK_INTO = 280,
TK_IS = 281,
TK_KEY = 282,
TK_LE = 283,
TK_LONG = 284,
TK_LONGCHAR = 285,
TK_LP = 286,
TK_LT = 287,
TK_LOCALIZABLE = 288,
TK_MINUS = 289,
TK_NE = 290,
TK_NOT = 291,
TK_NULL = 292,
TK_OBJECT = 293,
TK_OR = 294,
TK_ORDER = 295,
TK_PRIMARY = 296,
TK_RP = 297,
TK_SELECT = 298,
TK_SET = 299,
TK_SHORT = 300,
TK_SPACE = 301,
TK_STAR = 302,
TK_STRING = 303,
TK_TABLE = 304,
TK_TEMPORARY = 305,
TK_UPDATE = 306,
TK_VALUES = 307,
TK_WHERE = 308,
TK_WILDCARD = 309,
COLUMN = 311,
FUNCTION = 312,
COMMENT = 313,
UNCLOSED_STRING = 314,
SPACE = 315,
ILLEGAL = 316,
END_OF_FILE = 317,
TK_LIKE = 318,
TK_NEGATION = 319
};
#ifndef YY_SQL_SQL_TAB_H_INCLUDED
# define YY_SQL_SQL_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int sql_debug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
TK_ALTER = 258,
TK_AND = 259,
TK_BY = 260,
TK_CHAR = 261,
TK_COMMA = 262,
TK_CREATE = 263,
TK_DELETE = 264,
TK_DROP = 265,
TK_DISTINCT = 266,
TK_DOT = 267,
TK_EQ = 268,
TK_FREE = 269,
TK_FROM = 270,
TK_GE = 271,
TK_GT = 272,
TK_HOLD = 273,
TK_ADD = 274,
TK_ID = 275,
TK_ILLEGAL = 276,
TK_INSERT = 277,
TK_INT = 278,
TK_INTEGER = 279,
TK_INTO = 280,
TK_IS = 281,
TK_KEY = 282,
TK_LE = 283,
TK_LONG = 284,
TK_LONGCHAR = 285,
TK_LP = 286,
TK_LT = 287,
TK_LOCALIZABLE = 288,
TK_MINUS = 289,
TK_NE = 290,
TK_NOT = 291,
TK_NULL = 292,
TK_OBJECT = 293,
TK_OR = 294,
TK_ORDER = 295,
TK_PRIMARY = 296,
TK_RP = 297,
TK_SELECT = 298,
TK_SET = 299,
TK_SHORT = 300,
TK_SPACE = 301,
TK_STAR = 302,
TK_STRING = 303,
TK_TABLE = 304,
TK_TEMPORARY = 305,
TK_UPDATE = 306,
TK_VALUES = 307,
TK_WHERE = 308,
TK_WILDCARD = 309,
END_OF_FILE = 310,
ILLEGAL = 311,
SPACE = 312,
UNCLOSED_STRING = 313,
COMMENT = 314,
FUNCTION = 315,
COLUMN = 316,
TK_LIKE = 318,
TK_NEGATION = 319
};
#endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
/* Line 2068 of yacc.c */
#line 68 "sql.y"
#line 68 "sql.y" /* yacc.c:1909 */
struct sql_str str;
LPWSTR string;
@ -118,16 +124,14 @@ typedef union YYSTYPE
USHORT column_type;
int integer;
/* Line 2068 of yacc.c */
#line 125 "sql.tab.h"
} YYSTYPE;
#line 128 "sql.tab.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
int sql_parse (SQL_input *info);
#endif /* !YY_SQL_SQL_TAB_H_INCLUDED */

View file

@ -652,7 +652,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
/* Note: _Columns table doesn't have non-persistent data */
/* if maxcount is non-zero, assume it's exactly right for this table */
memset( colinfo, 0, maxcount * sizeof(*colinfo) );
if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) );
count = table->row_count;
for (i = 0; i < count; i++)
{
@ -665,7 +665,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
/* check the column number is in range */
if (col < 1 || col > maxcount)
{
ERR("column %d out of range\n", col);
ERR("column %d out of range (maxcount: %d)\n", col, maxcount);
continue;
}
/* check if this column was already set */

View file

@ -120,7 +120,7 @@ reactos/dll/win32/msg711.acm # Synced to Wine-1.7.17
reactos/dll/win32/msgsm32.acm # Synced to Wine-1.7.17
reactos/dll/win32/mshtml # Synced to Wine-1.7.17
reactos/dll/win32/mshtml.tlb # Synced to Wine-1.7.17
reactos/dll/win32/msi # Synced to Wine-1.7.17
reactos/dll/win32/msi # Synced to Wine-1.7.27
reactos/dll/win32/msimg32 # Synced to Wine-1.7.17
reactos/dll/win32/msimtf # Synced to Wine-1.7.17
reactos/dll/win32/msisip # Synced to Wine-1.7.17