[QGIS-Developer] Deploy plugin by setting QGIS_PLUGINPATH
Zhang Qun
zhangq.rhy at gmail.com
Thu Nov 16 19:19:16 PST 2017
Thanks Luiz for the alternative solution. I will try that later.
Best regards,
Zhang Qun
On Thu, Nov 16, 2017 at 7:53 PM, Luiz Motta <motta.luiz at gmail.com> wrote:
> Hi Zhang,
>
> In my plugins, I use the '__file__' for get the path of my plugin.
>
> Example in '__ini__.py':
>
> import os
> dirPlugin = os.path.dirname(__file__)
>
>
>
>
>
> 2017-11-16 8:47 GMT-02:00 Patrick Dunford <enzedrailmaps at gmail.com>:
>
>> There are sometimes reasons why this method may not work (I think Ubuntu
>> does have a particular limitation in this regard)
>>
>> One option is you can create a shortcut on the menu and pass the variable
>> value in that shortcut.
>> For example one of the Qgis shortcuts on the Whiskers menu in XFCE on my
>> computer uses this command to start a version of Qgis that I built from
>> source and installed to a different path:
>>
>> env LD_LIBRARY_PATH=/home/patrick/apps/lib /home/patrick/apps/bin/qgis
>>
>> where env is passing that variable into the environment that Qgis starts
>> with.
>>
>>
>> On 16/11/17 23:33, Zhang Qun wrote:
>>
>> Dear all,
>>
>> I want to use the QGIS_PLUGINPATH environment variable to point to the
>> directory where my plugin are located but did not manage to get it work.
>>
>> I'm on Ubuntu16.04 and running QGIS 2.18.
>>
>> I set the variable in terminal by:
>> $ export QGIS_PLUGINPATH=~/QGIS_Plugins/rndf-editor/RNDFEditor/
>>
>> and launch the QGIS in this terminal (I guess in order to get the
>> variable effective I have to run within the terminal right?)
>>
>> $ qgis
>>
>> But my plugin still did not get to show under the manu Plugin.
>>
>> Can anyone advise me the correct way to do it? Thanks.
>>
>> Best regards,
>> Zhang Qun
>>
>>
>> _______________________________________________
>> QGIS-Developer mailing listQGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171117/7917a412/attachment-0001.html>
More information about the QGIS-Developer
mailing list