Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a5d8ab57
Commit
a5d8ab57
authored
Sep 03, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Check transform validation flags.
parent
7cf23a79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
27 deletions
+45
-27
patch.c
dlls/msi/patch.c
+30
-27
msiquery.h
include/msiquery.h
+15
-0
No files found.
dlls/msi/patch.c
View file @
a5d8ab57
...
@@ -46,54 +46,57 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid )
...
@@ -46,54 +46,57 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid )
static
UINT
check_transform_applicable
(
MSIPACKAGE
*
package
,
IStorage
*
transform
)
static
UINT
check_transform_applicable
(
MSIPACKAGE
*
package
,
IStorage
*
transform
)
{
{
WCHAR
*
package_product
,
*
transform_product
,
*
template
=
NULL
;
MSISUMMARYINFO
*
si
=
MSI_GetSummaryInformationW
(
transform
,
0
);
UINT
ret
=
ERROR_FUNCTION_FAILED
;
UINT
valid_flags
=
0
,
wanted_flags
=
0
;
if
(
si
)
wanted_flags
=
msi_suminfo_get_int32
(
si
,
PID_CHARCOUNT
);
TRACE
(
"validation flags %x
\n
"
,
wanted_flags
);
package_product
=
msi_dup_property
(
package
->
db
,
szProductCode
);
if
(
wanted_flags
&
~
(
MSITRANSFORM_VALIDATE_PRODUCT
|
MSITRANSFORM_VALIDATE_LANGUAGE
))
transform_product
=
msi_get_suminfo_product
(
transform
);
FIXME
(
"unsupported validation flags %x
\n
"
,
wanted_flags
);
if
(
wanted_flags
&
MSITRANSFORM_VALIDATE_PRODUCT
)
{
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
));
TRACE
(
"package = %s transform = %s
\n
"
,
debugstr_w
(
package_product
),
debugstr_w
(
transform_product
));
if
(
!
transform_product
||
strstrW
(
transform_product
,
package_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
)
{
{
MSISUMMARYINFO
*
si
;
WCHAR
*
template
;
const
WCHAR
*
p
;
const
WCHAR
*
p
;
si
=
MSI_GetSummaryInformationW
(
transform
,
0
);
if
(
!
si
)
if
(
!
si
)
{
{
ERR
(
"no summary information!
\n
"
);
ERR
(
"no summary information!
\n
"
);
goto
end
;
goto
end
;
}
}
template
=
msi_suminfo_dup_string
(
si
,
PID_TEMPLATE
);
if
(
!
(
template
=
msi_suminfo_dup_string
(
si
,
PID_TEMPLATE
)))
if
(
!
template
)
{
{
ERR
(
"no template property!
\n
"
);
ERR
(
"no template property!
\n
"
);
msiobj_release
(
&
si
->
hdr
);
goto
end
;
}
if
(
!
template
[
0
])
{
ret
=
ERROR_SUCCESS
;
msiobj_release
(
&
si
->
hdr
);
goto
end
;
goto
end
;
}
}
TRACE
(
"template: %s
\n
"
,
debugstr_w
(
template
));
TRACE
(
"template: %s
\n
"
,
debugstr_w
(
template
));
p
=
strchrW
(
template
,
';'
);
if
(
!
template
[
0
]
||
((
p
=
strchrW
(
template
,
';'
))
&&
match_language
(
package
,
atoiW
(
p
+
1
)
)))
if
(
p
&&
match_language
(
package
,
atoiW
(
p
+
1
)
))
{
{
TRACE
(
"applicable transform
\n
"
);
valid_flags
|=
MSITRANSFORM_VALIDATE_LANGUAGE
;
ret
=
ERROR_SUCCESS
;
}
}
/* FIXME: check platform */
msi_free
(
template
);
msiobj_release
(
&
si
->
hdr
);
}
}
end:
end:
msi
_free
(
transform_product
);
msi
obj_release
(
&
si
->
hdr
);
msi_free
(
package_product
)
;
if
(
valid_flags
&
~
wanted_flags
)
return
ERROR_FUNCTION_FAILED
;
msi_free
(
template
);
TRACE
(
"applicable transform
\n
"
);
return
ret
;
return
ERROR_SUCCESS
;
}
}
static
UINT
apply_substorage_transform
(
MSIPACKAGE
*
package
,
MSIDATABASE
*
patch_db
,
LPCWSTR
name
)
static
UINT
apply_substorage_transform
(
MSIPACKAGE
*
package
,
MSIDATABASE
*
patch_db
,
LPCWSTR
name
)
...
...
include/msiquery.h
View file @
a5d8ab57
...
@@ -145,6 +145,21 @@ typedef enum tagMSIDBSTATE
...
@@ -145,6 +145,21 @@ typedef enum tagMSIDBSTATE
MSIDBSTATE_WRITE
=
1
MSIDBSTATE_WRITE
=
1
}
MSIDBSTATE
;
}
MSIDBSTATE
;
typedef
enum
tagMSITRANSFORM_VALIDATE
{
MSITRANSFORM_VALIDATE_LANGUAGE
=
0x00000001
,
MSITRANSFORM_VALIDATE_PRODUCT
=
0x00000002
,
MSITRANSFORM_VALIDATE_PLATFORM
=
0x00000004
,
MSITRANSFORM_VALIDATE_MAJORVERSION
=
0x00000008
,
MSITRANSFORM_VALIDATE_MINORVERSION
=
0x00000010
,
MSITRANSFORM_VALIDATE_UPDATEVERSION
=
0x00000020
,
MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION
=
0x00000040
,
MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION
=
0x00000080
,
MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION
=
0x00000100
,
MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION
=
0x00000200
,
MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION
=
0x00000400
,
MSITRANSFORM_VALIDATE_UPGRADECODE
=
0x00000800
}
MSITRANSFORM_VALIDATE
;
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment