From 1f91d0860ef92c39395a266f31473485cebbb890 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 16 Sep 2018 00:31:41 +0200 Subject: [PATCH] Set a relative path to find spinit and to load the codemodels. Installation will no longer require a fixed path C:\Spice64 etc. --- visualc/spinit | 17 +++++++-------- visualc/spinit64 | 18 +++++++--------- visualc/spinitd | 17 +++++++-------- visualc/spinitd64 | 17 +++++++-------- visualc/src/include/ngspice/config.h | 31 +++++----------------------- 5 files changed, 33 insertions(+), 67 deletions(-) diff --git a/visualc/spinit b/visualc/spinit index 8e4832c80..d7fd1300c 100644 --- a/visualc/spinit +++ b/visualc/spinit @@ -17,17 +17,14 @@ set interactive strcmp __flag $program "ngspice" if $__flag = 0 -* For SPICE2 POLYs, edit the below line to point to the location -* of your codemodel. +* Load the codemodels + codemodel ../lib/ngspice/spice2poly.cm + codemodel ../lib/ngspice/analog.cm + codemodel ../lib/ngspice/digital.cm + codemodel ../lib/ngspice/xtradev.cm + codemodel ../lib/ngspice/xtraevt.cm + codemodel ../lib/ngspice/table.cm - codemodel C:/Spice/lib/ngspice/spice2poly.cm - -* The other codemodels - codemodel C:/Spice/lib/ngspice/analog.cm - codemodel C:/Spice/lib/ngspice/digital.cm - codemodel C:/Spice/lib/ngspice/xtradev.cm - codemodel C:/Spice/lib/ngspice/xtraevt.cm - codemodel C:/Spice/lib/ngspice/table.cm end unset __flag diff --git a/visualc/spinit64 b/visualc/spinit64 index 47809f090..f7b3a8de8 100644 --- a/visualc/spinit64 +++ b/visualc/spinit64 @@ -17,17 +17,13 @@ set interactive strcmp __flag $program "ngspice" if $__flag = 0 -* For SPICE2 POLYs, edit the below line to point to the location -* of your codemodel. - - codemodel C:/Spice64/lib/ngspice/spice2poly.cm - -* The other codemodels - codemodel C:/Spice64/lib/ngspice/analog.cm - codemodel C:/Spice64/lib/ngspice/digital.cm - codemodel C:/Spice64/lib/ngspice/xtradev.cm - codemodel C:/Spice64/lib/ngspice/xtraevt.cm - codemodel C:/Spice64/lib/ngspice/table.cm +* Load the codemodels + codemodel ../lib/ngspice/spice2poly.cm + codemodel ../lib/ngspice/analog.cm + codemodel ../lib/ngspice/digital.cm + codemodel ../lib/ngspice/xtradev.cm + codemodel ../lib/ngspice/xtraevt.cm + codemodel ../lib/ngspice/table.cm end unset __flag diff --git a/visualc/spinitd b/visualc/spinitd index e52d0ff54..d7fd1300c 100644 --- a/visualc/spinitd +++ b/visualc/spinitd @@ -17,17 +17,14 @@ set interactive strcmp __flag $program "ngspice" if $__flag = 0 -* For SPICE2 POLYs, edit the below line to point to the location -* of your codemodel. +* Load the codemodels + codemodel ../lib/ngspice/spice2poly.cm + codemodel ../lib/ngspice/analog.cm + codemodel ../lib/ngspice/digital.cm + codemodel ../lib/ngspice/xtradev.cm + codemodel ../lib/ngspice/xtraevt.cm + codemodel ../lib/ngspice/table.cm - codemodel C:/Spiced/lib/ngspice/spice2poly.cm - -* The other codemodels - codemodel C:/Spiced/lib/ngspice/analog.cm - codemodel C:/Spiced/lib/ngspice/digital.cm - codemodel C:/Spiced/lib/ngspice/xtradev.cm - codemodel C:/Spiced/lib/ngspice/xtraevt.cm - codemodel C:/Spiced/lib/ngspice/table.cm end unset __flag diff --git a/visualc/spinitd64 b/visualc/spinitd64 index b4a7f3ed4..d7fd1300c 100644 --- a/visualc/spinitd64 +++ b/visualc/spinitd64 @@ -17,17 +17,14 @@ set interactive strcmp __flag $program "ngspice" if $__flag = 0 -* For SPICE2 POLYs, edit the below line to point to the location -* of your codemodel. +* Load the codemodels + codemodel ../lib/ngspice/spice2poly.cm + codemodel ../lib/ngspice/analog.cm + codemodel ../lib/ngspice/digital.cm + codemodel ../lib/ngspice/xtradev.cm + codemodel ../lib/ngspice/xtraevt.cm + codemodel ../lib/ngspice/table.cm - codemodel C:/Spice64d/lib/ngspice/spice2poly.cm - -* The other codemodels - codemodel C:/Spice64d/lib/ngspice/analog.cm - codemodel C:/Spice64d/lib/ngspice/digital.cm - codemodel C:/Spice64d/lib/ngspice/xtradev.cm - codemodel C:/Spice64d/lib/ngspice/xtraevt.cm - codemodel C:/Spice64d/lib/ngspice/table.cm end unset __flag diff --git a/visualc/src/include/ngspice/config.h b/visualc/src/include/ngspice/config.h index 3cfc075f8..4e8b525e7 100644 --- a/visualc/src/include/ngspice/config.h +++ b/visualc/src/include/ngspice/config.h @@ -434,31 +434,10 @@ /* Do not trigger unwanted traps by default */ /* #undef NEWTRUNC */ -#ifdef NGDEBUG -#ifdef CONFIG64 /* Define the directory for executables */ -#define NGSPICEBINDIR "C:/Spice64d/bin" +#define NGSPICEBINDIR "../bin" /* Define the directory for architecture independent data files */ -#define NGSPICEDATADIR "C:/Spice64d/share/ngspice" -#else -/* Define the directory for executables */ -#define NGSPICEBINDIR "C:/Spiced/bin" -/* Define the directory for architecture independent data files */ -#define NGSPICEDATADIR "C:/Spiced/share/ngspice" -#endif -#else -#ifdef CONFIG64 -/* Define the directory for executables */ -#define NGSPICEBINDIR "C:/Spice64/bin" -/* Define the directory for architecture independent data files */ -#define NGSPICEDATADIR "C:/Spice64/share/ngspice" -#else -/* Define the directory for executables */ -#define NGSPICEBINDIR "C:/Spice/bin" -/* Define the directory for architecture independent data files */ -#define NGSPICEDATADIR "C:/Spice/share/ngspice" -#endif -#endif +#define NGSPICEDATADIR "../share/ngspice" /* Define if we want NOBYPASS */ /* #undef NOBYPASS */ @@ -476,13 +455,13 @@ #define PACKAGE_NAME "ngspice" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ngspice 28" +#define PACKAGE_STRING "ngspice 29" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ngspice" /* Define to the version of this package. */ -#define PACKAGE_VERSION "28" +#define PACKAGE_VERSION "29" /* Define if we want predictor algorithm */ /* #undef PREDICTOR */ @@ -537,7 +516,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "28" +#define VERSION "29" /* Define if we want spice2 sensitivity analysis */ /* #undef WANT_SENSE2 */