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
d08378a0
Commit
d08378a0
authored
Jan 12, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix parsing of patch product codes (valgrind).
parent
94f4c0f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
action.c
dlls/msi/action.c
+1
-2
msi.c
dlls/msi/msi.c
+9
-12
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/action.c
View file @
d08378a0
...
@@ -465,8 +465,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
...
@@ -465,8 +465,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
WCHAR
**
msi_split_string
(
const
WCHAR
*
str
,
WCHAR
sep
)
static
LPWSTR
*
msi_split_string
(
LPCWSTR
str
,
WCHAR
sep
)
{
{
LPCWSTR
pc
;
LPCWSTR
pc
;
LPWSTR
p
,
*
ret
=
NULL
;
LPWSTR
p
,
*
ret
=
NULL
;
...
...
dlls/msi/msi.c
View file @
d08378a0
...
@@ -299,7 +299,8 @@ done:
...
@@ -299,7 +299,8 @@ done:
return
r
;
return
r
;
}
}
static
UINT
get_patch_product_codes
(
LPCWSTR
szPatchPackage
,
WCHAR
**
product_codes
)
static
UINT
get_patch_product_codes
(
LPCWSTR
szPatchPackage
,
WCHAR
***
product_codes
)
{
{
MSIHANDLE
patch
,
info
=
0
;
MSIHANDLE
patch
,
info
=
0
;
UINT
r
,
type
;
UINT
r
,
type
;
...
@@ -332,23 +333,22 @@ static UINT get_patch_product_codes( LPCWSTR szPatchPackage, WCHAR **product_cod
...
@@ -332,23 +333,22 @@ static UINT get_patch_product_codes( LPCWSTR szPatchPackage, WCHAR **product_cod
}
}
r
=
MsiSummaryInfoGetPropertyW
(
info
,
PID_TEMPLATE
,
&
type
,
NULL
,
NULL
,
codes
,
&
size
);
r
=
MsiSummaryInfoGetPropertyW
(
info
,
PID_TEMPLATE
,
&
type
,
NULL
,
NULL
,
codes
,
&
size
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
==
ERROR_SUCCESS
)
msi_free
(
codes
);
*
product_codes
=
msi_split_string
(
codes
,
';'
);
else
*
product_codes
=
codes
;
done:
done:
MsiCloseHandle
(
info
);
MsiCloseHandle
(
info
);
MsiCloseHandle
(
patch
);
MsiCloseHandle
(
patch
);
msi_free
(
codes
);
return
r
;
return
r
;
}
}
static
UINT
MSI_ApplyPatchW
(
LPCWSTR
szPatchPackage
,
LPCWSTR
szProductCode
,
LPCWSTR
szCommandLine
)
static
UINT
MSI_ApplyPatchW
(
LPCWSTR
szPatchPackage
,
LPCWSTR
szProductCode
,
LPCWSTR
szCommandLine
)
{
{
UINT
r
;
UINT
r
,
i
;
DWORD
size
;
DWORD
size
;
LPCWSTR
cmd_ptr
=
szCommandLine
;
LPCWSTR
cmd_ptr
=
szCommandLine
;
LPWSTR
beg
,
end
,
cmd
,
codes
=
NULL
;
LPWSTR
cmd
,
*
codes
=
NULL
;
BOOL
succeeded
=
FALSE
;
BOOL
succeeded
=
FALSE
;
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
' '
,
'P'
,
'A'
,
'T'
,
'C'
,
'H'
,
'='
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
' '
,
'P'
,
'A'
,
'T'
,
'C'
,
'H'
,
'='
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
...
@@ -376,17 +376,14 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
...
@@ -376,17 +376,14 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS
r
=
MsiConfigureProductExW
(
szProductCode
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_DEFAULT
,
cmd
);
r
=
MsiConfigureProductExW
(
szProductCode
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_DEFAULT
,
cmd
);
else
else
{
{
beg
=
codes
;
for
(
i
=
0
;
codes
[
i
];
i
++
)
while
((
end
=
strchrW
(
beg
,
'}'
)))
{
{
*
(
end
+
1
)
=
'\0'
;
r
=
MsiConfigureProductExW
(
codes
[
i
],
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_DEFAULT
,
cmd
);
r
=
MsiConfigureProductExW
(
beg
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_DEFAULT
,
cmd
);
if
(
r
==
ERROR_SUCCESS
)
if
(
r
==
ERROR_SUCCESS
)
{
{
TRACE
(
"patch applied
\n
"
);
TRACE
(
"patch applied
\n
"
);
succeeded
=
TRUE
;
succeeded
=
TRUE
;
}
}
beg
=
end
+
2
;
}
}
if
(
succeeded
)
if
(
succeeded
)
...
...
dlls/msi/msipriv.h
View file @
d08378a0
...
@@ -958,6 +958,7 @@ extern void msi_feature_set_state(MSIPACKAGE *, MSIFEATURE *, INSTALLSTATE);
...
@@ -958,6 +958,7 @@ extern void msi_feature_set_state(MSIPACKAGE *, MSIFEATURE *, INSTALLSTATE);
extern
MSIASSEMBLY
*
load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
MSIASSEMBLY
*
load_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
UINT
install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
UINT
install_assembly
(
MSIPACKAGE
*
,
MSICOMPONENT
*
);
extern
WCHAR
*
font_version_from_file
(
const
WCHAR
*
);
extern
WCHAR
*
font_version_from_file
(
const
WCHAR
*
);
extern
WCHAR
**
msi_split_string
(
const
WCHAR
*
,
WCHAR
);
/* media */
/* media */
...
...
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