<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 6, 2019 at 1:27 PM <<a href="mailto:Bauer.Josef@swm.de">Bauer.Josef@swm.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="DE">
<div class="gmail-m_7675714236613389890WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Hi Alessandro,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">thank you very much, that was exactly what we were looking for!
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Maybe it would be nice to put the QgsPluginInstaller also into the official API documentation (or in the “Deploying QGIS
 within an organization” documentation)? I could imagine that others also try to establish an “autoinstall/autoupdate” scenario.</span></p></div></div></blockquote><div><br></div><div>I'm not sure we can add that information to the API docs, because that code is not part of the stable API but it's something to consider for sure.</div><div><br></div><div>Btw, I've just found buried in the internet a work I've done a few years ago when I was working for Boundless:</div><div><br></div><div><a href="https://boundless-desktop.readthedocs.io/en/latest/system_admins/init_scripts.html#scripts-examples">https://boundless-desktop.readthedocs.io/en/latest/system_admins/init_scripts.html#scripts-examples</a></div><div><br></div><div>It may be helpful for your use case (I think it's for QGIS 2.x but it should be easily portable to QGI 3).</div><div></div><div></div><div><br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_7675714236613389890WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Josef<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> Alessandro Pasotti <<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>>
<br>
<b>Gesendet:</b> Mittwoch, 6. November 2019 12:21<br>
<b>An:</b> Bauer.Josef extern IT-DS-TS <<a href="mailto:Bauer.Josef@swm.de" target="_blank">Bauer.Josef@swm.de</a>><br>
<b>Cc:</b> QGIS Developer Mailing List <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>><br>
<b>Betreff:</b> Re: [QGIS-Developer] Automatically install and update plugins<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 6, 2019 at 12:10 PM <<a href="mailto:Bauer.Josef@swm.de" target="_blank">Bauer.Josef@swm.de</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Hi Allesandro,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">thank you for the answer. That sounds very promising. I think that is what we need.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">But can you tell me what exact Python API we have to use? I can’t find anything related
 to that topic in the API documentation [0] (we are using the LTR version QGIS 3.4).</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"> </span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Yeah, there is not much QGIS core API for plugins management, it's mainly done in the Python side:
<a href="https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py" target="_blank">
https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer.py</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">[0]
</span><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)"><a href="https://qgis.org/pyqgis/3.4/index.html" target="_blank"><span lang="EN-GB">https://qgis.org/pyqgis/3.4/index.html</span></a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Tanks und kind regards,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB">Josef</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Arial",sans-serif;color:rgb(31,73,125)" lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif" lang="EN-GB">Von:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif" lang="EN-GB"> Alessandro
 Pasotti <<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>>
<br>
<b>Gesendet:</b> Mittwoch, 6. November 2019 11:50<br>
<b>An:</b> B</span><span style="font-size:11pt;font-family:"Calibri",sans-serif">auer.Josef extern IT-DS-TS <<a href="mailto:Bauer.Josef@swm.de" target="_blank">Bauer.Josef@swm.de</a>><br>
<b>Cc:</b> QGIS Developer Mailing List <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>><br>
<b>Betreff:</b> Re: [QGIS-Developer] Automatically install and update plugins</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 6, 2019 at 11:38 AM <<a href="mailto:Bauer.Josef@swm.de" target="_blank">Bauer.Josef@swm.de</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt" lang="EN-GB">Dear QGIS Developer,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt" lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt" lang="EN-GB">we have written some plugins that we would like to be installed and updated automatically (without any user interaction). We have also
 setup an internal plugins server. We can install the plugins from our plugin server manually, but is there also the possibility to install and update them without any user interactions (we have pre-configured the plugins in the QGIS3.ini)?</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">basically, you need to create a custom startup py file and deploy it (it can also live on a network share), the startup script will contain the instructions (using the QGIS python
 API) <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">to upgrade the plugins you need automatically.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">See the links for some more information:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal"><a href="https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file" target="_blank">https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#the-startup-py-file</a><br clear="all">
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization" target="_blank">https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html#deploying-qgis-within-an-organization</a><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Hope this helps.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal">--
<u></u><u></u></p>
<div>
<p class="MsoNormal">Alessandro Pasotti<br>
w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <u></u><u></u></p>
<div>
<p class="MsoNormal">Alessandro Pasotti<br>
w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a><u></u><u></u></p>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>