Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | # NSIS file to create a self-installing exe for Vim. |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 2 | # It requires NSIS version 3.0 or later. |
Restorer | 74a2331 | 2024-03-28 09:19:44 +0000 | [diff] [blame] | 3 | # Last Change: 2024 Mar 20 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 4 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 5 | Unicode true |
| 6 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 7 | # WARNING: if you make changes to this script, look out for $0 to be valid, |
| 8 | # because uninstall deletes most files in $0. |
| 9 | |
Bram Moolenaar | ba46075 | 2013-07-04 22:35:01 +0200 | [diff] [blame] | 10 | # Location of gvim_ole.exe, vimw32.exe, GvimExt/*, etc. |
Bram Moolenaar | 286eacd | 2016-01-16 18:05:50 +0100 | [diff] [blame] | 11 | !ifndef VIMSRC |
| 12 | !define VIMSRC "..\src" |
| 13 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 14 | |
| 15 | # Location of runtime files |
Bram Moolenaar | 286eacd | 2016-01-16 18:05:50 +0100 | [diff] [blame] | 16 | !ifndef VIMRT |
| 17 | !define VIMRT ".." |
| 18 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 19 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 20 | # Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc. |
Bram Moolenaar | 286eacd | 2016-01-16 18:05:50 +0100 | [diff] [blame] | 21 | !ifndef VIMTOOLS |
| 22 | !define VIMTOOLS ..\.. |
| 23 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 25 | # Location of gettext. |
| 26 | # It must contain two directories: gettext32 and gettext64. |
| 27 | # See README.txt for detail. |
| 28 | !ifndef GETTEXT |
| 29 | !define GETTEXT ${VIMRT} |
| 30 | !endif |
| 31 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 32 | # If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe. |
| 33 | # This property will be set to 1. Get it at https://upx.github.io/ |
| 34 | !ifndef HAVE_UPX |
| 35 | !define HAVE_UPX 0 |
| 36 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 37 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 38 | # If you do not want to add Native Language Support, use the switch /DHAVE_NLS=0 |
| 39 | # in the command line makensis.exe. This property will be set to 0. |
| 40 | !ifndef HAVE_NLS |
| 41 | !define HAVE_NLS 1 |
| 42 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 43 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 44 | # To create an English-only the installer, use the switch /DHAVE_MULTI_LANG=0 on |
| 45 | # the command line makensis.exe. This property will be set to 0. |
| 46 | !ifndef HAVE_MULTI_LANG |
| 47 | !define HAVE_MULTI_LANG 1 |
| 48 | !endif |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 49 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 50 | # if you want to create a 64-bit the installer, use the switch /DWIN64=1 on |
| 51 | # the command line makensis.exe. This property will be set to 1. |
| 52 | !ifndef WIN64 |
| 53 | !define WIN64 0 |
| 54 | !endif |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 55 | |
K.Takata | 48f3833 | 2024-10-07 20:37:00 +0200 | [diff] [blame] | 56 | # if you don't want to include libgcc_s_sjlj-1.dll in the package, use the |
| 57 | # switch /DINCLUDE_LIBGCC=0 on the command line makensis.exe. |
| 58 | !ifndef INCLUDE_LIBGCC |
| 59 | !define INCLUDE_LIBGCC 1 |
| 60 | !endif |
| 61 | |
Bram Moolenaar | 6c7b444 | 2016-01-02 15:44:32 +0100 | [diff] [blame] | 62 | !include gvim_version.nsh # for version number |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 63 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 64 | # Definition of Patch for Vim. |
Bram Moolenaar | 9d59152 | 2019-05-26 20:49:42 +0200 | [diff] [blame] | 65 | !ifndef PATCHLEVEL |
| 66 | !define PATCHLEVEL 0 |
| 67 | !endif |
| 68 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 69 | # ----------- No configurable settings below this line ----------- |
| 70 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 71 | !include "Library.nsh" # for DLL install |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 72 | !include "LogicLib.nsh" |
| 73 | !include "MUI2.nsh" |
| 74 | !include "nsDialogs.nsh" |
| 75 | !include "Sections.nsh" |
| 76 | !include "x64.nsh" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 77 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 78 | # See https://nsis.sourceforge.io/LogicLib |
| 79 | ;FileExists is already part of LogicLib, but returns true for directories |
| 80 | ;as well as files |
| 81 | !macro _FileExists2 _a _b _t _f |
| 82 | !insertmacro _LOGICLIB_TEMP |
| 83 | StrCpy $_LOGICLIB_TEMP "0" |
| 84 | ;if path is not blank, continue to next check |
| 85 | StrCmp `${_b}` `` +4 0 |
| 86 | ;if path exists, continue to next check (IfFileExists returns true if this |
| 87 | ;is a directory) |
| 88 | IfFileExists `${_b}` `0` +3 |
| 89 | ;if path is not a directory, continue to confirm exists |
| 90 | IfFileExists `${_b}\*.*` +2 0 |
| 91 | StrCpy $_LOGICLIB_TEMP "1" ;file exists |
| 92 | ;now we have a definitive value - the file exists or it does not |
| 93 | StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}` |
| 94 | !macroend |
| 95 | !undef FileExists |
| 96 | !define FileExists `"" FileExists2` |
| 97 | !macro _DirExists _a _b _t _f |
| 98 | !insertmacro _LOGICLIB_TEMP |
| 99 | StrCpy $_LOGICLIB_TEMP "0" |
| 100 | ;if path is not blank, continue to next check |
| 101 | StrCmp `${_b}` `` +3 0 |
| 102 | ;if directory exists, continue to confirm exists |
| 103 | IfFileExists `${_b}\*.*` 0 +2 |
| 104 | StrCpy $_LOGICLIB_TEMP "1" |
| 105 | StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}` |
| 106 | !macroend |
| 107 | !define DirExists `"" DirExists` |
| 108 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 109 | !define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}" |
| 110 | !define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall" |
| 111 | !define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}" |
| 112 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 113 | !if ${WIN64} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 114 | Name "${PRODUCT} (x64)" |
| 115 | !else |
| 116 | Name "${PRODUCT}" |
| 117 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 118 | OutFile gvim${VER_MAJOR}${VER_MINOR}.exe |
| 119 | CRCCheck force |
Bram Moolenaar | 286eacd | 2016-01-16 18:05:50 +0100 | [diff] [blame] | 120 | SetCompressor /SOLID lzma |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 121 | SetCompressorDictSize 64 |
| 122 | ManifestDPIAware true |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 123 | SetDatablockOptimize on |
Bram Moolenaar | 442b422 | 2010-05-24 21:34:22 +0200 | [diff] [blame] | 124 | RequestExecutionLevel highest |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 125 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 126 | !if ${HAVE_UPX} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 127 | !packhdr temp.dat "upx --best --compress-icons=1 temp.dat" |
| 128 | !endif |
| 129 | |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 130 | !if ${WIN64} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 131 | !define BIT 64 |
| 132 | !else |
| 133 | !define BIT 32 |
| 134 | !endif |
| 135 | |
| 136 | ########################################################## |
| 137 | # MUI2 settings |
| 138 | |
| 139 | !define MUI_ABORTWARNING |
| 140 | !define MUI_UNABORTWARNING |
| 141 | |
| 142 | !define MUI_ICON "icons\vim_16c.ico" |
| 143 | !define MUI_UNICON "icons\vim_uninst_16c.ico" |
| 144 | |
| 145 | # Show all languages, despite user's codepage: |
| 146 | !define MUI_LANGDLL_ALLLANGUAGES |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 147 | # Always show dialog choice language |
| 148 | #!define MUI_LANGDLL_ALWAYSSHOW |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 149 | !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" |
| 150 | !define MUI_LANGDLL_REGISTRY_KEY "Software\Vim" |
| 151 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" |
| 152 | |
| 153 | !define MUI_WELCOMEFINISHPAGE_BITMAP "icons\welcome.bmp" |
| 154 | !define MUI_UNWELCOMEFINISHPAGE_BITMAP "icons\uninstall.bmp" |
| 155 | !define MUI_HEADERIMAGE |
| 156 | !define MUI_HEADERIMAGE_BITMAP "icons\header.bmp" |
| 157 | !define MUI_HEADERIMAGE_UNBITMAP "icons\un_header.bmp" |
| 158 | |
| 159 | !define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight" |
| 160 | !define MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight" |
| 161 | !define MUI_HEADERIMAGE_BITMAP_STRETCH "AspectFitHeight" |
| 162 | !define MUI_HEADERIMAGE_UNBITMAP_STRETCH "AspectFitHeight" |
| 163 | |
| 164 | !define MUI_COMPONENTSPAGE_SMALLDESC |
| 165 | !define MUI_LICENSEPAGE_CHECKBOX |
Restorer | 74a2331 | 2024-03-28 09:19:44 +0000 | [diff] [blame] | 166 | !define MUI_FINISHPAGE_SHOWREADME |
| 167 | !define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme) |
| 168 | !define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 169 | |
| 170 | # This adds '\Vim' to the user choice automagically. The actual value is |
| 171 | # obtained below with CheckOldVim. |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 172 | !if ${WIN64} |
Christian Brabandt | 7d60384 | 2021-07-24 21:19:42 +0200 | [diff] [blame] | 173 | !define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 174 | !else |
Christian Brabandt | 7d60384 | 2021-07-24 21:19:42 +0200 | [diff] [blame] | 175 | !define DEFAULT_INSTDIR "$PROGRAMFILES\Vim" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 176 | !endif |
Christian Brabandt | 7d60384 | 2021-07-24 21:19:42 +0200 | [diff] [blame] | 177 | InstallDir ${DEFAULT_INSTDIR} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 178 | |
| 179 | # Types of installs we can perform: |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 180 | InstType $(str_type_typical) |
| 181 | InstType $(str_type_minimal) |
| 182 | InstType $(str_type_full) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 183 | |
| 184 | SilentInstall normal |
| 185 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 186 | # General custom functions for MUI2: |
| 187 | #!define MUI_CUSTOMFUNCTION_ABORT VimOnUserAbort |
| 188 | #!define MUI_CUSTOMFUNCTION_UNABORT un.VimOnUserAbort |
| 189 | |
| 190 | # Installer pages |
| 191 | !insertmacro MUI_PAGE_WELCOME |
Restorer | 74a2331 | 2024-03-28 09:19:44 +0000 | [diff] [blame] | 192 | !insertmacro MUI_PAGE_LICENSE $(page_lic_file) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 193 | !insertmacro MUI_PAGE_COMPONENTS |
| 194 | Page custom SetCustom ValidateCustom |
| 195 | #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck |
| 196 | !insertmacro MUI_PAGE_DIRECTORY |
| 197 | !insertmacro MUI_PAGE_INSTFILES |
| 198 | !define MUI_FINISHPAGE_NOREBOOTSUPPORT |
| 199 | !insertmacro MUI_PAGE_FINISH |
| 200 | |
| 201 | # Uninstaller pages: |
| 202 | !insertmacro MUI_UNPAGE_CONFIRM |
| 203 | #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.VimCheckRunning |
| 204 | !insertmacro MUI_UNPAGE_COMPONENTS |
| 205 | !insertmacro MUI_UNPAGE_INSTFILES |
| 206 | !define MUI_FINISHPAGE_NOREBOOTSUPPORT |
| 207 | !insertmacro MUI_UNPAGE_FINISH |
| 208 | |
| 209 | ########################################################## |
| 210 | # Languages Files |
| 211 | |
| 212 | !insertmacro MUI_RESERVEFILE_LANGDLL |
| 213 | !include "lang\english.nsi" |
| 214 | |
| 215 | # Include support for other languages: |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 216 | !if ${HAVE_MULTI_LANG} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 217 | !include "lang\danish.nsi" |
| 218 | !include "lang\dutch.nsi" |
| 219 | !include "lang\german.nsi" |
Christos Longros | c62dacb | 2024-03-06 20:53:02 +0100 | [diff] [blame] | 220 | !include "lang\greek.nsi" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 221 | !include "lang\italian.nsi" |
| 222 | !include "lang\japanese.nsi" |
Bram Moolenaar | 809fcec | 2020-09-20 21:43:03 +0200 | [diff] [blame] | 223 | !include "lang\russian.nsi" |
Ivan Pešić | e105192 | 2024-03-05 23:34:00 +0400 | [diff] [blame] | 224 | !include "lang\serbian.nsi" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 225 | !include "lang\simpchinese.nsi" |
| 226 | !include "lang\tradchinese.nsi" |
Bram Moolenaar | 1a928c2 | 2020-01-18 16:10:40 +0100 | [diff] [blame] | 227 | !include "lang\turkish.nsi" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 228 | !endif |
| 229 | |
Bram Moolenaar | dabfde0 | 2019-05-17 12:37:27 +0200 | [diff] [blame] | 230 | ########################################################## |
| 231 | # Version resources |
| 232 | |
| 233 | VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim" |
RestorerZ | ec67ee0 | 2024-04-25 21:25:19 +0200 | [diff] [blame] | 234 | VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The Vim Project" |
Bram Moolenaar | dabfde0 | 2019-05-17 12:37:27 +0200 | [diff] [blame] | 235 | VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim" |
| 236 | VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996" |
| 237 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor" |
Bram Moolenaar | 9d59152 | 2019-05-26 20:49:42 +0200 | [diff] [blame] | 238 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0" |
| 239 | VIProductVersion "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 240 | |
| 241 | # Global variables |
| 242 | Var vim_dialog |
| 243 | Var vim_nsd_compat |
| 244 | Var vim_nsd_keymap |
| 245 | Var vim_nsd_mouse |
| 246 | Var vim_compat_stat |
| 247 | Var vim_keymap_stat |
| 248 | Var vim_mouse_stat |
| 249 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 250 | |
Bram Moolenaar | 5d42474 | 2018-02-04 19:11:30 +0100 | [diff] [blame] | 251 | # Reserve files |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 252 | ReserveFile ${VIMSRC}\installw32.exe |
Bram Moolenaar | 5d42474 | 2018-02-04 19:11:30 +0100 | [diff] [blame] | 253 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 254 | ########################################################## |
| 255 | # Functions |
| 256 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 257 | # Get parent directory |
| 258 | # Share this function both on installer and uninstaller |
| 259 | !macro GetParent un |
| 260 | Function ${un}GetParent |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 261 | Exch $0 ; old $0 is on top of stack |
| 262 | Push $1 |
| 263 | Push $2 |
| 264 | StrCpy $1 -1 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 265 | ${Do} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 266 | StrCpy $2 $0 1 $1 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 267 | ${If} $2 == "" |
| 268 | ${OrIf} $2 == "\" |
| 269 | ${ExitDo} |
| 270 | ${EndIf} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 271 | IntOp $1 $1 - 1 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 272 | ${Loop} |
| 273 | StrCpy $0 $0 $1 |
| 274 | Pop $2 |
| 275 | Pop $1 |
| 276 | Exch $0 ; put $0 on top of stack, restore $0 to original value |
| 277 | FunctionEnd |
| 278 | !macroend |
| 279 | |
| 280 | !insertmacro GetParent "" |
| 281 | !insertmacro GetParent "un." |
| 282 | |
Christopher Plewright | eea0a00 | 2023-02-17 20:04:51 +0000 | [diff] [blame] | 283 | # Get home directory |
| 284 | !macro GetHomeDir un |
| 285 | Function ${un}GetHomeDir |
| 286 | Push $0 |
| 287 | Push $1 |
| 288 | ReadEnvStr $0 "HOME" |
| 289 | ${If} $0 == "" |
| 290 | ReadEnvStr $0 "HOMEDRIVE" |
| 291 | ReadEnvStr $1 "HOMEPATH" |
| 292 | StrCpy $0 "$0$1" |
| 293 | ${If} $0 == "" |
| 294 | ReadEnvStr $0 "USERPROFILE" |
| 295 | ${EndIf} |
| 296 | ${EndIf} |
| 297 | Pop $1 |
| 298 | Exch $0 # put $0 on top of stack, restore $0 to original value |
| 299 | FunctionEnd |
| 300 | !macroend |
| 301 | |
| 302 | !insertmacro GetHomeDir "" |
| 303 | !insertmacro GetHomeDir "un." |
| 304 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 305 | # Check if Vim is already installed. |
| 306 | # return: Installed directory. If not found, it will be empty. |
| 307 | Function CheckOldVim |
| 308 | Push $0 |
| 309 | Push $R0 |
| 310 | Push $R1 |
| 311 | Push $R2 |
| 312 | |
| 313 | ${If} ${RunningX64} |
| 314 | SetRegView 64 |
| 315 | ${EndIf} |
| 316 | |
| 317 | ClearErrors |
| 318 | StrCpy $0 "" # Installed directory |
| 319 | StrCpy $R0 0 # Sub-key index |
| 320 | StrCpy $R1 "" # Sub-key |
| 321 | ${Do} |
| 322 | # Eumerate the sub-key: |
| 323 | EnumRegKey $R1 HKLM ${UNINST_REG_KEY} $R0 |
| 324 | |
| 325 | # Stop if no more sub-key: |
| 326 | ${If} ${Errors} |
| 327 | ${OrIf} $R1 == "" |
| 328 | ${ExitDo} |
| 329 | ${EndIf} |
| 330 | |
| 331 | # Move to the next sub-key: |
| 332 | IntOp $R0 $R0 + 1 |
| 333 | |
| 334 | # Check if the key is Vim uninstall key or not: |
| 335 | StrCpy $R2 $R1 4 |
| 336 | ${If} $R2 S!= "Vim " |
| 337 | ${Continue} |
| 338 | ${EndIf} |
| 339 | |
| 340 | # Verifies required sub-keys: |
| 341 | ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "DisplayName" |
| 342 | ${If} ${Errors} |
| 343 | ${OrIf} $R2 == "" |
| 344 | ${Continue} |
| 345 | ${EndIf} |
| 346 | |
| 347 | ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "UninstallString" |
| 348 | ${If} ${Errors} |
| 349 | ${OrIf} $R2 == "" |
| 350 | ${Continue} |
| 351 | ${EndIf} |
| 352 | |
| 353 | # Found |
| 354 | Push $R2 |
| 355 | call GetParent |
| 356 | call GetParent |
| 357 | Pop $0 # Vim directory |
| 358 | ${ExitDo} |
| 359 | |
| 360 | ${Loop} |
| 361 | |
| 362 | ${If} ${RunningX64} |
| 363 | SetRegView lastused |
| 364 | ${EndIf} |
| 365 | |
| 366 | Pop $R2 |
| 367 | Pop $R1 |
| 368 | Pop $R0 |
| 369 | Exch $0 # put $0 on top of stack, restore $0 to original value |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 370 | FunctionEnd |
| 371 | |
Bram Moolenaar | 4a22897 | 2021-05-01 22:41:39 +0200 | [diff] [blame] | 372 | Function LaunchApplication |
| 373 | SetOutPath $0 |
Restorer | 74a2331 | 2024-03-28 09:19:44 +0000 | [diff] [blame] | 374 | ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"' |
Bram Moolenaar | 4a22897 | 2021-05-01 22:41:39 +0200 | [diff] [blame] | 375 | FunctionEnd |
| 376 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 377 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 378 | Section "$(str_section_old_ver)" id_section_old_ver |
| 379 | SectionIn 1 2 3 RO |
| 380 | |
| 381 | # run the install program to check for already installed versions |
| 382 | SetOutPath $TEMP |
| 383 | File /oname=install.exe ${VIMSRC}\installw32.exe |
| 384 | DetailPrint "$(str_msg_uninstalling)" |
| 385 | ${Do} |
| 386 | nsExec::Exec "$TEMP\install.exe -uninstall-check" |
| 387 | Pop $3 |
| 388 | |
| 389 | call CheckOldVim |
| 390 | Pop $3 |
| 391 | ${If} $3 == "" |
| 392 | ${ExitDo} |
| 393 | ${Else} |
| 394 | # It seems that the old version is still remaining. |
| 395 | # TODO: Should we show a warning and run the uninstaller again? |
| 396 | |
| 397 | ${ExitDo} # Just ignore for now. |
| 398 | ${EndIf} |
| 399 | ${Loop} |
| 400 | Delete $TEMP\install.exe |
| 401 | Delete $TEMP\vimini.ini # install.exe creates this, but we don't need it. |
| 402 | |
| 403 | # We may have been put to the background when uninstall did something. |
| 404 | BringToFront |
| 405 | SectionEnd |
| 406 | |
| 407 | ########################################################## |
| 408 | Section "$(str_section_exe)" id_section_exe |
Bram Moolenaar | 49150a4 | 2017-09-17 21:00:03 +0200 | [diff] [blame] | 409 | SectionIn 1 2 3 RO |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 410 | |
| 411 | # we need also this here if the user changes the instdir |
| 412 | StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" |
| 413 | |
| 414 | SetOutPath $0 |
| 415 | File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe |
Bram Moolenaar | afde13b | 2019-04-28 19:46:49 +0200 | [diff] [blame] | 416 | !if /FileExists "${VIMSRC}\vim${BIT}.dll" |
| 417 | File ${VIMSRC}\vim${BIT}.dll |
| 418 | !endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 419 | File /oname=install.exe ${VIMSRC}\installw32.exe |
Bram Moolenaar | 30e8e73 | 2019-09-27 13:08:36 +0200 | [diff] [blame] | 420 | File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 421 | File ${VIMSRC}\vimrun.exe |
Bram Moolenaar | fec246d | 2016-08-28 18:47:14 +0200 | [diff] [blame] | 422 | File /oname=tee.exe ${VIMSRC}\teew32.exe |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 423 | File /oname=xxd.exe ${VIMSRC}\xxdw32.exe |
Bram Moolenaar | 1916673 | 2018-12-21 17:59:33 +0100 | [diff] [blame] | 424 | File ..\vimtutor.bat |
| 425 | File ..\README.txt |
Bram Moolenaar | 30e8e73 | 2019-09-27 13:08:36 +0200 | [diff] [blame] | 426 | File ..\uninstall.txt |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 427 | File ${VIMRT}\*.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 428 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 429 | !if /FileExists "${VIMTOOLS}\diff.exe" |
Bram Moolenaar | 98ebd2b | 2017-08-19 13:29:19 +0200 | [diff] [blame] | 430 | File ${VIMTOOLS}\diff.exe |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 431 | !endif |
| 432 | !if /FileExists "${VIMTOOLS}\winpty${BIT}.dll" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 433 | File ${VIMTOOLS}\winpty${BIT}.dll |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 434 | !endif |
| 435 | !if /FileExists "${VIMTOOLS}\winpty-agent.exe" |
Bram Moolenaar | 98ebd2b | 2017-08-19 13:29:19 +0200 | [diff] [blame] | 436 | File ${VIMTOOLS}\winpty-agent.exe |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 437 | !endif |
RestorerZ | 49f1e19 | 2024-04-09 23:04:44 +0200 | [diff] [blame] | 438 | !if /FileExists "${VIMTOOLS}\libsodium.dll" |
| 439 | File ${VIMTOOLS}\libsodium.dll |
| 440 | !endif |
Bram Moolenaar | 98ebd2b | 2017-08-19 13:29:19 +0200 | [diff] [blame] | 441 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 442 | SetOutPath $0\colors |
K.Takata | 44b9abb | 2022-08-24 18:08:00 +0100 | [diff] [blame] | 443 | File /r ${VIMRT}\colors\*.* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 444 | |
| 445 | SetOutPath $0\compiler |
| 446 | File ${VIMRT}\compiler\*.* |
| 447 | |
| 448 | SetOutPath $0\doc |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 449 | File /x uganda.nsis.txt ${VIMRT}\doc\*.txt |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 450 | File ${VIMRT}\doc\tags |
| 451 | |
| 452 | SetOutPath $0\ftplugin |
| 453 | File ${VIMRT}\ftplugin\*.* |
| 454 | |
| 455 | SetOutPath $0\indent |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 456 | File ${VIMRT}\indent\README.txt |
| 457 | File ${VIMRT}\indent\*.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 458 | |
Ken Takata | 1a9aba8 | 2024-01-16 17:14:29 +0100 | [diff] [blame] | 459 | SetOutPath $0\keymap |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 460 | File ${VIMRT}\keymap\README.txt |
| 461 | File ${VIMRT}\keymap\*.vim |
Ken Takata | 1a9aba8 | 2024-01-16 17:14:29 +0100 | [diff] [blame] | 462 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 463 | SetOutPath $0\macros |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 464 | File /r /x *.info ${VIMRT}\macros\*.* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 465 | |
Bram Moolenaar | 6a95c88 | 2019-03-26 23:02:46 +0100 | [diff] [blame] | 466 | SetOutPath $0\pack |
| 467 | File /r ${VIMRT}\pack\*.* |
Bram Moolenaar | 38623c8 | 2018-05-10 21:24:35 +0200 | [diff] [blame] | 468 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 469 | SetOutPath $0\plugin |
| 470 | File ${VIMRT}\plugin\*.* |
| 471 | |
Bram Moolenaar | 7fcab2a | 2006-03-25 21:46:12 +0000 | [diff] [blame] | 472 | SetOutPath $0\autoload |
K.Takata | 44b9abb | 2022-08-24 18:08:00 +0100 | [diff] [blame] | 473 | File /r ${VIMRT}\autoload\*.* |
Bram Moolenaar | 18144c8 | 2006-04-12 21:52:12 +0000 | [diff] [blame] | 474 | |
Bram Moolenaar | 44433da | 2022-05-06 18:08:52 +0100 | [diff] [blame] | 475 | SetOutPath $0\import\dist |
| 476 | File ${VIMRT}\import\dist\*.* |
| 477 | |
Christian Brabandt | 176711f | 2022-03-11 15:24:11 +0000 | [diff] [blame] | 478 | SetOutPath $0\bitmaps |
| 479 | File ${VIMSRC}\vim.ico |
| 480 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 481 | SetOutPath $0\syntax |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 482 | File /r /x testdir /x generator /x Makefile ${VIMRT}\syntax\*.* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 483 | |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 484 | SetOutPath $0\spell |
| 485 | File ${VIMRT}\spell\*.txt |
| 486 | File ${VIMRT}\spell\*.vim |
| 487 | File ${VIMRT}\spell\*.spl |
| 488 | File ${VIMRT}\spell\*.sug |
| 489 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 490 | SetOutPath $0\tools |
| 491 | File ${VIMRT}\tools\*.* |
| 492 | |
| 493 | SetOutPath $0\tutor |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 494 | File /x Makefile /x *.info ${VIMRT}\tutor\*.* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 495 | SectionEnd |
| 496 | |
| 497 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 498 | Section "$(str_section_console)" id_section_console |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 499 | SectionIn 1 3 |
| 500 | |
| 501 | SetOutPath $0 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 502 | File /oname=vim.exe ${VIMSRC}\vimw32.exe |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 503 | StrCpy $2 "$2 vim view vimdiff" |
| 504 | SectionEnd |
| 505 | |
| 506 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 507 | Section "$(str_section_batch)" id_section_batch |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 508 | SectionIn 3 |
| 509 | |
| 510 | StrCpy $1 "$1 -create-batfiles $2" |
| 511 | SectionEnd |
| 512 | |
| 513 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 514 | SectionGroup $(str_group_icons) id_group_icons |
| 515 | Section "$(str_section_desktop)" id_section_desktop |
| 516 | SectionIn 1 3 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 517 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 518 | StrCpy $1 "$1 -install-icons" |
| 519 | SectionEnd |
| 520 | |
| 521 | Section "$(str_section_start_menu)" id_section_startmenu |
| 522 | SectionIn 1 3 |
| 523 | |
| 524 | StrCpy $1 "$1 -add-start-menu" |
| 525 | SectionEnd |
| 526 | SectionGroupEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 527 | |
| 528 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 529 | Section "$(str_section_edit_with)" id_section_editwith |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 530 | SectionIn 1 3 |
| 531 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 532 | SetOutPath $0 |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 533 | |
Bram Moolenaar | 442b422 | 2010-05-24 21:34:22 +0200 | [diff] [blame] | 534 | ${If} ${RunningX64} |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 535 | # Install 64-bit gvimext.dll into the GvimExt64 directory. |
| 536 | SetOutPath $0\GvimExt64 |
| 537 | ClearErrors |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 538 | !define LIBRARY_SHELL_EXTENSION |
| 539 | !define LIBRARY_X64 |
| 540 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 541 | "${VIMSRC}\GvimExt\gvimext64.dll" \ |
| 542 | "$0\GvimExt64\gvimext.dll" "$0" |
| 543 | !undef LIBRARY_X64 |
| 544 | !undef LIBRARY_SHELL_EXTENSION |
Bram Moolenaar | 442b422 | 2010-05-24 21:34:22 +0200 | [diff] [blame] | 545 | ${EndIf} |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 546 | |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 547 | # Install 32-bit gvimext.dll into the GvimExt32 directory. |
| 548 | SetOutPath $0\GvimExt32 |
| 549 | ClearErrors |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 550 | !define LIBRARY_SHELL_EXTENSION |
| 551 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 552 | "${VIMSRC}\GvimExt\gvimext.dll" \ |
| 553 | "$0\GvimExt32\gvimext.dll" "$0" |
| 554 | !undef LIBRARY_SHELL_EXTENSION |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 555 | |
| 556 | # We don't have a separate entry for the "Open With..." menu, assume |
| 557 | # the user wants either both or none. |
| 558 | StrCpy $1 "$1 -install-popup -install-openwith" |
| 559 | SectionEnd |
| 560 | |
| 561 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 562 | Section "$(str_section_vim_rc)" id_section_vimrc |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 563 | SectionIn 1 3 |
| 564 | |
| 565 | StrCpy $1 "$1 -create-vimrc" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 566 | |
| 567 | ${If} ${RunningX64} |
| 568 | SetRegView 64 |
| 569 | ${EndIf} |
| 570 | WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_compat" "$vim_compat_stat" |
| 571 | WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_keyremap" "$vim_keymap_stat" |
| 572 | WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_mouse" "$vim_mouse_stat" |
| 573 | ${If} ${RunningX64} |
| 574 | SetRegView lastused |
| 575 | ${EndIf} |
| 576 | |
| 577 | ${If} $vim_compat_stat == "vi" |
| 578 | StrCpy $1 "$1 -vimrc-compat vi" |
| 579 | ${ElseIf} $vim_compat_stat == "vim" |
| 580 | StrCpy $1 "$1 -vimrc-compat vim" |
| 581 | ${ElseIf} $vim_compat_stat == "defaults" |
| 582 | StrCpy $1 "$1 -vimrc-compat defaults" |
| 583 | ${Else} |
| 584 | StrCpy $1 "$1 -vimrc-compat all" |
| 585 | ${EndIf} |
| 586 | |
| 587 | ${If} $vim_keymap_stat == "default" |
| 588 | StrCpy $1 "$1 -vimrc-remap no" |
| 589 | ${Else} |
| 590 | StrCpy $1 "$1 -vimrc-remap win" |
| 591 | ${EndIf} |
| 592 | |
| 593 | ${If} $vim_mouse_stat == "default" |
| 594 | StrCpy $1 "$1 -vimrc-behave default" |
| 595 | ${ElseIf} $vim_mouse_stat == "windows" |
| 596 | StrCpy $1 "$1 -vimrc-behave mswin" |
| 597 | ${Else} |
| 598 | StrCpy $1 "$1 -vimrc-behave unix" |
| 599 | ${EndIf} |
| 600 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 601 | SectionEnd |
| 602 | |
| 603 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 604 | SectionGroup $(str_group_plugin) id_group_plugin |
| 605 | Section "$(str_section_plugin_home)" id_section_pluginhome |
| 606 | SectionIn 1 3 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 607 | |
Christopher Plewright | eea0a00 | 2023-02-17 20:04:51 +0000 | [diff] [blame] | 608 | # use ShellExecAsUser below instead |
| 609 | # StrCpy $1 "$1 -create-directories home" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 610 | SectionEnd |
| 611 | |
| 612 | Section "$(str_section_plugin_vim)" id_section_pluginvim |
| 613 | SectionIn 3 |
| 614 | |
| 615 | StrCpy $1 "$1 -create-directories vim" |
| 616 | SectionEnd |
| 617 | SectionGroupEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 618 | |
| 619 | ########################################################## |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 620 | !if ${HAVE_NLS} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 621 | Section "$(str_section_nls)" id_section_nls |
| 622 | SectionIn 1 3 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 623 | |
Restorer | 74a2331 | 2024-03-28 09:19:44 +0000 | [diff] [blame] | 624 | #; FIXME: When adding new translations, do not forget to make changes here. |
| 625 | SetOutPath $0 |
| 626 | !if /FileExists ..\README.dax.txt |
| 627 | ${If} $Language = ${LANG_DANISH} |
| 628 | File ..\README.dax.txt |
| 629 | ${EndIf} |
| 630 | !endif |
| 631 | !if /FileExists ..\README.nlx.txt |
| 632 | ${If} $Language = ${LANG_DUTCH} |
| 633 | File ..\README.nlx.txt |
| 634 | ${EndIf} |
| 635 | !endif |
| 636 | !if /FileExists ..\README.dex.txt |
| 637 | ${If} $Language = ${LANG_GERMAN} |
| 638 | File ..\README.dex.txt |
| 639 | ${EndIf} |
| 640 | !endif |
| 641 | !if /FileExists ..\README.itx.txt |
| 642 | ${If} $Language = ${LANG_ITALIAN} |
| 643 | File ..\README.itx.txt |
| 644 | ${EndIf} |
| 645 | !endif |
| 646 | !if /FileExists ..\README.jax.txt |
| 647 | ${If} $Language = ${LANG_JAPANESE} |
| 648 | File ..\README.jax.txt |
| 649 | ${EndIf} |
| 650 | !endif |
| 651 | !if /FileExists ..\README.rux.txt |
| 652 | ${If} $Language = ${LANG_RUSSIAN} |
| 653 | File ..\README.rux.txt |
| 654 | ${EndIf} |
| 655 | !endif |
| 656 | !if /FileExists ..\README.srx.txt |
| 657 | ${If} $Language = ${LANG_SERBIAN} |
| 658 | File ..\README.srx.txt |
| 659 | ${EndIf} |
| 660 | !endif |
| 661 | !if /FileExists ..\README.cnx.txt |
| 662 | ${If} $Language = ${LANG_SIMPCHINESE} |
| 663 | File ..\README.cnx.txt |
| 664 | ${EndIf} |
| 665 | !endif |
| 666 | !if /FileExists ..\README.twx.txt |
| 667 | ${If} $Language = ${LANG_TRADCHINESE} |
| 668 | File ..\README.twx.txt |
| 669 | ${EndIf} |
| 670 | !endif |
| 671 | !if /FileExists ..\README.trx.txt |
| 672 | ${OrIf} $Language = ${LANG_TURKISH} |
| 673 | File ..\README.trx.txt |
| 674 | ${EndIf} |
| 675 | !endif |
| 676 | #; FIXME: When adding new translations, do not forget to make changes here. |
| 677 | SetOutPath $0\doc |
| 678 | !if /FileExists "${VIMRT}\doc\uganda.dax" |
| 679 | ${If} $Language = ${LANG_DANISH} |
| 680 | File ${VIMRT}\doc\uganda.dax |
| 681 | ${EndIf} |
| 682 | !endif |
| 683 | !if /FileExists "${VIMRT}\doc\uganda.nlx" |
| 684 | ${If} $Language = ${LANG_DUTCH} |
| 685 | File ${VIMRT}\doc\uganda.nlx |
| 686 | ${EndIf} |
| 687 | !endif |
| 688 | !if /FileExists "${VIMRT}\doc\uganda.dex" |
| 689 | ${If} $Language = ${LANG_GERMAN} |
| 690 | File ${VIMRT}\doc\uganda.dex |
| 691 | ${EndIf} |
| 692 | !endif |
| 693 | !if /FileExists "${VIMRT}\doc\uganda.itx" |
| 694 | ${If} $Language = ${LANG_ITALIAN} |
| 695 | File ${VIMRT}\doc\uganda.itx |
| 696 | ${EndIf} |
| 697 | !endif |
| 698 | !if /FileExists "${VIMRT}\doc\uganda.jax" |
| 699 | ${If} $Language = ${LANG_JAPANESE} |
| 700 | File ${VIMRT}\doc\uganda.jax |
| 701 | ${EndIf} |
| 702 | !endif |
| 703 | !if /FileExists "${VIMRT}\doc\uganda.rux" |
| 704 | ${If} $Language = ${LANG_RUSSIAN} |
| 705 | File ${VIMRT}\doc\uganda.rux |
| 706 | ${EndIf} |
| 707 | !endif |
| 708 | !if /FileExists "${VIMRT}\doc\uganda.srx" |
| 709 | ${If} $Language = ${LANG_SERBIAN} |
| 710 | File ${VIMRT}\doc\uganda.srx |
| 711 | ${EndIf} |
| 712 | !endif |
| 713 | !if /FileExists "${VIMRT}\doc\uganda.cnx" |
| 714 | ${If} $Language = ${LANG_SIMPCHINESE} |
| 715 | File ${VIMRT}\doc\uganda.cnx |
| 716 | ${EndIf} |
| 717 | !endif |
| 718 | !if /FileExists "${VIMRT}\doc\uganda.twx" |
| 719 | ${If} $Language = ${LANG_TRADCHINESE} |
| 720 | File ${VIMRT}\doc\uganda.twx |
| 721 | ${EndIf} |
| 722 | !endif |
| 723 | !if /FileExists "${VIMRT}\doc\uganda.trx" |
| 724 | ${If} $Language = ${LANG_TURKISH} |
| 725 | File ${VIMRT}\doc\uganda.trx |
| 726 | ${EndIf} |
| 727 | !endif |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 728 | SetOutPath $0\lang |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 729 | File /r /x Makefile ${VIMRT}\lang\*.* |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 730 | SetOutPath $0 |
| 731 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 732 | "${GETTEXT}\gettext${BIT}\libintl-8.dll" \ |
| 733 | "$0\libintl-8.dll" "$0" |
| 734 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 735 | "${GETTEXT}\gettext${BIT}\libiconv-2.dll" \ |
| 736 | "$0\libiconv-2.dll" "$0" |
K.Takata | 48f3833 | 2024-10-07 20:37:00 +0200 | [diff] [blame] | 737 | !if ${INCLUDE_LIBGCC} |
| 738 | !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" |
| 739 | # Install libgcc_s_sjlj-1.dll only if it is needed. |
| 740 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 741 | "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \ |
| 742 | "$0\libgcc_s_sjlj-1.dll" "$0" |
| 743 | !endif |
| 744 | !endif |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 745 | |
| 746 | ${If} ${SectionIsSelected} ${id_section_editwith} |
| 747 | ${If} ${RunningX64} |
| 748 | # Install DLLs for 64-bit gvimext.dll into the GvimExt64 directory. |
| 749 | SetOutPath $0\GvimExt64 |
| 750 | ClearErrors |
| 751 | !define LIBRARY_X64 |
| 752 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 753 | "${GETTEXT}\gettext64\libintl-8.dll" \ |
| 754 | "$0\GvimExt64\libintl-8.dll" "$0\GvimExt64" |
| 755 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 756 | "${GETTEXT}\gettext64\libiconv-2.dll" \ |
| 757 | "$0\GvimExt64\libiconv-2.dll" "$0\GvimExt64" |
| 758 | !undef LIBRARY_X64 |
| 759 | ${EndIf} |
| 760 | |
| 761 | # Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory. |
| 762 | SetOutPath $0\GvimExt32 |
| 763 | ClearErrors |
| 764 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 765 | "${GETTEXT}\gettext32\libintl-8.dll" \ |
| 766 | "$0\GvimExt32\libintl-8.dll" "$0\GvimExt32" |
| 767 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 768 | "${GETTEXT}\gettext32\libiconv-2.dll" \ |
| 769 | "$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32" |
K.Takata | 48f3833 | 2024-10-07 20:37:00 +0200 | [diff] [blame] | 770 | !if ${INCLUDE_LIBGCC} |
| 771 | !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" |
| 772 | # Install libgcc_s_sjlj-1.dll only if it is needed. |
| 773 | !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 774 | "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \ |
| 775 | "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32" |
| 776 | !endif |
| 777 | !endif |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 778 | ${EndIf} |
| 779 | SectionEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 780 | !endif |
| 781 | |
| 782 | ########################################################## |
| 783 | Section -call_install_exe |
| 784 | SetOutPath $0 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 785 | DetailPrint "$(str_msg_registering)" |
| 786 | nsExec::Exec "$0\install.exe $1" |
| 787 | Pop $3 |
Christopher Plewright | eea0a00 | 2023-02-17 20:04:51 +0000 | [diff] [blame] | 788 | |
| 789 | ${If} ${SectionIsSelected} ${id_section_pluginhome} |
| 790 | ReadEnvStr $3 "COMSPEC" |
| 791 | Call GetHomeDir |
| 792 | Pop $4 |
| 793 | ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE |
| 794 | ${EndIf} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 795 | SectionEnd |
| 796 | |
| 797 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 798 | !macro SaveSectionSelection section_id reg_value |
| 799 | ${If} ${SectionIsSelected} ${section_id} |
| 800 | WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 1 |
| 801 | ${Else} |
| 802 | WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 0 |
| 803 | ${EndIf} |
| 804 | !macroend |
| 805 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 806 | Section -post |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 807 | |
| 808 | # Get estimated install size |
| 809 | SectionGetSize ${id_section_exe} $3 |
| 810 | ${If} ${SectionIsSelected} ${id_section_console} |
| 811 | SectionGetSize ${id_section_console} $4 |
| 812 | IntOp $3 $3 + $4 |
| 813 | ${EndIf} |
| 814 | ${If} ${SectionIsSelected} ${id_section_editwith} |
| 815 | SectionGetSize ${id_section_editwith} $4 |
| 816 | IntOp $3 $3 + $4 |
| 817 | ${EndIf} |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 818 | !if ${HAVE_NLS} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 819 | ${If} ${SectionIsSelected} ${id_section_nls} |
| 820 | SectionGetSize ${id_section_nls} $4 |
| 821 | IntOp $3 $3 + $4 |
| 822 | ${EndIf} |
| 823 | !endif |
| 824 | |
| 825 | # Register EstimatedSize and AllowSilent. |
| 826 | # Other information will be set by the install.exe (dosinst.c). |
| 827 | ${If} ${RunningX64} |
| 828 | SetRegView 64 |
| 829 | ${EndIf} |
| 830 | WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "EstimatedSize" $3 |
| 831 | WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "AllowSilent" 1 |
| 832 | ${If} ${RunningX64} |
| 833 | SetRegView lastused |
| 834 | ${EndIf} |
| 835 | |
| 836 | # Store the selections to the registry. |
| 837 | ${If} ${RunningX64} |
| 838 | SetRegView 64 |
| 839 | ${EndIf} |
| 840 | !insertmacro SaveSectionSelection ${id_section_console} "select_console" |
| 841 | !insertmacro SaveSectionSelection ${id_section_batch} "select_batch" |
| 842 | !insertmacro SaveSectionSelection ${id_section_desktop} "select_desktop" |
| 843 | !insertmacro SaveSectionSelection ${id_section_startmenu} "select_startmenu" |
| 844 | !insertmacro SaveSectionSelection ${id_section_editwith} "select_editwith" |
| 845 | !insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc" |
| 846 | !insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome" |
| 847 | !insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim" |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 848 | !if ${HAVE_NLS} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 849 | !insertmacro SaveSectionSelection ${id_section_nls} "select_nls" |
| 850 | !endif |
| 851 | ${If} ${RunningX64} |
| 852 | SetRegView lastused |
| 853 | ${EndIf} |
| 854 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 855 | BringToFront |
| 856 | SectionEnd |
| 857 | |
| 858 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 859 | !macro LoadSectionSelection section_id reg_value |
| 860 | ClearErrors |
| 861 | ReadRegDWORD $3 HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} |
| 862 | ${IfNot} ${Errors} |
| 863 | ${If} $3 = 1 |
| 864 | !insertmacro SelectSection ${section_id} |
| 865 | ${Else} |
| 866 | !insertmacro UnselectSection ${section_id} |
| 867 | ${EndIf} |
| 868 | ${EndIf} |
| 869 | !macroend |
Bram Moolenaar | c3fdf7f | 2017-10-28 18:36:48 +0200 | [diff] [blame] | 870 | |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 871 | !macro LoadDefaultVimrc out_var reg_value default_value |
| 872 | ClearErrors |
| 873 | ReadRegStr ${out_var} HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} |
| 874 | ${If} ${Errors} |
| 875 | ${OrIf} ${out_var} == "" |
| 876 | StrCpy ${out_var} ${default_value} |
| 877 | ${EndIf} |
| 878 | !macroend |
| 879 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 880 | Function .onInit |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 881 | !if ${HAVE_MULTI_LANG} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 882 | # Select a language (or read from the registry). |
| 883 | !insertmacro MUI_LANGDLL_DISPLAY |
| 884 | !endif |
Bram Moolenaar | c3fdf7f | 2017-10-28 18:36:48 +0200 | [diff] [blame] | 885 | |
Christian Brabandt | 7d60384 | 2021-07-24 21:19:42 +0200 | [diff] [blame] | 886 | ${If} $INSTDIR == ${DEFAULT_INSTDIR} |
| 887 | # Check $VIM |
| 888 | ReadEnvStr $3 "VIM" |
| 889 | ${If} $3 != "" |
| 890 | StrCpy $INSTDIR $3 |
| 891 | ${EndIf} |
| 892 | ${EndIf} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 893 | |
| 894 | call CheckOldVim |
| 895 | Pop $3 |
| 896 | ${If} $3 == "" |
| 897 | # No old versions of Vim found. Unselect and hide the section. |
| 898 | !insertmacro UnselectSection ${id_section_old_ver} |
| 899 | SectionSetInstTypes ${id_section_old_ver} 0 |
| 900 | SectionSetText ${id_section_old_ver} "" |
| 901 | ${Else} |
Christian Brabandt | 7d60384 | 2021-07-24 21:19:42 +0200 | [diff] [blame] | 902 | ${If} $INSTDIR == ${DEFAULT_INSTDIR} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 903 | StrCpy $INSTDIR $3 |
| 904 | ${EndIf} |
| 905 | ${EndIf} |
| 906 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 907 | ${If} ${RunningX64} |
| 908 | SetRegView 64 |
| 909 | ${EndIf} |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 910 | # Load the selections from the registry (if any). |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 911 | !insertmacro LoadSectionSelection ${id_section_console} "select_console" |
| 912 | !insertmacro LoadSectionSelection ${id_section_batch} "select_batch" |
| 913 | !insertmacro LoadSectionSelection ${id_section_desktop} "select_desktop" |
| 914 | !insertmacro LoadSectionSelection ${id_section_startmenu} "select_startmenu" |
| 915 | !insertmacro LoadSectionSelection ${id_section_editwith} "select_editwith" |
| 916 | !insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc" |
| 917 | !insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome" |
| 918 | !insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim" |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 919 | !if ${HAVE_NLS} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 920 | !insertmacro LoadSectionSelection ${id_section_nls} "select_nls" |
| 921 | !endif |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 922 | # Load the default _vimrc settings from the registry (if any). |
| 923 | !insertmacro LoadDefaultVimrc $vim_compat_stat "vim_compat" "all" |
| 924 | !insertmacro LoadDefaultVimrc $vim_keymap_stat "vim_keyremap" "default" |
| 925 | !insertmacro LoadDefaultVimrc $vim_mouse_stat "vim_mouse" "default" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 926 | ${If} ${RunningX64} |
| 927 | SetRegView lastused |
| 928 | ${EndIf} |
| 929 | |
| 930 | # User variables: |
| 931 | # $0 - holds the directory the executables are installed to |
| 932 | # $1 - holds the parameters to be passed to install.exe. Starts with OLE |
| 933 | # registration (since a non-OLE gvim will not complain, and we want to |
| 934 | # always register an OLE gvim). |
| 935 | # $2 - holds the names to create batch files for |
| 936 | StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" |
| 937 | StrCpy $1 "-register-OLE" |
| 938 | StrCpy $2 "gvim evim gview gvimdiff vimtutor" |
Bram Moolenaar | c3fdf7f | 2017-10-28 18:36:48 +0200 | [diff] [blame] | 939 | FunctionEnd |
| 940 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 941 | Function .onInstSuccess |
| 942 | WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe |
| 943 | FunctionEnd |
Bram Moolenaar | c3fdf7f | 2017-10-28 18:36:48 +0200 | [diff] [blame] | 944 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 945 | Function .onInstFailed |
| 946 | MessageBox MB_OK|MB_ICONEXCLAMATION "$(str_msg_install_fail)" /SD IDOK |
Bram Moolenaar | c3fdf7f | 2017-10-28 18:36:48 +0200 | [diff] [blame] | 947 | FunctionEnd |
| 948 | |
| 949 | ########################################################## |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 950 | Function SetCustom |
| 951 | # Display the _vimrc setting dialog using nsDialogs. |
| 952 | |
| 953 | # Check if a _vimrc should be created |
| 954 | ${IfNot} ${SectionIsSelected} ${id_section_vimrc} |
| 955 | Abort |
| 956 | ${EndIf} |
| 957 | |
| 958 | !insertmacro MUI_HEADER_TEXT \ |
| 959 | $(str_vimrc_page_title) $(str_vimrc_page_subtitle) |
| 960 | |
| 961 | nsDialogs::Create 1018 |
| 962 | Pop $vim_dialog |
| 963 | |
| 964 | ${If} $vim_dialog == error |
| 965 | Abort |
| 966 | ${EndIf} |
| 967 | |
| 968 | ${If} ${RunningX64} |
| 969 | SetRegView 64 |
| 970 | ${EndIf} |
| 971 | |
| 972 | GetFunctionAddress $3 ValidateCustom |
| 973 | nsDialogs::OnBack $3 |
| 974 | |
| 975 | |
| 976 | # 1st group - Compatibility |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 977 | ${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 978 | Pop $3 |
| 979 | |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 980 | ${NSD_CreateLabel} 16u 14u 269u 10u $(str_msg_compat_desc) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 981 | Pop $3 |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 982 | ${NSD_CreateDropList} 42u 26u 237u 13u "" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 983 | Pop $vim_nsd_compat |
| 984 | ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi) |
| 985 | ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim) |
| 986 | ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_defaults) |
| 987 | ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_all) |
| 988 | |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 989 | ${If} $vim_compat_stat == "defaults" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 990 | StrCpy $4 2 |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 991 | ${ElseIf} $vim_compat_stat == "vim" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 992 | StrCpy $4 1 |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 993 | ${ElseIf} $vim_compat_stat == "vi" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 994 | StrCpy $4 0 |
| 995 | ${Else} # default |
| 996 | StrCpy $4 3 |
| 997 | ${EndIf} |
| 998 | ${NSD_CB_SetSelectionIndex} $vim_nsd_compat $4 |
| 999 | |
| 1000 | |
| 1001 | # 2nd group - Key remapping |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1002 | ${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1003 | Pop $3 |
| 1004 | |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1005 | ${NSD_CreateLabel} 16u 62u 269u 10u $(str_msg_keymap_desc) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1006 | Pop $3 |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1007 | ${NSD_CreateDropList} 42u 74u 236u 13u "" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1008 | Pop $vim_nsd_keymap |
| 1009 | ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default) |
| 1010 | ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows) |
| 1011 | |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 1012 | ${If} $vim_keymap_stat == "windows" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1013 | StrCpy $4 1 |
| 1014 | ${Else} # default |
| 1015 | StrCpy $4 0 |
| 1016 | ${EndIf} |
| 1017 | ${NSD_CB_SetSelectionIndex} $vim_nsd_keymap $4 |
| 1018 | |
| 1019 | |
| 1020 | # 3rd group - Mouse behavior |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1021 | ${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1022 | Pop $3 |
| 1023 | |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1024 | ${NSD_CreateLabel} 16u 108u 269u 10u $(str_msg_mouse_desc) |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1025 | Pop $3 |
Restorer | 6dcf59b | 2024-03-25 15:38:37 +0000 | [diff] [blame] | 1026 | ${NSD_CreateDropList} 42u 121u 237u 13u "" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1027 | Pop $vim_nsd_mouse |
| 1028 | ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default) |
| 1029 | ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows) |
| 1030 | ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_unix) |
| 1031 | |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 1032 | ${If} $vim_mouse_stat == "xterm" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1033 | StrCpy $4 2 |
Bram Moolenaar | ceb56dd | 2020-07-14 22:24:40 +0200 | [diff] [blame] | 1034 | ${ElseIf} $vim_mouse_stat == "windows" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1035 | StrCpy $4 1 |
| 1036 | ${Else} # default |
| 1037 | StrCpy $4 0 |
| 1038 | ${EndIf} |
| 1039 | ${NSD_CB_SetSelectionIndex} $vim_nsd_mouse $4 |
| 1040 | |
| 1041 | ${If} ${RunningX64} |
| 1042 | SetRegView lastused |
| 1043 | ${EndIf} |
| 1044 | |
| 1045 | nsDialogs::Show |
| 1046 | FunctionEnd |
| 1047 | |
| 1048 | Function ValidateCustom |
| 1049 | ${NSD_CB_GetSelectionIndex} $vim_nsd_compat $3 |
| 1050 | ${If} $3 = 0 |
| 1051 | StrCpy $vim_compat_stat "vi" |
| 1052 | ${ElseIf} $3 = 1 |
| 1053 | StrCpy $vim_compat_stat "vim" |
| 1054 | ${ElseIf} $3 = 2 |
| 1055 | StrCpy $vim_compat_stat "defaults" |
| 1056 | ${Else} |
| 1057 | StrCpy $vim_compat_stat "all" |
| 1058 | ${EndIf} |
| 1059 | |
| 1060 | ${NSD_CB_GetSelectionIndex} $vim_nsd_keymap $3 |
| 1061 | ${If} $3 = 0 |
| 1062 | StrCpy $vim_keymap_stat "default" |
| 1063 | ${Else} |
| 1064 | StrCpy $vim_keymap_stat "windows" |
| 1065 | ${EndIf} |
| 1066 | |
| 1067 | ${NSD_CB_GetSelectionIndex} $vim_nsd_mouse $3 |
| 1068 | ${If} $3 = 0 |
| 1069 | StrCpy $vim_mouse_stat "default" |
| 1070 | ${ElseIf} $3 = 1 |
| 1071 | StrCpy $vim_mouse_stat "windows" |
| 1072 | ${Else} |
| 1073 | StrCpy $vim_mouse_stat "xterm" |
| 1074 | ${EndIf} |
| 1075 | FunctionEnd |
| 1076 | |
| 1077 | ########################################################## |
| 1078 | # Description for Installer Sections |
| 1079 | |
| 1080 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
| 1081 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_old_ver} $(str_desc_old_ver) |
| 1082 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_exe} $(str_desc_exe) |
| 1083 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_console} $(str_desc_console) |
| 1084 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_batch} $(str_desc_batch) |
| 1085 | !insertmacro MUI_DESCRIPTION_TEXT ${id_group_icons} $(str_desc_icons) |
| 1086 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_desktop} $(str_desc_desktop) |
| 1087 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_startmenu} $(str_desc_start_menu) |
| 1088 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_editwith} $(str_desc_edit_with) |
| 1089 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_vimrc} $(str_desc_vim_rc) |
| 1090 | !insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin) |
| 1091 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home) |
| 1092 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim) |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 1093 | !if ${HAVE_NLS} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1094 | !insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls) |
| 1095 | !endif |
| 1096 | !insertmacro MUI_FUNCTION_DESCRIPTION_END |
| 1097 | |
| 1098 | |
| 1099 | ########################################################## |
| 1100 | # Uninstaller Functions and Sections |
| 1101 | |
| 1102 | Function un.onInit |
Restorer | 51c94b6 | 2024-03-24 09:41:18 +0000 | [diff] [blame] | 1103 | !if ${HAVE_MULTI_LANG} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1104 | # Get the language from the registry. |
| 1105 | !insertmacro MUI_UNGETLANGUAGE |
| 1106 | !endif |
| 1107 | FunctionEnd |
| 1108 | |
| 1109 | Section "un.$(str_unsection_register)" id_unsection_register |
| 1110 | SectionIn RO |
| 1111 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1112 | # Apparently $INSTDIR is set to the directory where the uninstaller is |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 1113 | # created. Thus the "vim91" directory is included in it. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1114 | StrCpy $0 "$INSTDIR" |
| 1115 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1116 | # delete the context menu entry and batch files |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1117 | DetailPrint "$(str_msg_unregistering)" |
Bram Moolenaar | 30e8e73 | 2019-09-27 13:08:36 +0200 | [diff] [blame] | 1118 | nsExec::Exec "$0\uninstall.exe -nsis" |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1119 | Pop $3 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1120 | |
| 1121 | # We may have been put to the background when uninstall did something. |
| 1122 | BringToFront |
| 1123 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1124 | # Delete the installer language setting. |
| 1125 | DeleteRegKey ${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY} |
| 1126 | SectionEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1127 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1128 | Section "un.$(str_unsection_exe)" id_unsection_exe |
| 1129 | |
| 1130 | StrCpy $0 "$INSTDIR" |
| 1131 | |
| 1132 | # Delete gettext and iconv DLLs |
| 1133 | ${If} ${FileExists} "$0\libiconv-2.dll" |
| 1134 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1135 | "$0\libiconv-2.dll" |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 1136 | ${EndIf} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1137 | ${If} ${FileExists} "$0\libintl-8.dll" |
| 1138 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1139 | "$0\libintl-8.dll" |
| 1140 | ${EndIf} |
| 1141 | ${If} ${FileExists} "$0\libgcc_s_sjlj-1.dll" |
| 1142 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1143 | "$0\libgcc_s_sjlj-1.dll" |
| 1144 | ${EndIf} |
| 1145 | |
| 1146 | # Delete other DLLs |
| 1147 | Delete /REBOOTOK $0\*.dll |
| 1148 | |
| 1149 | # Delete 64-bit GvimExt |
| 1150 | ${If} ${RunningX64} |
| 1151 | !define LIBRARY_X64 |
| 1152 | ${If} ${FileExists} "$0\GvimExt64\gvimext.dll" |
| 1153 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1154 | "$0\GvimExt64\gvimext.dll" |
| 1155 | ${EndIf} |
| 1156 | ${If} ${FileExists} "$0\GvimExt64\libiconv-2.dll" |
| 1157 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1158 | "$0\GvimExt64\libiconv-2.dll" |
| 1159 | ${EndIf} |
| 1160 | ${If} ${FileExists} "$0\GvimExt64\libintl-8.dll" |
| 1161 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1162 | "$0\GvimExt64\libintl-8.dll" |
| 1163 | ${EndIf} |
| 1164 | ${If} ${FileExists} "$0\GvimExt64\libwinpthread-1.dll" |
| 1165 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1166 | "$0\GvimExt64\libwinpthread-1.dll" |
| 1167 | ${EndIf} |
| 1168 | !undef LIBRARY_X64 |
| 1169 | RMDir /r $0\GvimExt64 |
| 1170 | ${EndIf} |
| 1171 | |
| 1172 | # Delete 32-bit GvimExt |
| 1173 | ${If} ${FileExists} "$0\GvimExt32\gvimext.dll" |
| 1174 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1175 | "$0\GvimExt32\gvimext.dll" |
| 1176 | ${EndIf} |
| 1177 | ${If} ${FileExists} "$0\GvimExt32\libiconv-2.dll" |
| 1178 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1179 | "$0\GvimExt32\libiconv-2.dll" |
| 1180 | ${EndIf} |
| 1181 | ${If} ${FileExists} "$0\GvimExt32\libintl-8.dll" |
| 1182 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1183 | "$0\GvimExt32\libintl-8.dll" |
| 1184 | ${EndIf} |
| 1185 | ${If} ${FileExists} "$0\GvimExt32\libgcc_s_sjlj-1.dll" |
| 1186 | !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ |
| 1187 | "$0\GvimExt32\libgcc_s_sjlj-1.dll" |
| 1188 | ${EndIf} |
| 1189 | RMDir /r $0\GvimExt32 |
Bram Moolenaar | 6199d43 | 2017-10-14 19:05:44 +0200 | [diff] [blame] | 1190 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1191 | ClearErrors |
| 1192 | # Remove everything but *.dll files. Avoids that |
| 1193 | # a lot remains when gvimext.dll cannot be deleted. |
Bram Moolenaar | 408b585 | 2006-05-13 10:44:07 +0000 | [diff] [blame] | 1194 | RMDir /r $0\autoload |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1195 | RMDir /r $0\colors |
| 1196 | RMDir /r $0\compiler |
| 1197 | RMDir /r $0\doc |
| 1198 | RMDir /r $0\ftplugin |
Bram Moolenaar | 44433da | 2022-05-06 18:08:52 +0100 | [diff] [blame] | 1199 | RMDir /r $0\import |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1200 | RMDir /r $0\indent |
| 1201 | RMDir /r $0\macros |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1202 | RMDir /r $0\pack |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1203 | RMDir /r $0\plugin |
Bram Moolenaar | 408b585 | 2006-05-13 10:44:07 +0000 | [diff] [blame] | 1204 | RMDir /r $0\spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1205 | RMDir /r $0\syntax |
| 1206 | RMDir /r $0\tools |
| 1207 | RMDir /r $0\tutor |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1208 | RMDir /r $0\lang |
| 1209 | RMDir /r $0\keymap |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 1210 | RMDir /r $0\bitmaps |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1211 | Delete $0\*.exe |
| 1212 | Delete $0\*.bat |
| 1213 | Delete $0\*.vim |
| 1214 | Delete $0\*.txt |
| 1215 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1216 | ${If} ${Errors} |
| 1217 | MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK |
| 1218 | ${EndIf} |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1219 | |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 1220 | # No error message if the "vim91" directory can't be removed, the |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1221 | # gvimext.dll may still be there. |
| 1222 | RMDir $0 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1223 | SectionEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1224 | |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1225 | # Remove "vimfiles" directory under the specified directory. |
| 1226 | !macro RemoveVimfiles dir |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 1227 | ${If} ${FileExists} ${dir}\_viminfo |
| 1228 | Delete ${dir}\_viminfo |
| 1229 | ${EndIf} |
| 1230 | ${If} ${DirExists} ${dir}\vimfiles |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1231 | RMDir ${dir}\vimfiles\colors |
| 1232 | RMDir ${dir}\vimfiles\compiler |
| 1233 | RMDir ${dir}\vimfiles\doc |
| 1234 | RMDir ${dir}\vimfiles\ftdetect |
| 1235 | RMDir ${dir}\vimfiles\ftplugin |
| 1236 | RMDir ${dir}\vimfiles\indent |
| 1237 | RMDir ${dir}\vimfiles\keymap |
| 1238 | RMDir ${dir}\vimfiles\plugin |
| 1239 | RMDir ${dir}\vimfiles\syntax |
RestorerZ | 2680a07 | 2024-03-20 20:15:51 +0100 | [diff] [blame] | 1240 | ${If} ${FileExists} ${dir}\vimfiles\.netrwhist* |
| 1241 | Delete ${dir}\vimfiles\.netrwhist* |
| 1242 | ${EndIf} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1243 | RMDir ${dir}\vimfiles |
| 1244 | ${EndIf} |
| 1245 | !macroend |
| 1246 | |
| 1247 | SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin |
| 1248 | Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home |
| 1249 | # get the home dir |
Christopher Plewright | eea0a00 | 2023-02-17 20:04:51 +0000 | [diff] [blame] | 1250 | Call un.GetHomeDir |
| 1251 | Pop $0 |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1252 | |
| 1253 | ${If} $0 != "" |
| 1254 | !insertmacro RemoveVimfiles $0 |
| 1255 | ${EndIf} |
| 1256 | SectionEnd |
| 1257 | |
| 1258 | Section "un.$(str_unsection_plugin_vim)" id_unsection_plugin_vim |
| 1259 | # get the parent dir of the installation |
| 1260 | Push $INSTDIR |
| 1261 | Call un.GetParent |
| 1262 | Pop $0 |
| 1263 | |
| 1264 | # if a plugin dir was created at installation remove it |
| 1265 | !insertmacro RemoveVimfiles $0 |
| 1266 | SectionEnd |
| 1267 | SectionGroupEnd |
| 1268 | |
| 1269 | Section "un.$(str_unsection_rootdir)" id_unsection_rootdir |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1270 | # get the parent dir of the installation |
| 1271 | Push $INSTDIR |
| 1272 | Call un.GetParent |
| 1273 | Pop $0 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1274 | |
Bram Moolenaar | a8d22e3 | 2019-04-12 21:29:33 +0200 | [diff] [blame] | 1275 | ${IfNot} ${Silent} |
| 1276 | Delete $0\_vimrc |
| 1277 | ${Endif} |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1278 | RMDir $0 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1279 | SectionEnd |
Bram Moolenaar | af610b8 | 2018-12-21 16:22:50 +0100 | [diff] [blame] | 1280 | |
| 1281 | ########################################################## |
| 1282 | # Description for Uninstaller Sections |
| 1283 | |
| 1284 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN |
| 1285 | !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_register} $(str_desc_unregister) |
| 1286 | !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_exe} $(str_desc_rm_exe) |
| 1287 | !insertmacro MUI_DESCRIPTION_TEXT ${id_ungroup_plugin} $(str_desc_rm_plugin) |
| 1288 | !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_home} $(str_desc_rm_plugin_home) |
| 1289 | !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_vim} $(str_desc_rm_plugin_vim) |
| 1290 | !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_rootdir} $(str_desc_rm_rootdir) |
| 1291 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_END |