From 4cd9040bba306c9c42e815c0afcba5f95783e045 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Mon, 3 Aug 2020 16:11:12 +0530 Subject: MinGW + MSYS --- Windows/MinGW+MSYS.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Windows/MinGW+MSYS.md diff --git a/Windows/MinGW+MSYS.md b/Windows/MinGW+MSYS.md new file mode 100644 index 0000000..d2f682a --- /dev/null +++ b/Windows/MinGW+MSYS.md @@ -0,0 +1,27 @@ +# MinGW + MSYS - Build environment for Ngspice on Windows +> MSYS provides a Linux like shell and all the utilities required during the configure-make-make install process of Ngspice on Windows. + +> MinGW provides the GCC compiler required to build the Ngspice executable. + +[Download MinGW (unmodified)](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z)\ +[Download MSYS (unmodified)](https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip/download) + +**Reduced versions of MinGW and MSYS for NGHDL can be found in this repository under `sources/` folder.** + +## Usage of MinGW + MSYS +1. Add `/mingw64/bin/` and `/mingw64/msys/bin` to the path so that all the utilities are able to find each other. +2. Open Windows command prompt at the location you want to use `MinGW + MSYS`. +3. Execute the command to launch `bash` provided by MSYS at this location. + ```sh + > pathtoMSYS/bin/bash.exe + ``` + 4. This comand launches bash in the CMD window which can then be used as `BASH shell`, with commands similar to Linux. + + +## Reduction of MinGW + MSYS +> Originally MinGW and MSYS are provided for a large variety of development scenarios which are not required by NGHDL, causing size overheads in the final distribution. + +1. To remove unrequired parts of MSYS and MinGW, a trial and error based approach is to be followed. + +2. To start, both utilities should be reduced to the bare minimum required components which can be noted by studying the Ngspice configure file `(/ngspice/configure)`. +The rest of the utilities are to added by accessing the errors in the logs provided during the configure-make-make install process. -- cgit From a64e48e777e3c95ca720b3225ee5262b0f1aa956 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Wed, 5 Aug 2020 22:08:04 +0530 Subject: Update readme.md --- Windows/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/readme.md b/Windows/readme.md index 6f5aae9..cb39499 100644 --- a/Windows/readme.md +++ b/Windows/readme.md @@ -29,7 +29,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) 6. Install all Python dependencies for NGHDL within the virtual environment as: - - Install PyInstaller, tornado, SetupTools through pip : + - Install PyInstaller, SetupTools through pip : $ pip install pyinstaller $ pip install --upgrade 'setuptools<45.0.0' -- cgit From b05ed92da35bb7e1e0c09ffc9616465cc30cae94 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 6 Aug 2020 18:33:44 +0530 Subject: Update readme.md --- Windows/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Windows/readme.md b/Windows/readme.md index cb39499..f63e717 100644 --- a/Windows/readme.md +++ b/Windows/readme.md @@ -98,9 +98,10 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) (these can be obtained under *sources/* folder in the repository ) - ghdl.7z - MSYS.7z -- ngspice-nghdl.7z - mingw64.7z +- ngspice-nghdl.7z ( this file can be obtained by decompressing `ngspice-nghdl.tar.xz` file present at `master branch` of this repository and recompressing using 7z tool) + 8. Place the script `installnghdl.nsi` at the eSim installer location. 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 f1056e2b9b752470d5434d19da65195f8ba70b10 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 6 Aug 2020 18:34:07 +0530 Subject: Delete ngspice-nghdl.7z --- Windows/sources/ngspice-nghdl.7z | Bin 3725876 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Windows/sources/ngspice-nghdl.7z diff --git a/Windows/sources/ngspice-nghdl.7z b/Windows/sources/ngspice-nghdl.7z deleted file mode 100644 index aaee3be..0000000 Binary files a/Windows/sources/ngspice-nghdl.7z and /dev/null differ -- cgit From 61fd2a0cec774a9076b1e45c53973a037d333147 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 6 Aug 2020 19:15:11 +0530 Subject: Delete readme.md --- Windows/readme.md | 107 ------------------------------------------------------ 1 file changed, 107 deletions(-) delete mode 100644 Windows/readme.md diff --git a/Windows/readme.md b/Windows/readme.md deleted file mode 100644 index f63e717..0000000 --- a/Windows/readme.md +++ /dev/null @@ -1,107 +0,0 @@ -NGHDL Installer (Windows OS) -==== - - -It contains all the documenation for making NGHDL executable (using PyInstaller) and packging for eSim Installation Script on Windows 7 and above. - - -## NGHDL Executable: - -1. Download and install "Python-3.5.2", "Git For Windows". Use "Git Bash" for all following shell commands. - - Reference - https://gitforwindows.org/ - -2. Add alias to python.exe in Git shell: - - $ alias python='winpty python.exe' #Need to be done for each new shell created - -3. Download `virtualenv` package as: - - $ pip install virtualenv - -4. Create a virtual environment as: - - $ python -m virtualenv nghdl - -5. Activate the virtual environment as: - - $ source nghdl/Scripts/activate - -6. Install all Python dependencies for NGHDL within the virtual environment as: - - - Install PyInstaller, SetupTools through pip : - - $ pip install pyinstaller - $ 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) : - - $ pip install --upgrade 'sip<5.0.0' - $ pip install - - Download PyQt4 Wheel from - [https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4] - 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 - - If above step works, then goto step 7. - -7. Test whether only NGHDL dependencies are available or not: - - $ pip freeze - -> Note : Following dependencies should be available - -> - PyQt4 -> - sip -> - altgraph -> - future -> - pefile -> - pyinstaller -> - pywin32-ctypes - - -8. Create spec file as: - - $ pyi-makespec --onefile -n nghdl /src/ngspice_ghdl.py - -9. Create onefile executable using pyinstaller as: - - $ pyinstaller -F --clean nghdl.spec - -10. Verify whether all NGHDL `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. -11. nghdl.exe is generated at the dist folder. - - - -## How to package NGHDL with eSim ? - -1. Place the nghdl.exe generated from the above process at the location /nghdl/src/ - -2. Delete all python files (files ending in .py) at /nghdl/src/ - -3. Remove the following files at /nghdl/ - - .gitignore - - GHDLside.md - - Workflow.md - -4. Place **nghdl** folder containing `src folder`, `Example folder` & `LICENSE` under folder named eSim/ - -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 ) - -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 ) -- ghdl.7z -- MSYS.7z -- mingw64.7z - -- ngspice-nghdl.7z ( this file can be obtained by decompressing `ngspice-nghdl.tar.xz` file present at `master branch` of this repository and recompressing using 7z tool) - -8. Place the script `installnghdl.nsi` at the eSim installer location. - -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 87f2b459db9251df785b079ae97180f87d0d769b Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 6 Aug 2020 19:18:14 +0530 Subject: Update README.md --- Windows/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Windows/README.md b/Windows/README.md index 6f5aae9..bf3e7ca 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -98,9 +98,10 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) (these can be obtained under *sources/* folder in the repository ) - ghdl.7z - MSYS.7z -- ngspice-nghdl.7z - mingw64.7z +- ngspice-nghdl.7z ( this file can be obtained by decompressing `ngspice-nghdl.tar.xz` file present at `master branch` of this repository and recompressing using 7z tool) + 8. Place the script `installnghdl.nsi` at the eSim installer location. 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 335ae3ddf3910315dda1cf274054b40635c304fe Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 6 Aug 2020 19:20:06 +0530 Subject: Update README.md --- Windows/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/README.md b/Windows/README.md index bf3e7ca..f63e717 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -29,7 +29,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) 6. Install all Python dependencies for NGHDL within the virtual environment as: - - Install PyInstaller, tornado, SetupTools through pip : + - Install PyInstaller, SetupTools through pip : $ pip install pyinstaller $ pip install --upgrade 'setuptools<45.0.0' -- cgit