diff options
author | Sumanto Kar | 2022-02-22 13:20:31 +0530 |
---|---|---|
committer | GitHub | 2022-02-22 13:20:31 +0530 |
commit | 0a046a7d4db025febef000464c27e8f4d6a276e6 (patch) | |
tree | 9e746aa0d149ccd8d7dfbd8a3d0d2975c3387b37 /Windows | |
parent | 1be38d711e2bdd63a39afda062a72ed12dd96fe5 (diff) | |
parent | a08bb380ee2e2c421359d01b99b10e27907d3a11 (diff) | |
download | eSim-0a046a7d4db025febef000464c27e8f4d6a276e6.tar.gz eSim-0a046a7d4db025febef000464c27e8f4d6a276e6.tar.bz2 eSim-0a046a7d4db025febef000464c27e8f4d6a276e6.zip |
Merge pull request #191 from rahulp13/installers
Installer updates for Verilator support
Diffstat (limited to 'Windows')
-rw-r--r-- | Windows/README.md | 46 | ||||
-rw-r--r-- | Windows/esim-setup-script.nsi | 122 | ||||
-rwxr-xr-x | Windows/makerchip.7z | bin | 0 -> 6497053 bytes |
3 files changed, 94 insertions, 74 deletions
diff --git a/Windows/README.md b/Windows/README.md index 93d93c2d..b494e22b 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -29,36 +29,22 @@ It contains all the documentation for making eSim executable (using PyInstaller) $ source eSim/Scripts/activate -6. Install the Python dependencies `PyInstaller`, `Matplotlib`, `Tornado`, `SetupTools`, `PyQt5`, `Pypiwin32` through pip for eSim within the virtual environment: - - $ pip install pyinstaller - $ pip install matplotlib==3.0.3 - $ pip install tornado - $ pip install setuptools - $ pip install PyQt5==5.9.2 - $ pip install pypiwin32 - +6. Install the following Python dependencies through pip for eSim within the virtual environment: + + $ pip install pyinstaller matplotlib==3.0.3 tornado setuptools + $ pip install PyQt5==5.9.2 pypiwin32 psutil + $ pip install watchdog hdlparse + 7. Test whether only eSim dependencies are available or not: $ pip freeze -> Note: Following Python packages for eSim along with their dependencies should be available - -> - PyQt5 -> - PyQt5-sip -> - matplotlib -> - numpy -> - dateutil -> - pyparsing -> - six -> - cycler.py -> - pypiwin32 - 8. Create spec file as: $ pyi-makespec --onefile -n eSim <path_to_eSim>/src/frontEnd/Application.py --icon=<path_to_eSim_logo> 9. Create onefile executable using pyinstaller as: - + $ pyinstaller -F --clean eSim.spec 10. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. @@ -83,7 +69,12 @@ It contains all the documentation for making eSim executable (using PyInstaller) - `library/browser/User-Manual/figures` folder - library/browser/User-Manual/eSim.html -3. Remove entire `library` folder and duplicate files from `template` and `modules` folders from `eSim\library\kicadLibrary` as same will be repeated in KiCad installer. Now, compress it in zip format, place it at `eSim\library` and delete that folder. +3. Remove following from `eSim\library\kicadLibrary` folder as same will be repeated in KiCad installer: + - entire `library` folder + - everything from `modules` folder except `Connectors_Terminal_Blocks.pretty/TerminalBlock_Altech_AK300-2_P5.00mm.kicad_mod` and `TO_SOT_Packages_THT.pretty/TO-220-3_Vertical.kicad_mod` + - everything from `temmplate` folder except `kicad.pro` file + + Now, compress it in zip format, place it at `eSim\library` and delete that folder. 4. Add eSim user manual `eSim_Manual_<version>.pdf` at location `library/browser/User-Manual`. @@ -102,12 +93,13 @@ It contains all the documentation for making eSim executable (using PyInstaller) > Note: Refer this [documentation](https://github.com/fossee/KiCad-eSim/blob/executables/README.md) on packaging KiCad for Windows OS 10. Add following files/folder to the installer folder: - - License file (`rtf` format). - - Logo (`ico` format). - - `esim-setup-script` file. - - `nghdl-setup-script` file. + - License file (`rtf` format) + - Logo (`ico` format) + - `esim-setup-script` file + - Makerchip executables (`makerchip.7z` file) + - `nghdl-setup-script` file fromt the `NGHDL` repository 11. Compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution. > Note: If there is any warning on `Eliminating "zeroing code out"`, then have a look at this reference - -https://nsis-dev.github.io/NSIS-Forums/html/t-358040.html
\ No newline at end of file +https://nsis-dev.github.io/NSIS-Forums/html/t-358040.html diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi index 856a2c39..130748e6 100644 --- a/Windows/esim-setup-script.nsi +++ b/Windows/esim-setup-script.nsi @@ -1,6 +1,6 @@ ;NSIS Modern User Interface ;Start Menu Folder Selection Example Script -;Modified by Fahim Khan, Saurabh Bansode, Rahul Paknikar - 01_03_2020 +;Modified by Fahim Khan, Saurabh Bansode, Rahul Paknikar - 14_02_2022 ;Made by eSim Team, FOSSEE, IIT Bombay ;-------------------------------- @@ -18,8 +18,8 @@ ; Otherwise it returns null(""). ; Written by kenglish_hi ; Adapted from StrReplace written by dandaman32 - - + + Var STR_HAYSTACK Var STR_NEEDLE Var STR_CONTAINS_VAR_1 @@ -67,13 +67,13 @@ FunctionEnd ;General !define PRODUCT_NAME "eSim" -!define PRODUCT_VERSION "2.1" -!define VERSION "2.1.0.0" +!define PRODUCT_VERSION "2.2" +!define VERSION "2.2.0.0" !define PRODUCT_PUBLISHER "FOSSEE, IIT Bombay" !define PRODUCT_WEB_SITE "https://esim.fossee.in/" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" - + VIAddVersionKey "ProductName" "eSim" VIProductVersion "${VERSION}" VIFileVersion "${VERSION}" @@ -86,7 +86,7 @@ VIAddVersionKey "FileDescription" "Installer for eSim EDA Suite" ;Default installation folder InstallDir "C:\FOSSEE" - + ;Request application privileges for Admin Rights RequestExecutionLevel admin @@ -140,20 +140,20 @@ FunctionEnd ;-------------------------------- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "eSim-2.1_installer.exe" +OutFile "eSim-2.2_installer.exe" Function .onVerifyInstDir ${StrContains} $0 "Program Files" $INSTDIR StrCmp $0 "" notfound MessageBox MB_ICONSTOP|MB_OK \ - "Installation in 'Program Files' is not allowed, choose another directory." + "Installation in 'Program Files' is not allowed, please choose another directory." Abort notfound: ${StrContains} $0 " " $INSTDIR StrCmp $0 "" PathGood MessageBox MB_ICONSTOP|MB_OK \ - "Installation path containing spaces is not allowed, choose another directory." + "Installation path containing spaces is not allowed, please choose another directory." Abort PathGood: FunctionEnd @@ -165,6 +165,7 @@ Section -NgspiceSim ;Current section needs an additional "size_kb" kilobytes of disk space ;AddSize 2726298 + AddSize 859966 SetOutPath "$EXEDIR" @@ -185,9 +186,9 @@ Section -NgspiceSim WriteRegStr HKLM "Software\eSim" "" $INSTDIR ;Create eSim config directory - CreateDirectory $PROFILE\.esim - CopyFiles "$EXEDIR\logo.ico" "$PROFILE\.esim" - FileOpen $0 "$PROFILE\.esim\config.ini" w + CreateDirectory $INSTDIR\eSim\library\config\.esim + CopyFiles "$EXEDIR\logo.ico" "$INSTDIR\eSim\library\config\.esim" + FileOpen $0 "$INSTDIR\eSim\library\config\.esim\config.ini" w FileWrite $0 `[eSim]$\n` FileWrite $0 `eSim_HOME = $INSTDIR\eSim$\n` FileWrite $0 `LICENSE = %(eSim_HOME)s\LICENSE.rtf$\n` @@ -197,25 +198,31 @@ Section -NgspiceSim FileWrite $0 `MODELICA_MAP_JSON = %(eSim_HOME)s\library\ngspicetoModelica\Mapping.json$\n` FileClose $0 + ;Create eSim startup batch file + ;FileOpen $0 "$INSTDIR\eSim\eSim.bat" w + ;FileWrite $0 `@echo off$\n` + ;FileWrite $0 `set HOME=$PROFILE$\n` + ;FileWrite $0 `start eSim.exe$\n` + ;FileWrite $0 `cd /d %HOME%$\n` + ;FileClose $0 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - + ;Create shortcuts ;create desktop shortcut - CreateShortCut "$PROFILE\..\Public\Desktop\eSim.lnk" "$INSTDIR\eSim\eSim" "" "$PROFILE\.esim\logo.ico" "" SW_SHOWMINIMIZED + CreateShortCut "$PROFILE\..\Public\Desktop\eSim.lnk" "$INSTDIR\eSim\eSim.exe" "" "$INSTDIR\eSim\library\config\.esim\logo.ico" "" SW_SHOWMINIMIZED !insertmacro MUI_STARTMENU_WRITE_END ;Remove not required files Delete "$EXEDIR\eSim.7z" Delete "$EXEDIR\logo.ico" - - SectionEnd Section -InstallKiCad - + SetOutPath "$EXEDIR" File "kicad-4.0.7-i686.exe" @@ -275,8 +282,25 @@ Section -AdditionalIcons SectionEnd + !include "nghdl-setup-script.nsi" + +Section -InstallMakerchip + + SetOutPath "$EXEDIR" + File "makerchip.7z" + + SetOutPath $INSTDIR + Nsis7z::ExtractWithDetails "$EXEDIR\makerchip.7z" "Extracting Makerchip %s..." + CopyFiles "$INSTDIR\makerchip\*" "$INSTDIR\MSYS\mingw64\bin" + + RMDir /r "$INSTDIR\makerchip" + Delete "$EXEDIR\makerchip.7z" + +SectionEnd + + Section -Post WriteUninstaller "$INSTDIR\eSim\uninst-eSim.exe" @@ -288,6 +312,7 @@ Section -Post SectionEnd + ;Function un.onUninstSuccess ; HideWindow ; MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." @@ -298,9 +323,10 @@ Function un.onInit Abort FunctionEnd + Section Uninstall - ; Set to HKLM + ; Set to HKLM EnVar::SetHKLM GetFullPathName $1 $INSTDIR\..\eSim\nghdl\src @@ -308,72 +334,74 @@ Section Uninstall Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - GetFullPathName $1 $INSTDIR\..\mingw64\bin - EnVar::DeleteValue "Path" $1 + GetFullPathName $1 $INSTDIR\..\MSYS\mingw64\bin + EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - - GetFullPathName $1 $INSTDIR\..\mingw64\msys\bin + + GetFullPathName $1 $INSTDIR\..\MSYS\usr\bin EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - GetFullPathName $1 $INSTDIR\..\mingw64\GHDL\bin - EnVar::DeleteValue "Path" $1 - Pop $0 - DetailPrint "EnVar::AddValue returned=|$0|" + ;GetFullPathName $1 $INSTDIR\..\mingw64\GHDL\bin + ;EnVar::DeleteValue "Path" $1 + ;Pop $0 + ;DetailPrint "EnVar::AddValue returned=|$0|" - GetFullPathName $1 $INSTDIR\..\ngspice-nghdl\bin + GetFullPathName $1 $INSTDIR\..\nghdl-simulator\bin EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - RMDir /r "$INSTDIR\..\mingw64" - RMDir /r "$INSTDIR\..\ngspice-nghdl" + RMDir /r "$INSTDIR\..\MSYS" + RMDir /r "$INSTDIR\..\nghdl-simulator" RMDir /r "$INSTDIR\..\eSim\nghdl" ;Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies - Delete "$INSTDIR\uninst-eSim.exe" - Delete "$SMPROGRAMS\eSim\Uninstall.lnk" + Delete "$INSTDIR\uninst-eSim.exe" + Delete "$SMPROGRAMS\eSim\Uninstall.lnk" - ;Removing Env Variable for KiCad - GetFullPathName $1 $INSTDIR\..\KiCad\bin - EnVar::DeleteValue "Path" $1 + ;Removing Env Variable for KiCad + GetFullPathName $1 $INSTDIR\..\KiCad\bin + EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" - ;Remove KiCad config - RMDir /r "$PROFILE\AppData\Roaming\kicad" - - ;Removing KiCad - ExecWait '"$INSTDIR\..\KiCad\uninstaller.exe" /S' + ;Remove KiCad config + RMDir /r "$PROFILE\AppData\Roaming\kicad" - Goto endActiveSync + ;Removing KiCad + ExecWait '"$INSTDIR\..\KiCad\uninstaller.exe" /S' + + Goto endActiveSync + endActiveSync: ;Removing eSim - RMDir /r "$PROFILE\.esim" - RMDir /r "$PROFILE\.nghdl" + RMDir /r "$INSTDIR\eSim\library\config\.esim" + RMDir /r "$INSTDIR\eSim\library\config\.nghdl" + RMDir /r "$INSTDIR\eSim\library\config" RMDir "$SMPROGRAMS\eSim" RMDir /r "$INSTDIR\..\eSim" RMDir /r "$INSTDIR\..\KiCad" - Delete "$PROFILE\..\Public\Desktop\eSim.lnk" + Delete "$PROFILE\..\Public\Desktop\eSim.lnk" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" ;SetAutoClose true SectionEnd - + ;Descriptions-------------------- ;Language strings - ;LangString DESC_NgspiceSim ${LANG_ENGLISH} "Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and Xspice. Ngspice is part of gEDA project, a full GPL'd suite of Electronic Design Automation tools." + ;LangString DESC_NgspiceSim ${LANG_ENGLISH} "Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and XSPICE. Ngspice is part of gEDA project, a full GPL'd suite of Electronic Design Automation tools." ;Assign language strings to sections ;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN ;!insertmacro MUI_DESCRIPTION_TEXT ${NgspiceSim} $(DESC_NgspiceSim) ;!insertmacro MUI_FUNCTION_DESCRIPTION_END - + ;-------------------------------- diff --git a/Windows/makerchip.7z b/Windows/makerchip.7z Binary files differnew file mode 100755 index 00000000..1cf13cb1 --- /dev/null +++ b/Windows/makerchip.7z |