good evening
sorry to use google translation to translate
i have the same problem that buttignol
a solution?
thank you
Quote:
Inno setup help disk space
Friends disk size and space available to install is the same when you switch to install on another HD how to fix it
If possible also how to put the point size ex: 149 Gb to 149.50 Gb
Ex: script my script is in two parts.
Quote:
[Code]
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;
Function MbOrTb(Byte: Extended): String;
begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' Mb' else
if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' Gb' else
Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' Tb'
end;
procedure InitializeWizard3();
var
Page: TWizardPage;
lbl: TLabel;
Path: String;
FreeMB, TotalMB: Cardinal;
begin
Path := ExpandConstant('{pf}');
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
Page := PageFromID(wpSelectDir);
lbl := TLabel.Create(Page);
lbl.Width := ScaleX(105);
lbl.Height := ScaleY(43);
lbl.Caption := ExpandConstant('Espaço total do disco : ') + MbOrTb(TotalMB);
lbl.Left := 0;
lbl.Top := 155;
lbl.Parent := Page.Surface;
lbl := TLabel.Create(Page);
lbl.Width := ScaleX(75);
lbl.Height := ScaleY(23);
lbl.Caption := ExpandConstant('Espaço em disco disponível: ') + MbOrTb(FreeMB) + ' (' + IntToStr((FreeMB * 100) div TotalMB) + '%)';
lbl.Left := 0;
lbl.Top := 175;
lbl.Parent := Page.Surface;
lbl := TLabel.Create(Page);
lbl.Width := ScaleX(75);
lbl.Height := ScaleY(23);
lbl.Caption := ExpandConstant('Espaço do Game : ') + MbOrTb(24000);
lbl.Left := 0;
lbl.Top := 195;
lbl.Parent := Page.Surface;
end;
procedure InitializeWizard();
begin
//InitializeWizard1();
//InitializeWizard2();
InitializeWizard3();
end;
Attached Images
|