* support/scripts/sdcc.nsi: added asranlib.exe to the install package
[fw/sdcc] / support / scripts / sdcc.nsi
index 5ca1890cb5e8ec475a528ca85bf65ce558f41291..35622c858c9fb5c5fbdfe4e21dd24bb74d56757d 100644 (file)
@@ -256,7 +256,7 @@ ${Function} SDCC.InstFilesLeave
 ${FunctionEnd}
 
 ; Finish page - add to path
-!define MUI_FINISHPAGE_TEXT "Confirm the checkbox if you won to add SDCC binary directory to the PATH environment variable"
+!define MUI_FINISHPAGE_TEXT "Confirm the checkbox if you want to add SDCC binary directory to the PATH environment variable"
 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Add $INSTDIR\bin to the PATH"
 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION SDCC.AddBinToPath
 !define MUI_FINISHPAGE_SHOWREADME
@@ -362,6 +362,7 @@ ${Section} "SDCC application files" SEC01
   File "${SDCC_ROOT}\bin\as-z80.exe"
   File "${SDCC_ROOT}\bin\asx8051.exe"
   File "${SDCC_ROOT}\bin\aslink.exe"
+  File "${SDCC_ROOT}\bin\asranlib.exe"
   File "${SDCC_ROOT}\bin\link-gbz80.exe"
   File "${SDCC_ROOT}\bin\link-hc08.exe"
   File "${SDCC_ROOT}\bin\link-z80.exe"
@@ -426,6 +427,7 @@ ${Section} "SDCC include files" SEC05
   File "${DEV_ROOT}\include\pic\*.inc"
   SetOutPath "$INSTDIR\include\pic16"
   File "${DEV_ROOT}\include\pic16\*.h"
+  File "${DEV_ROOT}\include\pic16\*.txt"
   SetOutPath "$INSTDIR\include\z80"
   File "${DEV_ROOT}\include\z80\*.h"
   SetOutPath "$INSTDIR\include"
@@ -527,7 +529,6 @@ ${Section} "SDCC library sources" SEC17
 #  File "${DEV_ROOT}\lib\src\gbz80\Makefile"
 
   SetOutPath "$INSTDIR\lib\src\z80"
-  File "${DEV_ROOT}\lib\src\z80\*.c"
   File "${DEV_ROOT}\lib\src\z80\*.s"
 #  File "${DEV_ROOT}\lib\src\z80\Makefile"
 
@@ -819,7 +820,6 @@ ${Section} Uninstall SECUNINSTALL
   Delete "$INSTDIR\lib\src\hc08\hc08.lib"
   Delete "$INSTDIR\lib\src\hc08\Makefile"
 
-  Delete "$INSTDIR\lib\src\z80\*.c"
   Delete "$INSTDIR\lib\src\z80\*.s"
   Delete "$INSTDIR\lib\src\z80\z80.lib"
   Delete "$INSTDIR\lib\src\z80\README"
@@ -889,6 +889,7 @@ ${Section} Uninstall SECUNINSTALL
   Delete "$INSTDIR\include\pic\*.txt"
   Delete "$INSTDIR\include\pic\*.inc"
   Delete "$INSTDIR\include\pic16\*.h"
+  Delete "$INSTDIR\include\pic16\*.txt"
   Delete "$INSTDIR\include\mcs51\*.h"
   Delete "$INSTDIR\include\hc08\*.h"
   Delete "$INSTDIR\include\*.h"
@@ -903,6 +904,7 @@ ${Section} Uninstall SECUNINSTALL
   Delete "$INSTDIR\bin\as-z80.exe"
   Delete "$INSTDIR\bin\asx8051.exe"
   Delete "$INSTDIR\bin\aslink.exe"
+  Delete "$INSTDIR\bin\asranlib.exe"
   Delete "$INSTDIR\bin\link-gbz80.exe"
   Delete "$INSTDIR\bin\link-hc08.exe"
   Delete "$INSTDIR\bin\link-z80.exe"
@@ -1305,12 +1307,17 @@ ${Function} SDCC.PageLeaveReinstall
   ;Run uninstaller
   HideWindow
 
-  ClearErrors
-  ; ExecWait doesn't wait if _?=$INSTDIR is not defined!
-  ExecWait '$R1 _?=$INSTDIR'
-
   ${If} $R0 == "2"
+    ; Uninstall only: uninstaller should be removed
+    ClearErrors
+    ; ExecWait doesn't wait if _?=$INSTDIR is not defined!
+    ExecWait '$R1'
     Quit
+  ${Else}
+    ; Uninstal & Reinstall: uninstaller will be rewritten
+    ClearErrors
+    ; ExecWait doesn't wait if _?=$INSTDIR is not defined!
+    ExecWait '$R1 _?=$INSTDIR'
   ${EndIf}
 
   BringToFront