Simple recursion of variable expansion allows for multiple use cases in
portability of designs. This also includes basic prevention of
recursion loops
Fixes https://gitlab.com/kicad/code/kicad/issues/10398
Older boards use older 3d model environmental variables. We need to
support both older environmental variables (if the user has them) as
well as updated environmental variables (if the user only has a single
3d model path)
This updated the environmental resolver to look first in the named
location and then substitute the new location if the old location is not
defined in the environment
Fixes https://gitlab.com/kicad/code/kicad/issues/10674
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it. This recurses all the way up to the schematic/
board, and then to the project.
Cross-reference handling is also move to the EDA_ITEMs. It must be done
before bubbling up so that we don't end up in loops. (The aDepth parameter
will break the loop, but without having done anything useful.)
Fixes https://gitlab.com/kicad/code/kicad/issues/13541
Also removes a bunch of std::string stuff from the file handling in the
simulator. All our file handling, env variable expansion, project path,
etc. stuff is wxString based, and jumping through std::string in between
just makes it more complex and increases the potential bug surface.
Also fixes a bug where you'd get two error messages when a spice model
library wasn't found.
Also fixes a bug where you'd get a spice model library not found error
when the text field was empty.
Also fixes a bug where we'd try to absolutize a path starting with an
unresolved text or environment variable. If the path starts with a
variable it's probably absolute, and tacking on the project path in the
error message just obfuscates things.
Fixes https://gitlab.com/kicad/code/kicad/issues/13082
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
There has been a long standing (since the beginning of the project?)
issue with sharing schematics between projects. It has been somewhat
supported for complex hierarchies (a sheet shared multiple times in a
single design) but it has not been well supported for simple hierarchies
(the symbol references cannot be changed in the shared schematic). This
issue has been resolved by moving all of the symbol instance sheet paths
from the symbol definitions in the all of the project files and save all
symbol path instances in the root sheet. This ensures that orphaned
symbol instance paths do not accumulate in shared schematic files and
that designs that reuse schematic in simple hierarchies can how have
different references. It also allows the root schematic from one project
to be uses as a sub-sheet in another project.
When legacy schematics are loaded, all sheet and symbol UUIDs are
converted from time stamps to true UUIDs. This is done to ensure there
are no sheet path instance clashes between projects. That being said,
there are no checks for this. It is assumed that the probability of
UUID clashes is so low that it doesn't make sense to test for them.
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.