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
7d10d1d2
Commit
7d10d1d2
authored
Feb 26, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Store the media type and set the last used source type accordingly.
parent
6e2048bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
18 deletions
+29
-18
action.c
dlls/msi/action.c
+0
-10
files.c
dlls/msi/files.c
+29
-8
No files found.
dlls/msi/action.c
View file @
7d10d1d2
...
...
@@ -3468,16 +3468,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
buffer
=
msi_dup_property
(
package
,
cszSourceDir
);
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
buffer
);
msi_free
(
buffer
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
/* FIXME: Need to write more keys to the user registry */
hDb
=
alloc_msihandle
(
&
package
->
db
->
hdr
);
...
...
dlls/msi/files.c
View file @
7d10d1d2
...
...
@@ -59,6 +59,7 @@ static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
struct
media_info
{
UINT
disk_id
;
UINT
type
;
UINT
last_sequence
;
LPWSTR
disk_prompt
;
LPWSTR
cabinet
;
...
...
@@ -504,6 +505,8 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
{
MSIRECORD
*
row
;
LPWSTR
source_dir
;
LPWSTR
source
;
DWORD
options
;
UINT
r
;
static
const
WCHAR
query
[]
=
{
...
...
@@ -539,6 +542,9 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
source_dir
=
msi_dup_property
(
package
,
cszSourceDir
);
lstrcpyW
(
mi
->
source
,
source_dir
);
PathStripToRootW
(
source_dir
);
mi
->
type
=
GetDriveTypeW
(
source_dir
);
if
(
file
->
IsCompressed
&&
mi
->
cabinet
)
{
if
(
mi
->
cabinet
[
0
]
==
'#'
)
...
...
@@ -554,12 +560,30 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
lstrcatW
(
mi
->
source
,
mi
->
cabinet
);
}
msi_package_add_media_disk
(
package
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
mi
->
disk_id
,
mi
->
volume_label
,
mi
->
disk_prompt
);
options
=
MSICODE_PRODUCT
;
if
(
mi
->
type
==
DRIVE_CDROM
||
mi
->
type
==
DRIVE_REMOVABLE
)
{
source
=
source_dir
;
options
|=
MSISOURCETYPE_MEDIA
;
}
else
if
(
package
->
BaseURL
&&
UrlIsW
(
package
->
BaseURL
,
URLIS_URL
))
{
source
=
package
->
BaseURL
;
options
|=
MSISOURCETYPE_URL
;
}
else
{
source
=
mi
->
source
;
options
|=
MSISOURCETYPE_NETWORK
;
}
if
(
mi
->
type
==
DRIVE_CDROM
||
mi
->
type
==
DRIVE_REMOVABLE
)
msi_package_add_media_disk
(
package
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
mi
->
disk_id
,
mi
->
volume_label
,
mi
->
disk_prompt
);
msi_package_add_info
(
package
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
source
);
options
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
source
);
msi_free
(
source_dir
);
return
ERROR_SUCCESS
;
...
...
@@ -602,14 +626,11 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m
{
LPWSTR
source
=
msi_dup_property
(
package
,
cszSourceDir
);
BOOL
matches
;
UINT
type
;
PathStripToRootW
(
source
);
type
=
GetDriveTypeW
(
source
);
matches
=
source_matches_volume
(
mi
,
source
);
msi_free
(
source
);
if
((
type
==
DRIVE_CDROM
||
type
==
DRIVE_REMOVABLE
)
&&
!
matches
)
if
((
mi
->
type
==
DRIVE_CDROM
||
mi
->
type
==
DRIVE_REMOVABLE
)
&&
!
matches
)
{
rc
=
msi_change_media
(
package
,
mi
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
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