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