diff options
Diffstat (limited to 'Windows')
-rw-r--r-- | Windows/MinGW+MSYS.md | 29 | ||||
-rw-r--r-- | Windows/README.md | 9 | ||||
-rw-r--r-- | Windows/nghdl-setup-script.nsi | 85 | ||||
-rw-r--r-- | Windows/sources/MSYS.7z | bin | 8449807 -> 16957136 bytes | |||
-rw-r--r-- | Windows/sources/mingw64.7z | bin | 27332061 -> 63598866 bytes | |||
-rw-r--r-- | Windows/sources/nghdl-simulator.7z | bin | 0 -> 5190141 bytes | |||
-rw-r--r-- | Windows/sources/ngspice-nghdl.7z | bin | 6709844 -> 0 bytes | |||
-rw-r--r-- | Windows/sources/verilator.7z | bin | 0 -> 3166538 bytes |
8 files changed, 77 insertions, 46 deletions
diff --git a/Windows/MinGW+MSYS.md b/Windows/MinGW+MSYS.md index d2f682a..1cc0def 100644 --- a/Windows/MinGW+MSYS.md +++ b/Windows/MinGW+MSYS.md @@ -3,25 +3,36 @@ > 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) +> [Download MSYS2 (unmodified)](https://www.msys2.org/). Following packages are found to be required for building Ngspice and Verilator: + + - $ pacman -S --needed base-devel mingw-w64-x86_64-toolchain + + When prompted for the options, Select the one corresponding to ``mingw-w64-x86_64-gcc`` + + - $ pacman -S --needed mingw-w64-x86_64-python mingw-w64-x86_64-make + - $ pacman -S --needed mingw-w64-x86_64-dlfcn autoconf2.71 + **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. +1. Add `/MSYS/usr/bin/` and `/MSYS/mingw64/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 + > pathtoMSYS/usr/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. - - +4. This comand launches bash in the CMD window which can then be used as `BASH shell`, with commands similar to Linux. +5. Note that this reduced version is not sufficient for building Ngspice and Verilator from their source codes. + + ## 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. +2. To start with, the packages listed above can work as the base for the reduction. + +3. Both utilities should be reduced to the bare minimum required components which can be noted by studying the Ngspice configure file `(/ngspice/configure)`. + +4. The rest of the utilities are to added by accessing the errors in the logs provided during the ``configure``-``make``-``make install`` process. Similar can be done for Verilator as well. diff --git a/Windows/README.md b/Windows/README.md index e39270e..dd84f6d 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -66,7 +66,7 @@ It contains all the documentation for making NGHDL executable (using PyInstaller - .gitignore
- GHDLside.md
- Workflow.md
- - ngspice-nghdl.tar.xz (Move it outside the folder as it is required later on)
+ - 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`.
@@ -76,14 +76,15 @@ It contains all the documentation for making NGHDL executable (using PyInstaller - 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-src.7z`.
+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-src.7z` from step 5, place the following 7z files at the installer folder for eSim:
+6. Along with `nghdl.7z` from step 5, place the following 7z files at the installer folder for eSim:
- ghdl.7z
+ - verilator.7z
- MSYS.7z
- mingw64.7z
- - ngspice-nghdl.7z
+ - nghdl-simulator.7z
> Note: These compressed files can be obtained under *Windows/sources/* folder of NGHDL's `installers` branch
diff --git a/Windows/nghdl-setup-script.nsi b/Windows/nghdl-setup-script.nsi index 1c0cfc5..2330eef 100644 --- a/Windows/nghdl-setup-script.nsi +++ b/Windows/nghdl-setup-script.nsi @@ -77,71 +77,90 @@ Section "nghdl-loadsource" SetOutPath $EXEDIR File "ghdl.7z" + File "verilator.7z" File "mingw64.7z" File "MSYS.7z" - File "nghdl-src.7z" - File "ngspice-nghdl.7z" + File "nghdl.7z" + File "nghdl-simulator.7z" SectionEnd -Section "nghdl-src" +Section "nghdl" SetOutPath $INSTDIR - Nsis7z::ExtractWithDetails "$EXEDIR\nghdl-src.7z" "Extracting NGHDL %s..." + Nsis7z::ExtractWithDetails "$EXEDIR\nghdl.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.7z" + Delete "$EXEDIR\nghdl.7z" SectionEnd -Section "nghdl-mingw" +Section "msys2" SetOutPath $INSTDIR - Nsis7z::ExtractWithDetails "$EXEDIR\mingw64.7z" "Extracting MinGW %s..." + Nsis7z::ExtractWithDetails "$EXEDIR\MSYS.7z" "Extracting MSYS2 %s..." EnVar::SetHKLM - EnVar::AddValue "Path" "$INSTDIR\mingw64\bin" + EnVar::AddValue "Path" "$INSTDIR\MSYS\usr\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\mingw64.7z" + Delete "$EXEDIR\MSYS.7z" SectionEnd -Section "nghdl-msys" - SetOutPath $INSTDIR\mingw64 - Nsis7z::ExtractWithDetails "$EXEDIR\MSYS.7z" "Extracting MSYS %s..." +Section "mingw64" + SetOutPath $INSTDIR\MSYS + Nsis7z::ExtractWithDetails "$EXEDIR\mingw64.7z" "Extracting MinGW %s..." EnVar::SetHKLM - EnVar::AddValue "Path" "$INSTDIR\mingw64\msys\bin" + EnVar::AddValue "Path" "$INSTDIR\MSYS\mingw64\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - Delete "$EXEDIR\MSYS.7z" + Delete "$EXEDIR\mingw64.7z" SectionEnd -Section "nghdl-GHDL" - SetOutPath $INSTDIR\mingw64 +Section "ghdl" + SetOutPath $INSTDIR Nsis7z::ExtractWithDetails "$EXEDIR\ghdl.7z" "Extracting GHDL %s..." - EnVar::SetHKLM - EnVar::AddValue "Path" "$INSTDIR\mingw64\GHDL\bin" - Pop $0 - DetailPrint "EnVar::AddValue returned=|$0|" + ;EnVar::SetHKLM + ;EnVar::AddValue "Path" "$INSTDIR\mingw64\GHDL\bin" + ;Pop $0 + ;DetailPrint "EnVar::AddValue returned=|$0|" + CopyFiles "$INSTDIR\GHDL\bin\*" "$INSTDIR\MSYS\mingw64\bin\" + CopyFiles "$INSTDIR\GHDL\include\*" "$INSTDIR\MSYS\mingw64\include\" + CopyFiles "$INSTDIR\GHDL\lib\*" "$INSTDIR\MSYS\mingw64\lib\" + RMDir /r "$INSTDIR\GHDL" Delete "$EXEDIR\ghdl.7z" SectionEnd +Section "verilator" + SetOutPath $INSTDIR + Nsis7z::ExtractWithDetails "$EXEDIR\verilator.7z" "Extracting Verilator %s..." + CopyFiles "$INSTDIR\verilator\bin\*" "$INSTDIR\MSYS\mingw64\bin\" + CopyFiles "$INSTDIR\verilator\share\verilator\bin\*" "$INSTDIR\MSYS\mingw64\bin\" + CopyFiles "$INSTDIR\verilator\share\verilator\include\*" "$INSTDIR\MSYS\mingw64\include\" + CopyFiles "$INSTDIR\verilator\share\verilator\examples\*" "$INSTDIR\MSYS\mingw64\examples\" + CopyFiles "$INSTDIR\verilator\share\verilator\verilator-config.cmake" "$INSTDIR\MSYS\mingw64\" + CopyFiles "$INSTDIR\verilator\share\verilator\verilator-config-version.cmake" "$INSTDIR\MSYS\mingw64\" + CopyFiles "$INSTDIR\verilator\share\pkgconfig" "$INSTDIR\MSYS\mingw64\" + RMDir /r "$INSTDIR\verilator" + Delete "$EXEDIR\verilator.7z" +SectionEnd + Section "envar-refresh" ReadEnvStr $R0 "PATH" - StrCpy $R0 "$R0;$INSTDIR\eSim\nghdl\src;$INSTDIR\mingw64\bin;$INSTDIR\mingw64\msys\bin;$INSTDIR\mingw64\GHDL\bin;" + StrCpy $R0 "$R0;$INSTDIR\eSim\nghdl\src;$INSTDIR\MSYS\mingw64\bin;$INSTDIR\MSYS\usr\bin;" System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PATH", R0).r0' SectionEnd -Section "nghdl-installNgspice" +Section "install-nghdl-simulator" SetOutPath $INSTDIR - Nsis7z::ExtractWithDetails "$EXEDIR\ngspice-nghdl.7z" "Extracting Ngspice %s..." + Nsis7z::ExtractWithDetails "$EXEDIR\nghdl-simulator.7z" "Extracting NGHDL Simulator %s..." - ;CopyFiles $INSTDIR\eSim\nghdl\src\outitf.c $INSTDIR\ngspice-nghdl\src\frontend + ;CopyFiles $INSTDIR\eSim\nghdl\src\outitf.c $INSTDIR\nghdl-simulator\src\frontend - CopyFiles $INSTDIR\mingw64\x86_64-w64-mingw32\lib\libws2_32.a $INSTDIR\eSim\nghdl\src\ghdlserver + CopyFiles "$INSTDIR\MSYS\mingw64\x86_64-w64-mingw32\lib\libws2_32.a" "$INSTDIR\eSim\nghdl\src\ghdlserver" - SetOutPath $INSTDIR\ngspice-nghdl - CreateDirectory $INSTDIR\ngspice-nghdl\release - SetOutPath $INSTDIR\ngspice-nghdl\release + SetOutPath $INSTDIR\nghdl-simulator + CreateDirectory $INSTDIR\nghdl-simulator\release + SetOutPath $INSTDIR\nghdl-simulator\release Var /GLOBAL shellpath Var /GLOBAL shellpath1 @@ -153,20 +172,20 @@ Section "nghdl-installNgspice" ${StrRep} '$shellpath1' '$shellpath' '\' '/' - ;FileOpen $0 "$INSTDIR\ngspice-nghdl\release\installngspice.sh" w - ;FileWrite $0 `../configure --with-wingui --enable-xspice --disable-debug --prefix=$shellpath1/ngspice-nghdl/install_dir --exec-prefix=$shellpath1/ngspice-nghdl/install_dir &&$\n` + ;FileOpen $0 "$INSTDIR\nghdl-simulator\release\installngspice.sh" w + ;FileWrite $0 `../configure --with-wingui --enable-xspice --disable-debug --prefix=$shellpath1/nghdl-simulator/install_dir --exec-prefix=$shellpath1/nghdl-simulator/install_dir &&$\n` ;FileWrite $0 `make -j$cpucores &&$\n` ;FileWrite $0 `make install$\n` ;FileClose $0 ;nsExec::ExecToLog "$INSTDIR\mingw64\msys\bin\bash.exe installngspice.sh" - ;Delete $INSTDIR\ngspice-nghdl\release\installngspice.sh - Delete "$EXEDIR\ngspice-nghdl.7z" + ;Delete $INSTDIR\nghdl-simulator\release\installngspice.sh + Delete "$EXEDIR\nghdl-simulator.7z" SetOutPath $INSTDIR EnVar::SetHKLM - EnVar::AddValue "Path" "$INSTDIR\ngspice-nghdl\bin" + EnVar::AddValue "Path" "$INSTDIR\nghdl-simulator\bin" Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" diff --git a/Windows/sources/MSYS.7z b/Windows/sources/MSYS.7z Binary files differindex c113d5f..cdbe940 100644 --- a/Windows/sources/MSYS.7z +++ b/Windows/sources/MSYS.7z diff --git a/Windows/sources/mingw64.7z b/Windows/sources/mingw64.7z Binary files differindex 855f693..0ffca41 100644 --- a/Windows/sources/mingw64.7z +++ b/Windows/sources/mingw64.7z diff --git a/Windows/sources/nghdl-simulator.7z b/Windows/sources/nghdl-simulator.7z Binary files differnew file mode 100644 index 0000000..c4c6e6e --- /dev/null +++ b/Windows/sources/nghdl-simulator.7z diff --git a/Windows/sources/ngspice-nghdl.7z b/Windows/sources/ngspice-nghdl.7z Binary files differdeleted file mode 100644 index b396af1..0000000 --- a/Windows/sources/ngspice-nghdl.7z +++ /dev/null diff --git a/Windows/sources/verilator.7z b/Windows/sources/verilator.7z Binary files differnew file mode 100644 index 0000000..bd9f5c5 --- /dev/null +++ b/Windows/sources/verilator.7z |