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
68e6071d
Commit
68e6071d
authored
Jun 23, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Factor out publishing the product source list.
parent
fac97bb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
41 deletions
+53
-41
action.c
dlls/msi/action.c
+53
-41
No files found.
dlls/msi/action.c
View file @
68e6071d
...
...
@@ -3339,6 +3339,55 @@ static UINT msi_publish_icons(MSIPACKAGE *package)
return
ERROR_SUCCESS
;
}
static
UINT
msi_publish_sourcelist
(
MSIPACKAGE
*
package
)
{
UINT
r
;
LPWSTR
buffer
;
MSIMEDIADISK
*
disk
;
MSISOURCELISTINFO
*
info
;
static
const
WCHAR
szEmpty
[]
=
{
0
};
buffer
=
strrchrW
(
package
->
PackagePath
,
'\\'
)
+
1
;
r
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
buffer
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
szEmpty
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
szEmpty
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
info
,
&
package
->
sourcelist_info
,
MSISOURCELISTINFO
,
entry
)
{
if
(
!
lstrcmpW
(
info
->
property
,
INSTALLPROPERTY_LASTUSEDSOURCEW
))
msi_set_last_used_source
(
package
->
ProductCode
,
NULL
,
info
->
context
,
info
->
options
,
info
->
value
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
info
->
context
,
info
->
options
,
info
->
property
,
info
->
value
);
}
LIST_FOR_EACH_ENTRY
(
disk
,
&
package
->
sourcelist_media
,
MSIMEDIADISK
,
entry
)
{
MsiSourceListAddMediaDiskW
(
package
->
ProductCode
,
NULL
,
disk
->
context
,
disk
->
options
,
disk
->
disk_id
,
disk
->
volume_label
,
disk
->
disk_prompt
);
}
return
ERROR_SUCCESS
;
}
static
BOOL
msi_check_publish
(
MSIPACKAGE
*
package
)
{
MSIFEATURE
*
feature
;
...
...
@@ -3362,8 +3411,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
{
UINT
rc
;
LPWSTR
packname
;
MSISOURCELISTINFO
*
info
;
MSIMEDIADISK
*
disk
;
HKEY
hkey
=
0
;
HKEY
hukey
=
0
;
HKEY
hudkey
=
0
,
props
=
0
;
...
...
@@ -3376,7 +3423,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szSourceList
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'L'
,
'i'
,
's'
,
't'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
DWORD
langid
;
LPWSTR
buffer
;
DWORD
size
;
...
...
@@ -3454,25 +3500,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
}
msi_free
(
buffer
);
buffer
=
strrchrW
(
package
->
PackagePath
,
'\\'
)
+
1
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
buffer
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
/* FIXME: Need to write more keys to the user registry */
hDb
=
alloc_msihandle
(
&
package
->
db
->
hdr
);
...
...
@@ -3508,26 +3535,11 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc
=
ERROR_SUCCESS
;
}
/* publish the SourceList info */
LIST_FOR_EACH_ENTRY
(
info
,
&
package
->
sourcelist_info
,
MSISOURCELISTINFO
,
entry
)
{
if
(
!
lstrcmpW
(
info
->
property
,
INSTALLPROPERTY_LASTUSEDSOURCEW
))
msi_set_last_used_source
(
package
->
ProductCode
,
NULL
,
info
->
context
,
info
->
options
,
info
->
value
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
info
->
context
,
info
->
options
,
info
->
property
,
info
->
value
);
}
LIST_FOR_EACH_ENTRY
(
disk
,
&
package
->
sourcelist_media
,
MSIMEDIADISK
,
entry
)
{
MsiSourceListAddMediaDiskW
(
package
->
ProductCode
,
NULL
,
disk
->
context
,
disk
->
options
,
disk
->
disk_id
,
disk
->
volume_label
,
disk
->
disk_prompt
);
}
rc
=
msi_publish_sourcelist
(
package
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
msi_publish_icons
(
package
);
rc
=
msi_publish_icons
(
package
);
end:
RegCloseKey
(
hkey
);
...
...
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