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
05e9a1fc
Commit
05e9a1fc
authored
Sep 02, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a partial implementation of MsiDetermineApplicablePatchesW.
parent
1169aa9a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
4 deletions
+81
-4
action.c
dlls/msi/action.c
+1
-1
msi.c
dlls/msi/msi.c
+76
-3
msipriv.h
dlls/msi/msipriv.h
+2
-0
msi.h
include/msi.h
+2
-0
No files found.
dlls/msi/action.c
View file @
05e9a1fc
...
...
@@ -501,7 +501,7 @@ static UINT msi_apply_substorage_transform( MSIPACKAGE *package,
return
ERROR_SUCCESS
;
}
static
UINT
msi_check_patch_applicable
(
MSIPACKAGE
*
package
,
MSISUMMARYINFO
*
si
)
UINT
msi_check_patch_applicable
(
MSIPACKAGE
*
package
,
MSISUMMARYINFO
*
si
)
{
static
const
WCHAR
szProdCode
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
LPWSTR
guid_list
,
*
guids
,
product_code
;
...
...
dlls/msi/msi.c
View file @
05e9a1fc
...
...
@@ -489,13 +489,86 @@ UINT WINAPI MsiDetermineApplicablePatchesA(LPCSTR szProductPackagePath,
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
static
UINT
MSI_ApplicablePatchW
(
MSIPACKAGE
*
package
,
LPCWSTR
patch
)
{
MSISUMMARYINFO
*
si
;
MSIDATABASE
*
patch_db
;
UINT
r
=
ERROR_SUCCESS
;
r
=
MSI_OpenDatabaseW
(
patch
,
MSIDBOPEN_READONLY
,
&
patch_db
);
if
(
r
!=
ERROR_SUCCESS
)
{
WARN
(
"failed to open patch file %s
\n
"
,
debugstr_w
(
patch
));
return
r
;
}
si
=
MSI_GetSummaryInformationW
(
patch_db
->
storage
,
0
);
if
(
!
si
)
{
r
=
ERROR_FUNCTION_FAILED
;
goto
done
;
}
r
=
msi_check_patch_applicable
(
package
,
si
);
if
(
r
!=
ERROR_SUCCESS
)
TRACE
(
"patch not applicable
\n
"
);
done:
msiobj_release
(
&
patch_db
->
hdr
);
msiobj_release
(
&
si
->
hdr
);
return
r
;
}
UINT
WINAPI
MsiDetermineApplicablePatchesW
(
LPCWSTR
szProductPackagePath
,
DWORD
cPatchInfo
,
PMSIPATCHSEQUENCEINFOW
pPatchInfo
)
{
FIXME
(
"(%s, %d, %p): stub!
\n
"
,
debugstr_w
(
szProductPackagePath
),
cPatchInfo
,
pPatchInfo
)
;
UINT
i
,
r
,
ret
=
ERROR_FUNCTION_FAILED
;
MSIPACKAGE
*
package
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
TRACE
(
"(%s, %d, %p)
\n
"
,
debugstr_w
(
szProductPackagePath
),
cPatchInfo
,
pPatchInfo
);
r
=
MSI_OpenPackageW
(
szProductPackagePath
,
&
package
);
if
(
r
!=
ERROR_SUCCESS
)
{
ERR
(
"failed to open package %u
\n
"
,
r
);
return
r
;
}
for
(
i
=
0
;
i
<
cPatchInfo
;
i
++
)
{
switch
(
pPatchInfo
[
i
].
ePatchDataType
)
{
case
MSIPATCH_DATATYPE_PATCHFILE
:
{
FIXME
(
"patch ordering not supported
\n
"
);
r
=
MSI_ApplicablePatchW
(
package
,
pPatchInfo
[
i
].
szPatchData
);
if
(
r
!=
ERROR_SUCCESS
)
{
pPatchInfo
[
i
].
dwOrder
=
~
0u
;
pPatchInfo
[
i
].
uStatus
=
ERROR_PATCH_TARGET_NOT_FOUND
;
}
else
{
pPatchInfo
[
i
].
dwOrder
=
i
;
pPatchInfo
[
i
].
uStatus
=
ret
=
ERROR_SUCCESS
;
}
break
;
}
default:
{
FIXME
(
"patch data type %u not supported
\n
"
,
pPatchInfo
[
i
].
ePatchDataType
);
pPatchInfo
[
i
].
dwOrder
=
~
0u
;
pPatchInfo
[
i
].
uStatus
=
ERROR_PATCH_TARGET_NOT_FOUND
;
break
;
}
}
TRACE
(
" szPatchData: %s
\n
"
,
debugstr_w
(
pPatchInfo
[
i
].
szPatchData
));
TRACE
(
"ePatchDataType: %u
\n
"
,
pPatchInfo
[
i
].
ePatchDataType
);
TRACE
(
" dwOrder: %u
\n
"
,
pPatchInfo
[
i
].
dwOrder
);
TRACE
(
" uStatus: %u
\n
"
,
pPatchInfo
[
i
].
uStatus
);
}
return
ret
;
}
UINT
WINAPI
MsiDeterminePatchSequenceA
(
LPCSTR
szProductCode
,
LPCSTR
szUserSid
,
...
...
dlls/msi/msipriv.h
View file @
05e9a1fc
...
...
@@ -683,6 +683,8 @@ extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
LPCWSTR
szTransformFile
,
int
iErrorCond
);
extern
void
append_storage_to_db
(
MSIDATABASE
*
db
,
IStorage
*
stg
);
extern
UINT
msi_check_patch_applicable
(
MSIPACKAGE
*
package
,
MSISUMMARYINFO
*
si
);
/* action internals */
extern
UINT
MSI_InstallPackage
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
);
extern
void
ACTION_free_package_structures
(
MSIPACKAGE
*
);
...
...
include/msi.h
View file @
05e9a1fc
...
...
@@ -237,6 +237,8 @@ typedef struct tagMSIPATCHSEQUENCEINFOW
#define MAX_FEATURE_CHARS 38
#define ERROR_PATCH_TARGET_NOT_FOUND 1642
/* Strings defined in msi.h */
/* Advertised Information */
...
...
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