Commit Graph

68 Commits

Author SHA1 Message Date
Wayne Stambaugh 8f99fc0496 Minor Python scripting fixes.
* 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.
2015-09-30 16:14:59 -04:00
jean-pierre charras 7808b2e240 Fix in KIWAY_PLAYER::ShowModal: the top level windows children of the KIWAY_PLAYER Modal frame are now enabled (previously were disabled). It fix some issues for instance with the aui toolbar when moved, and the dialog open when starting the footprint wizard frame. Perhaps explain a few other bugs.
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.
2015-09-05 14:10:54 +02:00
jean-pierre charras 4a56ee42c5 Footprint wizard: Fix IO exception error in python scripts which happens sometimes, due to the fact these scripts printed messages to a console, but when Pcbnew is not run from a console, there is no IO channel to read these messages.
The fix is not perfect (still no IO channel to read these messages) ,  but it works better.
Also, fix erroneous comments in code, and cleanup code.
2015-09-02 15:55:36 +02:00
jean-pierre charras 204eb49ce5 Minor enhancement in python console: remove margins around the client area. simplify code. 2015-08-24 20:32:56 +02:00
jean-pierre charras 718053376d forgotten python_scripting.cpp fix. 2015-07-09 18:51:08 +02:00
jean-pierre charras 01ae08a9a9 Remove the call to wxversion.py on winbuilder, because it does not work (not found, even when exists), ans it is not useful. Avoid crashes when wxPython scripting layer is not loaded, on kicad exit, and when trying to open the py console. 2015-07-09 18:44:23 +02:00
Wayne Stambaugh c288d200fb Minor wxPython scripting improvements.
* 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.
2015-06-27 15:05:26 -04:00
jean-pierre charras 4daf9039db Eeschema: Fix a very old bug relative to the tool to load power parts:
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.
2015-04-16 17:26:51 +02:00
jean-pierre charras 4bab8dde65 Fix some minor coverity warnings. Fix a bug in pcad2kicad plugin. Scripting: map BASE_SET. Rename some python bom scripts with better names. Fix erroneous comments and add comments 2015-03-02 09:28:49 +01:00
Mark Roszko 3c42764563 Fix snprintf usage. 2015-02-22 18:56:38 -05:00
Wayne Stambaugh 69553d6fa3 wxPython find and version loading fixes. (fixes lp:1408060)
* 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.
2015-02-14 19:23:54 -05:00
unknown 8876fdf4af Misc minor fixes (Fix some minor compil warnings). 2015-01-18 12:49:32 +01:00
jean-pierre charras 6a19315557 Fix compat with swig 3.03 2015-01-04 08:19:04 +01:00
jean-pierre charras f3765a32d8 Fix minor issues. Fix some outdated and broken BOM python scripts. Add info in BOM python scripts.
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)
2014-12-03 17:22:06 +01:00
jean-pierre charras f877a1159e Fix python scripting issue (EDA_RECT not mapped) 2014-11-08 14:30:39 +01:00
jean-pierre charras f55a436d58 map class CPolyLine (used in zones) in Python. 2014-11-06 16:27:22 +01:00
Wayne Stambaugh f86eb756af Source license, coding policy, and documentation fixes.
* Add more missing source code licenses.
* Fix coding policy violations (tabs and trailing white space) in Python
  scripting code.
* Add stable release policy to full documentation build.
2014-10-28 15:43:12 -04:00
jean-pierre charras 7b13463302 change malformed comments in kicad.i 2014-10-22 13:16:20 +02:00
jean-pierre charras c237838d00 python scripting: refinement for UTF8 class (from Miguel Ángel Ajo Pelayo) add __str__ method, usefull to print a UTF8 string.
Kicad manager: fix issues in file watcher: changes (adding/removing files)  in project folder not seen by Kicad manager (perhaps due to changes in internal wxWidgets code between 2.9.5 and 3.0).
2014-10-21 18:34:51 +02:00
jean-pierre charras f23bb59cd1 Python scripting: make UTF8 class accessible by python scripts. Add python method GetChars() to UTF8 class to get its char buffer.
See scripts/test_kicad_plugin.py for example.
2014-10-18 10:18:14 +02:00
jean-pierre charras e6274f70b0 BOARD::Add(): fix an issue for tracks: parent not set (could be an issue only in python scripts, because the parent is set by the constructor)
*.i : fix coding style issues.
python method: add BOARD_ITEM Duplicate, which is a wrapper to Clone(). ( defined as Cast_to_BOARD_ITEM(selt.Clone()).Cast() )
update some .py examples.
2014-10-02 19:09:32 +02:00
jean-pierre charras eb396a5e88 Fix footprint wizard issues. Fix export vrml incorrect Z position of items. 2014-07-02 15:08:28 +02:00
Jean-Samuel Reynaud 47b5bdcd47 Fix a mismatch between method signature in scripting/python_scripting.cpp and scripting/python_scripting.h 2014-03-28 07:27:58 -05:00
jean-pierre charras 34c593916c Pcbnew: Fix bug #1296649 (Text on flipped modules incorrectly placed).
Dialog Freeroute: if freeroute.jar is find in kicad binaries, it is run as a standard java application, not as web applcation
Very minor other fixes
FPC_(SMD_type)_footprintwizard.py wizard finished.
2014-03-27 18:45:05 +01:00
jean-pierre charras fd2afec6f5 Remove some fully outdated code (#pragma, from Henner Zeller's report, and some other things) 2014-02-18 12:41:53 +01:00
Marco Serantoni fb9e5b94ca [MacOSX] support for plugins in the bundle 2014-02-15 11:01:27 +01:00
Miguel Angel Ajo bbcd2c61d6 BOARD saving test 2014-02-09 00:21:47 +01:00
Povilas Kanapickas 7f12513c7e Remove some uses of using namespace std. 2013-12-13 10:27:30 -06:00
jean-pierre charras 8caef8f8b1 Make footprint wizards compatible with FPID changes (MODULE::SetLibRef changed to MODULE::SetFPID) 2013-11-01 16:29:50 +01:00
Wayne Stambaugh 0f4ba09545 Pcbnew footprint library table fixes.
* Make footprint viewer work properly with library table.
* Fix bug in Eagle plugin when enumerating footprints.
* Add missing P-CAD plugin from footprint library table editing dialog.
* Fix bug in FOOTPRINT_INFO::LoadLibraries when error occur loading footprints
  from libraries.
2013-09-21 20:28:02 -04:00
Miguel Angel Ajo 45de27baba Scripting build tools moved and renamed 2013-09-22 00:03:02 +02:00
Build System a602c1b2fe Adds target to build doxygen-python documentation, that take
pcbnew.py + doxygen-xml files, and build .i files with docstrings,
those .i files are included back again to build a pcbnew.py with
extended documentation from C++, finally we take the final pcbnew.py
to build the doxygen-python documentation
2013-09-20 21:01:21 +04:00
jean-pierre charras 50743cf3ba Initial release of pl_editor, the page layout and title block editor. 2013-07-19 20:27:22 +02:00
jean-pierre charras 3e8bd5592b Pcbnew: fix Bug #1156193 . Fix compil issues when KICAD_SCRIPTING_WXPYTHON is not enabled and KICAD_SCRIPTING is enabled 2013-03-17 20:04:42 +01:00
Miguel Angel Ajo f227383341 ReloadPlugins() python function, and mtime stored in the KICAD_PLUGINS dictionary 2013-03-17 03:03:18 +01:00
Miguel Angel Ajo 31a693cb8d Refactoring python to wxArrayString, and better exception error reporting 2013-03-17 02:14:46 +01:00
Miguel Angel Ajo 9a8baa00f2 Allow plugins to be reloaded without closing/opening pcbnew, next step is plugin editor, just a few lines away... 2013-03-16 04:27:48 +01:00
Miguel Angel Ajo 155ea57c36 LOCALE_IO toggle implementation for locale switches on scripting; code cleanups to comply with kicad coding style policy 2013-03-15 17:35:24 +01:00
Miguel Angel Ajo 742e1a7e44 Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class 2013-03-12 01:37:45 +01:00
Dick Hollenbeck 2a2a530c62 improvements to python's GIL acquisition and release, but not done yet, since I think the GIL needs to be acquired even when not involving wxPython. 2013-03-11 03:09:48 -05:00
Wayne Stambaugh 4d465ec8a0 Configuration and compile documentation improvements.
* Improve the stable and testing build version option logic.
* Use CMake FindPythonInterp to configure the Python interpreter.
* Use Python interpreter to determine the system Python module install
  path if not already defined on the command line.
* Add header symbol checks for asinh(), acosh(), and atanh().
* Add test source to check for isinf() which can be defined as a C++template.
* Replace conditional compile on windows systems for aXXXh() with CMake
  configuration tests.
* A few minor MSVC compile fixes.
* Fix incorrect python environment string in fixswigimports.py
* Create a separate document for KiCad CMake build options.
* Create a separate how to compile KiCad on Windows document.
2013-02-10 19:41:49 -05:00
Dick Hollenbeck 9bbff22d96 1) Switch to boost hashtable support from wx macros which did not handle std::string.
This required the additional compiler command line option "-std=c++0x".

2) Switch to unique_ptr from auto_ptr which is C++ deprecated.

3) Change to new English layer names per mailing list discussion, see class_board.cpp.

4) When saving to *.kicad_pcb or *.kicad_mod, identify opportunities to use wildcard
   layer sets, for pads so far.

5) Switch to two std::string hashtables in pcb_parser.cpp, away from one wxString based one
   for layer names and layer sets mapping. One hashtable holds the mask, the other the index.
   Layer sets are only in the mask table.

6) Move "LOCALE_IO toggle" into PCB_IO::Format() since it is a public API function and
   caller should find it as convenient as possible to use.  LOCALE_IO should handle
   nesting OK in the case where public Format() is called from one of the Footprint*()
   functions.

7) Drop support for "export module to new library".  Creating new libraries will have to
   be handled in concert with library table entries, and we've talked recently about
   creating a better footprint library manager, one that resides in a DLL/DSO.  So
   this kind of functionality needs to be handled in there in the near future.

8) Change name of exported PCB_IO module/footprint to *.kicad_mod and not *.emp.
2012-11-14 01:15:59 -06:00
jean-pierre charras c169de804d Pcbnew: Make scripting version compilable under Windows 2012-10-01 08:04:06 +02:00
Miguel Angel Ajo 89dd074841 pcbnew scripting: cleanup, renamed KICAD_SCRIPTING_EXPERIMENT to KICAD_SCRIPTING_WXPYTHON, now every flavour compiles 2012-08-02 19:24:53 +02:00
Miguel Angel Ajo b0881d8ec5 scripting: fixed kicad compilation, cleanups 2012-08-02 09:47:30 +02:00
Miguel Angel Ajo beec323603 Double Python initialization fixed 2012-08-01 13:54:20 +02:00
Miguel Angel Ajo 5d0dee1364 Adam Vašíček patches for WIN32 compilation of kicad scripting 2012-07-22 14:15:38 +02:00
Miguel Angel Ajo 2a9b8df888 Support for nanometer build, extra example 2012-07-15 22:01:05 +02:00
Miguel Angel Ajo 974fe74f66 Cleanup toward test-merge 2012-07-06 21:10:55 +02:00
Miguel Angel Ajo 08af577218 code cleanup and comments 2012-06-27 23:19:19 +02:00