summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBladen Martin2020-07-17 00:20:44 +0530
committerGitHub2020-07-17 00:20:44 +0530
commit3be08e41ac75ef07bd2e1869afc51d0831069163 (patch)
treef8cbd65bc3caed32ca24d70e0f63885818e0efdf
parentf5f3afe6b5ff6af20370e12fd186f81449fd0713 (diff)
downloadeSim-3be08e41ac75ef07bd2e1869afc51d0831069163.tar.gz
eSim-3be08e41ac75ef07bd2e1869afc51d0831069163.tar.bz2
eSim-3be08e41ac75ef07bd2e1869afc51d0831069163.zip
include NGHDL
-rw-r--r--Windows/esim-setup-script.nsi73
1 files changed, 50 insertions, 23 deletions
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"