← Back to team overview

torios-dev team mailing list archive

Re: progress indicator

 

Hi Nio,
(inlines)
On 10/14/2015 05:04 AM, Nio Wiklund wrote:
>
>> Could you send a zenity and dialog script for this?  Or point me to what
>> function I can reuse code from in mkusb or OBI.
> Start from the OBI-installer's
>
> function select_device
>
> and modify it to select target for the bootloader instead of target for
> the whole installation (as in the case of the basic OBI level). See the
> attached screenshot.
select_device
got it!
Thanks :)
>> .....
> I think grub-install can separate the source and target in a way, that
> this should not be a problem.
In my most recent version (not uploaded yet) grub-installer from the
live ISO works as intended.
I tested in a VM with 3 virtual drives.  sda sdb sdc
I installed to sdb with 2 root partitions and one swap
I installed to one of the root partitions
grub installed correctly to sdb now
But, I think offering the ability to  choose the device is a good idea
>>> When confident with zenity in the OBI, I would be ready for ToriOS 1.1.
>>> Of course there will be some minor bug-fixes too, plus up-to-date
>>> versions of all the program packages.
>> sounds good to me
>>> ..
>>>
>>> Den 2015-10-13 kl. 16:02, skrev Israel:
>>>> ....
>>>>
>>>> On 10/13/2015 01:47 AM, Nio Wiklund wrote:
>>>>> Hi Israel.
>>>>>
>>>>> ....
>>>>>
>>>>> I added the option -n to pv and used its output in zenity.
>>>> Ok. that sounds like a good idea
>> [[ "$USEZENITY" == "true" ]] && (tar -xvJf "$trbll" | pv -n -s $(du -sb
>> . | awk '{print$1}')) 2>&1 | zenity --progress
>> --title="$OneButtonInstaller"  "$ZEN_ICON" --text="$Extracting $trbll"
>> --auto-close
>> is what I use now
> But it was pulsating when I was testing - not a progressing bar growing
> from left to right. Something is, or was, not quite right. Do you get a
> progressing bar now?
>
> I have not learned awk yet. Maybe the awkward name is scaring me :-P
hehehe
This is in my most recent (not uploaded ISO)
It works, but maybe not as well as your idea.  I simply took that
command from:
man pv
there is an example for Dialog, so I changed it to zenity.
It goes through all the way, then backs down to half and then
progresses... so there must be something a bit off with that method.
I will look at mkusb code and use yours
>>>>> ....
>>>> So you think I should make an overall progress indicator?
>>> I think it would improve the user experience - not as important as a
>>> progress indicator for extracting from the tarball - but worthwhile.
>> Yeah, I suppose I could just use the log file to do this, and add a
>> progress number occasionally and have an 'overall progress' indicator window
>> This will create more issues, and should wait until later I think, as it
>> will make for a lot more debugging and testing to make sure things work
>> correctly
This turned out to be much easier than I supposed so this is now
implemented.
The functions get called a few times, so occasionally progress goes back
and forth, but it was very simple to do.
>>>>> ...
>>>>> .
>>> Installing the bootloader is a rather quick process, and can be one step
>>> in a crude stepwise indication (like in mkusb).
>>>
>>> Make a persistent live drive with mkusb and watch the progress
>>> indication! (I suggest that you test the bleeding edge version, now 10.3)
>> So would this be better than the current --pulsate ?
>> To me this is sufficient since it does go so quickly as you have said.
> As I wrote before - this is not as important as the progress bar while
> expanding the tarball. But I prefer notifications in one steady overall
> progress window to many short-lived windows, that the user has problems
> to finish reading before they disappear. I suggest that this task can
> wait until after the release of ToriOS 1.0, or be skipped completely.
I have now simply logged most of those windows rather than showing them.
I think pulsate is fine for the bootloader.
The overall progress indicator is much better....
It would be nice to use forms with the progress bar, is that possible?

I will work on select device and let it exist for dialog and zenity both.
>>>> These are all very good ideas Nio!  Thank you!
>>>>> Best regards
>>>>> Nio


-- 
Regards



Follow ups

References