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
92b5b3fd
Commit
92b5b3fd
authored
Feb 10, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Preserve existing advertise strings in the PublishComponents action.
parent
ba9f1f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
17 deletions
+44
-17
action.c
dlls/msi/action.c
+44
-17
No files found.
dlls/msi/action.c
View file @
92b5b3fd
...
...
@@ -5305,13 +5305,14 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
{
MSIPACKAGE
*
package
=
param
;
LPCWSTR
compgroupid
,
component
,
feature
,
qualifier
,
text
;
LPWSTR
advertise
=
NULL
,
output
=
NULL
;
LPWSTR
advertise
=
NULL
,
output
=
NULL
,
existing
=
NULL
,
p
,
q
;
HKEY
hkey
=
NULL
;
UINT
rc
;
MSICOMPONENT
*
comp
;
MSIFEATURE
*
feat
;
DWORD
sz
;
MSIRECORD
*
uirow
;
int
len
;
feature
=
MSI_RecordGetString
(
rec
,
5
);
feat
=
get_loaded_feature
(
package
,
feature
);
...
...
@@ -5338,30 +5339,56 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
rc
=
MSIREG_OpenUserComponentsKey
(
compgroupid
,
&
hkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
text
=
MSI_RecordGetString
(
rec
,
4
);
advertise
=
create_component_advertise_string
(
package
,
comp
,
feature
);
sz
=
strlenW
(
advertise
);
advertise
=
create_component_advertise_string
(
package
,
comp
,
feature
);
text
=
MSI_RecordGetString
(
rec
,
4
);
if
(
text
)
sz
+=
lstrlenW
(
text
);
sz
+=
3
;
sz
*=
sizeof
(
WCHAR
);
output
=
msi_alloc_zero
(
sz
)
;
strcpyW
(
output
,
advertise
);
msi_free
(
advertise
);
{
p
=
msi_alloc
(
(
strlenW
(
advertise
)
+
strlenW
(
text
)
+
1
)
*
sizeof
(
WCHAR
)
);
strcpyW
(
p
,
advertise
)
;
strcatW
(
p
,
text
);
msi_free
(
advertise
);
advertise
=
p
;
}
existing
=
msi_reg_get_val_str
(
hkey
,
qualifier
);
if
(
text
)
strcatW
(
output
,
text
);
sz
=
strlenW
(
advertise
)
+
1
;
if
(
existing
)
{
for
(
p
=
existing
;
*
p
;
p
+=
len
)
{
len
=
strlenW
(
p
)
+
1
;
if
(
strcmpW
(
advertise
,
p
))
sz
+=
len
;
}
}
if
(
!
(
output
=
msi_alloc
(
(
sz
+
1
)
*
sizeof
(
WCHAR
)
)))
{
rc
=
ERROR_OUTOFMEMORY
;
goto
end
;
}
q
=
output
;
if
(
existing
)
{
for
(
p
=
existing
;
*
p
;
p
+=
len
)
{
len
=
strlenW
(
p
)
+
1
;
if
(
strcmpW
(
advertise
,
p
))
{
memcpy
(
q
,
p
,
len
*
sizeof
(
WCHAR
)
);
q
+=
len
;
}
}
}
strcpyW
(
q
,
advertise
);
q
[
strlenW
(
q
)
+
1
]
=
0
;
msi_reg_set_val_multi_str
(
hkey
,
qualifier
,
output
);
end:
RegCloseKey
(
hkey
);
msi_free
(
output
);
msi_free
(
output
);
msi_free
(
advertise
);
msi_free
(
existing
);
/* the UI chunk */
uirow
=
MSI_CreateRecord
(
2
);
...
...
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