blob: 3743d3725fdb022ed6f2665b4fb331832d3201de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
NGHDL Installer (Windows OS)
====
It contains all the documentation for making NGHDL executable (using PyInstaller) and packging NGHDL for Windows 7 and above.
> Note: Do not develop NGHDL on Windows OS. Work only with `installers` branch on Windows OS and do development on Linux OS.
> Reference : https://stackoverflow.com/questions/37672886/cannot-get-rid-of-unstaged-files-in-git-on-my-local
## NGHDL Executable:
1. Download and install "Python-3.6.8", "Git For Windows". Use "Git Bash" for all following shell commands. Ensure that `tcl/tk` (`tkinter`) is also installed with Python as it is required by `matplotlib` dependency
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 the Python dependencies `PyInstaller`, `SetupTools`, `PyQt5` through pip for NGHDL within the virtual environment:
$ pip install pyinstaller
$ pip install setuptools
$ pip install PyQt5==5.9.2
7. Test whether only NGHDL dependencies are available or not:
$ pip freeze
> Note: Following Python packages for NGHDL along with their dependencies should be available -
> - PyQt5
> - PyQt5-sip
> - pyinstaller
8. Create spec file as:
$ pyi-makespec --onefile -n nghdl <path_to_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.
## How to package NGHDL with eSim ?
1. Take the `master` branch of NGHDL. Rename the folder to `nghdl`.
2. Place the NGHDL executable (`nghdl.exe`) at the location `nghdl/src/`. Also, remove following files from the `nghdl` folder:
- `.git` folder
- python files from `nghdl/src` folder
- .gitignore
- GHDLside.md
- Workflow.md
- nghdl-simulator-source.tar.xz (Move it outside the folder as it is required later on)
3. Place this **nghdl** folder containing `src` folder, `Example` folder, `LICENSE` file and `README.md` under folder named `eSim`.
4. Final directory structure should be:
- eSim/nghdl/Example
- eSim/nghdl/src
- eSim/nghdl/LICENSE
- eSim/nghdl/README.md
5. 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.7z`.
(7z compression tool can be downloaded from - https://www.7-zip.org/download.html)
6. Along with `nghdl.7z` from step 5, place the following 7z files at the installer folder for eSim:
- ghdl.7z
- MSYS.7z
- mingw64.7z
- nghdl-simulator.7z
> Note: These compressed files can be obtained under *Windows/sources/* folder of NGHDL's `installers` branch
7. Place the script `nghdl-setup-script.nsi` at the eSim's installer folder.
8. Follow rest of the [instructions](https://github.com/FOSSEE/eSim/tree/installers/Windows/README.md) for packaging eSim.
|