| 1 |
!include "MUI.nsh" |
| 2 |
|
| 3 |
;Name and file |
| 4 |
Name "Minidjvu 0.8" |
| 5 |
OutFile "minidjvu-0.8.exe" |
| 6 |
|
| 7 |
;Default installation folder |
| 8 |
InstallDir "$PROGRAMFILES\minidjvu" |
| 9 |
|
| 10 |
;Get installation folder from registry if available |
| 11 |
InstallDirRegKey HKCU "Software\minidjvu" "" |
| 12 |
|
| 13 |
|
| 14 |
;-------------------------------- |
| 15 |
;Interface Settings |
| 16 |
|
| 17 |
!define MUI_ABORTWARNING |
| 18 |
|
| 19 |
;-------------------------------- |
| 20 |
;Pages |
| 21 |
|
| 22 |
!insertmacro MUI_PAGE_WELCOME |
| 23 |
!insertmacro MUI_PAGE_LICENSE "COPYING" |
| 24 |
!insertmacro MUI_PAGE_DIRECTORY |
| 25 |
!insertmacro MUI_PAGE_INSTFILES |
| 26 |
!insertmacro MUI_PAGE_FINISH |
| 27 |
|
| 28 |
!insertmacro MUI_UNPAGE_CONFIRM |
| 29 |
!insertmacro MUI_UNPAGE_INSTFILES |
| 30 |
|
| 31 |
;-------------------------------- |
| 32 |
;Languages |
| 33 |
|
| 34 |
!insertmacro MUI_LANGUAGE "English" |
| 35 |
!insertmacro MUI_LANGUAGE "Russian" |
| 36 |
|
| 37 |
;-------------------------------- |
| 38 |
;Installer Sections |
| 39 |
|
| 40 |
Section "Install" |
| 41 |
|
| 42 |
SetOutPath "$INSTDIR" |
| 43 |
|
| 44 |
Delete "$INSTDIR\bash.dll" |
| 45 |
Delete "$INSTDIR\bash.exe" |
| 46 |
Delete "$INSTDIR\djvm.exe" |
| 47 |
Delete "$INSTDIR\jpeg_lic.html" |
| 48 |
Delete "$INSTDIR\jpeg62.dll" |
| 49 |
Delete "$INSTDIR\libtiff3.dll" |
| 50 |
Delete "$INSTDIR\rm.exe" |
| 51 |
Delete "$INSTDIR\tiff_lic.html" |
| 52 |
Delete "$INSTDIR\tiffinfo.exe" |
| 53 |
Delete "$INSTDIR\tiffsplit.exe" |
| 54 |
Delete "$INSTDIR\tifftodjvu.hta" |
| 55 |
Delete "$INSTDIR\tifftodjvu_help.html" |
| 56 |
Delete "$INSTDIR\windjview.exe" |
| 57 |
Delete "$INSTDIR\zlib1.dll" |
| 58 |
Delete "$INSTDIR\README.html" |
| 59 |
Delete "$SMPROGRAMS\minidjvu\README.lnk" |
| 60 |
Delete "$INSTDIR\minidjvu.nsi" |
| 61 |
|
| 62 |
File "COPYING" |
| 63 |
File "News" |
| 64 |
File "bin\minidjvu.exe" |
| 65 |
File "tifftodjvu.hta" |
| 66 |
CreateDirectory $INSTDIR\doc |
| 67 |
File "/oname=doc\tifftodjvu_help.html" "doc\tifftodjvu_help.html" |
| 68 |
|
| 69 |
CreateDirectory $SMPROGRAMS\minidjvu |
| 70 |
CreateShortcut $SMPROGRAMS\minidjvu\TIFF-to-DjVu.lnk $INSTDIR\tifftodjvu.hta |
| 71 |
CreateShortcut $SMPROGRAMS\minidjvu\Uninstall.lnk $INSTDIR\Uninstall.exe |
| 72 |
|
| 73 |
;Store installation folder |
| 74 |
WriteRegStr HKCU "Software\minidjvu" "" $INSTDIR |
| 75 |
|
| 76 |
;Create uninstaller |
| 77 |
WriteUninstaller "$INSTDIR\Uninstall.exe" |
| 78 |
|
| 79 |
SectionEnd |
| 80 |
|
| 81 |
;Uninstaller Section |
| 82 |
|
| 83 |
Section "Uninstall" |
| 84 |
|
| 85 |
Delete "$INSTDIR\COPYING" |
| 86 |
Delete "$INSTDIR\minidjvu.exe" |
| 87 |
Delete "$INSTDIR\tifftodjvu.hta" |
| 88 |
Delete "$INSTDIR\doc\tifftodjvu_help.html" |
| 89 |
|
| 90 |
Delete "$INSTDIR\Uninstall.exe" |
| 91 |
|
| 92 |
RMDir "$INSTDIR\doc" |
| 93 |
RMDir "$INSTDIR" |
| 94 |
|
| 95 |
Delete "$SMPROGRAMS\minidjvu\TIFF-to-DjVu.lnk" |
| 96 |
Delete "$SMPROGRAMS\minidjvu\Uninstall.lnk" |
| 97 |
RMDir "$SMPROGRAMS\minidjvu" |
| 98 |
|
| 99 |
DeleteRegKey /ifempty HKCU "Software\minidjvu" |
| 100 |
SectionEnd |