З процентами я розобрался на 99.9%. Остался последний вопрос.
Например, чтоби при просмотре замисть 67% било 67.0% (проценти 67.1% єсть )на екране процентов

зделать так

Додаю скрипт
читать дальше »
[Setup]
AppName=MyApp
AppVerName=MyApp
DefaultDirName={pf}\MyApp
[Files]
Source: innocallback.dll; DestDir: {tmp}; Flags: dontcopy
Source: files\*; DestDir: {app}; Flags: recursesubdirs
[code]
type
TTimerProc = procedure(HandleW, Msg, idEvent, TimeSys: LongWord);
var
TimerID: LongWord;
PercentsLabel: TLabel;
function WrapTimerProc(callback: TTimerProc; Paramcount: Integer): longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): longword; external 'SetTimer@user32';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32 stdcall delayload';
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.1n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;
procedure PercentsInstall();
begin
with WizardForm.ProgressGauge do
begin
PercentsLabel.Caption:= 'Установка игры: ' + NumToStr((Position*100)/Max) + ' %';
end;
end;
Procedure MyTimerProc(h, msg, idevent, dwTime: Longword);
Begin
if WizardForm.CurPageID = wpInstalling then PercentsInstall();
End;
procedure DeinitializeSetup();
begin
KillTimer(0, TimerID);
end;
procedure InitializeWizard();
begin
PercentsLabel:= TLabel.Create(WizardForm);
with PercentsLabel do
begin
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + ScaleY(30);
Width:= WizardForm.StatusLabel.Width;
Height:= WizardForm.StatusLabel.Height;
AutoSize:= False;
Transparent := True;
Alignment := taCenter;
Font.Style:= [fsBold, fsItalic];
Font.Size:= 14;
Font.Name:= 'Times New Roman';
Font.Color:= ClMaroon;
Parent:= WizardForm.InstallingPage;
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then
begin
TimerID:= SetTimer(0, 0, 500 {Установка игры}, WrapTimerProc(@MyTimerProc, 4));
end;
end;