|
#11
|
||||
|
||||
|
Thanks Razor12911 I tried many ways but failed error when compiling (Line 19 Identifier expected) inno setup 5.5.2 unicode
[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(Float: Extended): String; begin if Float < 1024 then Result:= NumToStr(Float)+' '+ 'MB'else if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+' '+'GB' else Result:= NumToStr(Float/(1024*1024))+' '+'TB'; end; procedure InitializeWizard3(); begin procedure DirEditOnChange(Sender: TObject); var Path: String; Page: TWizardPage; lbl: TLabel; FreeMB, TotalMB: Cardinal; begin Path := WizardForm.DirEdit.Text; 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; WizardForm.DirEdit.OnChange:= @DirEditOnChange; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); InitializeWizard3(); end; |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |