From 3be08e41ac75ef07bd2e1869afc51d0831069163 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 17 Jul 2020 00:20:44 +0530 Subject: include NGHDL --- Windows/esim-setup-script.nsi | 73 +++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 23 deletions(-) (limited to 'Windows/esim-setup-script.nsi') diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi index 87f54bee..fe79c1c5 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 "logo.ico" SetOutPath "$INSTDIR" ;ADD YOUR OWN FILES HERE... - ZipDLL::extractall "$EXEDIR\spice.zip" "$INSTDIR\" ZipDLL::extractall "$EXEDIR\eSim.zip" "$INSTDIR\" - ;Setting Env Variable for Ngspice - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\spice\bin" ;Copying Folder to install directory SetOutPath "$INSTDIR\eSim" @@ -208,19 +203,20 @@ 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\logo.ico" - !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd Section -InstallKiCad - SetOutPath "$EXEDIR" + ; SetOutPath "$EXEDIR" File "kicad-4.0.7-i686.exe" SetOutPath "$INSTDIR" @@ -233,15 +229,18 @@ 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\" - ;CopyFiles "$INSTDIR\eSim\library\kicadLibrary\library\*" "$INSTDIR\KiCad\share\kicad\library\" + CopyFiles "$INSTDIR\eSim\library\kicadLibrary\library\*" "$INSTDIR\KiCad\share\kicad\library\" ;Copy KiCad library made for eSim CopyFiles "$INSTDIR\eSim\library\kicadLibrary\kicad_eSim-Library\*" "$INSTDIR\KiCad\share\kicad\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,13 +352,6 @@ 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" -- cgit From 76cbadc71587f8047e118f5e7a932221f083cb73 Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Mon, 20 Jul 2020 15:17:30 +0530 Subject: added NGHDL and reduced KiCad --- Windows/esim-setup-script.nsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Windows/esim-setup-script.nsi') diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi index fe79c1c5..15203e31 100644 --- a/Windows/esim-setup-script.nsi +++ b/Windows/esim-setup-script.nsi @@ -216,7 +216,7 @@ SectionEnd Section -InstallKiCad - ; SetOutPath "$EXEDIR" + SetOutPath "$EXEDIR" File "kicad-4.0.7-i686.exe" SetOutPath "$INSTDIR" @@ -240,7 +240,7 @@ Section -InstallKiCad ZipDLL::extractall "$INSTDIR\eSim\library\kicadLibrary.zip" "$INSTDIR\eSim\library\" - CopyFiles "$INSTDIR\eSim\library\kicadLibrary\library\*" "$INSTDIR\KiCad\share\kicad\library\" + ;CopyFiles "$INSTDIR\eSim\library\kicadLibrary\library\*" "$INSTDIR\KiCad\share\kicad\library\" ;Copy KiCad library made for eSim CopyFiles "$INSTDIR\eSim\library\kicadLibrary\kicad_eSim-Library\*" "$INSTDIR\KiCad\share\kicad\library\" @@ -339,7 +339,7 @@ Section Uninstall ;Removing Env Variable for KiCad GetFullPathName $1 $INSTDIR\..\KiCad\bin - EnVar::DeleteValue "Path" $1 + EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" @@ -374,4 +374,4 @@ SectionEnd ;!insertmacro MUI_DESCRIPTION_TEXT ${NgspiceSim} $(DESC_NgspiceSim) ;!insertmacro MUI_FUNCTION_DESCRIPTION_END -;-------------------------------- \ No newline at end of file +;-------------------------------- -- cgit From b4f6a50446bd7e75fdbe11af6f934618b35d495e Mon Sep 17 00:00:00 2001 From: Bladen Martin Date: Fri, 31 Jul 2020 23:30:10 +0530 Subject: 7z for increased compression --- Windows/esim-setup-script.nsi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Windows/esim-setup-script.nsi') diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi index 15203e31..daaf4cc1 100644 --- a/Windows/esim-setup-script.nsi +++ b/Windows/esim-setup-script.nsi @@ -168,13 +168,13 @@ Section -NgspiceSim SetOutPath "$EXEDIR" - File "eSim.zip" + File "eSim.7z" File "logo.ico" SetOutPath "$INSTDIR" - ;ADD YOUR OWN FILES HERE... - ZipDLL::extractall "$EXEDIR\eSim.zip" "$INSTDIR\" + ;ADD YOUR OWN FILES HERE... + Nsis7z::ExtractWithDetails "$EXEDIR\eSim.7z" "Extracting eSim %s..." ;Copying Folder to install directory @@ -206,7 +206,7 @@ Section -NgspiceSim !insertmacro MUI_STARTMENU_WRITE_END ;Remove not required files - Delete "$EXEDIR\eSim.zip" + Delete "$EXEDIR\eSim.7z" Delete "$EXEDIR\logo.ico" @@ -339,7 +339,7 @@ Section Uninstall ;Removing Env Variable for KiCad GetFullPathName $1 $INSTDIR\..\KiCad\bin - EnVar::DeleteValue "Path" $1 + EnVar::DeleteValue "Path" $1 Pop $0 DetailPrint "EnVar::AddValue returned=|$0|" @@ -356,6 +356,7 @@ Section Uninstall 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}" @@ -374,4 +375,4 @@ SectionEnd ;!insertmacro MUI_DESCRIPTION_TEXT ${NgspiceSim} $(DESC_NgspiceSim) ;!insertmacro MUI_FUNCTION_DESCRIPTION_END -;-------------------------------- +;-------------------------------- \ No newline at end of file -- cgit