Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
604cdff9
Commit
604cdff9
authored
18 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Remove broken volume management code.
parent
5d0873a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/files.c
+3
-110
3 additions, 110 deletions
dlls/msi/files.c
with
3 additions
and
110 deletions
dlls/msi/files.c
+
3
−
110
View file @
604cdff9
...
...
@@ -343,88 +343,6 @@ static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, MSICOMPONENT*
file
->
SourcePath
=
build_directory_name
(
2
,
path
,
file
->
File
);
}
static
BOOL
check_volume
(
LPCWSTR
path
,
LPCWSTR
want_volume
,
LPWSTR
volume
,
UINT
*
intype
)
{
WCHAR
drive
[
4
];
WCHAR
name
[
MAX_PATH
];
UINT
type
;
if
(
!
want_volume
)
return
TRUE
;
if
(
!
(
path
[
0
]
&&
path
[
1
]
==
':'
))
{
if
(
intype
)
*
intype
=
DRIVE_NO_ROOT_DIR
;
return
TRUE
;
}
drive
[
0
]
=
path
[
0
];
drive
[
1
]
=
path
[
1
];
drive
[
2
]
=
'\\'
;
drive
[
3
]
=
0
;
TRACE
(
"Checking volume %s .. (%s)
\n
"
,
debugstr_w
(
drive
),
debugstr_w
(
want_volume
));
type
=
GetDriveTypeW
(
drive
);
TRACE
(
"drive is of type %x
\n
"
,
type
);
if
(
intype
)
*
intype
=
type
;
if
(
type
==
DRIVE_UNKNOWN
||
type
==
DRIVE_NO_ROOT_DIR
||
type
==
DRIVE_FIXED
||
type
==
DRIVE_RAMDISK
)
return
TRUE
;
GetVolumeInformationW
(
drive
,
name
,
MAX_PATH
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
TRACE
(
"Drive contains %s
\n
"
,
debugstr_w
(
name
));
return
(
strcmpiW
(
want_volume
,
name
)
==
0
);
}
static
BOOL
check_for_sourcefile
(
LPCWSTR
source
)
{
DWORD
attrib
=
GetFileAttributesW
(
source
);
return
(
!
(
attrib
==
INVALID_FILE_ATTRIBUTES
));
}
static
UINT
ready_volume
(
MSIPACKAGE
*
package
,
LPCWSTR
path
,
LPWSTR
last_volume
,
MSIRECORD
*
row
,
UINT
*
type
)
{
LPWSTR
volume
=
NULL
;
LPCWSTR
want_volume
=
MSI_RecordGetString
(
row
,
5
);
BOOL
ok
=
check_volume
(
path
,
want_volume
,
volume
,
type
);
TRACE
(
"Readying Volume for %s (%s, %s)
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
want_volume
),
debugstr_w
(
last_volume
));
if
(
check_for_sourcefile
(
path
)
&&
!
ok
)
{
FIXME
(
"Found the Sourcefile but not on the correct volume.(%s,%s,%s)
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
want_volume
),
debugstr_w
(
volume
));
return
ERROR_SUCCESS
;
}
while
(
!
ok
)
{
INT
rc
;
LPCWSTR
prompt
;
LPWSTR
msg
;
prompt
=
MSI_RecordGetString
(
row
,
3
);
msg
=
generate_error_string
(
package
,
1302
,
1
,
prompt
);
rc
=
MessageBoxW
(
NULL
,
msg
,
NULL
,
MB_OKCANCEL
);
msi_free
(
volume
);
msi_free
(
msg
);
if
(
rc
==
IDOK
)
ok
=
check_for_sourcefile
(
path
);
else
return
ERROR_INSTALL_USEREXIT
;
}
msi_free
(
last_volume
);
last_volume
=
strdupW
(
volume
);
return
ERROR_SUCCESS
;
}
struct
media_info
{
UINT
last_sequence
;
LPWSTR
last_volume
;
...
...
@@ -470,7 +388,6 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
LPCWSTR
cab
,
volume
;
DWORD
sz
;
INT
seq
;
UINT
type
;
LPCWSTR
prompt
;
MSICOMPONENT
*
comp
=
file
->
Component
;
...
...
@@ -502,23 +419,15 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
{
mi
->
last_path
=
resolve_folder
(
package
,
comp
->
Directory
,
TRUE
,
FALSE
,
NULL
);
set_file_source
(
package
,
file
,
comp
,
mi
->
last_path
);
rc
=
ready_volume
(
package
,
file
->
SourcePath
,
mi
->
last_volume
,
row
,
&
type
);
MsiSourceListAddMediaDiskW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
mi
->
count
,
volume
,
prompt
);
if
(
type
==
DRIVE_REMOVABLE
||
type
==
DRIVE_CDROM
||
type
==
DRIVE_RAMDISK
)
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
msiobj_release
(
&
row
->
hdr
);
return
rc
;
}
...
...
@@ -563,18 +472,10 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
strcpyW
(
mi
->
last_path
,
mi
->
source
);
strcatW
(
mi
->
source
,
cab
);
rc
=
ready_volume
(
package
,
mi
->
source
,
mi
->
last_volume
,
row
,
&
type
);
if
(
type
==
DRIVE_REMOVABLE
||
type
==
DRIVE_CDROM
||
type
==
DRIVE_RAMDISK
)
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
/* extract the cab file into a folder in the temp folder */
sz
=
MAX_PATH
;
...
...
@@ -591,19 +492,11 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
mi
->
last_path
=
msi_alloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
MSI_GetPropertyW
(
package
,
cszSourceDir
,
mi
->
source
,
&
sz
);
strcpyW
(
mi
->
last_path
,
mi
->
source
);
rc
=
ready_volume
(
package
,
mi
->
last_path
,
mi
->
last_volume
,
row
,
&
type
);
if
(
type
==
DRIVE_REMOVABLE
||
type
==
DRIVE_CDROM
||
type
==
DRIVE_RAMDISK
)
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
mi
->
last_path
);
}
set_file_source
(
package
,
file
,
comp
,
mi
->
last_path
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment