Commit Graph

191 Commits

Author SHA1 Message Date
Maciej Suminski 8e472c736a Merged upstream. 2013-09-20 17:54:35 +02:00
Wayne Stambaugh 9ab7c18f46 Footprint library table ground work.
* Remove defined CMAKE_INSTALL_PREFIX for Windows from main CMakeList.txt.
* Move footprint library path detection code from pcbnew.cpp to EDA_APP
  object.
* Add CMAKE_INSTALL_PREFIX to config.h.cmake.
* Simplify and fix search path list code.
* Add CMAKE_INSTALL_PREFIX to the list of search paths in case KiCad was
  installed using `make install`.
* Add default global footprint library table to CMake install.
* Add method to set footprint library table to PCB_BASE_FRAME object.
* Remove unused function EDA_APP::GetLibraryFile().
* Minor FP_LIB_TABLE object improvements.
2013-09-06 08:17:33 -04:00
Maciej Suminski 32e962e8ee Merged upstream and Mac OS X build fixes. 2013-08-27 11:03:06 +02:00
Dick Hollenbeck 0be3992913 Lay basis for a more full featured usage of boost, including compiled libraries such as unit_test_framework, system, etc. Move headers now into boost_root/include/boost/. 2013-08-20 13:03:21 -05:00
Carl Poirier 3f8343b341 REMOVE: USE_PCBNEW_NANOMETERS by making it the only way to go in pcbnew, effectively removing the deci-mils build. 2013-08-06 18:21:40 -05:00
Camille Delbegue 2134e7de04 Remove a Clang warning and add a missing dependency to boost in cmake file. 2013-08-05 17:53:13 +02:00
Dick Hollenbeck e8dc730526 1) Remove requirement to define KICAD_TESTING_BRANCH. Instead the KICAD_STABLE_BRANCH
must be defined if that is the build type wanted. This only affects a text string
anyways, is not particularly important other than telling user from which code
branch  the source came.  

2) Change name of "testing" to "product" in that same description within
common/build_version.cpp.  "testing" made it sound frightenly unusable.
2013-08-05 10:38:50 -05:00
Maciej Suminski d15f0e91e2 Upstream merge. 2013-08-05 14:46:05 +02:00
Brian Sidebotham c99243ffc5 * Added modified CMake FindPython... modules to support using Python-a-mingw-us distribution when building Windows scripting support using MinGW 2013-08-04 21:31:14 +01:00
Maciej Suminski 2fd2c1dc03 Upstream merge. 2013-08-02 15:57:24 +02: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
Maciej Suminski 36f1147da1 Upstream merge. 2013-07-08 15:05:12 +02:00
Maciej Sumiński 07781d34be Removed KICAD_GAL CMake option. 2013-07-07 02:30:28 +02:00
Dick Hollenbeck 0f1f0f92f1 downloads-by-cmake now configurable, fix wx2.8 compiler errors 2013-06-05 09:24:03 -05:00
Maciej Suminski e9ebdf2583 Upstream merge. 2013-06-05 10:01:53 +02:00
Dick Hollenbeck 2fc698846b *) Refinements to ExternalProject_Add( boost )
*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
2013-05-31 16:22:34 -05:00
Dick Hollenbeck 96f8f6066d remove boost and make it an external project, so the procedure for upgrading is better documented 2013-05-30 23:46:02 -05:00
Maciej Suminski 07cd3bcb56 Upstream merged 2013-04-10 15:03:35 +02:00
jean-pierre charras a47d36e399 Pcbnew: fix Bug #1163201. Fix Bug #1162779. Fix incorrect comment in CMakeLists.txt. 2013-04-03 18:16:26 +02:00
Maciej Suminski e262b32198 Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
    - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
    - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
    - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
    - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
    - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
    - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
    - STROKE_FONT - Implements stroke font drawing using GAL methods.
                          
Most important changes to Kicad original code:
    * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
    * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
    * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
    * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
    * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
    * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
    * Removed tools/class_painter.h, as now it is extended and included in source code.
                         
Build changes:
    * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
    * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
    * GAL-related code is compiled into a static library (common/libgal).
    * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
                            
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 08:54:03 +02:00
Maciej Suminski 30e1aaec26 Replacement of classes BOX2 and VECTOR2 with their extended versions
include/vector2d.h: Removed old version
include/math/math_util.h: rescale() for VECTOR2
include/math/vector2d.h: New version of VECTOR2
include/math/box2.h: New version of BOX2
common/drawframe.cpp: Refactorization of code, so it is compatible with new classes
include/plot_common.h, pcbnew/basepcbframe.cpp: Changed header inclusion path
CMakeLists.txt: Added definition to turn on WX_COMPATIBILITY for replacement classes
2013-03-28 17:30:09 +01:00
jean-pierre charras 3313b34a01 CMakeLists.txt: use elseif token instead of elif which create issues with some cmake version.
Fix minor issues in nsis config files
2013-02-27 08:19:42 +01:00
Wayne Stambaugh facde96ec2 Add build option to use footprint library table. 2013-02-23 14:30:43 -05:00
Dick Hollenbeck 49bca46a5c -fPIC only for non-MINGW. See http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html 2013-02-14 09:31:56 -06:00
Dick Hollenbeck fdc8a1345d typo 2013-02-14 08:50:32 -06:00
Dick Hollenbeck e4d09b96bc add -fPIC for all builds, even cross comiling to Windows from Linux, even non Debug and Release builds 2013-02-14 07:12:54 -06: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
acobo Aragunde Perez 2bea1c677c Eeschema: Add "append schematic" feature. Fix bug 1101718 <Empty plot filename> 2013-01-24 19:46:42 +01:00
Dick Hollenbeck f1af605d6c when linking a DSO, require all symbols to be resolved 2013-01-04 17:02:10 -06:00
Alexander Lunef 40f4304b2f Pcbnew: Add pcad2kicad pcb plugin, to import PCAD boards ( .pcb ASCII data file PCad 2000 format ) from Alexander Lunef 2012-12-29 10:54:25 +01:00
Dick Hollenbeck 2aa27122b0 Eliminate many assumptions in Pcbnew's library manager, pertaining to locality of libraries and
their type, by using the more abstract PLUGIN::Footprint*() functions.

This is an intermediate phase only, other changes will be necessary as library table support comes in.
Encapsulate usage of library path searching, since that will go away as library table support comes in.
Add FOOTPRINT_EDIT_FRAME::{get,set}LibPath() and FOOTPRINT_EDIT_FRAME::{get,set}LibNickName() functions
to provide this encapsulation.
2012-11-19 10:19:38 -06:00
Dick Hollenbeck a93637b14f remove -std=c++0x compiler option since nobody is ready for it, and accordingly back into auto_ptr from unique_ptr 2012-11-15 10:04:10 -06:00
jean-pierre charras 3688bae75f Fix compil issue under MinGW: for an obscure reason the option -std=c++0x creates error in wxWidget code:
some functions used in wxWidgets ( like _strdup and few other) are not defined when this option is set. 
but the equivalent option -std=gnu++0x works fine so it is used under mingw instead of  -std=c++0x.
(Under Linux/OSX  the option -std=c++0x is used)
2012-11-14 21:07:09 +01: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
Dick Hollenbeck 0e1e7f53b1 remove one-ness bug from CMakeLists.txt 2012-10-16 00:28:39 -05:00
Wayne Stambaugh e7925279ab Only use -O1 GCC optimization level for versions 4.7 and above for now. 2012-10-15 21:42:50 -04:00
Dick Hollenbeck 26eab9c767 make nanometers the default board internal units within Pcbnew 2012-10-15 00:21:31 -05:00
Brian Sidebotham 9823666ca9 Commit patch from Brian Sidebotham: Project template in Kicad manager 2012-10-14 18:57:11 +02:00
Wayne Stambaugh 1468a4ae31 Pcbnew s-experssion footprint library implementation.
* Add footprint methods to PCB_IO.
* Add FP_CACHE and FP_CACHE_ITEM for handling new footprint library design.
* Add code to save legacy libraries in new format.
* Change behavior of BOARD_ITEM::GetLayerName() to return the default layer
  name when the item does not have a BOARD as a parent.
* Minor changes to the module output formatter when writing to module library
  files (no BOARD as parent).
* Add new (and some that I forgot along the way) CMake flags to
  EDA_BASE_FRAME::CopyVersionInfoToClipboard().
* Add -Wno-narrowing to GCC flags to stop GCC 4.7 from complaining about
  a conversion from int to unsigned in the Boost polygon library.
* Add INPUT_STREAM_READER to richio.cpp to allow using any object derived
  from wxInputStream as a LINE_READER (needs to be validated).
2012-10-07 11:37:25 -04:00
jean-pierre charras 0e941708f4 Make scripting version compilable under Windows 2012-09-30 19:50:17 +02:00
Dick Hollenbeck 367bfb4e14 fix problem with eeschema print dialog showing up on missing monitor 2012-08-15 12:55:48 -05:00
jean-pierre charras c0992a9386 Remove Kbool from Kicad. Use Clipper instead, last changes 2012-08-04 13:47:24 +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 465dabd919 Fixes Win32 compilation that my previous commit broke, thanks to JP 2012-07-16 16:48:51 +02:00
Miguel Angel Ajo db427cb2cd merge with lp:kicad 2012-06-25 22:51:19 +02:00
Dick Hollenbeck a71857baaa Commit Dick's Pcbnew s-expression file parser bug fixes.
* Apply Dick's patch along with a few minor changes to fix some clashes with
  changes in my branch.  Thanks Dick!
* Added missing DRAWSEGMENT line angle.
* Fix thru hole pad layer mask issue.
2012-06-10 20:47:15 -04:00
Miguel Angel Ajo 30e251bfba merge 1 with tip 2012-06-03 22:06:51 +02:00