[Bug 2506] New: Fallout installer reports incorrect disk space
Wine Bugs
wine-bugs at winehq.org
Sun Oct 10 03:49:12 CDT 2004
http://bugs.winehq.org/show_bug.cgi?id=2506
Summary: Fallout installer reports incorrect disk space
Product: Wine
Version: unspecified
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: wine-kernel
AssignedTo: wine-bugs at winehq.org
ReportedBy: wsapplegate at myrealbox.com
Executive summary :
~~~~~~~~~~~~~~~~~~~
Fallout is an old (circa 1997) RPG, published by Interplay. The game doesn't
use a standard installer (like InstallShield or similar). Rather, Interplay
did write a custom installer. While recently trying to reinstall this game, I
was confronted to a weird problem : the reported disk space was about 268 MiB
instead of 2147 MiB as previously reported. Both values are in fact incorrect
(the hard disk has much more than 2 GiB), but the latter allows for a complete
installation, while the former only allows a limited installation, the
remainder being read from the CD-ROM.
Analysis :
~~~~~~~~~~
A quick investigation shows that the problem only occurs since WINE 20040505.
Not coincidentally, this version contains changes to the GetDiskFreeSpace*
functions. Tracing the _SETUP.EXE function calls, it indeed appears it makes
calls to GetDiskFreeSpaceA(), which in turn calls GetDiskFreeSpaceW(). This
functions returns values capped at 2 GiB, with the following parameters : 4096
bytes per sector, 1 sector per cluster, 524287 clusters. From the behaviour
exhibited by the installer, it unfortunately appears the programmers used a
16-bit sized variable to store the clusters value, thus generating incorrect
results when this number is above 65535, as reported by the new
GetDiskFreeSpaceW().
How to reproduce :
~~~~~~~~~~~~~~~~~~
You need (1) a HDD with more than 2 GiB free space and (2) a copy of Fallout.
Then, execute the following steps (assuming your CD-ROM is mounted as D:)
* run "wine 'd:\\_setup.exe'"
* notice the free space reported for the hard disk is incorrect
Solutions and workarounds :
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I personally solved the problem by kludging the GetDiskFreeSpaceW() function
in dlls/kernel/volume.c to report a number of cluster below 65535 (for a 2 GiB
disk, it reports 512 bytes * 64 sectors * 65535 clusters), but it's most
probably incorrect (these values are not consistent with the values reported
by NtQueryVolumeInformationFile()). If you run
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list