installer: corrections wizard C# (System.Management, AppContext.BaseDirectory), fix script Inno Setup GetDiskFreeSpaceEx, ajout SUIVI_INSTALLER
This commit is contained in:
@@ -84,11 +84,20 @@ begin
|
||||
Result := Exec('podman.exe', 'machine list', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
|
||||
end;
|
||||
|
||||
function GetDiskFreeSpaceEx(
|
||||
lpDirectoryName: string;
|
||||
var lpFreeBytesAvailableToCaller: Int64;
|
||||
var lpTotalNumberOfBytes: Int64;
|
||||
var lpTotalNumberOfFreeBytes: Int64
|
||||
): Boolean;
|
||||
external 'GetDiskFreeSpaceExW@kernel32.dll stdcall';
|
||||
|
||||
function GetFreeDiskSpaceMB(const Path: string): Cardinal;
|
||||
var
|
||||
FreeBytes, TotalBytes: Int64;
|
||||
Dummy: Int64;
|
||||
begin
|
||||
if GetDiskFreeSpaceEx(Path, FreeBytes, TotalBytes, nil) then
|
||||
if GetDiskFreeSpaceEx(Path, FreeBytes, TotalBytes, Dummy) then
|
||||
Result := Cardinal(FreeBytes div (1024 * 1024))
|
||||
else
|
||||
Result := 0;
|
||||
|
||||
Reference in New Issue
Block a user