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
604cdff9
Commit
604cdff9
authored
Apr 07, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Remove broken volume management code.
parent
5d0873a7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
107 deletions
+0
-107
files.c
dlls/msi/files.c
+0
-107
No files found.
dlls/msi/files.c
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
,
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
,
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
,
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
);
...
...
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