View Full Version : File Size during install...
coldmist
10-18-2009, 03:13 PM
I don't like the default "Stages" progress bar. I offer the option to copy a lot of big PDF's to the user's hard drive, and the progress bar doesn't show valid information during the copy stage, and customers wonder if it has locked up, etc.
I have since switched it over to showing the install progress per file (fairly easy via e_CurrentItemPct), however, I would really like to upgrade it with 2 tweaks.
1) I would like to only update the per-file progress bar if the current file's size is > 1MB so that it doesn't blink a lot for small files, but still shows ones taking >2 seconds to install/copy. How can I tell the size of the current file being installed?
2) Is there a way to have the primary progress bar show the percentage of total bytes installed vs total bytes to install? At that point, I don't care what "stage" it's in.
coldmist
10-18-2009, 03:45 PM
At the minimum, can I get a count of "external" files there are, and I can at least show '5 of 135 PDF files' to show how far there is to go?
jassing
10-19-2009, 11:36 PM
You can code it however you want -- so you can have it display progress bars any any text you want at your whim....
as for how to get a file's size... if you're using external files; you can just inspect the file at runtime... if you're using internal files; "off the top of my head" the answer is no... I know this was a request of mine sometime ago to include the file's sizes (compressed/uncompressed) with SetupData.GetFileList() results....
I would think your best bet is to change your "while installing" screen to a dual progress bar screen; this shows progress "overall" and "per file" so you can see that something is happening.
coldmist
10-21-2009, 11:41 PM
You can code it however you want -- so you can have it display progress bars any any text you want at your whim....
I figured there was a way, but I don't know how, hence this thread.
as for how to get a file's size... if you're using external files; you can just inspect the file at runtime... if you're using internal files; "off the top of my head" the answer is no... I know this was a request of mine sometime ago to include the file's sizes (compressed/uncompressed) with SetupData.GetFileList() results....
External files. Ok, so I found an example of getting sum of total bytes of files I will need to copy, and am looking at updating the overall progress bar based on bytes copied for multiple files.
I would think your best bet is to change your "while installing" screen to a dual progress bar screen; this shows progress "overall" and "per file" so you can see that something is happening.
I think I will, but I don't like their default "stages" for the top bar. I want it to reflect % of total file bytes copied/to be copied.
Right now in the "On Preload" of the "While Installing" dialog, I am trying to find all files, and add up their sizes.
But, I'm not sure how to then use that number to update the 'DlgProgressBar.SetPos(CTRL_PROGRESS_BAR_01, e_StagePct);' value with a percentage of overall bytes copied.
When is that code executed? Every 1%? Every 1 second? I couldn't find anything on that in the help.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.