I'm trying to follow steps from QGIS plugin creation tutorials.
- Working with QGIS LTR (3.22.13-2)
- Located at: [C:\OSGeo4W\bin]
Using the QGIS Plugin Builder, I get the (seemingly common) error, that "There was an error compiling. Compile it manually using pyrcc5.". I get stuck at the point where I'm supposed to compile with:
pyrcc5 -o resources.py resources.qrc
However, the plugin builder doesn't create a
resources.qrc in the plugin folder. Therefore I get the error "C:\OSGeo4W\apps\Python39\Scripts\pyrcc5: File does not exist 'resources.qrc'"
The pyrcc5 works just fine (I tested it on existing plugins, which contain a
resources.qrc file and it ran without errors). I'm puzzled though on how I'm supposed to proceed without the resources.qrc. It seems trivial, but since I have no experience, I have no idea whether I should just create an empty one? Apparently it's listing files that are used by the plugin, but can I just omit this step when not using any particular files?
According to various tutorials/threads online, the following
compile.bat script is supposed to be created:
@echo off call "C:\OSGeo4W\bin\o4w_env.bat" call "C:\OSGeo4W\bin\qt5_env.bat" call "C:\OSGeo4W\bin\py3_env.bat" @echo on pyrcc5 -o resources.py resources.qrc
py3_env.bat are not found, but according to according to this question also no longer needed.