From 694cb5d1522bfe450fc9315e9220b71b3dbf12f6 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Wed, 29 Jul 2020 17:48:35 +0530 Subject: Update readme.md --- Windows/readme.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/Windows/readme.md b/Windows/readme.md index 7da8684..799e4c9 100644 --- a/Windows/readme.md +++ b/Windows/readme.md @@ -7,7 +7,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) ## NGHDL Executable: -1. Download and install "Python-3.7.7", "Git For Windows". Use "Git Bash" for all following shell commands. +1. Download and install "Python-3.5.2", "Git For Windows". Use "Git Bash" for all following shell commands. Reference - https://gitforwindows.org/ @@ -32,7 +32,6 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) - Install PyInstaller, tornado, SetupTools through pip : $ pip install pyinstaller - $ pip install tornado $ pip install --upgrade 'setuptools<45.0.0' - Install PyQt4 through pip (Reference - https://stackoverflow.com/questions/22640640/how-to-install-pyqt4-on-windows-using-pip) : @@ -41,7 +40,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) $ pip install Download PyQt4 Wheel from - [https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4] - Where cp37 represents the Python version i.e. 3.7.7 + Where cp37 represents the Python version i.e. 3.7.x and so on > Note : - If there are any issues regarding loading of DLL files, refer : https://stackoverflow.com/questions/2738879/cannot-import-pyqt4-qtgui @@ -53,11 +52,12 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) > Note : Following dependencies should be available - > - PyQt4 -> - numpy -> - dateutil -> - pyparsing -> - six -> - cycler.py +> - sip +> - altgraph +> - future +> - pefile +> - pyinstaller +> - pywin32-ctypes 8. Create spec file as: @@ -73,7 +73,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) -## How to package NGHDL? +## How to package NGHDL with eSim ? 1. Place the nghdl.exe generated from the above process at the location /nghdl/src/ @@ -85,18 +85,22 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) - Readme.md - Workflow.md -4. Place nghdl folder containing `src folder`, `Examples folder`&`LICENSE`under folder named eSim/ +4. Place **nghdl** folder containing `src folder`, `Examples folder` & `LICENSE`under folder named eSim/ -5. Compress `eSim` folder in zip format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl-src.zip`. +5. Final directory structure should be: eSim/nghdl/Examples + eSim/nghdL/src + eSim/nghdl/LICENSE -6. Place the following zip files at the installer folder for eSim. +6. Compress the `eSim` folder from step 4 in 7z format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl-src.7z`. + (7z compression tool can be downloaded from - https://www.7-zip.org/download.html ) + +7. ALong with `nghdl-src.7z` from step 5, place the following 7z files at the installer folder for eSim. (these can be obtained under *sources/* folder in the repository ) -- nghdl-src.zip -- ghdl.zip -- MSYS.zip -- ngspice-nghdl.zip -- mingw.7z +- ghdl.7z +- MSYS.7z +- ngspice-nghdl.7z +- mingw64.7z -7. Place the script `installnghdl.nsi` at the eSim installer location. +8. Place the script `installnghdl.nsi` at the eSim installer location. -8. Follow the rest of the instructions for packging eSim [https://github.com/FOSSEE/eSim/tree/installers/Windows] and compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution. +9. Follow the rest of the instructions for packging eSim [https://github.com/FOSSEE/eSim/tree/installers/Windows] and compile the NSI script (`esim-setup-script.nsi` file). Now only use the generated installer for distribution. -- cgit From f0c7979f4ab41be5c0da7efb095b94bc5e416663 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Wed, 29 Jul 2020 19:04:59 +0530 Subject: Update readme.md --- Windows/readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Windows/readme.md b/Windows/readme.md index 799e4c9..6f5aae9 100644 --- a/Windows/readme.md +++ b/Windows/readme.md @@ -82,17 +82,17 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) 3. Remove the following files at /nghdl/ - .gitignore - GHDLside.md - - Readme.md - Workflow.md -4. Place **nghdl** folder containing `src folder`, `Examples folder` & `LICENSE`under folder named eSim/ +4. Place **nghdl** folder containing `src folder`, `Example folder` & `LICENSE` under folder named eSim/ -5. Final directory structure should be: eSim/nghdl/Examples - eSim/nghdL/src - eSim/nghdl/LICENSE +5. Final directory structure should be: +- eSim/nghdl/Example +- eSim/nghdl/src +- eSim/nghdl/LICENSE -6. Compress the `eSim` folder from step 4 in 7z format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl-src.7z`. - (7z compression tool can be downloaded from - https://www.7-zip.org/download.html ) +6. Compress the `eSim` folder from step 4 in 7z format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl-src.7z`.\ +(7z compression tool can be downloaded from - https://www.7-zip.org/download.html ) 7. ALong with `nghdl-src.7z` from step 5, place the following 7z files at the installer folder for eSim. (these can be obtained under *sources/* folder in the repository ) -- cgit From abb503315ba313fcced67962233a04b68367b6bb Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 11:17:12 +0530 Subject: Changes to made with new Ngspice version --- NgspiceChanges.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 NgspiceChanges.md diff --git a/NgspiceChanges.md b/NgspiceChanges.md new file mode 100644 index 0000000..5bf5afb --- /dev/null +++ b/NgspiceChanges.md @@ -0,0 +1,65 @@ +# Changes for Ngspice version upgrade + +1. Manually add the GHDL server close patch (header files and “close_server” function at the appropriate location) in the outitf.c which comes with the new Ngspice version +>Refer to previous version of NGHDL outitf.c file for reference + +call this function [ close_server(); ] in outitf.c before the line +```c +fprintf(stdout, "\nNo. of Data Rows : %d\n", run->pointCount); +``` +Which occurs in two functions in outitf.c (may not be same in the future), in functions named +```c + static void fileEnd(runDesc *run) +``` +and +```c + static void plotEnd(runDesc *run) +``` +**--- Do not replace old outitf.c with the outitf.c in the new ngspice version.\ +--- Make sure to maintain OS independence of the code, that is same code file for Windows and Linux.** + +2. Similarly manually add patch for identification of Mingw and linking of libws2_32.a to makedefs.in at */ngspice/src/xspice/icm* **after the line `LIBS = -lm`** (important) +```make +ISMINGW = $(shell uname | grep -c "MINGW64") +ifeq ($(ISMINGW), 1) + LIBS = -lm -lws2_32 +endif + +ISMINGW = $(shell uname | grep -c "MINGW32") +ifeq ($(ISMINGW), 1) + LIBS = -lm -lws2_32 +endif + +ISMINGW = $(shell uname | grep -c "MSYS") +ifeq ($(ISMINGW), 1) + LIBS = -lm -lws2_32 +endif +``` + +3. Add patch for linking libws2_32.a in Windows at Makefile.in at */ngspice/src/* by modifying the line +```make +@WINGUI_TRUE@am__append_19 = -lpsapi -lShlwapi +``` +To +```make +@WINGUI_TRUE@am__append_19 = -lpsapi -lShlwapi -lws2_32 +``` + + +4. Add patch for addition of GHDL codemodel to the spinit.in file at */ngspice/src/* as an addition to the section +```make +* The other codemodels +``` +with the line +```make +@XSPICEINIT@ codemodel @pkglibdir@/ghdl.cm +``` +and in GNUmakefile.in at */ngspice/src/xspice/icm* by replacing the line +```make +CMDIRS = spice2poly digital analog xtradev xtraevt table +``` +with +```make +CMDIRS = spice2poly digital analog xtradev xtraevt table ghdl +``` +5. Create a **`ghdl folder`** with two empty files named `modpath.lst` and `udnpath.lst` at the location */ngspice/src/xspice/icm/* -- cgit From f5ee0a49642b0b7642f815bbd7e0e7cb4baa403b Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:33:13 +0530 Subject: 7z for increased compression --- Windows/installnghdl.nsi | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Windows/installnghdl.nsi b/Windows/installnghdl.nsi index 0ab7da4..2d5de99 100644 --- a/Windows/installnghdl.nsi +++ b/Windows/installnghdl.nsi @@ -76,52 +76,52 @@ Section "nghdl-loadsource" SetOutPath $EXEDIR - File "ghdl.zip" - File "mingw.7z" - File "MSYS.zip" - File "nghdl-src.zip" - File "ngspice-nghdl.zip" + File "ghdl.7z" + File "mingw64.7z" + File "MSYS.7z" + File "nghdl-src.7z" + File "ngspice-nghdl.7z" SectionEnd Section "nghdl-src" SetOutPath $INSTDIR - ZipDLL::extractall "$EXEDIR\nghdl-src.zip" "$INSTDIR\" + Nsis7z::ExtractWithDetails "$EXEDIR\nghdl-src.7z" "Extracting NGHDL %s..." EnVar::SetHKLM DetailPrint "EnVar::SetHKLM" EnVar::AddValue "Path" "$INSTDIR\eSim\nghdl\src" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\nghdl-src.zip" + Delete "$EXEDIR\nghdl-src.7z" SectionEnd Section "nghdl-mingw" SetOutPath $INSTDIR - Nsis7z::ExtractWithDetails "$EXEDIR\mingw.7z" "Extracting MinGW %s..." + Nsis7z::ExtractWithDetails "$EXEDIR\mingw64.7z" "Extracting MinGW %s..." EnVar::SetHKLM EnVar::AddValue "Path" "$INSTDIR\mingw64\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\mingw.7z" + Delete "$EXEDIR\mingw64.7z" SectionEnd Section "nghdl-msys" SetOutPath $INSTDIR\mingw64 - ZipDLL::extractall "$EXEDIR\MSYS.zip" "$INSTDIR\mingw64\" + Nsis7z::ExtractWithDetails "$EXEDIR\MSYS.7z" "Extracting MSYS %s..." EnVar::SetHKLM EnVar::AddValue "Path" "$INSTDIR\mingw64\msys\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\MSYS.zip" + Delete "$EXEDIR\MSYS.7z" SectionEnd Section "nghdl-GHDL" SetOutPath $INSTDIR\mingw64 - ZipDLL::extractall "$EXEDIR\ghdl.zip" "$INSTDIR\mingw64\" + Nsis7z::ExtractWithDetails "$EXEDIR\ghdl.7z" "Extracting GHDL %s..." EnVar::SetHKLM EnVar::AddValue "Path" "$INSTDIR\mingw64\GHDL\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\ghdl.zip" + Delete "$EXEDIR\ghdl.7z" SectionEnd Section "envar-refresh" @@ -133,7 +133,7 @@ SectionEnd Section "nghdl-installNgspice" SetOutPath $INSTDIR - ZipDLL::extractall "$EXEDIR\ngspice-nghdl.zip" "$INSTDIR\" + Nsis7z::ExtractWithDetails "$EXEDIR\ngspice-nghdl.7z" "Extracting GHDL %s..." CopyFiles $INSTDIR\eSim\nghdl\src\outitf.c $INSTDIR\ngspice-nghdl\src\frontend @@ -160,7 +160,7 @@ Section "nghdl-installNgspice" FileClose $0 nsExec::ExecToLog "$INSTDIR\mingw64\msys\bin\bash.exe installngspice.sh" - Delete "$EXEDIR\ngspice-nghdl.zip" + Delete "$EXEDIR\ngspice-nghdl.7z" Delete $INSTDIR\ngspice-nghdl\release\installngspice.sh SetOutPath $INSTDIR -- cgit From 2e7c1591ed1ed6e181521182dd1763056572e661 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:34:13 +0530 Subject: Delete MSYS.zip --- Windows/sources/MSYS.zip | Bin 52163263 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/MSYS.zip diff --git a/Windows/sources/MSYS.zip b/Windows/sources/MSYS.zip deleted file mode 100644 index 84ccd49..0000000 Binary files a/Windows/sources/MSYS.zip and /dev/null differ -- cgit From 0f22172d72efc06f7fda409c8e35d6f2a54091c6 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:34:42 +0530 Subject: Delete ghdl.zip --- Windows/sources/ghdl.zip | Bin 21331447 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/ghdl.zip diff --git a/Windows/sources/ghdl.zip b/Windows/sources/ghdl.zip deleted file mode 100644 index 197414d..0000000 Binary files a/Windows/sources/ghdl.zip and /dev/null differ -- cgit From 5eec6521ce630403b9cb5cb33e3940a4b57879a3 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:34:50 +0530 Subject: Delete mingw.7z --- Windows/sources/mingw.7z | Bin 49370037 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/mingw.7z diff --git a/Windows/sources/mingw.7z b/Windows/sources/mingw.7z deleted file mode 100644 index 9c1eb68..0000000 Binary files a/Windows/sources/mingw.7z and /dev/null differ -- cgit From e8d3d12bc0a381e803b2337af94969a2758a65ce Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:35:00 +0530 Subject: Delete nghdl-src.zip --- Windows/sources/nghdl-src.zip | Bin 15494597 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/nghdl-src.zip diff --git a/Windows/sources/nghdl-src.zip b/Windows/sources/nghdl-src.zip deleted file mode 100644 index 2535bf4..0000000 Binary files a/Windows/sources/nghdl-src.zip and /dev/null differ -- cgit From 2af7b9153c1c9adc53dac76e8784311e62ee112c Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:35:09 +0530 Subject: Delete ngspice-nghdl.zip --- Windows/sources/ngspice-nghdl.zip | Bin 9349804 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/ngspice-nghdl.zip diff --git a/Windows/sources/ngspice-nghdl.zip b/Windows/sources/ngspice-nghdl.zip deleted file mode 100644 index d35f0d2..0000000 Binary files a/Windows/sources/ngspice-nghdl.zip and /dev/null differ -- cgit From 4bb2079a4f94e0fd6446f2abcd8df86f6427499b Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:35:29 +0530 Subject: Create sources --- Windows/sources | 1 + 1 file changed, 1 insertion(+) create mode 100644 Windows/sources diff --git a/Windows/sources b/Windows/sources new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Windows/sources @@ -0,0 +1 @@ + -- cgit From 705880606aa60b897040dd37d9bd5f9ff56a77b3 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:35:46 +0530 Subject: Delete sources --- Windows/sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Windows/sources diff --git a/Windows/sources b/Windows/sources deleted file mode 100644 index 8b13789..0000000 --- a/Windows/sources +++ /dev/null @@ -1 +0,0 @@ - -- cgit From 64b6576e0770258f599c9ec7eb8c4dc5bba18a4d Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Sat, 1 Aug 2020 10:50:12 +0530 Subject: sources compressed using 7z --- Windows/sources/MSYS.7z | Bin 0 -> 8449807 bytes Windows/sources/ghdl.7z | Bin 0 -> 10968564 bytes Windows/sources/mingw64.7z | Bin 0 -> 16720325 bytes Windows/sources/ngspice-nghdl.7z | Bin 0 -> 3725876 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Windows/sources/MSYS.7z create mode 100644 Windows/sources/ghdl.7z create mode 100644 Windows/sources/mingw64.7z create mode 100644 Windows/sources/ngspice-nghdl.7z diff --git a/Windows/sources/MSYS.7z b/Windows/sources/MSYS.7z new file mode 100644 index 0000000..c113d5f Binary files /dev/null and b/Windows/sources/MSYS.7z differ diff --git a/Windows/sources/ghdl.7z b/Windows/sources/ghdl.7z new file mode 100644 index 0000000..f403f6e Binary files /dev/null and b/Windows/sources/ghdl.7z differ diff --git a/Windows/sources/mingw64.7z b/Windows/sources/mingw64.7z new file mode 100644 index 0000000..41b0a98 Binary files /dev/null and b/Windows/sources/mingw64.7z differ diff --git a/Windows/sources/ngspice-nghdl.7z b/Windows/sources/ngspice-nghdl.7z new file mode 100644 index 0000000..aaee3be Binary files /dev/null and b/Windows/sources/ngspice-nghdl.7z differ -- cgit