Too many external applications fail to touch the parent directory.
Also removes FP_CACHE_ITEM lastMod times and dirty flags as we've
always loaded libraries atomically anyway.
Claws back some of the performance lost by being more efficient
with cache management for sequential calls to Enumerate and then
Load.
Fixes: lp:1750936
* https://bugs.launchpad.net/kicad/+bug/1750936
Smartens the cache freshness checking, and adds checksums of
constituent-directory last-mod-dates to the footprint info
list.
Also inserts the dataPtrs into the list at the same time as
the text to keep wxWidgets from measuring the width of the
text twice (yes, really). And converts the list to default-
column widths in case the wxWidgets patch is present to
greatly speed list creation (by not measuring all that text).
On my machine drops the first-load time from 4s to 2.5s and
the subsequent-load times from 2.5s to < 1s. With the
wxWidgets patch subsequent-loads become near-instantaneous.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
Allow partial library reads in libraries that support footprint per file.
This includes the KiCad and GEDA footprint libraries.
Allow for partially cached libraries rather than ignoring all valid files
when an error occurs.
Factor out the FP_LIB_TABLE specific content from FP_TBL_MODEL into a new
LIB_TABLE_GRID class that can be used for any library table grid mix in.
Create new FP_LIB_TABLE_GRID object for the footprint library edit dialog.
Add method GetEnvVariables() to return any environment variables found in
a LIB_TABLE object.
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
- FOOTPRINT_ASYNC_LOADER to load without freezing UI
- Rewrite loader threads as queue-driven thread pool
- Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.
Remove all mention of footprint from the new LIB_ID doxygen comments and
code.
Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.
Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.
Update all source files effected by the code and file name changes.
Update .gitignore for file name changes.
Derive LIB_TABLE_ROW from boost::noncopyable for use in boost pointer
containers.
Use std::unique_ptr to manage PROPERTIES pointer.
Add clone support for boost pointer containers.
Split common library table code out from FP_LIB_TABLE into base LIB_TABLE
object. The FP_LIB_TABLE object only contains the code specific to
footprint library tables.
Use boost::vector_ptr for storing library table row objects.
Fix move up and down bugs in footprint library table edit dialog.
Factor out ROW object from FP_LIB_TABLE so it can be reused to create a
symbol library table row object.
Create base LIB_TABLE_ROW object from ROW object common code.
Derived FP_LIB_TABLE_ROW object from LIB_TABLE_ROW to provide support for
footprint library table rows.
Update all instances of FP_LIB_TABLE::ROW with FP_LIB_TABLE_ROW.
Purge wxT() macros from modified files where possible.
* Factor out PROPERTIES object from the PCB plugin code and move it into
common so it can be used by both the Pcbnew and Eeschema plugins.
* Add schematic I/O plugin manager for loading and saving schematic and
component library files.
* Add initial attempt at a parser for current schematic file format. This
parser will be infinitely more strict than the current parser which is very
forgiving in what it parses.
* Make minor changes to the base bitmap class to support the new parser.
* Add find root sheet support to sheet object to allow fetching the root
sheet from any sheet in the stack.
*) Implement a framework for "Data Load On Demand".
*) Implement FP_LIB_TABLE* PROJECT::PcbFootprintLibs(), which is the first
prototype.
This allows the project specific footprint tables to be part of the Module Editor
when invoked from Eeschema.
was used locally. Then comment it out in favor of a newer strategy for
filling in nicknames in cvpcb.
Add MODULE* FootprintLoadWithOptionalNickname( const FPID& aFootprintId )
throw( IO_ERROR, PARSE_ERROR );
from code found elsewhere.
! 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.
comment for GITHUB_PLUGIN which should flow into Doxygen output.
*) Rewrote:
PCB_BASE_FRAME::Save_Module_In_Library(): now uses fp-lib-table and PROPERTIES.
PCB_EDIT_FRAME::ArchiveModulesOnBoard(): now can archive to any writable library type.
PCB_BASE_FRAME::SelectLibrary(): is now generic for selecting a library, not just the active library.
*) 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 save table and set project path environment variable code to
FP_LIB_TABLE object.
* Add code to Pcbnew and CvPcb to set project path environment variable.
* Create empty footprint table in Pcbnew when new board created.
* Save current project specific footprint library table to path on file save
as or empty project path.
* Fix a bug in Pcbnew in file save function that would silently overwrite
an existing board file.
* Disable selecting the current library in the module editor when there are
no libraries defined.
* Catch exceptions and report errors when writing footprint library tables.
* Fix Boost build CMakeFile to fix bug when bootstrapping a Boost build in
MSys.
We can now remove a few calls to FP_LIB_TABLE::ExpandSubstitutions( const wxString& aString )
since its being done in above function.
DIALOG_FP_LIB_TABLE now handles table to copy cut copy paste from global to
project and reverse. Fixed a problem with cursor position management when
switching between tables.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements. This provides an
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.
Write parser and formatter for options. Write dialog verification used before saving
FP_LIB_TABLEs, triggered from OK button in table editor.
Switch PROPERTY's value column to std::string from wxString.
Add event handler to fp lib table dialog for upcoming options dialog.
* 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.
* 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.