FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   ProgressBar (https://fileforums.com/showthread.php?t=105005)

buttignol 04-04-2022 07:51

ProgressBar
 
1 Attachment(s)
How to make the second progress bar

Fill the bar each extracted file

100% for each file extracted

Quote:

if OveralPct<=1000 then ISDoneProgressBar.Position := OveralPct;
LabelPct.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%'
#endif
The way the bar runs almost the same

Thanks

Cesar82 04-04-2022 12:28

Try using percentage values from each Data file in the PctOfTotal parameter of the ISArcExtract function.
Example of equal percentages for 4 files (25% progress for each file).
Code:

if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data2.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data3.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data4.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;


buttignol 04-04-2022 13:23

Quote:

Originally Posted by Cesar82 (Post 496410)
Try using percentage values from each Data file in the PctOfTotal parameter of the ISArcExtract function.
Example of equal percentages for 4 files (25% progress for each file).
Code:

if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data2.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data3.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract (0, 0.25, ExpandConstant('{src}\Data4.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;


Friend is not what I want
It's the files inside .bin
Ex: compact the game in only one.bin file (setup-1.bin)
At the time of extracting the second progress bar runs file by Setup-1.Bin file
Bar 1 - Show Setup-1.Bin Extract
Bar 2 - Shows inside the setup-1.bin
understood

Amigo não é isto que quero
é os arquivos dentro do .bin
Ex: Compacto o jogo em somente um arquivo.bin (Setup-1.bin)
na hora de extrair a segunda barra de progresso correr arquivo por arquivo do Setup-1.bin
Barra 1 - mostra setup-1.bin extraindo
Barra 2 - mostra dentro do setup-1.bin
Entendeu

buttignol 05-04-2022 09:02

Using "FilesMemo"
It would be possible to exchange "FilesMemo"
By progress bar
Can this work?
I tried but I could not
Code:

procedure AddToMemo(File: String);
begin
if ExtractFileExt(File) = '' then
FilesMemo.Lines.Add(RemoveBackslash(File)) else
FilesMemo.Lines.Add('Extraindo: ' + File);
end;

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then PBar.Position := OveralPct;
LabelCurrFileName.Caption := ExpandConstant('{app}\...');
LabelPct.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
LabelTime1.Caption := ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption := ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption := ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;

if (PrevFile <> String(CurrentFile)) and (String(CurrentFile) <> '') then begin
AddToMemo(CurrentFile);
PrevFile:= CurrentFile;
end;
Result := ISDoneCancel;
end;

procedure InitializeWizard();
begin

PrevFile:= '';
PBar2 := TNewProgressBar.Create(WizardForm);
with PBar2 do begin
Parent := WizardForm.InstallingPage;
SetBounds(0,60,417,20);
end;


buttignol 07-04-2022 09:14

1 Attachment(s)
Old Installer (BlackBox)

Dragonis40 10-04-2022 10:36

Still no answers?

buttignol 10-04-2022 12:15

Quote:

Originally Posted by Dragonis40 (Post 496491)
Still no answers?

Yes, nothing so far


All times are GMT -7. The time now is 21:51.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com