Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0d7dc8f9
Commit
0d7dc8f9
authored
Oct 24, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Only apply transforms that are valid for a database.
parent
7f98f1d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
action.c
dlls/msi/action.c
+28
-3
msipriv.h
dlls/msi/msipriv.h
+1
-0
suminfo.c
dlls/msi/suminfo.c
+16
-0
No files found.
dlls/msi/action.c
View file @
0d7dc8f9
...
...
@@ -398,6 +398,28 @@ static LPWSTR* msi_split_string( LPCWSTR str, WCHAR sep )
return
ret
;
}
static
UINT
msi_check_transform_applicable
(
MSIPACKAGE
*
package
,
IStorage
*
patch
)
{
WCHAR
szProductCode
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
LPWSTR
prod_code
,
patch_product
;
UINT
ret
;
prod_code
=
msi_dup_property
(
package
,
szProductCode
);
patch_product
=
msi_get_suminfo_product
(
patch
);
TRACE
(
"db = %s patch = %s
\n
"
,
debugstr_w
(
prod_code
),
debugstr_w
(
patch_product
));
if
(
strstrW
(
patch_product
,
prod_code
)
)
ret
=
ERROR_SUCCESS
;
else
ret
=
ERROR_FUNCTION_FAILED
;
msi_free
(
patch_product
);
msi_free
(
prod_code
);
return
ret
;
}
static
UINT
msi_apply_substorage_transform
(
MSIPACKAGE
*
package
,
MSIDATABASE
*
patch_db
,
LPCWSTR
name
)
{
...
...
@@ -416,14 +438,17 @@ static UINT msi_apply_substorage_transform( MSIPACKAGE *package,
r
=
IStorage_OpenStorage
(
patch_db
->
storage
,
name
,
NULL
,
STGM_SHARE_EXCLUSIVE
,
NULL
,
0
,
&
stg
);
if
(
SUCCEEDED
(
r
))
{
ret
=
msi_table_apply_transform
(
package
->
db
,
stg
);
ret
=
msi_check_transform_applicable
(
package
,
stg
);
if
(
ret
==
ERROR_SUCCESS
)
msi_table_apply_transform
(
package
->
db
,
stg
);
else
TRACE
(
"substorage transform %s wasn't applicable
\n
"
,
debugstr_w
(
name
));
IStorage_Release
(
stg
);
ret
=
ERROR_SUCCESS
;
}
else
ERR
(
"failed to open substorage %s
\n
"
,
debugstr_w
(
name
));
return
ret
;
return
ERROR_SUCCESS
;
}
static
UINT
msi_check_patch_applicable
(
MSIPACKAGE
*
package
,
MSISUMMARYINFO
*
si
)
...
...
dlls/msi/msipriv.h
View file @
0d7dc8f9
...
...
@@ -688,6 +688,7 @@ extern UINT MSI_PreviewDialogW( MSIPREVIEW *, LPCWSTR );
/* summary information */
extern
MSISUMMARYINFO
*
MSI_GetSummaryInformationW
(
IStorage
*
stg
,
UINT
uiUpdateCount
);
extern
LPWSTR
msi_suminfo_dup_string
(
MSISUMMARYINFO
*
si
,
UINT
uiProperty
);
extern
LPWSTR
msi_get_suminfo_product
(
IStorage
*
stg
);
/* undocumented functions */
UINT
WINAPI
MsiCreateAndVerifyInstallerDirectory
(
DWORD
);
...
...
dlls/msi/suminfo.c
View file @
0d7dc8f9
...
...
@@ -602,6 +602,22 @@ LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty )
return
strdupAtoW
(
prop
->
u
.
pszVal
);
}
LPWSTR
msi_get_suminfo_product
(
IStorage
*
stg
)
{
MSISUMMARYINFO
*
si
;
LPWSTR
prod
;
si
=
MSI_GetSummaryInformationW
(
stg
,
0
);
if
(
!
si
)
{
ERR
(
"no summary information!
\n
"
);
return
NULL
;
}
prod
=
msi_suminfo_dup_string
(
si
,
PID_REVNUMBER
);
msiobj_release
(
&
si
->
hdr
);
return
prod
;
}
UINT
WINAPI
MsiSummaryInfoGetPropertyA
(
MSIHANDLE
handle
,
UINT
uiProperty
,
UINT
*
puiDataType
,
INT
*
piValue
,
FILETIME
*
pftValue
,
LPSTR
szValueBuf
,
DWORD
*
pcchValueBuf
)
...
...
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