diff options
author | Rahul P | 2020-08-02 01:08:05 +0530 |
---|---|---|
committer | GitHub | 2020-08-02 01:08:05 +0530 |
commit | dcfa9968f4bb29fcac2b5b197e0d1db1a8370300 (patch) | |
tree | fd0c9106fc2380f058f334175888726d04abf71b | |
parent | f5f3afe6b5ff6af20370e12fd186f81449fd0713 (diff) | |
parent | 23e13dcfb7d8654f5d274c6a9c51b6529d58b057 (diff) | |
download | eSim-dcfa9968f4bb29fcac2b5b197e0d1db1a8370300.tar.gz eSim-dcfa9968f4bb29fcac2b5b197e0d1db1a8370300.tar.bz2 eSim-dcfa9968f4bb29fcac2b5b197e0d1db1a8370300.zip |
Merge pull request #3 from bladen-martin/installers
Updated eSim NSIS script for NGHDL and KiCad; eSim version changes
-rw-r--r-- | Windows/esim-setup-script.nsi | 78 | ||||
-rw-r--r-- | eSimVersionChange.md | 39 |
2 files changed, 92 insertions, 25 deletions
diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi index 87f54bee..daaf4cc1 100644 --- a/Windows/esim-setup-script.nsi +++ b/Windows/esim-setup-script.nsi @@ -8,7 +8,6 @@ !include "MUI2.nsh" !include "ZipDLL.nsh" - !include "EnvVarUpdate.nsh" !include "x64.nsh" ;-------------------------------- @@ -169,18 +168,14 @@ Section -NgspiceSim SetOutPath "$EXEDIR" - File "spice.zip" - File "eSim.zip" + File "eSim.7z" File "logo.ico" SetOutPath "$INSTDIR" - ;ADD YOUR OWN FILES HERE... - ZipDLL::extractall "$EXEDIR\spice.zip" "$INSTDIR\" - ZipDLL::extractall "$EXEDIR\eSim.zip" "$INSTDIR\" + ;ADD YOUR OWN FILES HERE... + Nsis7z::ExtractWithDetails "$EXEDIR\eSim.7z" "Extracting eSim %s..." - ;Setting Env Variable for Ngspice - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\spice\bin" ;Copying Folder to install directory SetOutPath "$INSTDIR\eSim" @@ -208,12 +203,13 @@ Section -NgspiceSim ;create desktop shortcut CreateShortCut "$PROFILE\..\Public\Desktop\eSim.lnk" "$INSTDIR\eSim\eSim" "" "$PROFILE\.esim\logo.ico" "" SW_SHOWMINIMIZED + !insertmacro MUI_STARTMENU_WRITE_END + ;Remove not required files - Delete "$EXEDIR\spice.zip" - Delete "$EXEDIR\eSim.zip" + Delete "$EXEDIR\eSim.7z" Delete "$EXEDIR\logo.ico" - !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd @@ -233,11 +229,14 @@ Section -InstallKiCad Goto endActiveSync endActiveSync: - ;Remove not required files - Delete "$EXEDIR\kicad-4.0.7-i686.exe" - Delete "$PROFILE\..\Public\Desktop\KiCad.lnk" + ;Remove not required files + Delete "$EXEDIR\kicad-4.0.7-i686.exe" + Delete "$PROFILE\..\Public\Desktop\KiCad.lnk" - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\KiCad\bin" + EnVar::SetHKLM + EnVar::AddValue "Path" "$INSTDIR\KiCad\bin" + Pop $0 + DetailPrint "EnVar::AddValue returned=|$0|" ZipDLL::extractall "$INSTDIR\eSim\library\kicadLibrary.zip" "$INSTDIR\eSim\library\" @@ -266,7 +265,7 @@ Section -InstallKiCad RMDir /r "$INSTDIR\eSim\library\kicadLibrary" SectionEnd - + Section -AdditionalIcons @@ -276,6 +275,7 @@ Section -AdditionalIcons SectionEnd +!include "installnghdl.nsi" Section -Post @@ -300,14 +300,48 @@ FunctionEnd Section Uninstall + ; Set to HKLM + EnVar::SetHKLM + + GetFullPathName $1 $INSTDIR\..\eSim\nghdl\src + EnVar::DeleteValue "Path" $1 + Pop $0 + DetailPrint "EnVar::AddValue returned=|$0|" + + GetFullPathName $1 $INSTDIR\..\mingw64\bin + EnVar::DeleteValue "Path" $1 + Pop $0 + DetailPrint "EnVar::AddValue returned=|$0|" + + GetFullPathName $1 $INSTDIR\..\mingw64\msys\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\install_dir\bin + EnVar::DeleteValue "Path" $1 + Pop $0 + DetailPrint "EnVar::AddValue returned=|$0|" + + RMDir /r "$INSTDIR\..\mingw64" + RMDir /r "$INSTDIR\..\ngspice-nghdl" + 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" ;Removing Env Variable for KiCad - GetFullPathName $0 $INSTDIR\..\KiCad\bin - ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" $0 + 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" @@ -318,17 +352,11 @@ Section Uninstall Goto endActiveSync endActiveSync: - ;Removing Env Variable for Ngspice - GetFullPathName $0 $INSTDIR\..\spice\bin - ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" $0 - - ;Removing Ngspice - RMDir /r "$INSTDIR\..\spice" - ;Removing eSim RMDir /r "$PROFILE\.esim" RMDir "$SMPROGRAMS\eSim" RMDir /r "$INSTDIR\..\eSim" + RMDir /r "$INSTDIR\..\KiCad" Delete "$PROFILE\..\Public\Desktop\eSim.lnk" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" diff --git a/eSimVersionChange.md b/eSimVersionChange.md new file mode 100644 index 00000000..3c119663 --- /dev/null +++ b/eSimVersionChange.md @@ -0,0 +1,39 @@ +# Changes to be made when eSim version is updated + +1. master/VERSION\ +- Change the version number + +2. master/conf.py\ +- Update `release` variable + +3. master/setup.py\ +- Update `version` field in `setup` function + +4. User manual +- Update user manual filename as `eSim_Manual_y.x.pdf` where y.x is the updated version. +- Update path in the following line at `master/src/browser/UserManual.py` with the updated manual name +```python + file = os.path.realpath('library/browser/User-Manual/eSim_Manual_2.0.pdf') +``` + +5. master/src/configuration/Appconfig.py\ +- In function `def __init__ (self)` , update the variable `sel._VERSION` + +6. master/INSTALL\ +- Update the installer file names according to the latest version + +7. installers/Windows/esim-setup-script.nsi\ +- Update the following lines in the script +```nsi +- !define PRODUCT_VERSION "y.x" +- !define VERSION "a.b.c.d" + +- OutFile "eSim-y.x_install.exe" +``` + +8. master/README.md +- Update new features, OS support and other changes that were made in the new version. + + + + |