Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 12th September 2006, 08:40   #1
saschagottfried
Member
 
Join Date: Aug 2006
Location: Germany
Posts: 54
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.
saschagottfried is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump