diff --git a/ChangeLog b/ChangeLog index 3491ce1b4..090d69f8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ -2009-11-15 Holger Vogt +2009-11-16 Holger Vogt * com_sysinfo.c: line 355 changed, allow mingw console compilation - runcoms2.c: cosmetics + runcoms2.c: cosmetics + cpitf.c, how-to-ngspice-vstudio.txt, visualc/include/config.h, + vngspice.sln, vngspice.vcproj: add console app to configuration + manager of Visual Studio 2009-11-15 Holger Vogt * main.c, src/include/compatmode.h: compatibility mode flag for HSPICE and SPICE3 diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index 22e88aa33..f93309e7c 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -249,7 +249,7 @@ ft_cpinit(void) cp_interactive = TRUE; found = TRUE; break; -#ifdef HAS_WINDOWS +#if defined (HAS_WINDOWS) || defined (__MINGW32__) || defined (_MSC_VER) /* search in local directory where ngspice.exe resides */ } else if ((fp = fopen("./spinit", "r"))) { cp_interactive = FALSE; diff --git a/visualc/how-to-ngspice-vstudio.txt b/visualc/how-to-ngspice-vstudio.txt index 1e5a01380..56a3345ed 100644 --- a/visualc/how-to-ngspice-vstudio.txt +++ b/visualc/how-to-ngspice-vstudio.txt @@ -82,4 +82,14 @@ C:\Spice\ spectrum spinit - \ No newline at end of file +If spinit is not found in the directory cited above, +vngspice.exe also searches for spinit in its own directory. If you give +a relative path for the codemodel directories in spinit, you may +determine your own directory tree. + +If you want to generate a console ngspice (without GUI, +without graphics interface, but usable in batch mode (-b)), +then you have to do the following before compilation: +select console_debug or console_release from the configuration manager. +ngspice.exe will search for spinit in the directory tree shown above, or, +if not found, in its own directory. \ No newline at end of file diff --git a/visualc/include/config.h b/visualc/include/config.h index f0fbcb043..0bd2bfdbf 100644 --- a/visualc/include/config.h +++ b/visualc/include/config.h @@ -1,6 +1,6 @@ /* config.h. Adoted from config which was generated by configure using MSYS and MINGW. */ -/* Special consideration have been given to MS Visual Studio 2008 nrequirements. */ -/* HVo Dec. 2008*/ +/* Special consideration have been given to MS Visual Studio 2008 requirements. */ +/* HVo Dec. 2008, Nov. 2009 */ /* Support for Verilog-A(MS) models */ /* #undef ADMS */ @@ -49,8 +49,11 @@ /* Define if you want to debug frontend */ /* #undef FTEDEBUG */ -/* define to specify MS Windows executable */ +/* CONSOLE flag set in configurations console_debug and console_release */ +#ifndef CONSOLE +/* define to specify MS Windows GUI executable */ #define HAS_WINDOWS 1 +#endif /* Define to 1 if you have the `access' function. */ #define HAVE_ACCESS 1 diff --git a/visualc/vngspice.sln b/visualc/vngspice.sln index 4779f4bb6..c17349737 100644 --- a/visualc/vngspice.sln +++ b/visualc/vngspice.sln @@ -5,10 +5,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vngspice", "vngspice.vcproj EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + console_debug|Win32 = console_debug|Win32 + console_release|Win32 = console_release|Win32 Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.ActiveCfg = console_debug|Win32 + {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.Build.0 = console_debug|Win32 + {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.ActiveCfg = console_release|Win32 + {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.Build.0 = console_release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/visualc/vngspice.vcproj b/visualc/vngspice.vcproj index f0b74a349..a34c660b4 100644 --- a/visualc/vngspice.vcproj +++ b/visualc/vngspice.vcproj @@ -199,6 +199,189 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1117,11 +1300,11 @@ >