${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
# 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"
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"
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"
;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