View Single Post
  #780  
Old 04-11-2013, 08:58
Darkangel5 Darkangel5 is offline
Registered User
 
Join Date: Oct 2013
Location: FRANCE
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Darkangel5 is on a distinguished road
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

Last edited by Darkangel5; 04-11-2013 at 09:18.
Reply With Quote