Add a MAPPED_FILE class to kiplatform that wraps mmap on POSIX
and MapViewOfFile on Windows, with a heap-buffer fallback. The
shared readIntoBuffer implementation lives in os/common/io.cpp
to avoid duplication across the three platform files.
Replace the istream-based FILE_STREAM in the Allegro importer
with a buffer-cursor reader over the mapped data. This removes
per-read virtual dispatch and buffering overhead.
Add overflow-safe bounds checking to Seek, Skip, ReadBytes,
ReadString, and ReadStringFixed. Guard against zero-length
files before mmap calls to avoid POSIX undefined behavior.
Wrap the MAPPED_FILE construction in try/catch so that
std::runtime_error is converted to IO_ERROR for callers.
Add a segment chain cache to BOARD_BUILDER matching the
existing outline cache pattern, returning const references
to avoid copies on repeated lookups.
Remove inner-loop PROF_TIMERs that added measurable overhead
on large boards and keep only the outer timing for zone fill
processing stages.
Add a schematic importer for gEDA and Lepton EDA .sch files.
The importer parses the full gEDA file format including
components, nets, buses, attributes, text, graphical
primitives, and paths with bezier curves.
A builtin symbol library ships 39 standard gEDA symbols so
import works without a gEDA installation. Symbol resolution
follows an 11-step search chain matching native gEDA/Lepton
conventions across environment variables, system paths, XDG
directories, RC files, config files, and project directories.
Last-found-wins priority matches native gEDA behavior.
RC file parsing handles gafrc and gschemrc component-library
directives. Lepton-EDA INI configs (lepton.conf, geda.conf)
are also parsed.
Project import reads gEDA .prj files and discovers schematics
and PCBs automatically.
File format knowledge and embedded symbol definitions derived
from gEDA/gaf (C) 1998-2010 Ales Hvezda, 1998-2016 gEDA
Contributors, and Lepton EDA (C) 2017-2024 Lepton EDA
Contributors. Both licensed under GNU GPL v2 or later.
Add complete import support for PADS ASCII (.asc) files, covering both
PCB layouts and schematics. The importer handles board outlines, copper
pours, routing with via inference, footprint decals, net assignment,
design rules, and component placement for PCB files. For schematics, it
supports symbol building from CAEDECAL definitions, multi-gate and
multi-variant parts, power symbols, wire routing, net labeling, arc
graphics, title blocks, and hierarchical sheet connectivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19944
On GTK, wxFileDialog defaults to local_only mode which hides GVFS-mounted
filesystems like Google Drive, SMB shares, and external drives mounted
through GVFS. This adds a platform-specific function that disables
local_only mode to show these network/virtual filesystems.
Apply AllowNetworkFileSystems to all file dialogs across KiCad
to ensure directories on network filesystems are visible when
browsing for files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14372
Tree adapters now call GetFootprints() directly instead of going through
GFootprintList and its cache file. FOOTPRINT implements LIB_TREE_ITEM so
footprint objects work directly in library tree displays similar to
LIB_SYMBOL.
Removed cache read/write calls from files.cpp, footprint_edit_frame.cpp,
and pcb_base_edit_frame.cpp. The footprint chooser uses AsyncLoad() and
BlockUntilLoaded() to ensure libraries are ready before building trees.
GFootprintList still exists for cvpcb and eeschema cross-module access
via KIWAY, but no longer reads or writes cache files.
Previously, clicking Cancel on the "File is already open" dialog did
not prevent the project from opening because the lock check happened
in ProjectChanged() after the project was already loaded.
This change moves the lock check to LoadProject() before any loading
occurs, so Cancel actually aborts the operation.
Additionally, when user clicks "Open Anyway" at the project level, the
decision is now propagated to child editors (eeschema, pcbnew) via a
new IsLockOverrideGranted() flag on the PROJECT class. This prevents
showing redundant lock dialogs for individual schematic and PCB files
when the user has already made their decision at the project level.
On Windows, files with the hidden attribute cannot be overwritten using
standard file I/O operations. This can cause save failures when files
have been synced via cloud services like OneDrive, which may set the
hidden attribute on files.
This commit extends KIPLATFORM::IO::MakeWriteable() to also clear the
hidden attribute on Windows, and adds calls to this function before
saving schematic and board files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14956
Local history combines project backup and autosave into a single place
where arbitrary history can be stored efficiently and restored to any
point in time. Git commits are made on a debouce timer to hold
modifications, allowing the user to step backwards in time to arbitrary
points. Restoring backups does not remove the existing files and
choosing to restore an autosave point does not remove the state of the
files prior to the restore, providing additional safety.
Keeps the maximum storage size limit but removes the additional
limitations of number of backups/backups per day, etc as these are not
relevant to a CoW-based backup as unchanged files do not take up
additional space.
Tuning profiles build on the previous delay tuning work to allow
the definition of track geometries per-layer for a given tuning
profile. These can be calculated from a target impedance (with
all relevant geometry taken from the board stackup), or entered
manually.
Tuning profiles can be configured to enable time-domain tuning,
and to automatically generate track geometry DRC rules for net
classes which have an assigned tuning profile.
Adds a DRC check for net classes with a tuning profile assigned
which is not itself defined.
We now allow the user to specify which in the
New Library dialog.
Also retires the "Export power symbols too" dialog.
Also gives a bunch of file and library dialogs
more explicit titles.
Also removes separate code-paths for Export to
Library and Export to New Library. The regular
code path has a "New Library..." button now.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
We implemented the intermediate temporary file in order to avoid issues
during save. Unfortunately, this is heavily system-dependent and seems
to cause problems with unusual setups. Now that we cache writing using
the prettifier, the errors during output will not affect the existing
file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21330
There should be far fewer hatched objects than other
objects, so we're spending too much effort finding
all the possible damage when we probably should
just be auto-regenerating all the hatching.
This also moves it out of being done during redraw,
which was proving problematic. Plus the refill
zones architecture does it during commit, and has
a lot more miles behind it.
Handle Altium project file format
Parse individual schematic files and layout files
Create top-level schematic file
Link imported UUIDs between schematic symbol and footprints based on
refdes
Create KiCad project
Map Altium layout layers between KiCad
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2117
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started. Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.
The singleton class can be extended to provide single instance
guarantee for any element across kifaces
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names