Update the reload function call to be python3 compatible along with
simplifying the load function to unify the loading of simple and
complex plugins.
Fixes: lp:1828595
* https://bugs.launchpad.net/kicad/+bug/1828595
(cherry picked from commit 59b729c731)
Some developer scripts ended up in the demonstration scripts directory
that was bundled with builds. This moves them to the build_tools
directory and updates the associated Documentation
Fixes: lp:1815891
* https://bugs.launchpad.net/kicad/+bug/1815891
Change the Doxyfile project name from KiCAD to KiCad. It doesn't look
very good when we don't get the project name capitalization correct.
Clean up trailing whitespace in some of the helper scripts and Doxyfile.
For some obscure (for me) reason, the path separators in bundlepath are seen as escape seq, and the path can be incorrectly handled
(when \n or \r are found in this string).
it happens only for this path, not for other paths in LoadPlugins.
For bundlepath parameter, unix separator is now used.
Fixes: lp:1766879
https://bugs.launchpad.net/kicad/+bug/1766879
This plugin mechanism is enabled only if option -DKICAD_SCRIPTING_ACTION_MENU=ON (it is off by default)
It imply -DKICAD_SCRIPTING=0N
This is currently for testing purposes only for developers, not yet for users.
*) Extend SWIG support deeper into the BOARD class.
*) Move swig *.i files into a directory identified for SWIG, in preparation
for a parallel universe involving Phoenix's SIP.
*) Move swig files which will be common to both eeschema and pcbnew into
common/swig.
*) Sketch out a "common" python module, and plan on dovetailing that into a
libkicad_shared.{dll,so}
*) Add common/swig/ki_exceptions.i and define a macro HANDLE_EXCEPTIONS()
which is to be applied to any function which needs C++ to python
exception translation.
*) Move the test for SWIG tool into top level CMakeLists.txt file for use
in all python modules beyond pcbnew, i.e. eeschema and common.
*) Add SWIG_MODULE_pcbnew_EXTRA_DEPS which generates a better Makefile, one
which rebuilds the swig generated *.cxx file when one of its dependencies
change.
*) Re-architect the board.i file so that it can be split into multiple *.i
files easily.
*) Make some KIWAY from python progress, in preparation for Modular KiCad
phase III.
* Switched hashtables.h over to std::undordered_map from boost version.
* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
and C++ so that the resultant type name is common in both languages, and
the types AGREE.
* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.
* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.
* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
Having the name consistent between like types is helpful, and between
languages. std::map<> ends up as SOMETHING_MAP.
* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
instead of hashtables, because swig does not yet support std::unordered_map.
* You can now get to any netclass or net info. NETNAMES_MAP and NETCODES_MAP
are traversable basically the same as a python dictionary using a python
string (not wsString) as the key! The wxString typemap converts python
string to wxString before the lookup happens. Iteration also works.
* Coding policy fixes in the scripting initialization code missed in my previous commit.
* Remove redundant checks for valid Python library paths in kicadplugins.i.
* Actually install the contents of the pcbnew/scripting/plugins directory on
Windows and Linux
* Move the test for existence of a directory before adding it to the Python
system library paths when loading the Python plugins.
footprint wizard frame: now shows messages from footprints python scripts. Especially usefull when a parameter is incorrect. Fix also an other issue (IO error) with some scripts which were usint the print command to output messages (now they use the nes message window.
* Wrap Pgm().OnPgmExit() changes in APP_SINGLE_TOP to build conditionally
when KICAD_SCRIPTING_WXPYTHON is enabled.
* Check the result of loading the correct wxPython version during
initialization.
Previously, only the lib named "power" was used (and therefore power parts defined in other libs not shown).
Now, all power parts can be loaded from any library.
Also, when loading power parts from the chose component dialog or the lib viewer, libs and parts are filtered: only power parts and libs containing power parts are listed.
Hotkeys: move a few global strings in the files where ther are actually used (and make them local.) and code cleaning.
Fix a few other minor issues.
* Add test to CMakeLists.txt to verify wxPython is installed when
KICAD_SCRIPTING_WXPYTHON=ON.
* Add test to make sure wxPython version major and minor numbers match
the version of wxWidgets found.
* Add code to set the correct version of wxPython to the python scripting
initialization code.
* Minor code simplification in Pcbnew KIFACE main window creation.
BOM dialog: remove a not very useful button, and merge its function with an other (not perfect, need more work)
Add message box to show info added in BOM python scripts (See scripts/bom-in-python/README-bom.txt about this info)