[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA: Specific configuration for each schematic (was New code for component library)
Hi all,
Stuart Brorson writes:
> [...]
> > I was thinking about making it possible to have one component library
> > per schematic. This way we could manage the addition of library
> > directories better for each page. I will have a look at that.
>
> How would that work specifically?
>
I was thinking about guile modules: there is one config module for the
system-wide configuration, and one for each opened page. The page
config module inherits from the system-wide module.
The program then switches between modules to get the piece of
configuration it wants depending on the current page.
For instance, there is now one component library per page and a system
component library. When a page is created, its component library is
initialized with the content of the system component library. The
local configuration files are then read and any component-library
directives are directed toward the new page component library.
There are two patches attached to this message that add such a feature
to gschem and libgeda (not gnetlist at this time).
Beware they are very rough: it's some kind of proof of concept
rather than the definitive way to do that. You have to apply these
patches to a fresh CVS checkout.
There is no guarantee that it will work or even compile.
The third attachment provides a simple example to test the feature:
there is two projects, each one has gafrc file that include project
specific symbol (with same name). The expected behavior of gschem is
to display the correct symbol in the schematic depending on the
project. And when opening the schematics of the two projects, the
symbol must be different (in fact it is only the number in the symbol
that change).
When you add a new component from the component selection dialog, the
component library of the current page is used. Since you can change
the page while the dialog is open, the displayed data may be out of
sink. It's a known problem that we will have to fix somehow.
I think there is a couple of things to do before adding such a feature
to the main trunk, like cleaning up the x_window/s_project and s_page
stuffs.
Anyway, please give it a try and let me know of what you think.
Patrick
libgeda.diff.gz
gschem.diff.gz
test-gschem.tar.gz