← Back to team overview

kicad-developers team mailing list archive

Next version of Kicad.


Warning: this is lengthy email aimed at the primary Kicad developers and
you know who you are!

Now that the latest version of Kicad has been release and the next
development cycle has been started, I would appreciate some input before
heading off in the wrong direction. I have a fairly large change set
that I am getting ready to commit to SVN. This commit has been spurred
in large part to the last two commits by JP that caused me some merge
headaches. I was going to wait and do some more testing, but it is
pretty obvious that it will become more and more difficult to manage the
longer I wait. I attempted to break the changes it into smaller part
but one particular change (see the first change below) makes that nearly
impossible so here is a list of changes from most to least significant.

Unobfuscated all of the global variables cleverly hidden by the
definitions of "eda_global", "COMMON_GLOBL", "MAIN", and friends. I
attempted to move variables into the application program files where
they are used. The global variables common to all applications were
moved into common.cpp. Now all global variables are hidden in plain
sight so we can start pushing them into the objects where they are used
to prevent some of the issues with application and project file settings
that don't get save and/or loaded properly.

Created a separate static link library with most of the PCB drawing item
object classes that are currently compiled multiple times when building
pcbnew, cvpcb, and gerbview. Now they get compiled into a single
library called pcbcommon and linked as required. On my system doing a
full build this saves about a minute.

Moved chematic library drawing object code to load from file and
calculate the bounding box from massive non-object oriented case
statements into the object classes where they belong. I also fixed a
bunch of bounding box calculation errors.

Removed MakeFileName() and ChangeFileNameExt() from gestfich.cpp and
converted code to use wxFileName which already has this functionality
and more built in and automatically handles file delimiter issues. This
change required changing the file name extensions to remove the leading ".".

Started replacing EDA_FileSelector with wxFileDialog so that appropriate
file name wild cards can be used. See the wxFileDialog documentation on
how to properly define wild cards.

Initial implementation of library search path using wxPathList to
hopefully fix some of the issues using the current hard coded paths.

Changed the one giant event handler in the Kicad executable to per event
methods for simplification.

Moved some common settings from global variables to variables in the
main frame class where they are used so they get loaded and saved
properly. Removed some globally defined file descriptor variables,
define them locally, and pass them as parameters. Move a few stand
alone functions into object classes where they are actually used.

Replace all instances of round() with wxRound() which should help to
solve some portability issues. I found that undocumented gem while
digging around the wxWidgets source code.

The usual slew of uncrustification, fixing spelling errors, and code

I want to give everyone a heads up to prevent major merge conflicts and
to make sure my changes are not too disruptive or someone finds them
totally unacceptable. Early in the next development cycle seems like
the right time to make these changes. I have been using this code for
several weeks and have not had any problems. That being said, there may
be some code paths that I have not checked out thoroughly so there may
be some minor breakage here and there. This is most likely going to be
the wxFileName stuff. Once again, most of these changes are of little
benefit to the end user. They are primarily aimed at simplifying life
for the developers. If I don't hear too much grumbling, I will commit
these changes to SVN in the next week or two.

I'll wait to after I commit this code before I put forth my list (read
rant) of things I would really like to see fixed and am willing to fix
in the next release of Kicad. You have been warned.;)


Follow ups