Win7 x64
, QGIS 3.4
installed through OSGeo4W
with 'Advanced Install'
Here's my workflow:
- Get the template directory from
PluginBuilder3
- Navigate to this folder in the
OSGeo4W Shell
- Use
call "C:\OSGeo4W64\bin\qt5_env.bat"
otherwisepyrcc5
is unavailable - Use
pyrcc5 -o resources.py resources.qrc
as suggested inpluginbuilder3
help – note that aresources.qrc
file already exists. This steps does not produce an error but does not seem to produce anything either. - Use
make
– this gives the following message:
make: Nothing to be done for 'defaults'.
- Use
make test
– this gives the following message:
chmod: cannot acces 'scripts/compile-strings.sh': No such file or directory
make: *** [transcompile] Error 1
I try to copy the plugin directory at C:\Users\xxx\AppData\Roaming\QGIS\QIS3\profiles\default\python\plugins
but it is not seen by QGIS
or Plugin Reloader
UPDATE:
– there is no sub-directory in the plugin folder – isn't a i18n
folder expected ?
– at step 4 resources.py
is updated but resources.qrc
is left unchanged
Best Answer
The compilation is going to be tested with the following example where icon enclosed in the red rectangle (see image), from one test plugin (makingmultiplebuffers), will be changed for one qgis-icon (24x24 pixels) created for this example.
Path to plugin is:
So, old icon name (icon.png) will be modified to qgis-icon.png in metadata.txt, resources.qrc and initGui method of main py file of plugin (in my case making_multiple_buffers.py). Completed all changes, I ran following commands at OSGeo4W shell:
and it can be observed at following image, after using reloading qgis plugin, that icon was efectively changed.