Easy Online Updater (EOU by RSH & contributors)

Miscellaneous tools
Message
Author
User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

Easy Online Updater (EOU by RSH & contributors)

#1 Post by ASRI éducation »

Edit : Update & infos by RSH => http://murga-linux.com/puppy/viewtopic. ... 259#691259

------------------------------
I appreciate the utility "LazY-Automated-Update (RSH)" http://murga-linux.com/puppy/viewtopic. ... 346#671346 & http://murga-linux.com/puppy/viewtopic. ... 865#690865
This is a simple and convenient way to provide users maintain their OS update.
The creator of this script (RSH) has not initiated discussion specific to this application, so that I would post to share/provide/improve this innovation.
Last edited by ASRI éducation on Mon 27 May 2013, 20:53, edited 8 times in total.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#2 Post by ASRI éducation »

For update & info by RSH, see below.
Last edited by ASRI éducation on Sun 12 May 2013, 12:33, edited 2 times in total.

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#3 Post by R-S-H »

The Easy Online Updater 0.6.6!

2013-03-16 by RSH and stu90 (Tray Application)
Again a nice Teamwork (remembering LazY FReD?)

Image

Thanks, ASRI éducation.

So, you think this could be a useful application for developers to keep users of their Puppies easily up to date?

Then one should have the complete package to be able to use and to provide to the users all its features.

To make a PET that supports all functions of Easy Online Updater, the Make PET for Web Upates Package (LazY-MP4WU-1.0.0.pet) is recommended - if one does not want to do everything needed manually. It needs dir2pet installed. After installing LazY-MP4WU-1.0.0.pet there is a right-click option Make PET for Web Updates in ROX right-click-menu.

After creating a PET for Web Updates there will be several files created (see screenshot). One is the package, a second one is an executable script and then there are four text files - all are named like the created PET with extensions.

The text files are made to provide online information which can be downloaded to read them before installing from within the gui. It creates files for EN, FR, ES, DE - just edit the English version and the one from your language. English version is used by default if no other file related to the users language settings is found. To make files for other languages just make a copy or add (copy & paste) your "code" to /usr/local/mkpet4web/info_files, to get such file automatically at next use.

The executable script is for the use to see the results of the edited text file in a GUI, just like the user/downloader would see it. It grabs automatically EN version. To switch between languages make comments out of the unneeded lines inside the script:

Code: Select all

#!/bin/bash
# Do make comments (#) out of those lines, that file you currently do not edit...
. LazY-MP4WU-1.0.0.pet.info-fr.txt
. LazY-MP4WU-1.0.0.pet.info-es.txt
. LazY-MP4WU-1.0.0.pet.info-de.txt
. LazY-MP4WU-1.0.0.pet.info.txt
Xdialog --title "LazY-MP4WU-1.0.0.pet" --msgbox "$UPDATEINFOTXT" 0 0
As you can see: LazY-MP4WU-1.0.0.pet.info.txt (which is the EN file) is taken at last, so its content is presented in the gui.

If you want to provide a screenshot to be watched online from within the gui, just name it as the PET is named and add .screenshot.jpg to it (must be .jpg).

To set the Easy Online Updater ready to use for your own purposes, just edit the URLs in /usr/local/LazY-Automated-Update/update-url - they are currently set to:

Code: Select all

NEWSERVER="http://smokey01.com/RSH/LazY-Puppy/Updates/"
INFSERVER="http://smokey01.com/RSH/LazY-Puppy/Updates/Information/"
and it provides different directories for the PET and for the additional info stuff.

One can only use this if one has or can provide access to the download server via wget - usually "free file hosting" surely does not work.

Ok, I hope I did not forget anything. I have tested both pets again, so it should work. If not, do a post and we will get it ready - though it should be already!

Note: the developer has to set automatic search function manually - it is not set after installing the PET!!!

RSH

EDIT:

Arrghh, I did forgot some information!

The Make PET for Web Upates Application creates also a pinstall.sh script to make the pet able to be marked as installed after installing it. If one has already a pinstall.sh script inside the directory to make a PET of - don't worry. It will be renamed and after that included into the new one. The script uses:

Code: Select all

cat >> $MP/pinstall.sh << EOF $MP/local_pinstall.sh
EOF
for this, so it should be included completely...

More and updated Information to 0.6.0 here
Informations on changes in 0.6.1 here
Informations on changes in 0.6.2 here

Informations on changes in 0.6.4
Fixed a small issue when writing $TESTSERVER to its file (now previous file is replaced)
GtkDialog-GUI-Icons set from icon=\"gtk-xxx\" to stock=\"gtk-xxx\" (hope this helps to show the icons in other/newer puppies)

Informations on changes in Easy Online Updater 0.6.5
Added some suggestions by ASRI Education (since he'd already made the changes, I just did replace those files)

Also the MakePET4WebUpdates 1.0.1 (creates now md5sum file to the created PET)
Attachments
LazY-MP4WU-1.0.1.pet
(6.22 KiB) Downloaded 609 times
LazY-EsOnU-0.6.6.pet
(36.73 KiB) Downloaded 594 times
image-2.jpg
Created files after creating a Package for Web Updates (except the screenshot image) (Screenshot NOT updated)
(23.4 KiB) Downloaded 1718 times
Last edited by R-S-H on Sat 11 May 2013, 21:50, edited 11 times in total.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#4 Post by ASRI éducation »

R-S-H wrote:I have updated the Easy Online Updater to Version 0.5.1.
...
The GUI now includes a button to refresh the list of available updates to exclude already installed packages.
Hello,

This new button is it useful? it seems to me that the previous version of your script did this automatically.

Proposal
Another button could be added (next to the button "refresh"): "Installed Packages" could display a GUI in order to inform the user of already installed packages (/usr/local/Lazy-Update-Automated/installed
Together, it would be possible to modify the pinstall.sh integrated in packages update: instead of creating an empty file in folder "installed", the script pinstall.sh could copy the contents of the file *.pet.info.txt placed on the server. Thus, the user could view the contents of the packages already installed.

Info : I've updated local FR
Attachments
LazY-EsOnU-0.5.1_localeFR_20130313.pet
(2.31 KiB) Downloaded 585 times

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#5 Post by R-S-H »

it seems to me that the previous version of your script did this automatically.
Only after a restart of the gui!
Proposal
Another button could be added (next to the button "refresh"): "Installed Packages" could display a GUI in order to inform the user of already installed packages (/usr/local/Lazy-Update-Automated/installed
Together, it would be possible to modify the pinstall.sh integrated in packages update: instead of creating an empty file in folder "installed", the script pinstall.sh could copy the contents of the file *.pet.info.txt placed on the server. Thus, the user could view the contents of the packages already installed.
Ok, I will give this some time on tomorrow (friday). Any wishes that could be released in two or three hours?

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#6 Post by ASRI éducation »

R-S-H wrote:
it seems to me that the previous version of your script did this automatically.
Only after a restart of the gui!
It's true, you're right. So your button is useful!

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#7 Post by R-S-H »

Ok, here it is.

The Easy Online Updater 0.6.0!

2013-03-16 by RSH and stu90 (Tray Application)
Again a nice Teamwork (remembering LazY FReD?)

This uses GtkDialog4 (0.8.x) and Yad-0.12 and up.

Download Easy Online Updater

Tab 1 shows available Updates on Server (currently 2)
Image

Tab 2 shows already installed Updates (currently none)
Image

Tab 3 shows Settings and Application Info
Image
Proposal
Another button could be added (next to the button "refresh"): "Installed Packages" could display a GUI in order to inform the user of already installed packages (/usr/local/Lazy-Update-Automated/installed
Together, it would be possible to modify the pinstall.sh integrated in packages update: instead of creating an empty file in folder "installed", the script pinstall.sh could copy the contents of the file *.pet.info.txt placed on the server. Thus, the user could view the contents of the packages already installed.
It's done.

I've tested it several times and seems to work fine. Content of Online Information is now saved instead of an empty file. Currently this works only, if updating from within the Easy Online Updater GUI (its install function). If the User is only downloading and then moving the PET to another location then there will be still saved only the empty file.

Thanks to stu90 the Easy Online Updater has now a Tray Application which will appear in the System Tray only if new Updates are available. If so, the user can do a right-click on the Tray Application and choose either to download all available Updates or to execute Easy Online Updater GUI or to quit the Tray Application. For the Tray Application YAD is needed to be installed!

To hack this Tray Application Script and also to put this all together and get synchronized, has been a lot of more work and time needed, as i did plan for it. I hope this will be worth it.

Btw: the Name LazY Puppy will be replaced with the Name of your Puppy, because it's $DISTRO_NAME used for this!

Would be nice to see it's been used by developers for their Puppies and to make the Update-Life a little easier for the users of those Puppies...

RSH

P.S.

Currently the French locales are not included, because this needs some more translations. I have sent the file to ASRI éducation for doing the French translations.
So, just a matter of time...
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#8 Post by R-S-H »

Hi.

After 10 new downloads of version 0.6.0 I got a pm about the yad tray application not working - over here everything is working fine. So, this is a bit confusing me, because it's a modified Lucid where it doesn't work - as well as LazY Puppy...

Anyone else experienced such problems?

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#9 Post by stu91 »

Hi R-S-H
testing stand alone the updated tray app included in your The Easy Online Updater 0.6.0 works for me on Exprimo puppy - it downloaded two update .pets and two .txt files to /root/Downloads and echos downloaded pets to /usr/local/LazY-Automated-Update/downloaded_list file - as all current updates are now downloaded the tray app doesn't show in the system tray again until new updates are available on the server but that is how it is supposed to be.
Anymore info on what is not working for whom ever it was that pm'ed you - have they tried running /usr/local/LazY-Automated-Update/lazy-auto-update-tray-app in terminal?

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#10 Post by R-S-H »

Hi stu91,

he (ASRI Education) mentioned something about the command --kill-parent.

That's all I can say.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#11 Post by ASRI éducation »

R-S-H wrote:Hi stu91,

he (ASRI Education) mentioned something about the command --kill-parent.

That's all I can say.
I used the version integrated in Lucid528 (yad 0.8.1).
I installed Yad 0.16.1, but it did not work.
Since then, I realized that I needed to replace the binary /usr/bin/yad by a shortcut to /usr/local/bin/yad
Now everything is ok, I have no more error message.

Note : users must be informed that a recent version of yad is required.

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#12 Post by ASRI éducation »

@ RSH
I took a few hours to enjoy your updated and truly is excellent.

Given the importance of this utility, I would like some suggestions.

- 1 -
If all updates are installed, the user does not have access to the GUI. The user can not change preferences or view information about installed packages. I therefore propose to retain the Xdialog (without timeout) and remove the exit.

Code: Select all

	# New, not yet installed Updates available? If not, exit
	EMPTY=`cat $serverpetlist`
	if [ "$EMPTY" = "" ]; then
		if [ "$RUNAS" != "auto" ]; then # if called from menu
			echo "$ALLUPDATESINSTALLEDMSG"
			Xdialog --title "$AUTOUPDATETXT" --msgbox "$ALLUPDATESINSTALLEDMSG" 0 0
			#Xdialog --title "$AUTOUPDATETXT" --timeout 5 --msgbox "$ALLUPDATESINSTALLEDMSG" 0 0
		fi
		#exit 3
	fi

- 2 -
I think it might be interesting to change the location of a few buttons.
I therefore propose an update of /usr/local/LazY-Automated-Update/lazy-auto-update
cf. attachments


- 3 -
Replacing a duplicate subtitle

Code: Select all

<frame $DOAUTOUPDATEOPTFRMTXT >
replaced by
<frame $INFOAUTHOR >

- 4 -
local : addition

Code: Select all

INFOAUTHOR="Auteurs et version"
local : change

Code: Select all

REFRESHBTNTXT="Refresh Application List"
REFRESHBTNTXTTT="Refresh GUI's application List to hide already installed Updates"
replaced by

Code: Select all

REFRESHBTNTXT="Refresh"
REFRESHBTNTXTTT="Refresh GUI's application List"

These are obviously only modest proposals.
Attachments
LazY-EsOnU-0.6.0_fichiers_modifies.tar.gz
new lazy-auto-update with locals
(8.7 KiB) Downloaded 554 times
LazY-EsOnU-0.6.0_fichiers_modifies3.jpg
(17.04 KiB) Downloaded 1354 times
LazY-EsOnU-0.6.0_fichiers_modifies2.jpg
(14.88 KiB) Downloaded 1368 times
LazY-EsOnU-0.6.0_fichiers_modifies1.jpg
(22.93 KiB) Downloaded 1341 times

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#13 Post by R-S-H »

ASRI éducation wrote:Note : users must be informed that a recent version of yad is required.
Yes, but the user has to read offered informations carefully as well. :wink:
http://murga-linux.com/puppy/viewtopic. ... 431#692431
http://murga-linux.com/puppy/viewtopic.php?p=692431#692431 wrote:This uses GtkDialog4 (0.8.x) and Yad-0.12 and up.
If all updates are installed, the user does not have access to the GUI. The user can not change preferences or view information about installed packages. I therefore propose to retain the Xdialog (without timeout) and remove the exit.
... ... ...
I think it might be interesting to change the location of a few buttons.
I therefore propose an update of /usr/local/LazY-Automated-Update/lazy-auto-update
Yes, these changes do make sense - absolutely!

I have added your modifications and also the FR locales to the package and updated to 0.6.1, thanks.

Download Version 0.6.1 here

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#14 Post by ASRI éducation »

R-S-H wrote:
ASRI éducation wrote:Note : users must be informed that a recent version of yad is required.
Yes, but the user has to read offered informations carefully as well. :wink:
http://murga-linux.com/puppy/viewtopic. ... 431#692431
http://murga-linux.com/puppy/viewtopic.php?p=692431#692431 wrote:This uses GtkDialog4 (0.8.x) and Yad-0.12 and up.
You're right RSH information is present. I misread.

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#15 Post by R-S-H »

Hi.

I ave noticed: when offline after the X desktop is started, the Tray-Application appears in the System Tray and tool tip says there are 0 updates available.

Should I change this to: the Tray-Application is not appearing in the system tray when offline after the X desktop is started?

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#16 Post by ASRI éducation »

R-S-H wrote:Hi.

I ave noticed: when offline after the X desktop is started, the Tray-Application appears in the System Tray and tool tip says there are 0 updates available.

Should I change this to: the Tray-Application is not appearing in the system tray when offline after the X desktop is started?

RSH
I had not noticed this problem because my computer is always connected to the Internet.
So I unplugged my ethernet cable...

I thought the icon "EOU" is displayed in the taskbar only when an update was available.

The utility should only appear when: internet connection is functional and that updates are available.

If the Internet connection is not ok, or if no update is available, the utility EOU should not occur.

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#17 Post by R-S-H »

Ok.

I have changed this.

File /usr/local/LazY-Automated-Update/zzz-autorun-lazy-auto-update (which appears in /root/Startup when automatic search is activated) checks now for existing server adress of smokey10.com.

Code: Select all

# Check, if server is available
TESTSERVER="174.132.189.156" # smokey01.com, change this to your server adress
ping -4 -c 1 "$TESTSERVER"
if [[ "$?" == "1" ]]; then
	exit 1
fi
Change TESTSERVER="174.132.189.156" to your server adress to make sure it's been tested (could be down altought the internet connection is working).

The PET is here!
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#18 Post by ASRI éducation »

EOU 0.6.2 is a excellent version !

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#19 Post by ASRI éducation »

I know that RSH is preparing a new version of the package "EOU".
I'm impatient.

R-S-H
Posts: 487
Joined: Mon 18 Feb 2013, 12:47

#20 Post by R-S-H »

ASRI éducation wrote:I know that RSH is preparing a new version of the package "EOU".
I'm impatient.
Oh, sorry.

I'm currently not working on this here. Didn't you tell me in one of your last pm's that you couldn't get access to your repository using LazY FReD? So, LazY FReD and the Easy Online Updater are using exactly the same code to search for files on the web server. Which means, you wouldn't get acces to your repository using the Easy Online Updater as well.

Because of that fact I assumed you wouldn't be interested in this here anymore.

Did you solve this? How?

Is there still a need for any updated version?

RSH

EDIT: 2013-04-08

I have uploaded a version 0.6.4
[b][url=http://lazy-puppy.weebly.com]LazY Puppy Home
The new LazY Puppy Information Centre[/url][/b]

Post Reply