gvim.nsi 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  1. # NSIS file to create a self-installing exe for Vim.
  2. # It requires NSIS version 3.0 or later.
  3. # Last Change: 2014 Nov 5
  4. Unicode true
  5. # WARNING: if you make changes to this script, look out for $0 to be valid,
  6. # because uninstall deletes most files in $0.
  7. # Location of gvim_ole.exe, vimw32.exe, GvimExt/*, etc.
  8. !ifndef VIMSRC
  9. !define VIMSRC "..\src"
  10. !endif
  11. # Location of runtime files
  12. !ifndef VIMRT
  13. !define VIMRT ".."
  14. !endif
  15. # Location of extra tools: diff.exe
  16. !ifndef VIMTOOLS
  17. !define VIMTOOLS ..\..
  18. !endif
  19. # Location of gettext.
  20. # It must contain two directories: gettext32 and gettext64.
  21. # See README.txt for detail.
  22. !ifndef GETTEXT
  23. !define GETTEXT ${VIMRT}
  24. !endif
  25. # Comment the next line if you don't have UPX.
  26. # Get it at https://upx.github.io/
  27. !define HAVE_UPX
  28. # Comment the next line if you do not want to add Native Language Support
  29. !define HAVE_NLS
  30. # Comment the following line to create an English-only installer:
  31. !define HAVE_MULTI_LANG
  32. # Uncomment the next line if you want to create a 64-bit installer.
  33. #!define WIN64
  34. !include gvim_version.nsh # for version number
  35. # Definition of Patch for Vim
  36. !ifndef PATCHLEVEL
  37. !define PATCHLEVEL 0
  38. !endif
  39. # ----------- No configurable settings below this line -----------
  40. !include "Library.nsh" # For DLL install
  41. !include "LogicLib.nsh"
  42. !include "MUI2.nsh"
  43. !include "nsDialogs.nsh"
  44. !include "Sections.nsh"
  45. !include "x64.nsh"
  46. !define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}"
  47. !define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
  48. !define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
  49. !ifdef WIN64
  50. Name "${PRODUCT} (x64)"
  51. !else
  52. Name "${PRODUCT}"
  53. !endif
  54. OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
  55. CRCCheck force
  56. SetCompressor /SOLID lzma
  57. SetCompressorDictSize 64
  58. ManifestDPIAware true
  59. SetDatablockOptimize on
  60. RequestExecutionLevel highest
  61. !ifdef HAVE_UPX
  62. !packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
  63. !endif
  64. !ifdef WIN64
  65. !define BIT 64
  66. !else
  67. !define BIT 32
  68. !endif
  69. ##########################################################
  70. # MUI2 settings
  71. !define MUI_ABORTWARNING
  72. !define MUI_UNABORTWARNING
  73. !define MUI_ICON "icons\vim_16c.ico"
  74. !define MUI_UNICON "icons\vim_uninst_16c.ico"
  75. # Show all languages, despite user's codepage:
  76. !define MUI_LANGDLL_ALLLANGUAGES
  77. !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
  78. !define MUI_LANGDLL_REGISTRY_KEY "Software\Vim"
  79. !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
  80. !define MUI_WELCOMEFINISHPAGE_BITMAP "icons\welcome.bmp"
  81. !define MUI_UNWELCOMEFINISHPAGE_BITMAP "icons\uninstall.bmp"
  82. !define MUI_HEADERIMAGE
  83. !define MUI_HEADERIMAGE_BITMAP "icons\header.bmp"
  84. !define MUI_HEADERIMAGE_UNBITMAP "icons\un_header.bmp"
  85. !define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight"
  86. !define MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH "AspectFitHeight"
  87. !define MUI_HEADERIMAGE_BITMAP_STRETCH "AspectFitHeight"
  88. !define MUI_HEADERIMAGE_UNBITMAP_STRETCH "AspectFitHeight"
  89. !define MUI_COMPONENTSPAGE_SMALLDESC
  90. !define MUI_LICENSEPAGE_CHECKBOX
  91. !define MUI_FINISHPAGE_RUN
  92. !define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
  93. !define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
  94. # This adds '\Vim' to the user choice automagically. The actual value is
  95. # obtained below with CheckOldVim.
  96. !ifdef WIN64
  97. !define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
  98. !else
  99. !define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
  100. !endif
  101. InstallDir ${DEFAULT_INSTDIR}
  102. # Types of installs we can perform:
  103. InstType $(str_type_typical)
  104. InstType $(str_type_minimal)
  105. InstType $(str_type_full)
  106. SilentInstall normal
  107. # General custom functions for MUI2:
  108. #!define MUI_CUSTOMFUNCTION_ABORT VimOnUserAbort
  109. #!define MUI_CUSTOMFUNCTION_UNABORT un.VimOnUserAbort
  110. # Installer pages
  111. !insertmacro MUI_PAGE_WELCOME
  112. !insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt"
  113. !insertmacro MUI_PAGE_COMPONENTS
  114. Page custom SetCustom ValidateCustom
  115. #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck
  116. !insertmacro MUI_PAGE_DIRECTORY
  117. !insertmacro MUI_PAGE_INSTFILES
  118. !define MUI_FINISHPAGE_NOREBOOTSUPPORT
  119. !insertmacro MUI_PAGE_FINISH
  120. # Uninstaller pages:
  121. !insertmacro MUI_UNPAGE_CONFIRM
  122. #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.VimCheckRunning
  123. !insertmacro MUI_UNPAGE_COMPONENTS
  124. !insertmacro MUI_UNPAGE_INSTFILES
  125. !define MUI_FINISHPAGE_NOREBOOTSUPPORT
  126. !insertmacro MUI_UNPAGE_FINISH
  127. ##########################################################
  128. # Languages Files
  129. !insertmacro MUI_RESERVEFILE_LANGDLL
  130. !include "lang\english.nsi"
  131. # Include support for other languages:
  132. !ifdef HAVE_MULTI_LANG
  133. !include "lang\danish.nsi"
  134. !include "lang\dutch.nsi"
  135. !include "lang\german.nsi"
  136. !include "lang\italian.nsi"
  137. !include "lang\japanese.nsi"
  138. !include "lang\russian.nsi"
  139. !include "lang\simpchinese.nsi"
  140. !include "lang\tradchinese.nsi"
  141. !include "lang\turkish.nsi"
  142. !endif
  143. ##########################################################
  144. # Version resources
  145. VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
  146. VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
  147. VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
  148. VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
  149. VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
  150. VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
  151. VIProductVersion "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
  152. # Global variables
  153. Var vim_dialog
  154. Var vim_nsd_compat
  155. Var vim_nsd_keymap
  156. Var vim_nsd_mouse
  157. Var vim_compat_stat
  158. Var vim_keymap_stat
  159. Var vim_mouse_stat
  160. # Reserve files
  161. ReserveFile ${VIMSRC}\installw32.exe
  162. ##########################################################
  163. # Functions
  164. # Get parent directory
  165. # Share this function both on installer and uninstaller
  166. !macro GetParent un
  167. Function ${un}GetParent
  168. Exch $0 ; old $0 is on top of stack
  169. Push $1
  170. Push $2
  171. StrCpy $1 -1
  172. ${Do}
  173. StrCpy $2 $0 1 $1
  174. ${If} $2 == ""
  175. ${OrIf} $2 == "\"
  176. ${ExitDo}
  177. ${EndIf}
  178. IntOp $1 $1 - 1
  179. ${Loop}
  180. StrCpy $0 $0 $1
  181. Pop $2
  182. Pop $1
  183. Exch $0 ; put $0 on top of stack, restore $0 to original value
  184. FunctionEnd
  185. !macroend
  186. !insertmacro GetParent ""
  187. !insertmacro GetParent "un."
  188. # Check if Vim is already installed.
  189. # return: Installed directory. If not found, it will be empty.
  190. Function CheckOldVim
  191. Push $0
  192. Push $R0
  193. Push $R1
  194. Push $R2
  195. ${If} ${RunningX64}
  196. SetRegView 64
  197. ${EndIf}
  198. ClearErrors
  199. StrCpy $0 "" # Installed directory
  200. StrCpy $R0 0 # Sub-key index
  201. StrCpy $R1 "" # Sub-key
  202. ${Do}
  203. # Eumerate the sub-key:
  204. EnumRegKey $R1 HKLM ${UNINST_REG_KEY} $R0
  205. # Stop if no more sub-key:
  206. ${If} ${Errors}
  207. ${OrIf} $R1 == ""
  208. ${ExitDo}
  209. ${EndIf}
  210. # Move to the next sub-key:
  211. IntOp $R0 $R0 + 1
  212. # Check if the key is Vim uninstall key or not:
  213. StrCpy $R2 $R1 4
  214. ${If} $R2 S!= "Vim "
  215. ${Continue}
  216. ${EndIf}
  217. # Verifies required sub-keys:
  218. ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "DisplayName"
  219. ${If} ${Errors}
  220. ${OrIf} $R2 == ""
  221. ${Continue}
  222. ${EndIf}
  223. ReadRegStr $R2 HKLM "${UNINST_REG_KEY}\$R1" "UninstallString"
  224. ${If} ${Errors}
  225. ${OrIf} $R2 == ""
  226. ${Continue}
  227. ${EndIf}
  228. # Found
  229. Push $R2
  230. call GetParent
  231. call GetParent
  232. Pop $0 # Vim directory
  233. ${ExitDo}
  234. ${Loop}
  235. ${If} ${RunningX64}
  236. SetRegView lastused
  237. ${EndIf}
  238. Pop $R2
  239. Pop $R1
  240. Pop $R0
  241. Exch $0 # put $0 on top of stack, restore $0 to original value
  242. FunctionEnd
  243. Function LaunchApplication
  244. SetOutPath $0
  245. ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"'
  246. FunctionEnd
  247. ##########################################################
  248. Section "$(str_section_old_ver)" id_section_old_ver
  249. SectionIn 1 2 3 RO
  250. # run the install program to check for already installed versions
  251. SetOutPath $TEMP
  252. File /oname=install.exe ${VIMSRC}\installw32.exe
  253. DetailPrint "$(str_msg_uninstalling)"
  254. ${Do}
  255. nsExec::Exec "$TEMP\install.exe -uninstall-check"
  256. Pop $3
  257. call CheckOldVim
  258. Pop $3
  259. ${If} $3 == ""
  260. ${ExitDo}
  261. ${Else}
  262. # It seems that the old version is still remaining.
  263. # TODO: Should we show a warning and run the uninstaller again?
  264. ${ExitDo} # Just ignore for now.
  265. ${EndIf}
  266. ${Loop}
  267. Delete $TEMP\install.exe
  268. Delete $TEMP\vimini.ini # install.exe creates this, but we don't need it.
  269. # We may have been put to the background when uninstall did something.
  270. BringToFront
  271. SectionEnd
  272. ##########################################################
  273. Section "$(str_section_exe)" id_section_exe
  274. SectionIn 1 2 3 RO
  275. # we need also this here if the user changes the instdir
  276. StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
  277. SetOutPath $0
  278. File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
  279. !if /FileExists "${VIMSRC}\vim${BIT}.dll"
  280. File ${VIMSRC}\vim${BIT}.dll
  281. !endif
  282. !if /FileExists "${VIMRT}\libsodium.dll"
  283. File ${VIMRT}\libsodium.dll
  284. !endif
  285. File /oname=install.exe ${VIMSRC}\installw32.exe
  286. File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe
  287. File ${VIMSRC}\vimrun.exe
  288. File /oname=tee.exe ${VIMSRC}\teew32.exe
  289. File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
  290. File ..\vimtutor.bat
  291. File ..\README.txt
  292. File ..\uninstall.txt
  293. File ${VIMRT}\*.vim
  294. File ${VIMTOOLS}\diff.exe
  295. File ${VIMTOOLS}\winpty${BIT}.dll
  296. File ${VIMTOOLS}\winpty-agent.exe
  297. SetOutPath $0\colors
  298. File /r ${VIMRT}\colors\*.*
  299. SetOutPath $0\compiler
  300. File ${VIMRT}\compiler\*.*
  301. SetOutPath $0\doc
  302. File ${VIMRT}\doc\*.txt
  303. File ${VIMRT}\doc\tags
  304. SetOutPath $0\ftplugin
  305. File ${VIMRT}\ftplugin\*.*
  306. SetOutPath $0\indent
  307. File ${VIMRT}\indent\*.*
  308. SetOutPath $0\macros
  309. File /r ${VIMRT}\macros\*.*
  310. SetOutPath $0\pack
  311. File /r ${VIMRT}\pack\*.*
  312. SetOutPath $0\plugin
  313. File ${VIMRT}\plugin\*.*
  314. SetOutPath $0\autoload
  315. File /r ${VIMRT}\autoload\*.*
  316. SetOutPath $0\import\dist
  317. File ${VIMRT}\import\dist\*.*
  318. SetOutPath $0\bitmaps
  319. File ${VIMSRC}\vim.ico
  320. SetOutPath $0\syntax
  321. File /r ${VIMRT}\syntax\*.*
  322. SetOutPath $0\spell
  323. File ${VIMRT}\spell\*.txt
  324. File ${VIMRT}\spell\*.vim
  325. File ${VIMRT}\spell\*.spl
  326. File ${VIMRT}\spell\*.sug
  327. SetOutPath $0\tools
  328. File ${VIMRT}\tools\*.*
  329. SetOutPath $0\tutor
  330. File ${VIMRT}\tutor\*.*
  331. SectionEnd
  332. ##########################################################
  333. Section "$(str_section_console)" id_section_console
  334. SectionIn 1 3
  335. SetOutPath $0
  336. File /oname=vim.exe ${VIMSRC}\vimw32.exe
  337. StrCpy $2 "$2 vim view vimdiff"
  338. SectionEnd
  339. ##########################################################
  340. Section "$(str_section_batch)" id_section_batch
  341. SectionIn 3
  342. StrCpy $1 "$1 -create-batfiles $2"
  343. SectionEnd
  344. ##########################################################
  345. SectionGroup $(str_group_icons) id_group_icons
  346. Section "$(str_section_desktop)" id_section_desktop
  347. SectionIn 1 3
  348. StrCpy $1 "$1 -install-icons"
  349. SectionEnd
  350. Section "$(str_section_start_menu)" id_section_startmenu
  351. SectionIn 1 3
  352. StrCpy $1 "$1 -add-start-menu"
  353. SectionEnd
  354. SectionGroupEnd
  355. ##########################################################
  356. Section "$(str_section_edit_with)" id_section_editwith
  357. SectionIn 1 3
  358. SetOutPath $0
  359. ${If} ${RunningX64}
  360. # Install 64-bit gvimext.dll into the GvimExt64 directory.
  361. SetOutPath $0\GvimExt64
  362. ClearErrors
  363. !define LIBRARY_SHELL_EXTENSION
  364. !define LIBRARY_X64
  365. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  366. "${VIMSRC}\GvimExt\gvimext64.dll" \
  367. "$0\GvimExt64\gvimext.dll" "$0"
  368. !undef LIBRARY_X64
  369. !undef LIBRARY_SHELL_EXTENSION
  370. ${EndIf}
  371. # Install 32-bit gvimext.dll into the GvimExt32 directory.
  372. SetOutPath $0\GvimExt32
  373. ClearErrors
  374. !define LIBRARY_SHELL_EXTENSION
  375. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  376. "${VIMSRC}\GvimExt\gvimext.dll" \
  377. "$0\GvimExt32\gvimext.dll" "$0"
  378. !undef LIBRARY_SHELL_EXTENSION
  379. # We don't have a separate entry for the "Open With..." menu, assume
  380. # the user wants either both or none.
  381. StrCpy $1 "$1 -install-popup -install-openwith"
  382. SectionEnd
  383. ##########################################################
  384. Section "$(str_section_vim_rc)" id_section_vimrc
  385. SectionIn 1 3
  386. StrCpy $1 "$1 -create-vimrc"
  387. ${If} ${RunningX64}
  388. SetRegView 64
  389. ${EndIf}
  390. WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_compat" "$vim_compat_stat"
  391. WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_keyremap" "$vim_keymap_stat"
  392. WriteRegStr HKLM "${UNINST_REG_KEY_VIM}" "vim_mouse" "$vim_mouse_stat"
  393. ${If} ${RunningX64}
  394. SetRegView lastused
  395. ${EndIf}
  396. ${If} $vim_compat_stat == "vi"
  397. StrCpy $1 "$1 -vimrc-compat vi"
  398. ${ElseIf} $vim_compat_stat == "vim"
  399. StrCpy $1 "$1 -vimrc-compat vim"
  400. ${ElseIf} $vim_compat_stat == "defaults"
  401. StrCpy $1 "$1 -vimrc-compat defaults"
  402. ${Else}
  403. StrCpy $1 "$1 -vimrc-compat all"
  404. ${EndIf}
  405. ${If} $vim_keymap_stat == "default"
  406. StrCpy $1 "$1 -vimrc-remap no"
  407. ${Else}
  408. StrCpy $1 "$1 -vimrc-remap win"
  409. ${EndIf}
  410. ${If} $vim_mouse_stat == "default"
  411. StrCpy $1 "$1 -vimrc-behave default"
  412. ${ElseIf} $vim_mouse_stat == "windows"
  413. StrCpy $1 "$1 -vimrc-behave mswin"
  414. ${Else}
  415. StrCpy $1 "$1 -vimrc-behave unix"
  416. ${EndIf}
  417. SectionEnd
  418. ##########################################################
  419. SectionGroup $(str_group_plugin) id_group_plugin
  420. Section "$(str_section_plugin_home)" id_section_pluginhome
  421. SectionIn 1 3
  422. StrCpy $1 "$1 -create-directories home"
  423. SectionEnd
  424. Section "$(str_section_plugin_vim)" id_section_pluginvim
  425. SectionIn 3
  426. StrCpy $1 "$1 -create-directories vim"
  427. SectionEnd
  428. SectionGroupEnd
  429. ##########################################################
  430. !ifdef HAVE_NLS
  431. Section "$(str_section_nls)" id_section_nls
  432. SectionIn 1 3
  433. SetOutPath $0\lang
  434. File /r ${VIMRT}\lang\*.*
  435. SetOutPath $0\keymap
  436. File ${VIMRT}\keymap\README.txt
  437. File ${VIMRT}\keymap\*.vim
  438. SetOutPath $0
  439. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  440. "${GETTEXT}\gettext${BIT}\libintl-8.dll" \
  441. "$0\libintl-8.dll" "$0"
  442. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  443. "${GETTEXT}\gettext${BIT}\libiconv-2.dll" \
  444. "$0\libiconv-2.dll" "$0"
  445. !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
  446. # Install libgcc_s_sjlj-1.dll only if it is needed.
  447. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  448. "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
  449. "$0\libgcc_s_sjlj-1.dll" "$0"
  450. !endif
  451. ${If} ${SectionIsSelected} ${id_section_editwith}
  452. ${If} ${RunningX64}
  453. # Install DLLs for 64-bit gvimext.dll into the GvimExt64 directory.
  454. SetOutPath $0\GvimExt64
  455. ClearErrors
  456. !define LIBRARY_X64
  457. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  458. "${GETTEXT}\gettext64\libintl-8.dll" \
  459. "$0\GvimExt64\libintl-8.dll" "$0\GvimExt64"
  460. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  461. "${GETTEXT}\gettext64\libiconv-2.dll" \
  462. "$0\GvimExt64\libiconv-2.dll" "$0\GvimExt64"
  463. !undef LIBRARY_X64
  464. ${EndIf}
  465. # Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
  466. SetOutPath $0\GvimExt32
  467. ClearErrors
  468. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  469. "${GETTEXT}\gettext32\libintl-8.dll" \
  470. "$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
  471. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  472. "${GETTEXT}\gettext32\libiconv-2.dll" \
  473. "$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
  474. !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
  475. # Install libgcc_s_sjlj-1.dll only if it is needed.
  476. !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  477. "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
  478. "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
  479. !endif
  480. ${EndIf}
  481. SectionEnd
  482. !endif
  483. ##########################################################
  484. Section -call_install_exe
  485. SetOutPath $0
  486. DetailPrint "$(str_msg_registering)"
  487. nsExec::Exec "$0\install.exe $1"
  488. Pop $3
  489. SectionEnd
  490. ##########################################################
  491. !macro SaveSectionSelection section_id reg_value
  492. ${If} ${SectionIsSelected} ${section_id}
  493. WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 1
  494. ${Else}
  495. WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" ${reg_value} 0
  496. ${EndIf}
  497. !macroend
  498. Section -post
  499. # Get estimated install size
  500. SectionGetSize ${id_section_exe} $3
  501. ${If} ${SectionIsSelected} ${id_section_console}
  502. SectionGetSize ${id_section_console} $4
  503. IntOp $3 $3 + $4
  504. ${EndIf}
  505. ${If} ${SectionIsSelected} ${id_section_editwith}
  506. SectionGetSize ${id_section_editwith} $4
  507. IntOp $3 $3 + $4
  508. ${EndIf}
  509. !ifdef HAVE_NLS
  510. ${If} ${SectionIsSelected} ${id_section_nls}
  511. SectionGetSize ${id_section_nls} $4
  512. IntOp $3 $3 + $4
  513. ${EndIf}
  514. !endif
  515. # Register EstimatedSize and AllowSilent.
  516. # Other information will be set by the install.exe (dosinst.c).
  517. ${If} ${RunningX64}
  518. SetRegView 64
  519. ${EndIf}
  520. WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "EstimatedSize" $3
  521. WriteRegDWORD HKLM "${UNINST_REG_KEY_VIM}" "AllowSilent" 1
  522. ${If} ${RunningX64}
  523. SetRegView lastused
  524. ${EndIf}
  525. # Store the selections to the registry.
  526. ${If} ${RunningX64}
  527. SetRegView 64
  528. ${EndIf}
  529. !insertmacro SaveSectionSelection ${id_section_console} "select_console"
  530. !insertmacro SaveSectionSelection ${id_section_batch} "select_batch"
  531. !insertmacro SaveSectionSelection ${id_section_desktop} "select_desktop"
  532. !insertmacro SaveSectionSelection ${id_section_startmenu} "select_startmenu"
  533. !insertmacro SaveSectionSelection ${id_section_editwith} "select_editwith"
  534. !insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
  535. !insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
  536. !insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
  537. !ifdef HAVE_NLS
  538. !insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
  539. !endif
  540. ${If} ${RunningX64}
  541. SetRegView lastused
  542. ${EndIf}
  543. BringToFront
  544. SectionEnd
  545. ##########################################################
  546. !macro LoadSectionSelection section_id reg_value
  547. ClearErrors
  548. ReadRegDWORD $3 HKLM "${UNINST_REG_KEY_VIM}" ${reg_value}
  549. ${IfNot} ${Errors}
  550. ${If} $3 = 1
  551. !insertmacro SelectSection ${section_id}
  552. ${Else}
  553. !insertmacro UnselectSection ${section_id}
  554. ${EndIf}
  555. ${EndIf}
  556. !macroend
  557. !macro LoadDefaultVimrc out_var reg_value default_value
  558. ClearErrors
  559. ReadRegStr ${out_var} HKLM "${UNINST_REG_KEY_VIM}" ${reg_value}
  560. ${If} ${Errors}
  561. ${OrIf} ${out_var} == ""
  562. StrCpy ${out_var} ${default_value}
  563. ${EndIf}
  564. !macroend
  565. Function .onInit
  566. !ifdef HAVE_MULTI_LANG
  567. # Select a language (or read from the registry).
  568. !insertmacro MUI_LANGDLL_DISPLAY
  569. !endif
  570. ${If} $INSTDIR == ${DEFAULT_INSTDIR}
  571. # Check $VIM
  572. ReadEnvStr $3 "VIM"
  573. ${If} $3 != ""
  574. StrCpy $INSTDIR $3
  575. ${EndIf}
  576. ${EndIf}
  577. call CheckOldVim
  578. Pop $3
  579. ${If} $3 == ""
  580. # No old versions of Vim found. Unselect and hide the section.
  581. !insertmacro UnselectSection ${id_section_old_ver}
  582. SectionSetInstTypes ${id_section_old_ver} 0
  583. SectionSetText ${id_section_old_ver} ""
  584. ${Else}
  585. ${If} $INSTDIR == ${DEFAULT_INSTDIR}
  586. StrCpy $INSTDIR $3
  587. ${EndIf}
  588. ${EndIf}
  589. ${If} ${RunningX64}
  590. SetRegView 64
  591. ${EndIf}
  592. # Load the selections from the registry (if any).
  593. !insertmacro LoadSectionSelection ${id_section_console} "select_console"
  594. !insertmacro LoadSectionSelection ${id_section_batch} "select_batch"
  595. !insertmacro LoadSectionSelection ${id_section_desktop} "select_desktop"
  596. !insertmacro LoadSectionSelection ${id_section_startmenu} "select_startmenu"
  597. !insertmacro LoadSectionSelection ${id_section_editwith} "select_editwith"
  598. !insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
  599. !insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
  600. !insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
  601. !ifdef HAVE_NLS
  602. !insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
  603. !endif
  604. # Load the default _vimrc settings from the registry (if any).
  605. !insertmacro LoadDefaultVimrc $vim_compat_stat "vim_compat" "all"
  606. !insertmacro LoadDefaultVimrc $vim_keymap_stat "vim_keyremap" "default"
  607. !insertmacro LoadDefaultVimrc $vim_mouse_stat "vim_mouse" "default"
  608. ${If} ${RunningX64}
  609. SetRegView lastused
  610. ${EndIf}
  611. # User variables:
  612. # $0 - holds the directory the executables are installed to
  613. # $1 - holds the parameters to be passed to install.exe. Starts with OLE
  614. # registration (since a non-OLE gvim will not complain, and we want to
  615. # always register an OLE gvim).
  616. # $2 - holds the names to create batch files for
  617. StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
  618. StrCpy $1 "-register-OLE"
  619. StrCpy $2 "gvim evim gview gvimdiff vimtutor"
  620. FunctionEnd
  621. Function .onInstSuccess
  622. WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
  623. FunctionEnd
  624. Function .onInstFailed
  625. MessageBox MB_OK|MB_ICONEXCLAMATION "$(str_msg_install_fail)" /SD IDOK
  626. FunctionEnd
  627. ##########################################################
  628. Function SetCustom
  629. # Display the _vimrc setting dialog using nsDialogs.
  630. # Check if a _vimrc should be created
  631. ${IfNot} ${SectionIsSelected} ${id_section_vimrc}
  632. Abort
  633. ${EndIf}
  634. !insertmacro MUI_HEADER_TEXT \
  635. $(str_vimrc_page_title) $(str_vimrc_page_subtitle)
  636. nsDialogs::Create 1018
  637. Pop $vim_dialog
  638. ${If} $vim_dialog == error
  639. Abort
  640. ${EndIf}
  641. ${If} ${RunningX64}
  642. SetRegView 64
  643. ${EndIf}
  644. GetFunctionAddress $3 ValidateCustom
  645. nsDialogs::OnBack $3
  646. # 1st group - Compatibility
  647. ${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title)
  648. Pop $3
  649. ${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc)
  650. Pop $3
  651. ${NSD_CreateDropList} 18% 19% 75% 8% ""
  652. Pop $vim_nsd_compat
  653. ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi)
  654. ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim)
  655. ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_defaults)
  656. ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_all)
  657. ${If} $vim_compat_stat == "defaults"
  658. StrCpy $4 2
  659. ${ElseIf} $vim_compat_stat == "vim"
  660. StrCpy $4 1
  661. ${ElseIf} $vim_compat_stat == "vi"
  662. StrCpy $4 0
  663. ${Else} # default
  664. StrCpy $4 3
  665. ${EndIf}
  666. ${NSD_CB_SetSelectionIndex} $vim_nsd_compat $4
  667. # 2nd group - Key remapping
  668. ${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title)
  669. Pop $3
  670. ${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc)
  671. Pop $3
  672. ${NSD_CreateDropList} 38% 54% 55% 8% ""
  673. Pop $vim_nsd_keymap
  674. ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
  675. ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
  676. ${If} $vim_keymap_stat == "windows"
  677. StrCpy $4 1
  678. ${Else} # default
  679. StrCpy $4 0
  680. ${EndIf}
  681. ${NSD_CB_SetSelectionIndex} $vim_nsd_keymap $4
  682. # 3rd group - Mouse behavior
  683. ${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title)
  684. Pop $3
  685. ${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc)
  686. Pop $3
  687. ${NSD_CreateDropList} 23% 87% 70% 8% ""
  688. Pop $vim_nsd_mouse
  689. ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default)
  690. ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
  691. ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_unix)
  692. ${If} $vim_mouse_stat == "xterm"
  693. StrCpy $4 2
  694. ${ElseIf} $vim_mouse_stat == "windows"
  695. StrCpy $4 1
  696. ${Else} # default
  697. StrCpy $4 0
  698. ${EndIf}
  699. ${NSD_CB_SetSelectionIndex} $vim_nsd_mouse $4
  700. ${If} ${RunningX64}
  701. SetRegView lastused
  702. ${EndIf}
  703. nsDialogs::Show
  704. FunctionEnd
  705. Function ValidateCustom
  706. ${NSD_CB_GetSelectionIndex} $vim_nsd_compat $3
  707. ${If} $3 = 0
  708. StrCpy $vim_compat_stat "vi"
  709. ${ElseIf} $3 = 1
  710. StrCpy $vim_compat_stat "vim"
  711. ${ElseIf} $3 = 2
  712. StrCpy $vim_compat_stat "defaults"
  713. ${Else}
  714. StrCpy $vim_compat_stat "all"
  715. ${EndIf}
  716. ${NSD_CB_GetSelectionIndex} $vim_nsd_keymap $3
  717. ${If} $3 = 0
  718. StrCpy $vim_keymap_stat "default"
  719. ${Else}
  720. StrCpy $vim_keymap_stat "windows"
  721. ${EndIf}
  722. ${NSD_CB_GetSelectionIndex} $vim_nsd_mouse $3
  723. ${If} $3 = 0
  724. StrCpy $vim_mouse_stat "default"
  725. ${ElseIf} $3 = 1
  726. StrCpy $vim_mouse_stat "windows"
  727. ${Else}
  728. StrCpy $vim_mouse_stat "xterm"
  729. ${EndIf}
  730. FunctionEnd
  731. ##########################################################
  732. # Description for Installer Sections
  733. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  734. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_old_ver} $(str_desc_old_ver)
  735. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_exe} $(str_desc_exe)
  736. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_console} $(str_desc_console)
  737. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_batch} $(str_desc_batch)
  738. !insertmacro MUI_DESCRIPTION_TEXT ${id_group_icons} $(str_desc_icons)
  739. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_desktop} $(str_desc_desktop)
  740. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_startmenu} $(str_desc_start_menu)
  741. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_editwith} $(str_desc_edit_with)
  742. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_vimrc} $(str_desc_vim_rc)
  743. !insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin)
  744. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home)
  745. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim)
  746. !ifdef HAVE_NLS
  747. !insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
  748. !endif
  749. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  750. ##########################################################
  751. # Uninstaller Functions and Sections
  752. Function un.onInit
  753. !ifdef HAVE_MULTI_LANG
  754. # Get the language from the registry.
  755. !insertmacro MUI_UNGETLANGUAGE
  756. !endif
  757. FunctionEnd
  758. Section "un.$(str_unsection_register)" id_unsection_register
  759. SectionIn RO
  760. # Apparently $INSTDIR is set to the directory where the uninstaller is
  761. # created. Thus the "vim61" directory is included in it.
  762. StrCpy $0 "$INSTDIR"
  763. # delete the context menu entry and batch files
  764. DetailPrint "$(str_msg_unregistering)"
  765. nsExec::Exec "$0\uninstall.exe -nsis"
  766. Pop $3
  767. # We may have been put to the background when uninstall did something.
  768. BringToFront
  769. # Delete the installer language setting.
  770. DeleteRegKey ${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY}
  771. SectionEnd
  772. Section "un.$(str_unsection_exe)" id_unsection_exe
  773. StrCpy $0 "$INSTDIR"
  774. # Delete gettext and iconv DLLs
  775. ${If} ${FileExists} "$0\libiconv-2.dll"
  776. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  777. "$0\libiconv-2.dll"
  778. ${EndIf}
  779. ${If} ${FileExists} "$0\libintl-8.dll"
  780. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  781. "$0\libintl-8.dll"
  782. ${EndIf}
  783. ${If} ${FileExists} "$0\libgcc_s_sjlj-1.dll"
  784. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  785. "$0\libgcc_s_sjlj-1.dll"
  786. ${EndIf}
  787. # Delete other DLLs
  788. Delete /REBOOTOK $0\*.dll
  789. # Delete 64-bit GvimExt
  790. ${If} ${RunningX64}
  791. !define LIBRARY_X64
  792. ${If} ${FileExists} "$0\GvimExt64\gvimext.dll"
  793. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  794. "$0\GvimExt64\gvimext.dll"
  795. ${EndIf}
  796. ${If} ${FileExists} "$0\GvimExt64\libiconv-2.dll"
  797. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  798. "$0\GvimExt64\libiconv-2.dll"
  799. ${EndIf}
  800. ${If} ${FileExists} "$0\GvimExt64\libintl-8.dll"
  801. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  802. "$0\GvimExt64\libintl-8.dll"
  803. ${EndIf}
  804. ${If} ${FileExists} "$0\GvimExt64\libwinpthread-1.dll"
  805. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  806. "$0\GvimExt64\libwinpthread-1.dll"
  807. ${EndIf}
  808. !undef LIBRARY_X64
  809. RMDir /r $0\GvimExt64
  810. ${EndIf}
  811. # Delete 32-bit GvimExt
  812. ${If} ${FileExists} "$0\GvimExt32\gvimext.dll"
  813. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  814. "$0\GvimExt32\gvimext.dll"
  815. ${EndIf}
  816. ${If} ${FileExists} "$0\GvimExt32\libiconv-2.dll"
  817. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  818. "$0\GvimExt32\libiconv-2.dll"
  819. ${EndIf}
  820. ${If} ${FileExists} "$0\GvimExt32\libintl-8.dll"
  821. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  822. "$0\GvimExt32\libintl-8.dll"
  823. ${EndIf}
  824. ${If} ${FileExists} "$0\GvimExt32\libgcc_s_sjlj-1.dll"
  825. !insertmacro UninstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
  826. "$0\GvimExt32\libgcc_s_sjlj-1.dll"
  827. ${EndIf}
  828. RMDir /r $0\GvimExt32
  829. ClearErrors
  830. # Remove everything but *.dll files. Avoids that
  831. # a lot remains when gvimext.dll cannot be deleted.
  832. RMDir /r $0\autoload
  833. RMDir /r $0\colors
  834. RMDir /r $0\compiler
  835. RMDir /r $0\doc
  836. RMDir /r $0\ftplugin
  837. RMDir /r $0\import
  838. RMDir /r $0\indent
  839. RMDir /r $0\macros
  840. RMDir /r $0\pack
  841. RMDir /r $0\plugin
  842. RMDir /r $0\spell
  843. RMDir /r $0\syntax
  844. RMDir /r $0\tools
  845. RMDir /r $0\tutor
  846. RMDir /r $0\lang
  847. RMDir /r $0\keymap
  848. Delete $0\*.exe
  849. Delete $0\*.bat
  850. Delete $0\*.vim
  851. Delete $0\*.txt
  852. ${If} ${Errors}
  853. MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK
  854. ${EndIf}
  855. # No error message if the "vim62" directory can't be removed, the
  856. # gvimext.dll may still be there.
  857. RMDir $0
  858. SectionEnd
  859. # Remove "vimfiles" directory under the specified directory.
  860. !macro RemoveVimfiles dir
  861. ${If} ${FileExists} ${dir}\vimfiles
  862. RMDir ${dir}\vimfiles\colors
  863. RMDir ${dir}\vimfiles\compiler
  864. RMDir ${dir}\vimfiles\doc
  865. RMDir ${dir}\vimfiles\ftdetect
  866. RMDir ${dir}\vimfiles\ftplugin
  867. RMDir ${dir}\vimfiles\indent
  868. RMDir ${dir}\vimfiles\keymap
  869. RMDir ${dir}\vimfiles\plugin
  870. RMDir ${dir}\vimfiles\syntax
  871. RMDir ${dir}\vimfiles
  872. ${EndIf}
  873. !macroend
  874. SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
  875. Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
  876. # get the home dir
  877. ReadEnvStr $0 "HOME"
  878. ${If} $0 == ""
  879. ReadEnvStr $0 "HOMEDRIVE"
  880. ReadEnvStr $1 "HOMEPATH"
  881. StrCpy $0 "$0$1"
  882. ${If} $0 == ""
  883. ReadEnvStr $0 "USERPROFILE"
  884. ${EndIf}
  885. ${EndIf}
  886. ${If} $0 != ""
  887. !insertmacro RemoveVimfiles $0
  888. ${EndIf}
  889. SectionEnd
  890. Section "un.$(str_unsection_plugin_vim)" id_unsection_plugin_vim
  891. # get the parent dir of the installation
  892. Push $INSTDIR
  893. Call un.GetParent
  894. Pop $0
  895. # if a plugin dir was created at installation remove it
  896. !insertmacro RemoveVimfiles $0
  897. SectionEnd
  898. SectionGroupEnd
  899. Section "un.$(str_unsection_rootdir)" id_unsection_rootdir
  900. # get the parent dir of the installation
  901. Push $INSTDIR
  902. Call un.GetParent
  903. Pop $0
  904. ${IfNot} ${Silent}
  905. Delete $0\_vimrc
  906. ${Endif}
  907. RMDir $0
  908. SectionEnd
  909. ##########################################################
  910. # Description for Uninstaller Sections
  911. !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
  912. !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_register} $(str_desc_unregister)
  913. !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_exe} $(str_desc_rm_exe)
  914. !insertmacro MUI_DESCRIPTION_TEXT ${id_ungroup_plugin} $(str_desc_rm_plugin)
  915. !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_home} $(str_desc_rm_plugin_home)
  916. !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_plugin_vim} $(str_desc_rm_plugin_vim)
  917. !insertmacro MUI_DESCRIPTION_TEXT ${id_unsection_rootdir} $(str_desc_rm_rootdir)
  918. !insertmacro MUI_UNFUNCTION_DESCRIPTION_END