install.nsi 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ;NSIS Modern User Interface
  2. ;Basic Example Script
  3. ;Written by Joost Verburg
  4. ;--------------------------------
  5. ;Include Modern UI
  6. !define Vendor "sdbarker"
  7. !define Title "sdbarker's dotfiles"
  8. !include "MUI2.nsh"
  9. ;--------------------------------
  10. ;General
  11. SetCompressor /FINAL /SOLID lzma
  12. ;Name and file
  13. Name "${Title} Installer"
  14. OutFile "${Title} Installer.exe"
  15. ;Default installation folder
  16. InstallDir "$PROFILE"
  17. ;Get installation folder from registry if available
  18. InstallDirRegKey HKCU "Software\${Vendor}\${Title}" ""
  19. ;Request application privileges for Windows Vista
  20. RequestExecutionLevel user
  21. ;--------------------------------
  22. ;Interface Settings
  23. !define MUI_ABORTWARNING
  24. ;--------------------------------
  25. ;Pages
  26. !insertmacro MUI_PAGE_LICENSE "LICENSE"
  27. !insertmacro MUI_PAGE_COMPONENTS
  28. !insertmacro MUI_PAGE_DIRECTORY
  29. !insertmacro MUI_PAGE_INSTFILES
  30. !insertmacro MUI_UNPAGE_CONFIRM
  31. !insertmacro MUI_UNPAGE_INSTFILES
  32. ;--------------------------------
  33. ;Languages
  34. !insertmacro MUI_LANGUAGE "English"
  35. ;--------------------------------
  36. ;Installer Sections
  37. Section ".vimrc" SecVimRc
  38. ; .vimrc
  39. SetOutPath "$INSTDIR"
  40. CreateDirectory "$INSTDIR\.vim"
  41. File /r vim\*
  42. SectionEnd
  43. Section "_vsvimrc" SecVsVimRc
  44. ; _vsvimrc
  45. SetOutPath "$INSTDIR"
  46. File /r vsvim\*
  47. SectionEnd
  48. Section ".gitconfig" SecGitconfig
  49. ; .gitconfig
  50. SetOutPath "$INSTDIR"
  51. File /r git\*
  52. SectionEnd
  53. ;Section "-Uninstaller" SecUninstaller
  54. ; ; Store installation folder
  55. ; WriteRegStr HKCU "Software\${Vendor}\${Title}" "" $INSTDIR
  56. ;
  57. ; ; Create uninstaller
  58. ; CreateDirectory "$PROGRAMFILES\${Vendor}\${Title}"
  59. ; WriteUninstaller "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
  60. ;
  61. ; ; Add uninstaller to Add/Remove Programs (Programs and Features in Vista+)
  62. ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "DisplayName" "${Title}"
  63. ; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "UninstallString" "$\"$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe$\""
  64. ;SectionEnd
  65. ;--------------------------------
  66. ;Descriptions
  67. ;Language strings
  68. LangString DESC_SecVimRc ${LANG_ENGLISH} ".vimrc and associated config files, plugins, syntax definitions, etc."
  69. LangString DESC_SecVsVimRc ${LANG_ENGLISH} "_vsvimrc for the VsVim Visual Studio plugin"
  70. LangString DESC_SecGitconfig ${LANG_ENGLISH} ".gitconfig and .gitignore"
  71. ;LangString DESC_SecUninstaller ${LANG_ENGLISH} "Adds an uninstaller to remove the configs later."
  72. ;Assign language strings to sections
  73. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  74. !insertmacro MUI_DESCRIPTION_TEXT ${SecVimRc} $(DESC_SecVimRc)
  75. !insertmacro MUI_DESCRIPTION_TEXT ${SecVsVimRc} $(DESC_SecVsVimRc)
  76. !insertmacro MUI_DESCRIPTION_TEXT ${SecGitConfig} $(DESC_SecGitconfig)
  77. ;!insertmacro MUI_DESCRIPTION_TEXT ${SecUninstaller} $(DESC_SecUninstaller)
  78. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  79. ;--------------------------------
  80. ;Uninstaller Section
  81. ;Section "Uninstall"
  82. ; ; Remove installed files here
  83. ; Delete "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
  84. ; Delete "$INSTDIR\_vimrc"
  85. ; Delete "$INSTDIR\vimfiles\colors\sdbarker.vim"
  86. ; Delete "$INSTDIR\vimfiles\compiler\perl.vim"
  87. ; Delete "$INSTDIR\vimfiles\compiler\ruby.vim"
  88. ; Delete "$INSTDIR\vimfiles\configs\*.*"
  89. ; Delete "$INSTDIR\vimfiles\doc\*"
  90. ; Delete "$INSTDIR\vimfiles\ftdetect\sass-scss.vim"
  91. ; Delete "$INSTDIR\vimfiles\ftplugin\sass.vim"
  92. ; Delete "$INSTDIR\vimfiles\ftplugin\scss.vim"
  93. ; Delete "$INSTDIR\vimfiles\indent\sass.vim"
  94. ; Delete "$INSTDIR\vimfiles\indent\scss.vim"
  95. ; Delete "$INSTDIR\vimfiles\nerdtree_plugin\*"
  96. ; Delete "$INSTDIR\vimfiles\plugin\NERD_commenter.vim"
  97. ; Delete "$INSTDIR\vimfiles\plugin\NERD_tree.vim"
  98. ; Delete "$INSTDIR\vimfiles\plugin\grep.vim"
  99. ; Delete "$INSTDIR\vimfiles\plugin\minibufexpl.vim"
  100. ; Delete "$INSTDIR\vimfiles\syntax\less.vim"
  101. ; Delete "$INSTDIR\vimfiles\syntax\nerdtree.vim"
  102. ; Delete "$INSTDIR\vimfiles\syntax\sass.vim"
  103. ; Delete "$INSTDIR\vimfiles\syntax\scss.vim"
  104. ; Delete "$INSTDIR\vimfiles\syntax\tt2.vim"
  105. ; Delete "$INSTDIR\vimfiles\syntax\tt2html.vim"
  106. ;
  107. ; Delete "$INSTDIR\.gitconfig"
  108. ; Delete "$INSTDIR\.gitignore"
  109. ;
  110. ; RMDir /r "$PROGRAMFILES\${Vendor}\${Title}"
  111. ; RMDir /r "$PROGRAMFILES\${Vendor}"
  112. ;
  113. ; DeleteRegKey HKCU "Software\${Vendor}\${Title}"
  114. ; DeleteRegKey /ifempty HKCU "Software\${Vendor}"
  115. ; DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}"
  116. ;
  117. ;SectionEnd