ngspice.dll will find its own location (using dladdr() or the corresponding Windows API function), if --enable-relpath is set in ./configure.
spinit is searched for in ../share/ngspice/scripts/ relative to this location.
A relative path is enterd into spinit to find the code models in a path ../lib/ngspice, if --enable-relpath is set in ./configure, independently from the prefix="some_directory".
However this search path is relative to the calling program (eeschema.exe), not relative to ngspice.dll. If both eeschema.exe and ngspice.dll are in the same directory (e.g. in KiCad/bin as in the nightly Windows builds), then everything is ok..
The changes are established in branch sh-kicad, but also in the main development branch scope-inpcom-7.
An update:
spinit
ngspice.dll will find its own location (using dladdr() or the corresponding Windows API function), if --enable-relpath is set in ./configure.
spinit is searched for in ../share/ ngspice/ scripts/ relative to this location.
A relative path is enterd into spinit to find the code models in a path ../lib/ngspice, if --enable-relpath is set in ./configure, independently from the prefix= "some_directory ".
However this search path is relative to the calling program (eeschema.exe), not relative to ngspice.dll. If both eeschema.exe and ngspice.dll are in the same directory (e.g. in KiCad/bin as in the nightly Windows builds), then everything is ok..
The changes are established in branch sh-kicad, but also in the main development branch scope-inpcom-7.
Holger