The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.
Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.
This avoids a circular dependency that was previously reported
by static analysis.
Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)
Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt
std::thread is used instead for multithreaded computation
Spooling up a full PLAYER in the background takes too long.
This also fixes bugs around how the tables are saved, although
that was just missing code rather than anything architectural.
Fixes: lp:1785436
* https://bugs.launchpad.net/kicad/+bug/1785436
As of v5 footprint library reorganization (one repo per library concept
is replaced with a common repo for all libraries), the Footprint Library
Wizard may handle only the old libraries. It has been replaced with
a file browser to select only local files.
Fixes: lp:1772209
* https://bugs.launchpad.net/kicad/+bug/1772209
* Refresh the view only when changes are made in the caller frame.
* Allows recreate a new instances when try to open the 3D view from a frame taht is not the initial caller
* Remove duplicate code in kicad frames.
- support for background color setting
- removed several global config settings (such as g_Drc_On)
- wrapped most of global config settings in PCB_GENERAL_SETTINGS class
- reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
- new GAL feature for legacy users: double-click (or E) to change track width available as an option.
Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543
Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
* Move add_directory()s in main CMakeList.txt after all find_package()
macros are run so all flags in the main CMakeList.txt are propagated
to the sub-folder CMakeList.txt files.
* Remove commented out include of config.h
* Make the link maps only build on linux as -${TO_LINKER},-cref
-${TO_LINKER},-Map=blah just gives warnings on osx w/ clang
* Make the link maps only build with flag -DKICAD_MAKE_LINK_MAPS is
defined during CMake configuration as they are highly specific.
* Moved the code for setting link maps into the main CMakeList.txt
file to avoid duplication.
* Removed -D__ASSERTMACRO__ from osx as its no longer needed
* Removed a couple of other OSX only things that wouldn't work anyway
* Moved set (BU_CHMOD_BUNDLE_ITEMS) to the main CMakeList.txt as
otherwise it would only work for the KiCad build not the other
applications
* Made KICAD_SCRIPTING_MODULES enable KICAD_SCRIPTING as currently if
you have modules enabled without the scripting base it will on build.
This could be changed to a fatal error saying you need to also enable
scripting but it seems unnecessary.
* Removed duplication of pcbnew.py install code under modules and
scripting since you can't have modules without scripting now
* The resource setting for bitmap2component is too late in the CMakeLists.txt,
and is being ignored. Bitmap2component does not have an icon resource on
Windows. Moving the entire section resolves the issue.
* The other programs only have the mingw special case listed, not the generic
declaration for the resource file so added them.
* Remove global s_NetObjectslist.
* Separate out non-owning version of NETLIST_OBJECTS_LIST into NETLIST_OBJECTS.
* Fix double free pertaining to ~NETLIST_READER().
* Remove all file-io from CvPCB.
* Remove exe launcher cvpcb, retain only cvpcb.kiface, since cvpcb.kiface has no file i/o.
* Add void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) and teach it to use old
netlist loading code with a STRING_LINE_READER LINE_READER.
* Fix BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )
Fix issue when using a page layout file in project folder: eeschema and Pcbnew did not use it, unless using an absolute path.
Now, if the file path is nor absolute, it is seen as relative to the project (which is the expected behavior)
fp lib wizard: when pcbnew id compiled with USE_GITHUB_PLUGIN=OFF, the github plugin option is no more accessible (and the web viewer no more used).
* Fix creation of single app bundle with respect to scripting support.
* Cleanup scripting search paths for OSX.
* Fix some small CMake bugs from previous OSX build change.
* Optimize bundle file structure to be consistent with Apple specs.
* Add helper script for compiling wxWidgets and wxPython
* Update OSX build instructions.
* Compile all binaries into a single application bundle.
* Use CMake BundleUtilities to make application bundle relocatable.
* Restructure build output to directly create an image file.
* Fix default search paths.
* Set KIGITHUB environment variable.
* Added patch to fix wxWidgets so names for OSX.
Eeschema, Pcbnew, and Cvpcb all run under the same process now,
FOR THE VERY FIRST TIME!
*) Added KIWAY::PlayerCreate(), PlayerClose(), and PlayersClose().
*) Factored FRAME_T into <frame_type.h> from ID_DRAWFRAME_TYPE.
*) Found that the following command line is helpful for collecting all the *.kiface
files into the <build>/kicad/ directory so that kicad can find them.
$ cp `find . -name '*.kiface'` kicad/
Maybe somebody will want to rework how the CMake files are organized so all
the binaries can go into the same place. See python-a-mingw-us.
*) This might fix the problem on the Mac where child process windows were not
coming to the front. See ->Raise() in kicad/mainframe.cpp.
*) You can set USE_KIFACE to 0 in kicad/mainframe.cpp to chain load child exes
instead of using the KIFACE modules directly, i.e. revert.
In PATCH_COMMAND, use patch instead of bzr patch if patch or patch.exe is found (mandatory to use msys2 because bzr patch does not work when using msys2)
! The initial testing of this commit should be done using a Debug build so that
all the wxASSERT()s are enabled. Also, be sure and keep enabled the
USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it
off is senseless anyways. If you want stable code, go back to a prior version,
the one tagged with "stable".
* Relocate all functionality out of the wxApp derivative into more finely
targeted purposes:
a) DLL/DSO specific
b) PROJECT specific
c) EXE or process specific
d) configuration file specific data
e) configuration file manipulations functions.
All of this functionality was blended into an extremely large wxApp derivative
and that was incompatible with the desire to support multiple concurrently
loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
An amazing amount of organization come from simply sorting each bit of
functionality into the proper box.
* Switch to wxConfigBase from wxConfig everywhere except instantiation.
* Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
PGM_SINGLE_TOP,
* Remove "Return" prefix on many function names.
* Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
* Fix building boost for use in a DSO on linux.
* Remove some of the assumptions in the CMakeLists.txt files that windows had
to be the host platform when building windows binaries.
* Reduce the number of wxStrings being constructed at program load time via
static construction.
* Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
these functions are useful even when the wxConfigBase comes from another
source, as is the case in the KICAD_MANAGER_FRAME.
* Move the setting of the KIPRJMOD environment variable into class PROJECT,
so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
* Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
its child wxFrames and wxDialogs now have a Kiway() member function which
returns a KIWAY& that that window tree branch is in support of. This is like
wxWindows DNA in that child windows get this member with proper value at time
of construction.
* Anticipate some of the needs for milestones B) and C) and make code
adjustments now in an effort to reduce work in those milestones.
* No testing has been done for python scripting, since milestone C) has that
being largely reworked and re-thought-out.
To use multiple working threads. This entailed adding KiCad typedefs:
*) Add typedefs for MUTEX and MUTLOCK which mask the actual choices for the project.
*) Add FOOTPRINT_LIST::DisplayErrors( wxWindow* ) which is a single strategy for
showing aggregated load errors. Although what's there is only scaffolding
and needs a volunteer who knows HTML pretty well.
*) Ensure all callers of ReadFootprintFiles() use the new DisplayErrors() function.
*) Push utf8.cpp and utf8.h into common library for open use.
This response file is not expanded under mingw3 2 (mingw/gcc bug?), and the list of include paths, found in this file, is not taken in account.
Now, under mingw32+msys, when not cross-compiling, the response file is disabled.
Cvpcb, Pcbnew: fix a list of libs which should be added only when cross-compiling:
Previously, they were always added, which creates an issue with mingw/msy/ gcc 2.8.
Now they are added only when cross-compiling (this issue was noticeable only with msys+mingw version 2.8)
*) Set environment variable KISYSMOD before loading FP_LIB_TABLE so that
FP_LIB_TABLE::ROW::SetFullURI() can do substitution up front.
*) De-emphasize the lib path in some of the footprint frames but keep it
so the footprint editor can export a current library to another.
You can even export a GITHUB library to a pretty library for local
installation.
*) Start the PLUGIN options editor.
*) Enhance cursor positioning in DIALOG_FP_LIB_TABLE.
* Add code to CvPcb to handle assigning component footprints from the
footprint library table instead of the search path method.
* Add code to CvPcb to allow editing of the footprint library table.
* CvPcb footprint and component panes display fully qualified FPID names.
* Make CvPcb library pane display footprint library table nicknames instead
of library file names.
* Add code to FP_LIB_TABLE object to test the paths in the table against the
list of libraries loaded from the project file.
* Add code to FP_LIB_TABLE to convert assigned footprints in a NETLIST from
legacy format to footprint library table format.
* Split out COMPONENT_NET, COMPONENT, and NETLIST objects from netlist_reader
files and create new pcb_netlist files.
* Fix minor wxListView scroll bar sizing issues.
* Add new token and code to save and load FPID nickname in board file.
* Add new token and code to save and load FPID nickname in s-expression net
list file.
* Add WX_STRING_REPORT object to dump strings to a wxString object.
* Add third list control with library names.
* Add button to toolbar to select filter by library name.
* Add bitmap for filter by library name toolbar button.
* Remove custom UI colors from list controls.
* All items shapes are converted to polygons.
* Polygons are merged layer by layer (for calculation time reasons,zones are not merged)
* for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons, not inside zones areas).
* the look is better, mainly when displaying the copper thickness
* solder and paste layers are now shown in 3D viewer.
* the code was seriously cleaned (but still needs to be enhanced).
* Note this is a work in progress which needs refinements.
* Tweak the NETLIST_READER code to allow for component footprint names that
are not found in any library to generate a warning instead of an error and
update the board accordingly.
* Don't display undo warning in netlist dialog when dry run option selected.
* Rename netlist_reader_common.cpp to netlist_reader.cpp
* Rename netlist_reader_firstformat.cpp to legacy_netlist_reader.cpp
* Rename netlist_reader_kicad.cpp to kicad_netlist_reader.cpp
* Remove cvpcb/read_write_cmpfile.cpp and move the single function it
contained into cvframe.cpp
* Remove cvpcb/loadcmp.cpp and move the single function it contained into
class_DisplayFootprintsFrame.cpp.
* Remove cvpcb/readschematicnetlist.cpp and move the single function it
contained into cvframe.cpp.
* Remove cvpcb/setvisu.cpp and move the few functions it contained into
the appropriate source file.
* Create separate NETLIST object to hold contents of netlist files.
* Read entire netlist and footprint link files before making applying
changes to board.
* Add BOARD::ReplaceNetlist() function to eliminate the calls between the
NETLIST_READER, PCB_EDIT_FRAME, and BOARD objects.
* Change placement of new components below the center of the current board
or in the center of the page if the BOARD is empty.
* Add dry run option to netlist dialog to print changes to message control
without making changes.
* Add button to netlist dialog to allow saving contents of message control
to a file.
* Eliminate the need to compile netlist_reader_*.cpp in both CvPcb and Pcbnew.
* Add netlist_reader_*.cpp to the pcbcommon library.
* Remove redundant load component link file code from CvPcb.
* Modify CvPcb new to work with the new NETLIST_READER object.
* Add compare() function and < and == operators to FPID object.
* Add REPORTER class to hide an underlying string writing implementation for
use in low level objects. Thank you Dick for the idea.
* Lots of minor coding policy, Doxygen comment, and missing license fixes.
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
Other scaling factors (MILS_TO_IU_SCALING_FACTOR and DECIMILS_TO_IU_SCALING_FACTOR)
also defined only in convert_to_biu.h.
Allows different scaling value for Gerbview.
Needs more tests.
* All objects derived from EDA_ITEM now have consistent hit test method
definitions.
* Remove double function calls from all classes derived from SCH_ITEM.
* Lots of Doxygen comment fixes.
* Implement code to allow wxDC to handle coordinate conversions between
device and drawing units.
* Add build settings to enable wxGCDC for wxGraphicsContext testing.
* Remove wxAUI conditional build cruft as it is now required to build
Kicad.
* Fix scroll increment size regression to prevent jumping around the
zoom center position.
* Add find GDI+ cmake module for building on WXMSW when wxGraphicsContext
is enabled.
* Add methods to read and write project file parameters using dynamically defined list.
* Remove all global variables defined in CVPcb code.
* Dynamically define project file settings so class member variables can be used.
* Separate reading and writing application settings from project file settings.
* Make application UI objects and dialogs respect system UI font.
* Remove non-standard widget colors from CVPcb dialogs.
* Changed CVPcb object link list implementation to use wxList.
* Changed project library and path dialog to make OK button save project file instead of confusing "Save Cfg" button.
* Eliminate some duplicate file wildcard and extension definitions.
* The usual code reformatting, commenting, and spelling fixes.