Graphics Reference
In-Depth Information
clean:
rm $(UI_FILES) $(RESOURCE_FILES)
The top portion of the Makefile sets five variables that tell make about your plugin:
PLUGINNAME is, of course, the name of your plugin.
PY_FILES is a list of the Python source files that make up your plugin's source
code.
EXTRAS is a list of additional files that should be included with your plugin. You
would typically include the metadata.txt file and any additional images or
other files used by your plugin.
UI_FILES is a list of the UI templates that need to be compiled for your plugin
to work. Note that you have to use the .py suffix for each template file, as you're
telling make which file you want to have recompiled when the corresponding
.ui file is changed.
RESOURCE_FILES is a list of the resource files used by your application. Once
again, you have to use the .py suffix for each resource file rather than the .qrc
version of the file.
Typically, you would only have to change the values of these five variables to set up your
Makefile. However, if the pyrcc4 or pyuic4 command-line tools are in a nonstandard
location, or if QGIS uses a directory other than ~/.qgis2/python/plugins for its
Python plugins, then you will have to modify the other parts of the Makefile so that it
works with your particular development setup.
Once it has been set up, the Makefile provides three make targets that you can use:
make compile (or just make ) will compile your plugin's .ui and .qrc files
into the corresponding .py modules.
make deploy will compile the .ui and .qrc files, and then copy all the ne-
cessary files into the QGIS plugin directory.
make clean will remove the .py version of your .ui and .qrc files.
You can use make deploy and then click on the Plugin Reloader tool in QGIS to run
the latest version of your plugin so you can test it out.
Search WWH ::




Custom Search