windows: fsocc and fix wpd2html install
This commit is contained in:
parent
60b1044842
commit
27c0129c99
@ -151,10 +151,19 @@ string path_wingettempfilename(TCHAR *pref)
|
||||
#endif
|
||||
|
||||
|
||||
bool fsocc(const string &path, int *pc, long long *blocks)
|
||||
bool fsocc(const string &path, int *pc, long long *avmbs)
|
||||
{
|
||||
static const int FSOCC_MB = 1024*1024;
|
||||
#ifdef _WIN32
|
||||
return false;
|
||||
ULARGE_INTEGER freebytesavail;
|
||||
ULARGE_INTEGER totalbytes;
|
||||
if (!GetDiskFreeSpaceEx(path.c_str(), &freebytesavail,
|
||||
&totalbytes, NULL)) {
|
||||
return false;
|
||||
}
|
||||
*pc = int(100 * double(freebytesavail) / double(totalbytes));
|
||||
*avmbs = totalbytes / FSOCC_MB;
|
||||
return true;
|
||||
#else
|
||||
#ifdef sun
|
||||
struct statvfs buf;
|
||||
@ -178,7 +187,6 @@ bool fsocc(const string &path, int *pc, long long *blocks)
|
||||
*pc = int(fpc);
|
||||
if (blocks) {
|
||||
*blocks = 0;
|
||||
#define FSOCC_MB (1024*1024)
|
||||
if (buf.f_bsize > 0) {
|
||||
int ratio = buf.f_bsize > FSOCC_MB ? buf.f_bsize / FSOCC_MB :
|
||||
FSOCC_MB / buf.f_bsize;
|
||||
|
||||
@ -209,7 +209,9 @@ copywpd()
|
||||
chkcp $MINGWBIN/libgcc_s_dw2-1.dll $DEST
|
||||
chkcp $MINGWBIN/libstdc++-6.dll $DEST
|
||||
chkcp $ZLIB/zlib1.dll $DEST
|
||||
chkcp $QTBIN/libwinpthread-1.dll $DEST
|
||||
}
|
||||
|
||||
copychm()
|
||||
{
|
||||
DEST=$FILTERS
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user