Plug-in update

This topic has been viewed 9831 times and has 6 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Plug-in update

Post by enkonyito »

When using a plug-in, how can it indicate there is a new version?
EnkoNyito
User avatar
clanmills
Posts: 33
Joined: Fri May 16, 2014 4:50 am
Country: Camberley, Surrey, England
Contact:

Re: Plug-in update

Post by clanmills »

I don't know if there's an 'official' way to deal with this. However when your plugin loads, your Action class object is run. At that time, I add a menu items to the "Tools" menu.

Code: Select all

public class Action extends PluginAction
{
    public Action()
    {
        putPropertyValue(Property.NAME, "ToWebPlugin...");
        putPropertyValue(Property.MENU, "Tools");
        setEnabled(true);
    }
    ... stuff deleted ...
}
You could inspect something over the internet (using http) and inform the user that a new version is available. And a brief explanation about how to install it.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Plug-in update

Post by Puybaret »

If a plug-in declares an id among the properties of ApplicationPlugin.properties (which is unfortunately not the case for the plug-in you wrote), Sweet Home 3D proposes to describe a new version of a plug-in (or a library) with an update XML element that respects the following DTD.
To ensure the end users receive this information, the update XML element will have to be integrated to SweetHome3DUpdates.xml hosted on sweethome3d.com web server. It's the file that is read at program launch when a user has Internet access to sweethome3d.com and the Check updates at program launch option is selected in the preferences pane. At the moment, editing SweetHome3DUpdates.xml can only be made by the webmaster of sweethome3d.com, i.e. me. [;)]
Hope you'll understand that I'll accept to edit that file only for very important udpates.
Emmanuel Puybaret, Sweet Home 3D creator
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Plug-in update

Post by enkonyito »

Trying to write a tutorial (I will submit you) for setting up the SunFlow rendering engine, I found a new revision of the PhotoRenderer.java and PhotoRenderer.properties files.
The integration of these new settings in the plug-in is an important update?
EnkoNyito
starrunner
Posts: 40
Joined: Wed Sep 15, 2010 10:44 am

Re: Plug-in update

Post by starrunner »

Hi Emmanuel,

so you are saying even if we integrate the ID it wouldn't help, as you wouldn't integrate new versions of our plugins into SweetHome3DUpdates.xml?

By the way, I couldn't find something about the ID in the Plug-in developer's guide. Only the JavaDoc of Plugin.java states:
The id key gives an optional id to the plug-in, which can be useful to determine if an update for this plug-in is available during libraries updates checking.
For me it looks like that this option was intended for your own plugins.

Just an idea: What about an optional updateUrl in the ApplicationPlugin.properties, which points to an URL that uses the same or a similar DTD?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Plug-in update

Post by Puybaret »

I never stated that I'll refuse to update SweetHome3DUpdates.xml for contributed plug-ins, and I don't understand how you can conclude that I programmed this feature for me exclusively since I even didn't use it myself! It wasn't possible for enkonyito's plug-in when he made his comment, because he didn't set any ID in the previous version of his plug-in (I was also on vacation at the end of November and forgot to answer here when I got back).

There's no information about this ID in the Plug-in developer's guide because the update warning was added afterwards.
What about an optional updateUrl in the ApplicationPlugin.properties, which points to an URL that uses the same or a similar DTD?
That's a nice idea but not so easy to program because it would require to merge the update information to display only one dialog box to the user. I fear also that it could be a way to spam users with messages I couldn't control.
Emmanuel Puybaret, Sweet Home 3D creator
starrunner
Posts: 40
Joined: Wed Sep 15, 2010 10:44 am

Re: Plug-in update

Post by starrunner »

Hi Emmanuel,
I never stated that I'll refuse to update SweetHome3DUpdates.xml for contributed plug-ins
Oh, apologies, no offense, it seems that I've got the meaning of this statement wrong:
I'll accept to edit that file only for very important udpates.
I have to admit that the intention of your first post was not really clear to me and I might have interpreted it in a wrong direction.

So lets try to make it clear:
  1. How should the ID look like - esp. to prevent name clashes (in other words - what's the difference to just use the plugin name or class)?
  2. How does the workflow of a new update look like esp. on which channel does a plugin developer provide a new update-element to you?
  3. When will that update get promoted to your XML file?
  4. If that is the official way of providing easy updates for a plugin to the end user, could you integrate it into the Plug-in developer's guide?
    [/list=1]

    A last word about "spamming" with the updateUrl: As soon as someone has installed a 3rd party plugin, you have already lost control [>:)].

    Seriously, if every plugin developer uses his own update stratgegy, because there is no official way for updates, the user might be annoyed even more by the different configuration, messages, intervals...
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest