From 27776b92439b26de41df324b4f2cabb73913e661 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 16 Jul 2020 22:55:25 +0530 Subject: create nghdl.exe and packaging nghdl --- Windows/readme.md | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Windows/readme.md (limited to 'Windows/readme.md') diff --git a/Windows/readme.md b/Windows/readme.md new file mode 100644 index 0000000..10c73f2 --- /dev/null +++ b/Windows/readme.md @@ -0,0 +1,102 @@ +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.7.7", "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, 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) : + + $ 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.7 + + > 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 eSim dependencies are available or not: + + $ pip freeze + +> Note : Following dependencies should be available - +> - PyQt4 +> - numpy +> - dateutil +> - pyparsing +> - six +> - cycler.py + + +8. Create spec file as: + + $ pyi-makespec --onefile -n eSim /src/ngspice_ghdl.py + +9. Create onefile executable using pyinstaller as: + + $ pyinstaller -F --clean nghdl.spec + +10. Verify whether all eSim `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? + +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 + - Readme.md + - Workflow.md + +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`. + +6. Place the following zip 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 + +7. 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. \ No newline at end of file -- cgit From 4c8c9e1448b138c8636a04e31374a385b8960657 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Thu, 16 Jul 2020 22:58:10 +0530 Subject: Update readme.md --- Windows/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Windows/readme.md') diff --git a/Windows/readme.md b/Windows/readme.md index 10c73f2..7da8684 100644 --- a/Windows/readme.md +++ b/Windows/readme.md @@ -47,7 +47,7 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) - 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 eSim dependencies are available or not: +7. Test whether only NGHDL dependencies are available or not: $ pip freeze @@ -62,13 +62,13 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) 8. Create spec file as: - $ pyi-makespec --onefile -n eSim /src/ngspice_ghdl.py + $ 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 eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. +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. @@ -99,4 +99,4 @@ It contains all the documenation for making NGHDL executable (using PyInstaller) 7. 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. \ No newline at end of file +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. -- cgit