[QGIS-Developer] Change plugin name

Alex M tech_dev at wildintellect.com
Tue Nov 27 12:57:21 PST 2018


On 11/27/18 04:54, Borys Jurgiel wrote:
> Dnia wtorek, 27 listopada 2018 12:58:50 CET Denis Rouzaud pisze:
>> I see two ways of propagating the info:
>> easy way: on qgis user mailing list
>> elegant way: release a new version of your plugin which opens a dialog
>> after install (or at each startup, but it's a bit aggressive) which tells
>> your user that the plugin has been renamed.
> 
> I started to write exactly the same :-)  You can also call the plugin 
> installer 
> API in order to install ORSTools:
> 
> import pyplugin_installer
> pyplugin_installer.instance().installPlugin('ORSTools', quiet=False)
> 
> Uninstalling OSMTools from within itself may be more tricky, but should be 
> possible as well. You may need to call the plugin's unload() method 
> prior to uninstalling:
> 
> self.unload()
> pyplugin_installer.instance().uninstallPlugin('opl_bazaprojektow', 
> quiet=False)
> 
> Also the uninstalling should be the very last line in the function (just don't 
> try 
> to do anything after it's removed).
> 
> Best regards, 
> 
> Borys
> 

Why not call the uninstall from the newly installed plugin.
So old plugin says, here get the new plugin at new name.
Then new plugin offers to remove old plugin.

Thanks,
Alex



More information about the QGIS-Developer mailing list