gEDA-dev: pcb library/font/etc path mechanism
Dan McMahill
dan at mcmahill.net
Wed Jan 24 18:25:18 EST 2007
Hello,
I was trying to fix a couple of the remaining issues which currently
keep pcb from running correctly under windows. Hopefully I'll still
have some readers in spite of that.
The issue I'm currently trying to address is that the default directory
to look in for the default_font file, and the default newlib search path
is compiled into the binary based on arguments to the configure script.
On a real OS where you have a shell available, it is easy to change
these directories with command line options and you can easily create a
wrapper script (see pcbtest.sh in the src/ directory) that sets these.
In the windows world, it is entirely possible, perhaps even probable
that someone would use a binary installer to install pcb to some
different location that what may be a compiled in default.
Here is what I was thinking:
1) use argv[0] to figure out where the binary is installed and then look
for the library and font files relative to that location.
Advantages: You can relocate your install and have it still work.
Disadvantages: You can't relocate just the binary and have it work.
Also if you start messing with --prefix=some_path
--exec-prefix=some_other_path, I have a mess to untangle and it may break.
2) keep the existing mechanism but on windows only use the relative path
thing mentioned in #1. Anyone building a windows installer should be
using the supplied script and it forces a known relationship between
where the binary lives and where the libraries and font file live.
Any other ideas? I'm leaning towards #2.
-Dan
More information about the geda-dev
mailing list