| 1 |
; NSIS installer script for Irssi |
; NSIS installer script for Irssi |
| 2 |
; Copyright (C) 2008, Joshua Dick <josh@joshdick.net> |
; Copyright (C) 2008-2010, Joshua Dick <josh@joshdick.net> |
| 3 |
; Copyright (C) 2008, Sebastian Pipping <webmaster@hartwork.org> |
; Copyright (C) 2008, Sebastian Pipping <webmaster@hartwork.org> |
| 4 |
; |
; |
| 5 |
; This program is free software: you can redistribute it and/or modify |
; This program is free software: you can redistribute it and/or modify |
| 19 |
!include "${EXTRA_INSTALLER}\RequireVersion.nsh" |
!include "${EXTRA_INSTALLER}\RequireVersion.nsh" |
| 20 |
!insertmacro REQUIRE_VERSION "2.34" |
!insertmacro REQUIRE_VERSION "2.34" |
| 21 |
|
|
| 22 |
!define APP_VER_FULL "0.8.15" |
!define APP_VER_FULL "0.8.15-TEST1" |
| 23 |
!define APP_VER_INFO "0.8.15.1" |
!define APP_VER_INFO "0.8.15.1" |
| 24 |
!define APP_VER_FILE "0_8_15" |
!define APP_VER_FILE "0_8_15" |
| 25 |
!define APP_PKG_RELEASE "1" |
!define APP_PKG_RELEASE "1" |
| 107 |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VER_INFO}" |
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VER_INFO}" |
| 108 |
VIProductVersion "${APP_VER_INFO}" |
VIProductVersion "${APP_VER_INFO}" |
| 109 |
|
|
| 110 |
|
; Check for a previous installation and prompt the user to remove it |
| 111 |
|
Function .onInit |
| 112 |
|
ReadRegStr $R0 "${APP_UNINST_ROOT}" "${APP_UNINST_KEY}" "UninstallString" |
| 113 |
|
StrCmp $R0 "" done |
| 114 |
|
|
| 115 |
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ |
| 116 |
|
"Another version of Irssi is already installed and must be removed before installing this \ |
| 117 |
|
version.$\n$\nClick 'OK' to start its uninstaller or 'Cancel' to cancel this installation." \ |
| 118 |
|
IDOK uninst |
| 119 |
|
Abort |
| 120 |
|
|
| 121 |
|
; Run the uninstaller |
| 122 |
|
uninst: |
| 123 |
|
Exec $INSTDIR\Uninstall.exe |
| 124 |
|
done: |
| 125 |
|
FunctionEnd |
| 126 |
|
|
| 127 |
Section -AppDataFiles |
Section -AppDataFiles |
| 128 |
Version::IsWindowsPlatform9x |
Version::IsWindowsPlatform9x |
| 199 |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${APP_NAME_SHORT} (in Cygterm).lnk" "$INSTDIR\irssi_cygterm.bat" "" "$INSTDIR\irssi.ico" |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${APP_NAME_SHORT} (in Cygterm).lnk" "$INSTDIR\irssi_cygterm.bat" "" "$INSTDIR\irssi.ico" |
| 200 |
|
|
| 201 |
ANY_WINDOWS: |
ANY_WINDOWS: |
| 202 |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Readme.lnk" "$INSTDIR\README.txt" |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Readme.lnk" "$INSTDIR\README.txt" |
| 203 |
WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Website.url" "InternetShortcut" "URL" "http://www.irssi.org/" |
WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Website.url" "InternetShortcut" "URL" "http://www.irssi.org/" |
| 204 |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\${APP_UNINST_FILE}" |
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\${APP_UNINST_FILE}" |
| 205 |
!insertmacro MUI_STARTMENU_WRITE_END |
!insertmacro MUI_STARTMENU_WRITE_END |
| 206 |
SectionEnd |
SectionEnd |
| 207 |
|
|
| 208 |
Section un.StartMenuEntry |
Section un.StartMenuEntry |
| 261 |
WriteUninstaller "$INSTDIR\${APP_UNINST_FILE}" |
WriteUninstaller "$INSTDIR\${APP_UNINST_FILE}" |
| 262 |
|
|
| 263 |
WriteRegStr ${APP_REG_ROOT} "${APP_REG_INSTALLER}" "${APP_REG_INSTDIR_VALUE}" $INSTDIR |
WriteRegStr ${APP_REG_ROOT} "${APP_REG_INSTALLER}" "${APP_REG_INSTDIR_VALUE}" $INSTDIR |
| 264 |
|
|
| 265 |
|
MessageBox MB_YESNO \ |
| 266 |
|
"Installation complete!$\n$\nIt is HIGHLY RECOMMENDED that you follow the instructions in the \ |
| 267 |
|
'Important Usage Information' section of README.txt to ensure that several Irssi features \ |
| 268 |
|
will work properly.$\n$\nOpen README.txt now?" \ |
| 269 |
|
IDNO skipreadme |
| 270 |
|
ExecShell "open" "$INSTDIR\README.txt" |
| 271 |
|
skipreadme: |
| 272 |
SectionEnd |
SectionEnd |
| 273 |
|
|
| 274 |
Section un.InstallEssentials |
Section un.InstallEssentials |