| 1 | ; Script generated by the HM NIS Edit Script Wizard. |
|---|
| 2 | |
|---|
| 3 | ; HM NIS Edit Wizard helper defines |
|---|
| 4 | !define PRODUCT_NAME "iriverter" |
|---|
| 5 | !define PRODUCT_VERSION "0.16" |
|---|
| 6 | !define PRODUCT_PUBLISHER "James Lee" |
|---|
| 7 | !define PRODUCT_WEB_SITE "http://iriverter.sourceforge.net" |
|---|
| 8 | !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\iriverter.exe" |
|---|
| 9 | !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
|---|
| 10 | !define PRODUCT_UNINST_ROOT_KEY "HKLM" |
|---|
| 11 | |
|---|
| 12 | SetCompressor lzma |
|---|
| 13 | |
|---|
| 14 | ; MUI 1.67 compatible ------ |
|---|
| 15 | !include "MUI.nsh" |
|---|
| 16 | |
|---|
| 17 | ; MUI Settings |
|---|
| 18 | !define MUI_ABORTWARNING |
|---|
| 19 | !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" |
|---|
| 20 | !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" |
|---|
| 21 | |
|---|
| 22 | ; Language Selection Dialog Settings |
|---|
| 23 | !define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" |
|---|
| 24 | !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" |
|---|
| 25 | !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" |
|---|
| 26 | |
|---|
| 27 | ; Welcome page |
|---|
| 28 | !insertmacro MUI_PAGE_WELCOME |
|---|
| 29 | ; License page |
|---|
| 30 | !insertmacro MUI_PAGE_LICENSE "c:\windows\profiles\jlee\Desktop\iriverter-0.16\COPYING" |
|---|
| 31 | ; Components page |
|---|
| 32 | !insertmacro MUI_PAGE_COMPONENTS |
|---|
| 33 | ; Directory page |
|---|
| 34 | !insertmacro MUI_PAGE_DIRECTORY |
|---|
| 35 | ; Instfiles page |
|---|
| 36 | !insertmacro MUI_PAGE_INSTFILES |
|---|
| 37 | ; Finish page |
|---|
| 38 | !define MUI_FINISHPAGE_RUN "$INSTDIR\iriverter.exe" |
|---|
| 39 | !insertmacro MUI_PAGE_FINISH |
|---|
| 40 | |
|---|
| 41 | ; Uninstaller pages |
|---|
| 42 | !insertmacro MUI_UNPAGE_INSTFILES |
|---|
| 43 | |
|---|
| 44 | ; Language files |
|---|
| 45 | !insertmacro MUI_LANGUAGE "Korean" |
|---|
| 46 | !insertmacro MUI_LANGUAGE "Croatian" |
|---|
| 47 | !insertmacro MUI_LANGUAGE "Bosnian" |
|---|
| 48 | !insertmacro MUI_LANGUAGE "PortugueseBR" |
|---|
| 49 | !insertmacro MUI_LANGUAGE "Slovenian" |
|---|
| 50 | !insertmacro MUI_LANGUAGE "French" |
|---|
| 51 | !insertmacro MUI_LANGUAGE "Serbian" |
|---|
| 52 | !insertmacro MUI_LANGUAGE "Slovak" |
|---|
| 53 | !insertmacro MUI_LANGUAGE "Greek" |
|---|
| 54 | !insertmacro MUI_LANGUAGE "English" |
|---|
| 55 | !insertmacro MUI_LANGUAGE "German" |
|---|
| 56 | !insertmacro MUI_LANGUAGE "Farsi" |
|---|
| 57 | !insertmacro MUI_LANGUAGE "Arabic" |
|---|
| 58 | !insertmacro MUI_LANGUAGE "Danish" |
|---|
| 59 | !insertmacro MUI_LANGUAGE "Spanish" |
|---|
| 60 | !insertmacro MUI_LANGUAGE "Albanian" |
|---|
| 61 | !insertmacro MUI_LANGUAGE "TradChinese" |
|---|
| 62 | !insertmacro MUI_LANGUAGE "Czech" |
|---|
| 63 | !insertmacro MUI_LANGUAGE "Ukrainian" |
|---|
| 64 | !insertmacro MUI_LANGUAGE "Macedonian" |
|---|
| 65 | !insertmacro MUI_LANGUAGE "Luxembourgish" |
|---|
| 66 | !insertmacro MUI_LANGUAGE "Finnish" |
|---|
| 67 | !insertmacro MUI_LANGUAGE "Mongolian" |
|---|
| 68 | !insertmacro MUI_LANGUAGE "Kurdish" |
|---|
| 69 | !insertmacro MUI_LANGUAGE "Belarusian" |
|---|
| 70 | !insertmacro MUI_LANGUAGE "Dutch" |
|---|
| 71 | !insertmacro MUI_LANGUAGE "Breton" |
|---|
| 72 | !insertmacro MUI_LANGUAGE "Estonian" |
|---|
| 73 | !insertmacro MUI_LANGUAGE "Icelandic" |
|---|
| 74 | !insertmacro MUI_LANGUAGE "Norwegian" |
|---|
| 75 | !insertmacro MUI_LANGUAGE "Hebrew" |
|---|
| 76 | !insertmacro MUI_LANGUAGE "Japanese" |
|---|
| 77 | !insertmacro MUI_LANGUAGE "SimpChinese" |
|---|
| 78 | !insertmacro MUI_LANGUAGE "Thai" |
|---|
| 79 | !insertmacro MUI_LANGUAGE "Hungarian" |
|---|
| 80 | !insertmacro MUI_LANGUAGE "Malay" |
|---|
| 81 | !insertmacro MUI_LANGUAGE "Romanian" |
|---|
| 82 | !insertmacro MUI_LANGUAGE "Italian" |
|---|
| 83 | !insertmacro MUI_LANGUAGE "Catalan" |
|---|
| 84 | !insertmacro MUI_LANGUAGE "Portuguese" |
|---|
| 85 | !insertmacro MUI_LANGUAGE "Polish" |
|---|
| 86 | !insertmacro MUI_LANGUAGE "Swedish" |
|---|
| 87 | !insertmacro MUI_LANGUAGE "Latvian" |
|---|
| 88 | !insertmacro MUI_LANGUAGE "Turkish" |
|---|
| 89 | !insertmacro MUI_LANGUAGE "Russian" |
|---|
| 90 | !insertmacro MUI_LANGUAGE "Lithuanian" |
|---|
| 91 | !insertmacro MUI_LANGUAGE "Bulgarian" |
|---|
| 92 | !insertmacro MUI_LANGUAGE "Indonesian" |
|---|
| 93 | !insertmacro MUI_LANGUAGE "SerbianLatin" |
|---|
| 94 | |
|---|
| 95 | ; Reserve files |
|---|
| 96 | !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS |
|---|
| 97 | |
|---|
| 98 | ; MUI end ------ |
|---|
| 99 | |
|---|
| 100 | !include "zipdll.nsh" |
|---|
| 101 | |
|---|
| 102 | Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" |
|---|
| 103 | OutFile "Setup.exe" |
|---|
| 104 | InstallDir "$PROGRAMFILES\iriverter" |
|---|
| 105 | InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" |
|---|
| 106 | ShowInstDetails show |
|---|
| 107 | ShowUnInstDetails show |
|---|
| 108 | |
|---|
| 109 | Function .onInit |
|---|
| 110 | !insertmacro MUI_LANGDLL_DISPLAY |
|---|
| 111 | FunctionEnd |
|---|
| 112 | |
|---|
| 113 | Section "iriverter" SEC01 |
|---|
| 114 | SetOutPath "$INSTDIR\doc\images" |
|---|
| 115 | SetOverwrite try |
|---|
| 116 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\convert-24.png" |
|---|
| 117 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\important.gif" |
|---|
| 118 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\tip.gif" |
|---|
| 119 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\toc-blank.gif" |
|---|
| 120 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\home.gif" |
|---|
| 121 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\note.gif" |
|---|
| 122 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\singlevideo-24.png" |
|---|
| 123 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\caution.gif" |
|---|
| 124 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\toc-plus.gif" |
|---|
| 125 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\toc-minus.gif" |
|---|
| 126 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\prev.gif" |
|---|
| 127 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\up.gif" |
|---|
| 128 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\directory-24.png" |
|---|
| 129 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\warning.gif" |
|---|
| 130 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\next.gif" |
|---|
| 131 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\images\dvd-24.png" |
|---|
| 132 | SetOutPath "$INSTDIR\doc\html" |
|---|
| 133 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\using.html" |
|---|
| 134 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\troubleshooting.html" |
|---|
| 135 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\index.html" |
|---|
| 136 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\advanced.html" |
|---|
| 137 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\linux.html" |
|---|
| 138 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\installing.html" |
|---|
| 139 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\options.html" |
|---|
| 140 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\playing.html" |
|---|
| 141 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\introduction.html" |
|---|
| 142 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\osx.html" |
|---|
| 143 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\doc\html\other.html" |
|---|
| 144 | SetOutPath "$INSTDIR" |
|---|
| 145 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\mplayer.exe" |
|---|
| 146 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\iriverter.exe" |
|---|
| 147 | CreateDirectory "$SMPROGRAMS\iriverter" |
|---|
| 148 | CreateShortCut "$SMPROGRAMS\iriverter\iriverter.lnk" "$INSTDIR\iriverter.exe" |
|---|
| 149 | CreateShortCut "$DESKTOP\iriverter.lnk" "$INSTDIR\iriverter.exe" |
|---|
| 150 | SetOutPath "$INSTDIR\profiles" |
|---|
| 151 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\profiles\pmp.profile" |
|---|
| 152 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\profiles\zvm.profile" |
|---|
| 153 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\profiles\x5.profile" |
|---|
| 154 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\profiles\h300.profile" |
|---|
| 155 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\profiles\u10.profile" |
|---|
| 156 | SetOutPath "$INSTDIR" |
|---|
| 157 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\COPYING" |
|---|
| 158 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\swt-win32-3231.dll" |
|---|
| 159 | File "c:\windows\profiles\jlee\Desktop\iriverter-0.16\mencoder.exe" |
|---|
| 160 | SectionEnd |
|---|
| 161 | |
|---|
| 162 | Section "Extra Codecs" SEC02 |
|---|
| 163 | InetLoad::load \ |
|---|
| 164 | "http://www.mplayerhq.hu/MPlayer/releases/codecs/windows-all-20060501.zip" \ |
|---|
| 165 | "$TEMP\windows-all-20060501.zip" |
|---|
| 166 | Pop $0 |
|---|
| 167 | StrCmp $0 "OK" dlok |
|---|
| 168 | MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, click OK to abort installation" /SD IDOK |
|---|
| 169 | Abort |
|---|
| 170 | dlok: |
|---|
| 171 | !insertmacro ZIPDLL_EXTRACT "$TEMP\windows-all-20060501.zip" "$INSTDIR" "<ALL>" |
|---|
| 172 | Rename "$INSTDIR\windows-all-20050412" "$INSTDIR\codecs" |
|---|
| 173 | SectionEnd |
|---|
| 174 | |
|---|
| 175 | Section -AdditionalIcons |
|---|
| 176 | WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" |
|---|
| 177 | CreateShortCut "$SMPROGRAMS\iriverter\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" |
|---|
| 178 | CreateShortCut "$SMPROGRAMS\iriverter\Uninstall.lnk" "$INSTDIR\uninst.exe" |
|---|
| 179 | SectionEnd |
|---|
| 180 | |
|---|
| 181 | Section -Post |
|---|
| 182 | WriteUninstaller "$INSTDIR\uninst.exe" |
|---|
| 183 | WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\mplayer.exe" |
|---|
| 184 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" |
|---|
| 185 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" |
|---|
| 186 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\iriverter.exe" |
|---|
| 187 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" |
|---|
| 188 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" |
|---|
| 189 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" |
|---|
| 190 | SectionEnd |
|---|
| 191 | |
|---|
| 192 | ; Section descriptions |
|---|
| 193 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
|---|
| 194 | !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Components necessary to run." |
|---|
| 195 | !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Proprietary codecs like Real and Windows Media." |
|---|
| 196 | !insertmacro MUI_FUNCTION_DESCRIPTION_END |
|---|
| 197 | |
|---|
| 198 | |
|---|
| 199 | Function un.onUninstSuccess |
|---|
| 200 | HideWindow |
|---|
| 201 | MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." |
|---|
| 202 | FunctionEnd |
|---|
| 203 | |
|---|
| 204 | Function un.onInit |
|---|
| 205 | !insertmacro MUI_UNGETLANGUAGE |
|---|
| 206 | MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 |
|---|
| 207 | Abort |
|---|
| 208 | FunctionEnd |
|---|
| 209 | |
|---|
| 210 | Section Uninstall |
|---|
| 211 | Delete "$INSTDIR\${PRODUCT_NAME}.url" |
|---|
| 212 | Delete "$INSTDIR\uninst.exe" |
|---|
| 213 | Delete "$INSTDIR\mencoder.exe" |
|---|
| 214 | Delete "$INSTDIR\swt-win32-3224.dll" |
|---|
| 215 | Delete "$INSTDIR\COPYING" |
|---|
| 216 | Delete "$INSTDIR\profiles\u10.profile" |
|---|
| 217 | Delete "$INSTDIR\profiles\h300.profile" |
|---|
| 218 | Delete "$INSTDIR\profiles\x5.profile" |
|---|
| 219 | Delete "$INSTDIR\profiles\zvm.profile" |
|---|
| 220 | Delete "$INSTDIR\profiles\pmp.profile" |
|---|
| 221 | Delete "$INSTDIR\iriverter.exe" |
|---|
| 222 | Delete "$INSTDIR\mplayer.exe" |
|---|
| 223 | Delete "$INSTDIR\doc\html\other.html" |
|---|
| 224 | Delete "$INSTDIR\doc\html\osx.html" |
|---|
| 225 | Delete "$INSTDIR\doc\html\introduction.html" |
|---|
| 226 | Delete "$INSTDIR\doc\html\playing.html" |
|---|
| 227 | Delete "$INSTDIR\doc\html\options.html" |
|---|
| 228 | Delete "$INSTDIR\doc\html\installing.html" |
|---|
| 229 | Delete "$INSTDIR\doc\html\linux.html" |
|---|
| 230 | Delete "$INSTDIR\doc\html\advanced.html" |
|---|
| 231 | Delete "$INSTDIR\doc\html\index.html" |
|---|
| 232 | Delete "$INSTDIR\doc\html\troubleshooting.html" |
|---|
| 233 | Delete "$INSTDIR\doc\html\using.html" |
|---|
| 234 | Delete "$INSTDIR\doc\images\dvd-24.png" |
|---|
| 235 | Delete "$INSTDIR\doc\images\next.gif" |
|---|
| 236 | Delete "$INSTDIR\doc\images\warning.gif" |
|---|
| 237 | Delete "$INSTDIR\doc\images\directory-24.png" |
|---|
| 238 | Delete "$INSTDIR\doc\images\up.gif" |
|---|
| 239 | Delete "$INSTDIR\doc\images\prev.gif" |
|---|
| 240 | Delete "$INSTDIR\doc\images\toc-minus.gif" |
|---|
| 241 | Delete "$INSTDIR\doc\images\toc-plus.gif" |
|---|
| 242 | Delete "$INSTDIR\doc\images\caution.gif" |
|---|
| 243 | Delete "$INSTDIR\doc\images\singlevideo-24.png" |
|---|
| 244 | Delete "$INSTDIR\doc\images\note.gif" |
|---|
| 245 | Delete "$INSTDIR\doc\images\home.gif" |
|---|
| 246 | Delete "$INSTDIR\doc\images\toc-blank.gif" |
|---|
| 247 | Delete "$INSTDIR\doc\images\tip.gif" |
|---|
| 248 | Delete "$INSTDIR\doc\images\important.gif" |
|---|
| 249 | Delete "$INSTDIR\doc\images\convert-24.png" |
|---|
| 250 | |
|---|
| 251 | Delete "$SMPROGRAMS\iriverter\Uninstall.lnk" |
|---|
| 252 | Delete "$SMPROGRAMS\iriverter\Website.lnk" |
|---|
| 253 | Delete "$DESKTOP\iriverter.lnk" |
|---|
| 254 | Delete "$SMPROGRAMS\iriverter\iriverter.lnk" |
|---|
| 255 | |
|---|
| 256 | RMDir "$SMPROGRAMS\iriverter" |
|---|
| 257 | RMDir "$INSTDIR\profiles" |
|---|
| 258 | RMDir "$INSTDIR\doc\images" |
|---|
| 259 | RMDir "$INSTDIR\doc\html" |
|---|
| 260 | RMDir "$INSTDIR" |
|---|
| 261 | |
|---|
| 262 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" |
|---|
| 263 | DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" |
|---|
| 264 | SetAutoClose true |
|---|
| 265 | SectionEnd |
|---|