Get RealProgress::FileProgress to work with floating point values
I want to realize a progress bar with the RealProgress plug-in for an update, where I have an indexfile for the files on a DVD with the corresponding filesizes appended after the target path of the file.
Example:
+ /targetpath/ 2456
means:
add file to targetpath with Size 2456 in kB.
My strategy is to parse the whole file, sum up the filesizes to get a overall amount of data to be copied. During the copy process I will read every line again into a "CopyFiles" command. Thus I read the fileSize again.
For the progressbar I will pass the parameter:
"current fileSize" / "Full amount of data" to put this value as a parameter to the progressbar.
But it seems not to be possible to pass a floating point parameter to RealProgress:FileProgress (the doc is not that precise for that function *g*).
I would like to have this new topic as a feature request for this plug-in.
In the meantime I try something like this. Sum up the filesizes until they are at least one percent of the total amount of data to be copied. Then increase the progress bar by 1% and reset the the variable that sums up the filesizes.
Probably this would be also a good implementation idea for this requested feature. Just take the floating point value as a parameter that will be summed up in the "background" and still just pass an integer to the progress bar when the sum hits a certain integer threshold.
Thanks to Afrow UK and everybody else for his work on RealProgress.