IPC plugins don't work with KiCad's PCM
Summary
This is related to #65 and I've also commented on that issue (#65 (comment 2796456676)) but I thought creating a separate issue would be better. If not please feel free to close this one.
The linked issue above does describe the lack of documentation for using IPC plugins through the PCM, but they describe some other things as well so I wanted to create a specific IPC & PCM issue. I've also attached a working IPC plugin zip so that the issue is more easy to follow. The zip also contains a python script that auto-builds a valid archive to use when installing from file in the PCM.
Essentially the issue is that the plugin gets recognised by the PCM, but the icon doesn't show up in the layout view. Observing other SWIG plugins, it seems that they require an __init__.py that has a register() method call which is inherited from a pcbnew.ActionPlugin() class. What is the alternative when using the IPC API?
Using a plugin.json isn't documented anywhere officially but it is definitely required to get the plugin working with the KiCad API. It uses the same schema but reading the docs nothing is said about how that is used through the PCM. I see that an actions and runtime fields are used in the round_tracks example here, but again, adding those to the metadata.json doesn't seem to make it work.
Reproduction steps
- Unzip the attached test.zip
- Install the IPC plugin by placing the unzipped folder in your plugins directory as described here.
- Verify that it appears in the PCB editor. It will appear as a black box in the toolbar.
- Remove installation.
- Navigate to the
packages\directory and runpython package-builder.pyto build the test archive. - Verify the archive was built correctly.
- Use the
Install from File...button to install the archive. - Verify it appears under the
Installedtab. - Open PCB Editor.
- Should appear in the top right but it does not.
Version Info
Please include all the requested information below. If you do not, your issue may be closed.
- Python version:
-
kicad-pythonversion: 0.4.0
KiCad full version info:
Insert the output of kicad-cli version --format about, or the full KiCad version text found in
the KiCad About dialog, between the sets of triple backticks below
Application: kicad-cli x64 on x64
Version: 9.0.4, release build
Libraries:
wxWidgets 3.2.8
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
libcurl/8.13.0-DEV Schannel zlib/1.3.1
Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxBase
Build Info:
Date: Aug 18 2025 00:41:45
wxWidgets: 3.2.8 (wchar_t,wx containers)
Boost: 1.88.0
OCC: 7.9.1
Curl: 8.13.0-DEV
ngspice: 44
Compiler: Visual C++ 1942 without C++ ABI
KICAD_IPC_API=ON
Locale:
Lang: en_GB
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)