[QGIS-Developer] Rename QGIS plugin

Wirth Ervin wirth.ervin at mailbox.org
Sat Feb 16 05:16:19 PST 2019


Thank you for all the suggestions (Nils, pcav), I'll think about it.

Yours sincerely, Ervin

On 2/16/2019 1:50 PM, Nils Nolde wrote:
> Hi Ervin,
>
> I went through the same pain not too long ago. Unfortunately there's 
> no graceful way to rename a plugin. I mean, no way to just change the 
> name and the stats and history will preserve. You will have to create 
> a new plugin basically and deprecate the old one. In my case it was 
> purely semantic, functionality didn't really change. If functionality 
> changes, I guess creating a new plugin would be the better way anyways.
>
> The way I did it (or better will do it next week hopefully):
> 1. Upload the new plugin, stating it's the descendant of the old plugin
> 2. Release a last version of the old plugin, that will only:
>     - install the new plugin from the repo
>     - uninstall itself
>     - don't forget to flag as deprecated!
>
> I'm happy to tell you though, that QGIS makes this reeeeally easy. 
> Have a look at my last version, it's literally 5 lines of code (just 
> be sure to call unload() before you uninstall):
> https://github.com/nilsnolde/orstools-qgis-plugin/blob/01f1c6b1a10c4fdf11c1076e1d1064eaff92b44b/OSMtools/OSMtoolsPlugin.py#L51 
>
>
> I can't remember who suggested this method, but it came from this list 
> here too. Other suggestions were simple messages to install the new 
> version or other simple user dialogs. Due to its simplicity, I went 
> with the auto-uninstall.
>
> Best of luck
> Nils
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190216/6d9795ff/attachment.html>


More information about the QGIS-Developer mailing list