summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrahulp132020-08-06 00:42:53 +0530
committerrahulp132020-08-06 00:42:53 +0530
commit070aacd31259c89a1a26ffd67f1cf38d9c6d6cdf (patch)
tree66d9266f811a281b7af358eb573e5332c1cb902f
parente18d4e7f10fa5748ccb473052270bc97297b3875 (diff)
parent002c6450cde02732a527dc577e7b3ff664c612da (diff)
downloadnghdl-070aacd31259c89a1a26ffd67f1cf38d9c6d6cdf.tar.gz
nghdl-070aacd31259c89a1a26ffd67f1cf38d9c6d6cdf.tar.bz2
nghdl-070aacd31259c89a1a26ffd67f1cf38d9c6d6cdf.zip
Merge branch 'installers' of https://github.com/rahulp13/nghdl into installers
-rw-r--r--NgspiceChanges.md65
-rw-r--r--Windows/installnghdl.nsi30
-rw-r--r--Windows/readme.md44
-rw-r--r--Windows/sources/MSYS.7zbin0 -> 8449807 bytes
-rw-r--r--Windows/sources/MSYS.zipbin52163263 -> 0 bytes
-rw-r--r--Windows/sources/ghdl.7z (renamed from Windows/sources/ngspice-nghdl.zip)bin9349804 -> 10968564 bytes
-rw-r--r--Windows/sources/ghdl.zipbin21331447 -> 0 bytes
-rw-r--r--Windows/sources/mingw.7zbin49370037 -> 0 bytes
-rw-r--r--Windows/sources/mingw64.7z (renamed from Windows/sources/nghdl-src.zip)bin15494597 -> 16720325 bytes
-rw-r--r--Windows/sources/ngspice-nghdl.7zbin0 -> 3725876 bytes
10 files changed, 104 insertions, 35 deletions
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/*
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
diff --git a/Windows/readme.md b/Windows/readme.md
index 7da8684..6f5aae9 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 <wheel_package_of_PyQt4>
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/
@@ -82,21 +82,25 @@ 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. 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/Example
+- 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.
diff --git a/Windows/sources/MSYS.7z b/Windows/sources/MSYS.7z
new file mode 100644
index 0000000..c113d5f
--- /dev/null
+++ b/Windows/sources/MSYS.7z
Binary files differ
diff --git a/Windows/sources/MSYS.zip b/Windows/sources/MSYS.zip
deleted file mode 100644
index 84ccd49..0000000
--- a/Windows/sources/MSYS.zip
+++ /dev/null
Binary files differ
diff --git a/Windows/sources/ngspice-nghdl.zip b/Windows/sources/ghdl.7z
index d35f0d2..f403f6e 100644
--- a/Windows/sources/ngspice-nghdl.zip
+++ b/Windows/sources/ghdl.7z
Binary files differ
diff --git a/Windows/sources/ghdl.zip b/Windows/sources/ghdl.zip
deleted file mode 100644
index 197414d..0000000
--- a/Windows/sources/ghdl.zip
+++ /dev/null
Binary files differ
diff --git a/Windows/sources/mingw.7z b/Windows/sources/mingw.7z
deleted file mode 100644
index 9c1eb68..0000000
--- a/Windows/sources/mingw.7z
+++ /dev/null
Binary files differ
diff --git a/Windows/sources/nghdl-src.zip b/Windows/sources/mingw64.7z
index 2535bf4..41b0a98 100644
--- a/Windows/sources/nghdl-src.zip
+++ b/Windows/sources/mingw64.7z
Binary files differ
diff --git a/Windows/sources/ngspice-nghdl.7z b/Windows/sources/ngspice-nghdl.7z
new file mode 100644
index 0000000..aaee3be
--- /dev/null
+++ b/Windows/sources/ngspice-nghdl.7z
Binary files differ