mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
-sync msi with wine 1.1.32
svn path=/trunk/; revision=43735
This commit is contained in:
parent
6562d206a7
commit
b7a13d7347
File diff suppressed because it is too large
Load diff
|
@ -162,8 +162,6 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
|
|||
LPWSTR val = NULL;
|
||||
LPBYTE buffer;
|
||||
|
||||
static const WCHAR root[] = {'\\',0};
|
||||
|
||||
if (!sig->File)
|
||||
{
|
||||
PathRemoveFileSpecW(path);
|
||||
|
@ -193,7 +191,7 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
|
|||
if (!GetFileVersionInfoW(path, 0, size, buffer))
|
||||
goto done;
|
||||
|
||||
if (!VerQueryValueW(buffer, root, (LPVOID)&info, &size) || !info)
|
||||
if (!VerQueryValueW(buffer, szBackSlash, (LPVOID)&info, &size) || !info)
|
||||
goto done;
|
||||
|
||||
if (sig->MinVersionLS || sig->MinVersionMS)
|
||||
|
@ -633,12 +631,11 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath,
|
|||
|
||||
if (buf)
|
||||
{
|
||||
static const WCHAR rootW[] = { '\\',0 };
|
||||
UINT versionLen;
|
||||
LPVOID subBlock = NULL;
|
||||
|
||||
if (GetFileVersionInfoW(filePath, 0, size, buf))
|
||||
VerQueryValueW(buf, rootW, &subBlock, &versionLen);
|
||||
VerQueryValueW(buf, szBackSlash, &subBlock, &versionLen);
|
||||
if (subBlock)
|
||||
{
|
||||
VS_FIXEDFILEINFO *info = subBlock;
|
||||
|
@ -742,8 +739,6 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
|
|||
WCHAR subpath[MAX_PATH];
|
||||
WCHAR *buf;
|
||||
|
||||
static const WCHAR dot[] = {'.',0};
|
||||
static const WCHAR dotdot[] = {'.','.',0};
|
||||
static const WCHAR starDotStarW[] = { '*','.','*',0 };
|
||||
|
||||
TRACE("Searching directory %s for file %s, depth %d\n", debugstr_w(dir),
|
||||
|
@ -792,8 +787,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
|
|||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
|
||||
lstrcmpW(findData.cFileName, dot) &&
|
||||
lstrcmpW(findData.cFileName, dotdot))
|
||||
lstrcmpW(findData.cFileName, szDot) &&
|
||||
lstrcmpW(findData.cFileName, szDotDot))
|
||||
{
|
||||
lstrcpyW(subpath, dir);
|
||||
PathAppendW(subpath, findData.cFileName);
|
||||
|
@ -804,8 +799,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
|
|||
while (rc == ERROR_SUCCESS && !*appValue &&
|
||||
FindNextFileW(hFind, &findData) != 0)
|
||||
{
|
||||
if (!lstrcmpW(findData.cFileName, dot) ||
|
||||
!lstrcmpW(findData.cFileName, dotdot))
|
||||
if (!lstrcmpW(findData.cFileName, szDot) ||
|
||||
!lstrcmpW(findData.cFileName, szDotDot))
|
||||
continue;
|
||||
|
||||
lstrcpyW(subpath, dir);
|
||||
|
@ -1079,7 +1074,6 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
|
|||
UINT r = ERROR_SUCCESS;
|
||||
|
||||
static const WCHAR success[] = {'C','C','P','_','S','u','c','c','e','s','s',0};
|
||||
static const WCHAR one[] = {'1',0};
|
||||
|
||||
signature = MSI_RecordGetString(row, 1);
|
||||
|
||||
|
@ -1089,7 +1083,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
|
|||
if (value)
|
||||
{
|
||||
TRACE("Found signature %s\n", debugstr_w(signature));
|
||||
MSI_SetPropertyW(package, success, one);
|
||||
MSI_SetPropertyW(package, success, szOne);
|
||||
msi_free(value);
|
||||
r = ERROR_NO_MORE_ITEMS;
|
||||
}
|
||||
|
|
|
@ -42,17 +42,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
|
||||
extern const WCHAR szRegisterClassInfo[];
|
||||
extern const WCHAR szRegisterProgIdInfo[];
|
||||
extern const WCHAR szRegisterExtensionInfo[];
|
||||
extern const WCHAR szRegisterMIMEInfo[];
|
||||
|
||||
extern const WCHAR szUnregisterClassInfo[];
|
||||
extern const WCHAR szUnregisterExtensionInfo[];
|
||||
extern const WCHAR szUnregisterMIMEInfo[];
|
||||
extern const WCHAR szUnregisterProgIdInfo[];
|
||||
|
||||
static MSIAPPID *load_appid( MSIPACKAGE* package, MSIRECORD *row )
|
||||
{
|
||||
LPCWSTR buffer;
|
||||
|
@ -798,7 +787,6 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
|
|||
static const WCHAR szProgID[] = { 'P','r','o','g','I','D',0 };
|
||||
static const WCHAR szVIProgID[] = { 'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0 };
|
||||
static const WCHAR szAppID[] = { 'A','p','p','I','D',0 };
|
||||
static const WCHAR szSpace[] = {' ',0};
|
||||
static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
|
||||
HKEY hkey,hkey2,hkey3;
|
||||
MSICLASS *cls;
|
||||
|
@ -1098,7 +1086,6 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid,
|
|||
strcpyW(command,advertise);
|
||||
if (verb->Argument)
|
||||
{
|
||||
static const WCHAR szSpace[] = {' ',0};
|
||||
strcatW(command,szSpace);
|
||||
strcatW(command,verb->Argument);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,6 @@ struct cond_str {
|
|||
static LPWSTR COND_GetString( const struct cond_str *str );
|
||||
static LPWSTR COND_GetLiteral( const struct cond_str *str );
|
||||
static int cond_lex( void *COND_lval, COND_input *info);
|
||||
static const WCHAR szEmpty[] = { 0 };
|
||||
|
||||
static INT compare_int( INT a, INT operator, INT b );
|
||||
static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert );
|
||||
|
@ -185,7 +184,7 @@ static BOOL num_from_prop( LPCWSTR p, INT *val )
|
|||
|
||||
|
||||
/* Line 189 of yacc.c */
|
||||
#line 189 "cond.tab.c"
|
||||
#line 188 "cond.tab.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
|
@ -260,7 +259,7 @@ typedef union YYSTYPE
|
|||
{
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 111 "cond.y"
|
||||
#line 110 "cond.y"
|
||||
|
||||
struct cond_str str;
|
||||
LPWSTR string;
|
||||
|
@ -269,7 +268,7 @@ typedef union YYSTYPE
|
|||
|
||||
|
||||
/* Line 214 of yacc.c */
|
||||
#line 273 "cond.tab.c"
|
||||
#line 272 "cond.tab.c"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
|
@ -281,7 +280,7 @@ typedef union YYSTYPE
|
|||
|
||||
|
||||
/* Line 264 of yacc.c */
|
||||
#line 285 "cond.tab.c"
|
||||
#line 284 "cond.tab.c"
|
||||
|
||||
#ifdef short
|
||||
# undef short
|
||||
|
@ -585,12 +584,12 @@ static const yytype_int8 yyrhs[] =
|
|||
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
||||
static const yytype_uint16 yyrline[] =
|
||||
{
|
||||
0, 135, 135, 141, 148, 152, 156, 160, 164, 171,
|
||||
175, 182, 186, 190, 195, 199, 208, 217, 221, 225,
|
||||
229, 233, 238, 243, 251, 252, 253, 254, 255, 256,
|
||||
257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
|
||||
267, 268, 272, 276, 283, 292, 296, 305, 314, 327,
|
||||
339, 346, 360, 369
|
||||
0, 134, 134, 140, 147, 151, 155, 159, 163, 170,
|
||||
174, 181, 185, 189, 194, 198, 207, 216, 220, 224,
|
||||
228, 232, 237, 242, 250, 251, 252, 253, 254, 255,
|
||||
256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
|
||||
266, 267, 271, 275, 282, 291, 295, 304, 313, 326,
|
||||
338, 345, 359, 368
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1541,7 +1540,7 @@ yyreduce:
|
|||
case 2:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 136 "cond.y"
|
||||
#line 135 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
cond->result = (yyvsp[(1) - (1)].value);
|
||||
|
@ -1551,7 +1550,7 @@ yyreduce:
|
|||
case 3:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 141 "cond.y"
|
||||
#line 140 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
cond->result = MSICONDITION_NONE;
|
||||
|
@ -1561,7 +1560,7 @@ yyreduce:
|
|||
case 4:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 149 "cond.y"
|
||||
#line 148 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (1)].value);
|
||||
;}
|
||||
|
@ -1570,7 +1569,7 @@ yyreduce:
|
|||
case 5:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 153 "cond.y"
|
||||
#line 152 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value);
|
||||
;}
|
||||
|
@ -1579,7 +1578,7 @@ yyreduce:
|
|||
case 6:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 157 "cond.y"
|
||||
#line 156 "cond.y"
|
||||
{
|
||||
(yyval.value) = !(yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value);
|
||||
;}
|
||||
|
@ -1588,7 +1587,7 @@ yyreduce:
|
|||
case 7:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 161 "cond.y"
|
||||
#line 160 "cond.y"
|
||||
{
|
||||
(yyval.value) = ( (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value) ) && !( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) );
|
||||
;}
|
||||
|
@ -1597,7 +1596,7 @@ yyreduce:
|
|||
case 8:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 165 "cond.y"
|
||||
#line 164 "cond.y"
|
||||
{
|
||||
(yyval.value) = ( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) ) || ( !(yyvsp[(1) - (3)].value) && !(yyvsp[(3) - (3)].value) );
|
||||
;}
|
||||
|
@ -1606,7 +1605,7 @@ yyreduce:
|
|||
case 9:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 172 "cond.y"
|
||||
#line 171 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (1)].value);
|
||||
;}
|
||||
|
@ -1615,7 +1614,7 @@ yyreduce:
|
|||
case 10:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 176 "cond.y"
|
||||
#line 175 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value);
|
||||
;}
|
||||
|
@ -1624,7 +1623,7 @@ yyreduce:
|
|||
case 11:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 183 "cond.y"
|
||||
#line 182 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(2) - (2)].value) ? 0 : 1;
|
||||
;}
|
||||
|
@ -1633,7 +1632,7 @@ yyreduce:
|
|||
case 12:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 187 "cond.y"
|
||||
#line 186 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (1)].value) ? 1 : 0;
|
||||
;}
|
||||
|
@ -1642,7 +1641,7 @@ yyreduce:
|
|||
case 13:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 191 "cond.y"
|
||||
#line 190 "cond.y"
|
||||
{
|
||||
(yyval.value) = ((yyvsp[(1) - (1)].string) && (yyvsp[(1) - (1)].string)[0]) ? 1 : 0;
|
||||
msi_free((yyvsp[(1) - (1)].string));
|
||||
|
@ -1652,7 +1651,7 @@ yyreduce:
|
|||
case 14:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 196 "cond.y"
|
||||
#line 195 "cond.y"
|
||||
{
|
||||
(yyval.value) = compare_int( (yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].value) );
|
||||
;}
|
||||
|
@ -1661,7 +1660,7 @@ yyreduce:
|
|||
case 15:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 200 "cond.y"
|
||||
#line 199 "cond.y"
|
||||
{
|
||||
int num;
|
||||
if (num_from_prop( (yyvsp[(1) - (3)].string), &num ))
|
||||
|
@ -1675,7 +1674,7 @@ yyreduce:
|
|||
case 16:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 209 "cond.y"
|
||||
#line 208 "cond.y"
|
||||
{
|
||||
int num;
|
||||
if (num_from_prop( (yyvsp[(3) - (3)].string), &num ))
|
||||
|
@ -1689,7 +1688,7 @@ yyreduce:
|
|||
case 17:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 218 "cond.y"
|
||||
#line 217 "cond.y"
|
||||
{
|
||||
(yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE );
|
||||
;}
|
||||
|
@ -1698,7 +1697,7 @@ yyreduce:
|
|||
case 18:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 222 "cond.y"
|
||||
#line 221 "cond.y"
|
||||
{
|
||||
(yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE );
|
||||
;}
|
||||
|
@ -1707,7 +1706,7 @@ yyreduce:
|
|||
case 19:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 226 "cond.y"
|
||||
#line 225 "cond.y"
|
||||
{
|
||||
(yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE );
|
||||
;}
|
||||
|
@ -1716,7 +1715,7 @@ yyreduce:
|
|||
case 20:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 230 "cond.y"
|
||||
#line 229 "cond.y"
|
||||
{
|
||||
(yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), FALSE );
|
||||
;}
|
||||
|
@ -1725,7 +1724,7 @@ yyreduce:
|
|||
case 21:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 234 "cond.y"
|
||||
#line 233 "cond.y"
|
||||
{
|
||||
(yyval.value) = 0;
|
||||
msi_free((yyvsp[(1) - (3)].string));
|
||||
|
@ -1735,7 +1734,7 @@ yyreduce:
|
|||
case 22:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 239 "cond.y"
|
||||
#line 238 "cond.y"
|
||||
{
|
||||
(yyval.value) = 0;
|
||||
msi_free((yyvsp[(3) - (3)].string));
|
||||
|
@ -1745,7 +1744,7 @@ yyreduce:
|
|||
case 23:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 244 "cond.y"
|
||||
#line 243 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(2) - (3)].value);
|
||||
;}
|
||||
|
@ -1754,133 +1753,133 @@ yyreduce:
|
|||
case 24:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 251 "cond.y"
|
||||
#line 250 "cond.y"
|
||||
{ (yyval.value) = COND_EQ; ;}
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 252 "cond.y"
|
||||
#line 251 "cond.y"
|
||||
{ (yyval.value) = COND_NE; ;}
|
||||
break;
|
||||
|
||||
case 26:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 253 "cond.y"
|
||||
#line 252 "cond.y"
|
||||
{ (yyval.value) = COND_LT; ;}
|
||||
break;
|
||||
|
||||
case 27:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 254 "cond.y"
|
||||
#line 253 "cond.y"
|
||||
{ (yyval.value) = COND_GT; ;}
|
||||
break;
|
||||
|
||||
case 28:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 255 "cond.y"
|
||||
#line 254 "cond.y"
|
||||
{ (yyval.value) = COND_LE; ;}
|
||||
break;
|
||||
|
||||
case 29:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 256 "cond.y"
|
||||
#line 255 "cond.y"
|
||||
{ (yyval.value) = COND_GE; ;}
|
||||
break;
|
||||
|
||||
case 30:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 257 "cond.y"
|
||||
#line 256 "cond.y"
|
||||
{ (yyval.value) = COND_SS; ;}
|
||||
break;
|
||||
|
||||
case 31:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 258 "cond.y"
|
||||
#line 257 "cond.y"
|
||||
{ (yyval.value) = COND_IEQ; ;}
|
||||
break;
|
||||
|
||||
case 32:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 259 "cond.y"
|
||||
#line 258 "cond.y"
|
||||
{ (yyval.value) = COND_INE; ;}
|
||||
break;
|
||||
|
||||
case 33:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 260 "cond.y"
|
||||
#line 259 "cond.y"
|
||||
{ (yyval.value) = COND_ILT; ;}
|
||||
break;
|
||||
|
||||
case 34:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 261 "cond.y"
|
||||
#line 260 "cond.y"
|
||||
{ (yyval.value) = COND_IGT; ;}
|
||||
break;
|
||||
|
||||
case 35:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 262 "cond.y"
|
||||
#line 261 "cond.y"
|
||||
{ (yyval.value) = COND_ILE; ;}
|
||||
break;
|
||||
|
||||
case 36:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 263 "cond.y"
|
||||
#line 262 "cond.y"
|
||||
{ (yyval.value) = COND_IGE; ;}
|
||||
break;
|
||||
|
||||
case 37:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 264 "cond.y"
|
||||
#line 263 "cond.y"
|
||||
{ (yyval.value) = COND_ISS; ;}
|
||||
break;
|
||||
|
||||
case 38:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 265 "cond.y"
|
||||
#line 264 "cond.y"
|
||||
{ (yyval.value) = COND_LHS; ;}
|
||||
break;
|
||||
|
||||
case 39:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 266 "cond.y"
|
||||
#line 265 "cond.y"
|
||||
{ (yyval.value) = COND_RHS; ;}
|
||||
break;
|
||||
|
||||
case 40:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 267 "cond.y"
|
||||
#line 266 "cond.y"
|
||||
{ (yyval.value) = COND_ILHS; ;}
|
||||
break;
|
||||
|
||||
case 41:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 268 "cond.y"
|
||||
#line 267 "cond.y"
|
||||
{ (yyval.value) = COND_IRHS; ;}
|
||||
break;
|
||||
|
||||
case 42:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 273 "cond.y"
|
||||
#line 272 "cond.y"
|
||||
{
|
||||
(yyval.string) = (yyvsp[(1) - (1)].string);
|
||||
;}
|
||||
|
@ -1889,7 +1888,7 @@ yyreduce:
|
|||
case 43:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 277 "cond.y"
|
||||
#line 276 "cond.y"
|
||||
{
|
||||
(yyval.string) = (yyvsp[(1) - (1)].string);
|
||||
;}
|
||||
|
@ -1898,7 +1897,7 @@ yyreduce:
|
|||
case 44:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 284 "cond.y"
|
||||
#line 283 "cond.y"
|
||||
{
|
||||
(yyval.string) = COND_GetLiteral(&(yyvsp[(1) - (1)].str));
|
||||
if( !(yyval.string) )
|
||||
|
@ -1909,7 +1908,7 @@ yyreduce:
|
|||
case 45:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 293 "cond.y"
|
||||
#line 292 "cond.y"
|
||||
{
|
||||
(yyval.value) = (yyvsp[(1) - (1)].value);
|
||||
;}
|
||||
|
@ -1918,7 +1917,7 @@ yyreduce:
|
|||
case 46:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 297 "cond.y"
|
||||
#line 296 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1932,7 +1931,7 @@ yyreduce:
|
|||
case 47:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 306 "cond.y"
|
||||
#line 305 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1946,7 +1945,7 @@ yyreduce:
|
|||
case 48:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 315 "cond.y"
|
||||
#line 314 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1964,7 +1963,7 @@ yyreduce:
|
|||
case 49:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 328 "cond.y"
|
||||
#line 327 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
|
||||
|
@ -1978,7 +1977,7 @@ yyreduce:
|
|||
case 50:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 340 "cond.y"
|
||||
#line 339 "cond.y"
|
||||
{
|
||||
COND_input* cond = (COND_input*) info;
|
||||
|
||||
|
@ -1990,7 +1989,7 @@ yyreduce:
|
|||
case 51:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 347 "cond.y"
|
||||
#line 346 "cond.y"
|
||||
{
|
||||
UINT len = GetEnvironmentVariableW( (yyvsp[(2) - (2)].string), NULL, 0 );
|
||||
(yyval.string) = NULL;
|
||||
|
@ -2006,7 +2005,7 @@ yyreduce:
|
|||
case 52:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 361 "cond.y"
|
||||
#line 360 "cond.y"
|
||||
{
|
||||
(yyval.string) = COND_GetString(&(yyvsp[(1) - (1)].str));
|
||||
if( !(yyval.string) )
|
||||
|
@ -2017,7 +2016,7 @@ yyreduce:
|
|||
case 53:
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 370 "cond.y"
|
||||
#line 369 "cond.y"
|
||||
{
|
||||
LPWSTR szNum = COND_GetString(&(yyvsp[(1) - (1)].str));
|
||||
if( !szNum )
|
||||
|
@ -2030,7 +2029,7 @@ yyreduce:
|
|||
|
||||
|
||||
/* Line 1455 of yacc.c */
|
||||
#line 2034 "cond.tab.c"
|
||||
#line 2033 "cond.tab.c"
|
||||
default: break;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
||||
|
@ -2242,7 +2241,7 @@ yyreturn:
|
|||
|
||||
|
||||
/* Line 1675 of yacc.c */
|
||||
#line 379 "cond.y"
|
||||
#line 378 "cond.y"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ typedef union YYSTYPE
|
|||
{
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 111 "cond.y"
|
||||
#line 110 "cond.y"
|
||||
|
||||
struct cond_str str;
|
||||
LPWSTR string;
|
||||
|
|
|
@ -64,7 +64,6 @@ struct cond_str {
|
|||
static LPWSTR COND_GetString( const struct cond_str *str );
|
||||
static LPWSTR COND_GetLiteral( const struct cond_str *str );
|
||||
static int cond_lex( void *COND_lval, COND_input *info);
|
||||
static const WCHAR szEmpty[] = { 0 };
|
||||
|
||||
static INT compare_int( INT a, INT operator, INT b );
|
||||
static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert );
|
||||
|
|
|
@ -44,15 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
|||
static const WCHAR c_collen[] = {'C',':','\\',0};
|
||||
static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
|
||||
|
||||
|
||||
static const WCHAR szActionData[] = {
|
||||
'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0
|
||||
};
|
||||
static const WCHAR ProdCode[] = {
|
||||
'P','r','o','d','u','c','t','C','o','d','e',0
|
||||
};
|
||||
static const WCHAR UserSID[] = {'U','s','e','r','S','I','D',0};
|
||||
|
||||
typedef struct tagMSIRUNNINGACTION
|
||||
{
|
||||
struct list entry;
|
||||
|
@ -172,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
|
|||
|
||||
end = strstrW(beg, sep);
|
||||
*end = '\0';
|
||||
MSI_SetPropertyW(package, szActionData, beg);
|
||||
MSI_SetPropertyW(package, szCustomActionData, beg);
|
||||
beg = end + 3;
|
||||
|
||||
end = strstrW(beg, sep);
|
||||
*end = '\0';
|
||||
MSI_SetPropertyW(package, UserSID, beg);
|
||||
MSI_SetPropertyW(package, szUserSID, beg);
|
||||
beg = end + 3;
|
||||
|
||||
end = strchrW(beg, ']');
|
||||
*end = '\0';
|
||||
MSI_SetPropertyW(package, ProdCode, beg);
|
||||
MSI_SetPropertyW(package, szProductCode, beg);
|
||||
}
|
||||
|
||||
UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute)
|
||||
|
@ -241,8 +232,8 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
|
|||
if (!execute)
|
||||
{
|
||||
LPWSTR actiondata = msi_dup_property(package, action);
|
||||
LPWSTR usersid = msi_dup_property(package, UserSID);
|
||||
LPWSTR prodcode = msi_dup_property(package, ProdCode);
|
||||
LPWSTR usersid = msi_dup_property(package, szUserSID);
|
||||
LPWSTR prodcode = msi_dup_property(package, szProductCode);
|
||||
LPWSTR deferred = msi_get_deferred_action(action, actiondata, usersid, prodcode);
|
||||
|
||||
if (type & msidbCustomActionTypeCommit)
|
||||
|
@ -265,8 +256,6 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
|
|||
}
|
||||
else
|
||||
{
|
||||
static const WCHAR szBlank[] = {0};
|
||||
|
||||
LPWSTR actiondata = msi_dup_property( package, action );
|
||||
|
||||
switch (script)
|
||||
|
@ -287,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
|
|||
if (deferred_data)
|
||||
set_deferred_action_props(package, deferred_data);
|
||||
else if (actiondata)
|
||||
MSI_SetPropertyW(package,szActionData,actiondata);
|
||||
MSI_SetPropertyW(package, szCustomActionData, actiondata);
|
||||
else
|
||||
MSI_SetPropertyW(package,szActionData,szBlank);
|
||||
MSI_SetPropertyW(package, szCustomActionData, szEmpty);
|
||||
|
||||
msi_free(actiondata);
|
||||
}
|
||||
|
@ -383,7 +372,6 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
|
|||
MSIRECORD *row = 0;
|
||||
HANDLE file;
|
||||
CHAR buffer[1024];
|
||||
static const WCHAR f1[] = {'m','s','i',0};
|
||||
WCHAR fmt[MAX_PATH];
|
||||
DWORD sz = MAX_PATH;
|
||||
UINT r;
|
||||
|
@ -391,7 +379,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
|
|||
if (MSI_GetPropertyW(package, cszTempFolder, fmt, &sz) != ERROR_SUCCESS)
|
||||
GetTempPathW(MAX_PATH, fmt);
|
||||
|
||||
if (GetTempFileNameW(fmt, f1, 0, tmp_file) == 0)
|
||||
if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0)
|
||||
{
|
||||
TRACE("Unable to create file\n");
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
@ -853,11 +841,9 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source,
|
|||
DWORD size;
|
||||
UINT r;
|
||||
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
|
||||
size = MAX_PATH;
|
||||
MSI_GetPropertyW(package, cszSourceDir, package_path, &size);
|
||||
lstrcatW(package_path, backslash);
|
||||
lstrcatW(package_path, szBackSlash);
|
||||
lstrcatW(package_path, source);
|
||||
|
||||
TRACE("Installing package %s concurrently\n", debugstr_w(package_path));
|
||||
|
@ -884,10 +870,7 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
|
|||
debugstr_w(tmp_file));
|
||||
|
||||
if (!strchrW(tmp_file,'.'))
|
||||
{
|
||||
static const WCHAR dot[]={'.',0};
|
||||
strcatW(tmp_file,dot);
|
||||
}
|
||||
strcatW(tmp_file, szDot);
|
||||
|
||||
info = do_msidbCustomActionTypeDll( package, type, tmp_file, target, action );
|
||||
|
||||
|
|
|
@ -65,6 +65,11 @@ static VOID MSI_CloseDatabase( MSIOBJECTHDR *arg )
|
|||
DeleteFileW( db->deletefile );
|
||||
msi_free( db->deletefile );
|
||||
}
|
||||
if (db->localfile)
|
||||
{
|
||||
DeleteFileW( db->localfile );
|
||||
msi_free( db->localfile );
|
||||
}
|
||||
}
|
||||
|
||||
UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
|
||||
|
@ -78,7 +83,6 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
|
|||
BOOL created = FALSE;
|
||||
WCHAR path[MAX_PATH];
|
||||
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
||||
|
||||
TRACE("%s %s\n",debugstr_w(szDBPath),debugstr_w(szPersist) );
|
||||
|
@ -177,7 +181,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
|
|||
if (!strchrW( save_path, '\\' ))
|
||||
{
|
||||
GetCurrentDirectoryW( MAX_PATH, path );
|
||||
lstrcatW( path, backslash );
|
||||
lstrcatW( path, szBackSlash );
|
||||
lstrcatW( path, save_path );
|
||||
}
|
||||
else
|
||||
|
@ -192,8 +196,6 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
|
|||
db->mode = szMode;
|
||||
if (created)
|
||||
db->deletefile = strdupW( szDBPath );
|
||||
else
|
||||
db->deletefile = NULL;
|
||||
list_init( &db->tables );
|
||||
list_init( &db->transforms );
|
||||
|
||||
|
@ -656,7 +658,6 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
|
|||
LPWSTR **records = NULL;
|
||||
LPWSTR **temp_records;
|
||||
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
static const WCHAR suminfo[] =
|
||||
{'_','S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n',0};
|
||||
|
||||
|
@ -665,13 +666,13 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
|
|||
if( folder == NULL || file == NULL )
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
len = lstrlenW(folder) + lstrlenW(backslash) + lstrlenW(file) + 1;
|
||||
len = lstrlenW(folder) + lstrlenW(szBackSlash) + lstrlenW(file) + 1;
|
||||
path = msi_alloc( len * sizeof(WCHAR) );
|
||||
if (!path)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
||||
lstrcpyW( path, folder );
|
||||
lstrcatW( path, backslash );
|
||||
lstrcatW( path, szBackSlash );
|
||||
lstrcatW( path, file );
|
||||
|
||||
data = msi_read_text_archive( path );
|
||||
|
@ -878,7 +879,6 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
|||
{
|
||||
static const WCHAR query[] = {
|
||||
's','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','%','s',0 };
|
||||
static const WCHAR szbs[] = { '\\', 0 };
|
||||
static const WCHAR forcecodepage[] = {
|
||||
'_','F','o','r','c','e','C','o','d','e','p','a','g','e',0 };
|
||||
MSIRECORD *rec = NULL;
|
||||
|
@ -899,7 +899,7 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table,
|
|||
return ERROR_OUTOFMEMORY;
|
||||
|
||||
lstrcpyW( filename, folder );
|
||||
lstrcatW( filename, szbs );
|
||||
lstrcatW( filename, szBackSlash );
|
||||
lstrcatW( filename, file );
|
||||
|
||||
handle = CreateFileW( filename, GENERIC_READ | GENERIC_WRITE, 0,
|
||||
|
@ -1081,6 +1081,19 @@ typedef struct _tagMERGEDATA
|
|||
struct list *tabledata;
|
||||
} MERGEDATA;
|
||||
|
||||
static BOOL merge_type_match(LPCWSTR type1, LPCWSTR type2)
|
||||
{
|
||||
if (((type1[0] == 'l') || (type1[0] == 's')) &&
|
||||
((type2[0] == 'l') || (type2[0] == 's')))
|
||||
return TRUE;
|
||||
|
||||
if (((type1[0] == 'L') || (type1[0] == 'S')) &&
|
||||
((type2[0] == 'L') || (type2[0] == 'S')))
|
||||
return TRUE;
|
||||
|
||||
return !lstrcmpW(type1, type2);
|
||||
}
|
||||
|
||||
static UINT merge_verify_colnames(MSIQUERY *dbview, MSIQUERY *mergeview)
|
||||
{
|
||||
MSIRECORD *dbrec, *mergerec;
|
||||
|
@ -1126,7 +1139,7 @@ static UINT merge_verify_colnames(MSIQUERY *dbview, MSIQUERY *mergeview)
|
|||
if (!MSI_RecordGetString(mergerec, i))
|
||||
break;
|
||||
|
||||
if (lstrcmpW(MSI_RecordGetString(dbrec, i),
|
||||
if (!merge_type_match(MSI_RecordGetString(dbrec, i),
|
||||
MSI_RecordGetString(mergerec, i)))
|
||||
{
|
||||
r = ERROR_DATATYPE_MISMATCH;
|
||||
|
@ -1335,6 +1348,8 @@ static UINT merge_diff_row(MSIRECORD *rec, LPVOID param)
|
|||
}
|
||||
else if (r != ERROR_NO_MORE_ITEMS)
|
||||
goto done;
|
||||
|
||||
r = ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
mergerow = msi_alloc(sizeof(MERGEROW));
|
||||
|
|
|
@ -495,7 +495,6 @@ static LPWSTR msi_create_tmp_path(void)
|
|||
{
|
||||
WCHAR tmp[MAX_PATH];
|
||||
LPWSTR path = NULL;
|
||||
static const WCHAR prefix[] = { 'm','s','i',0 };
|
||||
DWORD len, r;
|
||||
|
||||
r = GetTempPathW( MAX_PATH, tmp );
|
||||
|
@ -505,7 +504,7 @@ static LPWSTR msi_create_tmp_path(void)
|
|||
path = msi_alloc( len * sizeof (WCHAR) );
|
||||
if( path )
|
||||
{
|
||||
r = GetTempFileNameW( tmp, prefix, 0, path );
|
||||
r = GetTempFileNameW( tmp, szMsi, 0, path );
|
||||
if (!r)
|
||||
{
|
||||
msi_free( path );
|
||||
|
@ -588,8 +587,6 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
|
|||
LPCWSTR font_text, text = NULL;
|
||||
LPWSTR font;
|
||||
|
||||
static const WCHAR empty[] = {0};
|
||||
|
||||
ctrl = msi_dialog_find_control( dialog, control );
|
||||
if (!ctrl)
|
||||
return;
|
||||
|
@ -597,7 +594,7 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
|
|||
{
|
||||
font_text = MSI_RecordGetString( rec , 1 );
|
||||
font = msi_dialog_get_style( font_text, &text );
|
||||
if (!text) text = empty;
|
||||
if (!text) text = szEmpty;
|
||||
SetWindowTextW( ctrl->hwnd, text );
|
||||
msi_free( font );
|
||||
msi_dialog_check_messages( NULL );
|
||||
|
@ -2390,8 +2387,6 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
|
|||
HANDLE file;
|
||||
|
||||
static const WCHAR asterisk[] = {'*',0};
|
||||
static const WCHAR dot[] = {'.',0};
|
||||
static const WCHAR dotdot[] = {'.','.',0};
|
||||
|
||||
if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryList )))
|
||||
return;
|
||||
|
@ -2415,7 +2410,7 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
|
|||
if ( wfd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY )
|
||||
continue;
|
||||
|
||||
if ( !lstrcmpW( wfd.cFileName, dot ) || !lstrcmpW( wfd.cFileName, dotdot ) )
|
||||
if ( !lstrcmpW( wfd.cFileName, szDot ) || !lstrcmpW( wfd.cFileName, szDotDot ) )
|
||||
continue;
|
||||
|
||||
item.mask = LVIF_TEXT;
|
||||
|
@ -2471,8 +2466,6 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
|
|||
LVITEMW item;
|
||||
int index;
|
||||
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
|
||||
if (nmhdr->code != LVN_ITEMACTIVATE)
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
|
@ -2494,7 +2487,7 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog,
|
|||
|
||||
lstrcpyW( new_path, path );
|
||||
lstrcatW( new_path, text );
|
||||
lstrcatW( new_path, backslash );
|
||||
lstrcatW( new_path, szBackSlash );
|
||||
|
||||
MSI_SetPropertyW( dialog->package, prop, new_path );
|
||||
|
||||
|
@ -2564,7 +2557,6 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
|
|||
LVCOLUMNW lvc;
|
||||
DWORD count = 0;
|
||||
|
||||
static const WCHAR zero[] = {'0',0};
|
||||
static const WCHAR negative[] = {'-',0};
|
||||
|
||||
if (!text) return;
|
||||
|
@ -2582,7 +2574,7 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control
|
|||
begin += end - begin + 1;
|
||||
|
||||
/* empty braces or '0' hides the column */
|
||||
if ( !num[0] || !lstrcmpW( num, zero ) )
|
||||
if ( !num[0] || !lstrcmpW( num, szZero ) )
|
||||
{
|
||||
count++;
|
||||
msi_free( num );
|
||||
|
@ -3760,7 +3752,6 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er
|
|||
DWORD size = MAX_PATH;
|
||||
int res;
|
||||
|
||||
static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
|
||||
static const WCHAR pn_prop[] = {'P','r','o','d','u','c','t','N','a','m','e',0};
|
||||
static const WCHAR title_fmt[] = {'%','s',' ','W','a','r','n','i','n','g',0};
|
||||
static const WCHAR error_abort[] = {'E','r','r','o','r','A','b','o','r','t',0};
|
||||
|
|
|
@ -170,7 +170,6 @@ static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
|
|||
static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
|
||||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
|
@ -190,7 +189,6 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
|
|||
static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
|
||||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
|
@ -210,7 +208,6 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
|
|||
static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument,
|
||||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
|
@ -383,7 +380,6 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument,
|
|||
static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument,
|
||||
msi_dialog *dialog)
|
||||
{
|
||||
static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
|
||||
return MSI_SetPropertyW( package, szReinstallMode, argument );
|
||||
}
|
||||
|
||||
|
|
|
@ -47,13 +47,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
extern const WCHAR szInstallFiles[];
|
||||
extern const WCHAR szDuplicateFiles[];
|
||||
extern const WCHAR szMoveFiles[];
|
||||
extern const WCHAR szPatchFiles[];
|
||||
extern const WCHAR szRemoveDuplicateFiles[];
|
||||
extern const WCHAR szRemoveFiles[];
|
||||
|
||||
static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *action )
|
||||
{
|
||||
MSIRECORD *uirow;
|
||||
|
@ -164,14 +157,12 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
|
|||
}
|
||||
if (gle == ERROR_SHARING_VIOLATION)
|
||||
{
|
||||
static const WCHAR msiW[] = {'m','s','i',0};
|
||||
static const WCHAR slashW[] = {'\\',0};
|
||||
WCHAR tmpfileW[MAX_PATH], *pathW, *p;
|
||||
DWORD len;
|
||||
|
||||
TRACE("file in use, scheduling rename operation\n");
|
||||
|
||||
GetTempFileNameW(slashW, msiW, 0, tmpfileW);
|
||||
GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW);
|
||||
len = strlenW(file->TargetPath) + strlenW(tmpfileW) + 1;
|
||||
if (!(pathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
|
|
@ -37,12 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
|||
static const WCHAR cszTargetDir[] = {'T','A','R','G','E','T','D','I','R',0};
|
||||
static const WCHAR cszDatabase[]={'D','A','T','A','B','A','S','E',0};
|
||||
|
||||
const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
|
||||
const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
|
||||
const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
|
||||
const WCHAR cszbs[]={'\\',0};
|
||||
const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
|
||||
|
||||
LPWSTR build_icon_path(MSIPACKAGE *package, LPCWSTR icon_name )
|
||||
{
|
||||
LPWSTR SystemFolder, dest, FilePath;
|
||||
|
@ -724,7 +718,7 @@ LPWSTR build_directory_name(DWORD count, ...)
|
|||
continue;
|
||||
strcatW(dir, str);
|
||||
if( ((i+1)!=count) && dir[strlenW(dir)-1]!='\\')
|
||||
strcatW(dir, cszbs);
|
||||
strcatW(dir, szBackSlash);
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,6 @@ static UINT msi_change_media(MSIPACKAGE *package, MSIMEDIAINFO *mi)
|
|||
LPWSTR source_dir;
|
||||
UINT r = ERROR_SUCCESS;
|
||||
|
||||
static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
|
||||
static const WCHAR error_prop[] = {'E','r','r','o','r','D','i','a','l','o','g',0};
|
||||
|
||||
if ((msi_get_property_int(package, szUILevel, 0) & INSTALLUILEVEL_MASK) ==
|
||||
|
@ -356,14 +355,12 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
|
|||
}
|
||||
if (err == ERROR_SHARING_VIOLATION)
|
||||
{
|
||||
static const WCHAR msiW[] = {'m','s','i',0};
|
||||
static const WCHAR slashW[] = {'\\',0};
|
||||
WCHAR tmpfileW[MAX_PATH], *tmppathW, *p;
|
||||
DWORD len;
|
||||
|
||||
TRACE("file in use, scheduling rename operation\n");
|
||||
|
||||
GetTempFileNameW(slashW, msiW, 0, tmpfileW);
|
||||
GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW);
|
||||
len = strlenW(path) + strlenW(tmpfileW) + 1;
|
||||
if (!(tmppathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
|
||||
return ERROR_OUTOFMEMORY;
|
||||
|
|
|
@ -264,8 +264,6 @@ UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
|
|||
|
||||
UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
|
||||
TRACE("%s %08x\n", debugstr_w(szProduct), dwReinstallMode);
|
||||
|
||||
return MsiReinstallFeatureW(szProduct, szAll, dwReinstallMode);
|
||||
|
@ -311,7 +309,6 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
|
|||
LPWSTR beg, end;
|
||||
LPWSTR cmd = NULL, codes = NULL;
|
||||
|
||||
static const WCHAR space[] = {' ',0};
|
||||
static const WCHAR patcheq[] = {'P','A','T','C','H','=',0};
|
||||
static WCHAR empty[] = {0};
|
||||
|
||||
|
@ -361,7 +358,7 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
|
|||
}
|
||||
|
||||
lstrcpyW(cmd, cmd_ptr);
|
||||
if (szCommandLine) lstrcatW(cmd, space);
|
||||
if (szCommandLine) lstrcatW(cmd, szSpace);
|
||||
lstrcatW(cmd, patcheq);
|
||||
lstrcatW(cmd, szPatchPackage);
|
||||
|
||||
|
@ -1216,9 +1213,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
DWORD type;
|
||||
UINT r = ERROR_UNKNOWN_PRODUCT;
|
||||
|
||||
static const WCHAR one[] = {'1',0};
|
||||
static const WCHAR five[] = {'5',0};
|
||||
static const WCHAR empty[] = {0};
|
||||
static const WCHAR displayname[] = {
|
||||
'D','i','s','p','l','a','y','N','a','m','e',0};
|
||||
static const WCHAR displayversion[] = {
|
||||
|
@ -1315,7 +1310,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
|
||||
val = msi_reg_get_value(props, szProperty, &type);
|
||||
if (!val)
|
||||
val = strdupW(empty);
|
||||
val = strdupW(szEmpty);
|
||||
|
||||
r = msi_copy_outval(val, szValue, pcchValue);
|
||||
}
|
||||
|
@ -1340,7 +1335,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
|
||||
val = msi_reg_get_value(hkey, szProperty, &type);
|
||||
if (!val)
|
||||
val = strdupW(empty);
|
||||
val = strdupW(szEmpty);
|
||||
|
||||
r = msi_copy_outval(val, szValue, pcchValue);
|
||||
}
|
||||
|
@ -1358,7 +1353,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
val = strdupW(five);
|
||||
}
|
||||
else
|
||||
val = strdupW(one);
|
||||
val = strdupW(szOne);
|
||||
|
||||
r = msi_copy_outval(val, szValue, pcchValue);
|
||||
goto done;
|
||||
|
@ -1372,7 +1367,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
}
|
||||
|
||||
if (prod || managed)
|
||||
val = strdupW(one);
|
||||
val = strdupW(szOne);
|
||||
else
|
||||
goto done;
|
||||
|
||||
|
@ -1384,7 +1379,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
|
|||
goto done;
|
||||
|
||||
/* FIXME */
|
||||
val = strdupW(empty);
|
||||
val = strdupW(szEmpty);
|
||||
r = msi_copy_outval(val, szValue, pcchValue);
|
||||
}
|
||||
else
|
||||
|
@ -1482,9 +1477,6 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
|
|||
DWORD len;
|
||||
LONG res;
|
||||
|
||||
static const WCHAR szEmpty[] = {0};
|
||||
static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
|
||||
static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
|
||||
static const WCHAR szManagedPackage[] = {'M','a','n','a','g','e','d',
|
||||
'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
||||
|
||||
|
@ -2971,8 +2963,6 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct,
|
|||
LPCWSTR orgptr;
|
||||
UINT r;
|
||||
|
||||
static const WCHAR szEmpty[] = {0};
|
||||
|
||||
TRACE("%s %p %p %p %p %p %p\n", debugstr_w(szProduct), lpUserNameBuf,
|
||||
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
||||
pcchSerialBuf);
|
||||
|
@ -3385,10 +3375,6 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
|||
WCHAR filename[MAX_PATH];
|
||||
static const WCHAR szLogVerbose[] = {
|
||||
' ','L','O','G','V','E','R','B','O','S','E',0 };
|
||||
static const WCHAR szInstalled[] = { 'I','n','s','t','a','l','l','e','d',0};
|
||||
static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
|
||||
static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
|
||||
static const WCHAR szOne[] = {'1',0};
|
||||
WCHAR reinstallmode[11];
|
||||
LPWSTR ptr;
|
||||
DWORD sz;
|
||||
|
|
|
@ -36,5 +36,4 @@ STRINGTABLE DISCARDABLE
|
|||
14 "Feature von:"
|
||||
15 "Wählen Sie das Verzeichnis aus, dass %s enthält."
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
||||
|
|
|
@ -76,6 +76,7 @@ typedef struct tagMSIDATABASE
|
|||
UINT bytes_per_strref;
|
||||
LPWSTR path;
|
||||
LPWSTR deletefile;
|
||||
LPWSTR localfile;
|
||||
LPCWSTR mode;
|
||||
struct list tables;
|
||||
struct list transforms;
|
||||
|
@ -1029,12 +1030,44 @@ extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR f
|
|||
extern void ui_progress(MSIPACKAGE *, int, int, int, int);
|
||||
extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *);
|
||||
|
||||
/* string consts use a number of places and defined in helpers.c*/
|
||||
extern const WCHAR cszSourceDir[];
|
||||
extern const WCHAR cszSOURCEDIR[];
|
||||
extern const WCHAR cszRootDrive[];
|
||||
extern const WCHAR cszbs[];
|
||||
extern const WCHAR szLocalSid[];
|
||||
/* common strings */
|
||||
static const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
|
||||
static const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
|
||||
static const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
|
||||
static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
|
||||
static const WCHAR szEmpty[] = {0};
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
static const WCHAR szOne[] = {'1',0};
|
||||
static const WCHAR szZero[] = {'0',0};
|
||||
static const WCHAR szSpace[] = {' ',0};
|
||||
static const WCHAR szBackSlash[] = {'\\',0};
|
||||
static const WCHAR szForwardSlash[] = {'/',0};
|
||||
static const WCHAR szDot[] = {'.',0};
|
||||
static const WCHAR szDotDot[] = {'.','.',0};
|
||||
static const WCHAR szSemiColon[] = {';',0};
|
||||
static const WCHAR szPreselected[] = {'P','r','e','s','e','l','e','c','t','e','d',0};
|
||||
static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
|
||||
static const WCHAR szState[] = {'S','t','a','t','e',0};
|
||||
static const WCHAR szMsi[] = {'m','s','i',0};
|
||||
static const WCHAR szPatch[] = {'P','A','T','C','H',0};
|
||||
static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
|
||||
static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
|
||||
static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
|
||||
static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
|
||||
static const WCHAR szRemove[] = {'R','E','M','O','V','E',0};
|
||||
static const WCHAR szUserSID[] = {'U','s','e','r','S','I','D',0};
|
||||
static const WCHAR szProductCode[] = {'P','r','o','d','u','c','t','C','o','d','e',0};
|
||||
static const WCHAR szRegisterClassInfo[] = {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
|
||||
static const WCHAR szRegisterProgIdInfo[] = {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
|
||||
static const WCHAR szRegisterExtensionInfo[] = {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
|
||||
static const WCHAR szRegisterMIMEInfo[] = {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
|
||||
static const WCHAR szDuplicateFiles[] = {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
|
||||
static const WCHAR szInstallFiles[] = {'I','n','s','t','a','l','l','F','i','l','e','s',0};
|
||||
static const WCHAR szRemoveFiles[] = {'R','e','m','o','v','e','F','i','l','e','s',0};
|
||||
static const WCHAR szFindRelatedProducts[] = {'F','i','n','d','R','e','l','a','t','e','d','P','r','o','d','u','c','t','s',0};
|
||||
static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0};
|
||||
static const WCHAR szCustomActionData[] = {'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0};
|
||||
static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
|
||||
|
||||
/* memory allocation macro functions */
|
||||
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
|
||||
|
|
|
@ -126,9 +126,7 @@ UINT MSI_DatabaseOpenViewW(MSIDATABASE *db,
|
|||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
msiobj_addref( &db->hdr );
|
||||
query->row = 0;
|
||||
query->db = db;
|
||||
query->view = NULL;
|
||||
list_init( &query->mem );
|
||||
|
||||
r = MSI_ParseSQL( db, szQuery, &query->view, &query->mem );
|
||||
|
|
|
@ -150,9 +150,6 @@ UINT msi_clone_properties(MSIPACKAGE *package)
|
|||
*/
|
||||
static UINT set_installed_prop( MSIPACKAGE *package )
|
||||
{
|
||||
static const WCHAR szInstalled[] = {
|
||||
'I','n','s','t','a','l','l','e','d',0 };
|
||||
WCHAR val[2] = { '1', 0 };
|
||||
HKEY hkey = 0;
|
||||
UINT r;
|
||||
|
||||
|
@ -160,7 +157,7 @@ static UINT set_installed_prop( MSIPACKAGE *package )
|
|||
if (r == ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey( hkey );
|
||||
MSI_SetPropertyW( package, szInstalled, val );
|
||||
MSI_SetPropertyW( package, szInstalled, szOne );
|
||||
}
|
||||
|
||||
return r;
|
||||
|
@ -175,8 +172,6 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
|
|||
PSID psid = NULL;
|
||||
UINT r = ERROR_FUNCTION_FAILED;
|
||||
|
||||
static const WCHAR user_sid[] = {'U','s','e','r','S','I','D',0};
|
||||
|
||||
size = 0;
|
||||
GetUserNameW( NULL, &size );
|
||||
|
||||
|
@ -205,7 +200,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
|
|||
if (!ConvertSidToStringSidW( psid, &sid_str ))
|
||||
goto done;
|
||||
|
||||
r = MSI_SetPropertyW( package, user_sid, sid_str );
|
||||
r = MSI_SetPropertyW( package, szUserSID, sid_str );
|
||||
|
||||
done:
|
||||
LocalFree( sid_str );
|
||||
|
@ -226,7 +221,6 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
|
|||
WCHAR name[MAX_PATH];
|
||||
WCHAR windir[MAX_PATH];
|
||||
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
static const WCHAR fusion[] = {'f','u','s','i','o','n','.','d','l','l',0};
|
||||
static const WCHAR sub[] = {
|
||||
'S','o','f','t','w','a','r','e','\\',
|
||||
|
@ -265,10 +259,10 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
|
|||
}
|
||||
|
||||
lstrcpyW(check, windir);
|
||||
lstrcatW(check, backslash);
|
||||
lstrcatW(check, szBackSlash);
|
||||
lstrcatW(check, subdir);
|
||||
lstrcatW(check, name);
|
||||
lstrcatW(check, backslash);
|
||||
lstrcatW(check, szBackSlash);
|
||||
lstrcatW(check, fusion);
|
||||
|
||||
if(GetFileAttributesW(check) != INVALID_FILE_ATTRIBUTES)
|
||||
|
@ -360,7 +354,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
SYSTEMTIME systemtime;
|
||||
LANGID langid;
|
||||
|
||||
static const WCHAR cszbs[]={'\\',0};
|
||||
static const WCHAR CFF[] =
|
||||
{'C','o','m','m','o','n','F','i','l','e','s','F','o','l','d','e','r',0};
|
||||
static const WCHAR PFF[] =
|
||||
|
@ -407,8 +400,6 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
{'A','d','m','i','n','U','s','e','r',0};
|
||||
static const WCHAR szPriv[] =
|
||||
{'P','r','i','v','i','l','e','g','e','d',0};
|
||||
static const WCHAR szOne[] =
|
||||
{'1',0};
|
||||
static const WCHAR v9x[] = { 'V','e','r','s','i','o','n','9','X',0 };
|
||||
static const WCHAR vNT[] = { 'V','e','r','s','i','o','n','N','T',0 };
|
||||
static const WCHAR szMsiNTProductType[] = { 'M','s','i','N','T','P','r','o','d','u','c','t','T','y','p','e',0 };
|
||||
|
@ -465,76 +456,76 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
*/
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, CFF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, PFF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, CADF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_FAVORITES,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, FaF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_FONTS,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, FoF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_SENDTO,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, SendTF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_STARTMENU,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, SMF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_STARTUP,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, StF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_TEMPLATES,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, TemplF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_DESKTOP,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, DF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_PROGRAMS,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, PMF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_ADMINTOOLS,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, ATF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_APPDATA,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, ADF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_SYSTEM,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, SF, pth);
|
||||
MSI_SetPropertyW(package, SF16, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_LOCAL_APPDATA,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, LADF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_MYPICTURES,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, MPF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_PERSONAL,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, PF, pth);
|
||||
|
||||
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
||||
strcatW(pth,cszbs);
|
||||
strcatW(pth, szBackSlash);
|
||||
MSI_SetPropertyW(package, WF, pth);
|
||||
|
||||
/* Physical Memory is specified in MB. Using total amount. */
|
||||
|
@ -753,15 +744,6 @@ static MSIPACKAGE *msi_alloc_package( void )
|
|||
list_init( &package->RunningActions );
|
||||
list_init( &package->sourcelist_info );
|
||||
list_init( &package->sourcelist_media );
|
||||
|
||||
package->patch = NULL;
|
||||
package->ActionFormat = NULL;
|
||||
package->LastAction = NULL;
|
||||
package->dialog = NULL;
|
||||
package->next_dialog = NULL;
|
||||
package->scheduled_action_running = FALSE;
|
||||
package->commit_action_running = FALSE;
|
||||
package->rollback_action_running = FALSE;
|
||||
}
|
||||
|
||||
return package;
|
||||
|
@ -788,8 +770,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
|||
{
|
||||
static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
|
||||
static const WCHAR szpi[] = {'%','i',0};
|
||||
static const WCHAR szProductCode[] = {
|
||||
'P','r','o','d','u','c','t','C','o','d','e',0};
|
||||
MSIPACKAGE *package;
|
||||
WCHAR uilevel[10];
|
||||
UINT r;
|
||||
|
@ -843,10 +823,9 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
|||
static LPCWSTR copy_package_to_temp( LPCWSTR szPackage, LPWSTR filename )
|
||||
{
|
||||
WCHAR path[MAX_PATH];
|
||||
static const WCHAR szMSI[] = {'m','s','i',0};
|
||||
|
||||
GetTempPathW( MAX_PATH, path );
|
||||
GetTempFileNameW( path, szMSI, 0, filename );
|
||||
GetTempFileNameW( path, szMsi, 0, filename );
|
||||
|
||||
if( !CopyFileW( szPackage, filename, FALSE ) )
|
||||
{
|
||||
|
@ -891,6 +870,38 @@ LPCWSTR msi_download_file( LPCWSTR szUrl, LPWSTR filename )
|
|||
return filename;
|
||||
}
|
||||
|
||||
static UINT msi_get_local_package_name( LPWSTR path )
|
||||
{
|
||||
static const WCHAR szInstaller[] = {
|
||||
'\\','I','n','s','t','a','l','l','e','r','\\',0};
|
||||
static const WCHAR fmt[] = { '%','x','.','m','s','i',0};
|
||||
DWORD time, len, i;
|
||||
HANDLE handle;
|
||||
|
||||
time = GetTickCount();
|
||||
GetWindowsDirectoryW( path, MAX_PATH );
|
||||
strcatW( path, szInstaller );
|
||||
CreateDirectoryW( path, NULL );
|
||||
|
||||
len = strlenW(path);
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
{
|
||||
snprintfW( &path[len], MAX_PATH - len, fmt, (time + i)&0xffff );
|
||||
handle = CreateFileW( path, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0 );
|
||||
if (handle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
}
|
||||
if (GetLastError() != ERROR_FILE_EXISTS &&
|
||||
GetLastError() != ERROR_SHARING_VIOLATION)
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
||||
{
|
||||
static const WCHAR OriginalDatabase[] =
|
||||
|
@ -901,7 +912,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
|||
MSIHANDLE handle;
|
||||
LPWSTR ptr, base_url = NULL;
|
||||
UINT r;
|
||||
WCHAR temppath[MAX_PATH];
|
||||
WCHAR temppath[MAX_PATH], localfile[MAX_PATH];
|
||||
LPCWSTR file = szPackage;
|
||||
|
||||
TRACE("%s %p\n", debugstr_w(szPackage), pPackage);
|
||||
|
@ -929,6 +940,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
|||
if ( UrlIsW( szPackage, URLIS_URL ) )
|
||||
{
|
||||
file = msi_download_file( szPackage, temppath );
|
||||
if ( file != szPackage )
|
||||
file = copy_package_to_temp( file, temppath );
|
||||
|
||||
base_url = strdupW( szPackage );
|
||||
if ( !base_url )
|
||||
|
@ -940,7 +953,24 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
|||
else
|
||||
file = copy_package_to_temp( szPackage, temppath );
|
||||
|
||||
r = MSI_OpenDatabaseW( file, MSIDBOPEN_READONLY, &db );
|
||||
r = msi_get_local_package_name( localfile );
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
TRACE("Copying to local package %s\n", debugstr_w(localfile));
|
||||
|
||||
if (!CopyFileW( file, localfile, FALSE ))
|
||||
{
|
||||
ERR("Unable to copy package (%s -> %s) (error %u)\n",
|
||||
debugstr_w(file), debugstr_w(localfile), GetLastError());
|
||||
return GetLastError();
|
||||
}
|
||||
|
||||
/* transforms that add binary streams require that we open the database
|
||||
* read/write, which is safe because we always create a copy that is thrown
|
||||
* away when we're done.
|
||||
*/
|
||||
r = MSI_OpenDatabaseW( file, MSIDBOPEN_DIRECT, &db );
|
||||
if( r != ERROR_SUCCESS )
|
||||
{
|
||||
if (file != szPackage)
|
||||
|
@ -951,6 +981,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
|||
|
||||
return r;
|
||||
}
|
||||
|
||||
db->localfile = strdupW( localfile );
|
||||
}
|
||||
|
||||
package = MSI_CreatePackage( db, base_url );
|
||||
|
@ -981,6 +1013,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
|||
MSI_SetPropertyW( package, OriginalDatabase, fullpath );
|
||||
}
|
||||
|
||||
package->script = msi_alloc_zero( sizeof(MSISCRIPT) );
|
||||
*pPackage = package;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
|
@ -1148,7 +1181,6 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
|
|||
LPWSTR tmp;
|
||||
WCHAR number[3];
|
||||
static const WCHAR format[] = { '%','i',':',' ',0};
|
||||
static const WCHAR space[] = { ' ',0};
|
||||
sz = 0;
|
||||
MSI_RecordGetStringW(record,i,NULL,&sz);
|
||||
sz+=4;
|
||||
|
@ -1165,7 +1197,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
|
|||
}
|
||||
strcatW(message,tmp);
|
||||
if (msg_field > 1)
|
||||
strcatW(message,space);
|
||||
strcatW(message, szSpace);
|
||||
|
||||
msi_free(tmp);
|
||||
}
|
||||
|
@ -1526,7 +1558,6 @@ int msi_get_property_int(MSIPACKAGE *package, LPCWSTR prop, int def)
|
|||
static UINT MSI_GetProperty( MSIHANDLE handle, LPCWSTR name,
|
||||
awstring *szValueBuf, LPDWORD pchValueBuf )
|
||||
{
|
||||
static const WCHAR empty[] = {0};
|
||||
MSIPACKAGE *package;
|
||||
MSIRECORD *row = NULL;
|
||||
UINT r = ERROR_FUNCTION_FAILED;
|
||||
|
@ -1602,7 +1633,7 @@ done:
|
|||
val = MSI_RecordGetString( row, 1 );
|
||||
|
||||
if (!val)
|
||||
val = empty;
|
||||
val = szEmpty;
|
||||
|
||||
r = msi_strcpy_to_awstring( val, szValueBuf, pchValueBuf );
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@ static MSIPREVIEW *MSI_EnableUIPreview( MSIDATABASE *db )
|
|||
if( preview )
|
||||
{
|
||||
preview->package = package;
|
||||
preview->dialog = 0;
|
||||
msiobj_addref( &package->hdr );
|
||||
}
|
||||
msiobj_release( &package->hdr );
|
||||
|
|
|
@ -416,9 +416,8 @@ DWORD msi_version_str_to_dword(LPCWSTR p)
|
|||
|
||||
LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value )
|
||||
{
|
||||
static const WCHAR emptyW[] = {0};
|
||||
DWORD len;
|
||||
if (!value) value = emptyW;
|
||||
if (!value) value = szEmpty;
|
||||
len = (lstrlenW(value) + 1) * sizeof (WCHAR);
|
||||
return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, len );
|
||||
}
|
||||
|
@ -1779,9 +1778,6 @@ static UINT msi_get_patch_state(LPCWSTR prodcode, LPCWSTR usersid,
|
|||
LONG res;
|
||||
UINT r = ERROR_NO_MORE_ITEMS;
|
||||
|
||||
static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
|
||||
static const WCHAR szState[] = {'S','t','a','t','e',0};
|
||||
|
||||
*state = MSIPATCHSTATE_INVALID;
|
||||
|
||||
r = MSIREG_OpenUserDataProductKey(prodcode, context,
|
||||
|
@ -1830,10 +1826,6 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
|
|||
LONG res;
|
||||
UINT temp, r = ERROR_NO_MORE_ITEMS;
|
||||
|
||||
static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
|
||||
static const WCHAR szState[] = {'S','t','a','t','e',0};
|
||||
static const WCHAR szEmpty[] = {0};
|
||||
|
||||
if (MSIREG_OpenProductKey(prodcode, usersid, context,
|
||||
&prod, FALSE) != ERROR_SUCCESS)
|
||||
return ERROR_NO_MORE_ITEMS;
|
||||
|
|
|
@ -57,7 +57,6 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions,
|
|||
{
|
||||
HKEY rootkey = 0;
|
||||
UINT rc = ERROR_FUNCTION_FAILED;
|
||||
static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
|
||||
|
||||
if (context == MSIINSTALLCONTEXT_USERUNMANAGED)
|
||||
{
|
||||
|
@ -1096,9 +1095,6 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
|||
DWORD index;
|
||||
|
||||
static const WCHAR fmt[] = {'%','i',0};
|
||||
static const WCHAR one[] = {'1',0};
|
||||
static const WCHAR backslash[] = {'\\',0};
|
||||
static const WCHAR forwardslash[] = {'/',0};
|
||||
|
||||
TRACE("%s %s %x %x %s %i\n", debugstr_w(szProduct), debugstr_w(szUserSid),
|
||||
dwContext, dwOptions, debugstr_w(szSource), dwIndex);
|
||||
|
@ -1138,7 +1134,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
|||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? backslash : forwardslash;
|
||||
postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? szBackSlash : szForwardSlash;
|
||||
if (szSource[lstrlenW(szSource) - 1] == *postfix)
|
||||
source = strdupW(szSource);
|
||||
else
|
||||
|
@ -1158,7 +1154,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
|
|||
|
||||
if (count == 0)
|
||||
{
|
||||
rc = RegSetValueExW(typekey, one, 0, REG_EXPAND_SZ, (LPBYTE)source, size);
|
||||
rc = RegSetValueExW(typekey, szOne, 0, REG_EXPAND_SZ, (LPBYTE)source, size);
|
||||
goto done;
|
||||
}
|
||||
else if (dwIndex > count || dwIndex == 0)
|
||||
|
@ -1248,7 +1244,6 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
|
|||
DWORD size;
|
||||
|
||||
static const WCHAR fmt[] = {'%','i',0};
|
||||
static const WCHAR semicolon[] = {';',0};
|
||||
|
||||
TRACE("%s %s %x %x %i %s %s\n", debugstr_w(szProduct),
|
||||
debugstr_w(szUserSid), dwContext, dwOptions, dwDiskId,
|
||||
|
@ -1289,7 +1284,7 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid,
|
|||
*buffer = '\0';
|
||||
|
||||
if (szVolumeLabel) lstrcpyW(buffer, szVolumeLabel);
|
||||
lstrcatW(buffer, semicolon);
|
||||
lstrcatW(buffer, szSemiColon);
|
||||
if (szDiskPrompt) lstrcatW(buffer, szDiskPrompt);
|
||||
|
||||
RegSetValueExW(mediakey, szIndex, 0, REG_SZ, (LPBYTE)buffer, size);
|
||||
|
|
|
@ -314,9 +314,8 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
|
|||
/* find the string identified by an id - return null if there's none */
|
||||
const WCHAR *msi_string_lookup_id( const string_table *st, UINT id )
|
||||
{
|
||||
static const WCHAR zero[] = { 0 };
|
||||
if( id == 0 )
|
||||
return zero;
|
||||
return szEmpty;
|
||||
|
||||
if( id >= st->maxcount )
|
||||
return NULL;
|
||||
|
|
|
@ -443,7 +443,6 @@ MSISUMMARYINFO *MSI_GetSummaryInformationW( IStorage *stg, UINT uiUpdateCount )
|
|||
if( !si )
|
||||
return si;
|
||||
|
||||
memset( si->property, 0, sizeof si->property );
|
||||
si->update_count = uiUpdateCount;
|
||||
IStorage_AddRef( stg );
|
||||
si->storage = stg;
|
||||
|
@ -608,9 +607,8 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType,
|
|||
|
||||
if( str->unicode )
|
||||
{
|
||||
len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1,
|
||||
str->str.w, *pcchValueBuf );
|
||||
len--;
|
||||
len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, NULL, 0 ) - 1;
|
||||
MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, str->str.w, *pcchValueBuf );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -121,7 +121,6 @@ static void table_calc_column_offsets( MSIDATABASE *db, MSICOLUMNINFO *colinfo,
|
|||
static UINT get_tablecolumns( MSIDATABASE *db,
|
||||
LPCWSTR szTableName, MSICOLUMNINFO *colinfo, UINT *sz);
|
||||
static void msi_free_colinfo( MSICOLUMNINFO *colinfo, UINT count );
|
||||
static UINT table_find_insert_idx (MSIVIEW *view, LPCWSTR name, INT *pidx);
|
||||
|
||||
static inline UINT bytes_per_column( MSIDATABASE *db, const MSICOLUMNINFO *col )
|
||||
{
|
||||
|
@ -627,7 +626,6 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
|||
column_info *col;
|
||||
MSITABLE *table;
|
||||
UINT i;
|
||||
INT idx;
|
||||
|
||||
/* only add tables that don't exist already */
|
||||
if( TABLE_Exists(db, name ) )
|
||||
|
@ -693,11 +691,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
|||
if( r )
|
||||
goto err;
|
||||
|
||||
r = table_find_insert_idx (tv, name, &idx);
|
||||
if (r != ERROR_SUCCESS)
|
||||
idx = -1;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec, idx, persistent == MSICONDITION_FALSE );
|
||||
r = tv->ops->insert_row( tv, rec, -1, persistent == MSICONDITION_FALSE );
|
||||
TRACE("insert_row returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
|
@ -747,11 +741,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
|||
if( r )
|
||||
goto err;
|
||||
|
||||
r = table_find_insert_idx (tv, name, &idx);
|
||||
if (r != ERROR_SUCCESS)
|
||||
idx = -1;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec, idx, FALSE );
|
||||
r = tv->ops->insert_row( tv, rec, -1, FALSE );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
|
@ -1189,8 +1179,6 @@ static UINT msi_stream_name( const MSITABLEVIEW *tv, UINT row, LPWSTR *pstname )
|
|||
type = tv->columns[i].type;
|
||||
if ( type & MSITYPE_KEY )
|
||||
{
|
||||
static const WCHAR szDot[] = { '.', 0 };
|
||||
|
||||
r = TABLE_fetch_int( view, row, i+1, &ival );
|
||||
if ( r != ERROR_SUCCESS )
|
||||
goto err;
|
||||
|
@ -1370,6 +1358,48 @@ err:
|
|||
return r;
|
||||
}
|
||||
|
||||
static UINT get_table_value_from_record( MSITABLEVIEW *tv, MSIRECORD *rec, UINT iField, UINT *pvalue )
|
||||
{
|
||||
MSICOLUMNINFO columninfo;
|
||||
UINT r;
|
||||
|
||||
if ( (iField <= 0) ||
|
||||
(iField > tv->num_cols) ||
|
||||
MSI_RecordIsNull( rec, iField ) )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
columninfo = tv->columns[ iField - 1 ];
|
||||
|
||||
if ( MSITYPE_IS_BINARY(columninfo.type) )
|
||||
{
|
||||
*pvalue = 1; /* refers to the first key column */
|
||||
}
|
||||
else if ( columninfo.type & MSITYPE_STRING )
|
||||
{
|
||||
LPCWSTR sval = MSI_RecordGetString( rec, iField );
|
||||
|
||||
r = msi_string2idW(tv->db->strings, sval, pvalue);
|
||||
if (r != ERROR_SUCCESS)
|
||||
return ERROR_NOT_FOUND;
|
||||
}
|
||||
else if ( 2 == bytes_per_column( tv->db, &columninfo ) )
|
||||
{
|
||||
*pvalue = 0x8000 + MSI_RecordGetInteger( rec, iField );
|
||||
if ( *pvalue & 0xffff0000 )
|
||||
{
|
||||
ERR("field %u value %d out of range\n", iField, *pvalue - 0x8000);
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT ival = MSI_RecordGetInteger( rec, iField );
|
||||
*pvalue = ival ^ 0x80000000;
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask )
|
||||
{
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
|
||||
|
@ -1397,11 +1427,15 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
|
|||
val = 0;
|
||||
if ( !MSI_RecordIsNull( rec, i + 1 ) )
|
||||
{
|
||||
r = get_table_value_from_record (tv, rec, i + 1, &val);
|
||||
if ( MSITYPE_IS_BINARY(tv->columns[ i ].type) )
|
||||
{
|
||||
IStream *stm;
|
||||
LPWSTR stname;
|
||||
|
||||
if ( r != ERROR_SUCCESS )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
r = MSI_RecordGetIStream( rec, i + 1, &stm );
|
||||
if ( r != ERROR_SUCCESS )
|
||||
return r;
|
||||
|
@ -1419,38 +1453,29 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
|
|||
|
||||
if ( r != ERROR_SUCCESS )
|
||||
return r;
|
||||
|
||||
val = 1; /* refers to the first key column */
|
||||
}
|
||||
else if ( tv->columns[i].type & MSITYPE_STRING )
|
||||
{
|
||||
LPCWSTR sval = MSI_RecordGetString( rec, i + 1 );
|
||||
UINT ival, x;
|
||||
UINT x;
|
||||
|
||||
r = msi_string2idW(tv->db->strings, sval, &ival);
|
||||
if (r == ERROR_SUCCESS)
|
||||
if ( r != ERROR_SUCCESS )
|
||||
{
|
||||
LPCWSTR sval = MSI_RecordGetString( rec, i + 1 );
|
||||
val = msi_addstringW( tv->db->strings, 0, sval, -1, 1,
|
||||
persistent ? StringPersistent : StringNonPersistent );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
TABLE_fetch_int(&tv->view, row, i + 1, &x);
|
||||
if (ival == x)
|
||||
if (val == x)
|
||||
continue;
|
||||
}
|
||||
|
||||
val = msi_addstringW( tv->db->strings, 0, sval, -1, 1,
|
||||
persistent ? StringPersistent : StringNonPersistent );
|
||||
}
|
||||
else if ( 2 == bytes_per_column( tv->db, &tv->columns[ i ] ) )
|
||||
{
|
||||
val = 0x8000 + MSI_RecordGetInteger( rec, i + 1 );
|
||||
if ( val & 0xffff0000 )
|
||||
{
|
||||
ERR("field %u value %d out of range\n", i+1, val - 0x8000 );
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT ival = MSI_RecordGetInteger( rec, i + 1 );
|
||||
val = ival ^ 0x80000000;
|
||||
if ( r != ERROR_SUCCESS )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1622,6 +1647,41 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT find_insert_index( MSITABLEVIEW *tv, MSIRECORD *rec, UINT *pidx )
|
||||
{
|
||||
UINT r, idx, j, ivalue, x;
|
||||
|
||||
TRACE("%p %p %p\n", tv, rec, pidx);
|
||||
|
||||
for (idx = 0; idx < tv->table->row_count; idx++)
|
||||
{
|
||||
for (j = 0; j < tv->num_cols; j++ )
|
||||
{
|
||||
r = get_table_value_from_record (tv, rec, j+1, &ivalue);
|
||||
if (r != ERROR_SUCCESS)
|
||||
break;
|
||||
|
||||
r = TABLE_fetch_int(&tv->view, idx, j + 1, &x);
|
||||
if (r != ERROR_SUCCESS)
|
||||
return r;
|
||||
|
||||
if (ivalue > x)
|
||||
break;
|
||||
else if (ivalue == x)
|
||||
continue;
|
||||
else {
|
||||
TRACE("Found %d.\n", idx);
|
||||
*pidx = idx;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TRACE("Found %d.\n", idx);
|
||||
*pidx = idx;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT TABLE_insert_row( struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary )
|
||||
{
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
|
||||
|
@ -1634,6 +1694,13 @@ static UINT TABLE_insert_row( struct tagMSIVIEW *view, MSIRECORD *rec, UINT row,
|
|||
if( r != ERROR_SUCCESS )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
if (row == -1)
|
||||
{
|
||||
r = find_insert_index(tv, rec, &row);
|
||||
if( r != ERROR_SUCCESS )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
r = table_create_new_row( view, &row, temporary );
|
||||
TRACE("insert_row returned %08x\n", r);
|
||||
if( r != ERROR_SUCCESS )
|
||||
|
@ -2377,7 +2444,6 @@ static UINT read_raw_int(const BYTE *data, UINT col, UINT bytes)
|
|||
|
||||
static UINT msi_record_encoded_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR *pstname )
|
||||
{
|
||||
static const WCHAR szDot[] = { '.', 0 };
|
||||
LPWSTR stname = NULL, sval, p;
|
||||
DWORD len;
|
||||
UINT i, r;
|
||||
|
@ -2957,29 +3023,3 @@ void msi_free_transforms( MSIDATABASE *db )
|
|||
msi_free( t );
|
||||
}
|
||||
}
|
||||
|
||||
static UINT table_find_insert_idx (MSIVIEW *view, LPCWSTR name, INT *pidx)
|
||||
{
|
||||
UINT r, name_id, row_id;
|
||||
INT idx;
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW *)view;
|
||||
|
||||
TRACE ("%p %s\n", view, debugstr_w(name));
|
||||
|
||||
r = msi_string2idW(tv->db->strings, name, &name_id);
|
||||
if (r != ERROR_SUCCESS)
|
||||
{
|
||||
*pidx = -1;
|
||||
return r;
|
||||
}
|
||||
|
||||
for( idx = 0; idx < tv->table->row_count; idx++ )
|
||||
{
|
||||
r = TABLE_fetch_int( &tv->view, idx, 1, &row_id );
|
||||
if (row_id > name_id)
|
||||
break;
|
||||
}
|
||||
|
||||
*pidx = idx;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||
|
||||
extern const WCHAR szFindRelatedProducts[];
|
||||
extern const WCHAR szMigrateFeatureStates[];
|
||||
extern const WCHAR szRemoveExistingProducts[];
|
||||
|
||||
static BOOL check_language(DWORD lang1, LPCWSTR lang2, DWORD attributes)
|
||||
{
|
||||
DWORD langdword;
|
||||
|
@ -65,7 +61,6 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
|
|||
LPWSTR prop;
|
||||
LPWSTR newprop;
|
||||
DWORD len;
|
||||
static const WCHAR separator[] = {';',0};
|
||||
|
||||
prop = msi_dup_property(package, action_property );
|
||||
if (prop)
|
||||
|
@ -86,7 +81,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
|
|||
if (prop)
|
||||
{
|
||||
strcpyW(newprop,prop);
|
||||
strcatW(newprop,separator);
|
||||
strcatW(newprop,szSemiColon);
|
||||
}
|
||||
else
|
||||
newprop[0] = 0;
|
||||
|
|
Loading…
Reference in a new issue