[Eric] plugins

Detlev Offenbach detlev at die-offenbachs.de
Sat Jul 14 15:04:55 BST 2007


On Samstag, 14. Juli 2007, Jürgen Urner wrote:
> Detlev Offenbach wrote:
> > On Sonntag, 8. Juli 2007, Jürgen Urner wrote:
> >> Currently from a package zip everything is dumped to eric4plugins.
> >> On uninstall, only the plugin file is removed.
> >>
> >> Would be nice if plugins could be packages, and maybe a force check on
> >> install
> >> that a plugin consists only of one package or one script to enshure
> >> propper removal.
> >>
> >> Jürgen
> >>
> >>
> >> _______________________________________________
> >> Eric mailing list
> >> Eric at riverbankcomputing.com
> >> http://www.riverbankcomputing.com/mailman/listinfo/eric
> >
> > plugin package files should have one file in the top directory, which is
> > the plugin script and one package (directory), that contains als the
> > files. The plugin script should contain a module attribute "packageName"
> > that contains the name of the package as a string. If the uninstall
> > routine doesn't find this attribute, it will give an error message. Maybe
> > this precondition should be checked at installation time.
>
> That would be Eric extracts "packageName" only. What about other files
> (dirs) present in
> a plugin zip? And what happens if a plugin accidently overwrites another
> packages content?
> Wouldn't plugin handling be easier if plugins were only allowed to be
> one single files or one
> single package?

That is exactly the convention for plugin packages. I could modify the 
installer like that:

1) extract the plugin module from the zip file and get the "packageName" 
attribute

2) refuse to install, if it isn't found

3) check if there is a package of the same name already installed in the 
specified area

4) if so and the plugin module is there as well assume an update

5) if no update give the user an info and abort

6) otherwise extract the zip contents and install all files residing in the 
directory given by packageName

Would that be ok?

>
> Another thing ...maybe I've overlooked something ...but a notification
> on unistall plugin
> would be nice to do cleanups.

What kind of notification? There are a bunch of error notifications and a 
success notification.

>
> Jürgen
>

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de



More information about the Eric mailing list