Browse Source

Update windows installer

master
sbarker 5 years ago
parent
commit
8bca71e389
1 changed files with 58 additions and 54 deletions
  1. 58
    54
      install.nsi

+ 58
- 54
install.nsi View File

@@ -46,96 +46,100 @@ RequestExecutionLevel user
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section ".vimrc" SecVimRc
; .vimrc
SetOutPath "$INSTDIR"
CreateDirectory "$INSTDIR\vimfiles"
CreateDirectory "$INSTDIR\.vim"
File /r vim\*
SectionEnd
Section "_vsvimrc" SecVsVimRc
; _vsvimrc
SetOutPath "$INSTDIR"
File /r vsvim\*
SectionEnd
Section ".gitconfig" SecGitconfig
; .gitconfig
SetOutPath "$INSTDIR"
File /r git\*
SectionEnd
Section "-Uninstaller" SecUninstaller
; Store installation folder
WriteRegStr HKCU "Software\${Vendor}\${Title}" "" $INSTDIR
; Create uninstaller
CreateDirectory "$PROGRAMFILES\${Vendor}\${Title}"
WriteUninstaller "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
; Add uninstaller to Add/Remove Programs (Programs and Features in Vista+)
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "DisplayName" "${Title}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "UninstallString" "$\"$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe$\""
SectionEnd
;Section "-Uninstaller" SecUninstaller
; ; Store installation folder
; WriteRegStr HKCU "Software\${Vendor}\${Title}" "" $INSTDIR
;
; ; Create uninstaller
; CreateDirectory "$PROGRAMFILES\${Vendor}\${Title}"
; WriteUninstaller "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
;
; ; Add uninstaller to Add/Remove Programs (Programs and Features in Vista+)
; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "DisplayName" "${Title}"
; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}" "UninstallString" "$\"$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe$\""
;SectionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_SecVimRc ${LANG_ENGLISH} ".vimrc and associated config files, plugins, syntax definitions, etc."
LangString DESC_SecVsVimRc ${LANG_ENGLISH} "_vsvimrc for the VsVim Visual Studio plugin"
LangString DESC_SecGitconfig ${LANG_ENGLISH} ".gitconfig and .gitignore"
LangString DESC_SecUninstaller ${LANG_ENGLISH} "Adds an uninstaller to remove the configs later."
;LangString DESC_SecUninstaller ${LANG_ENGLISH} "Adds an uninstaller to remove the configs later."
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecVimRc} $(DESC_SecVimRc)
!insertmacro MUI_DESCRIPTION_TEXT ${SecVsVimRc} $(DESC_SecVsVimRc)
!insertmacro MUI_DESCRIPTION_TEXT ${SecGitConfig} $(DESC_SecGitconfig)
!insertmacro MUI_DESCRIPTION_TEXT ${SecUninstaller} $(DESC_SecUninstaller)
;!insertmacro MUI_DESCRIPTION_TEXT ${SecUninstaller} $(DESC_SecUninstaller)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
; Remove installed files here
Delete "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
Delete "$INSTDIR\_vimrc"
Delete "$INSTDIR\vimfiles\colors\sdbarker.vim"
Delete "$INSTDIR\vimfiles\compiler\perl.vim"
Delete "$INSTDIR\vimfiles\compiler\ruby.vim"
Delete "$INSTDIR\vimfiles\configs\*.*"
Delete "$INSTDIR\vimfiles\doc\*"
Delete "$INSTDIR\vimfiles\ftdetect\sass-scss.vim"
Delete "$INSTDIR\vimfiles\ftplugin\sass.vim"
Delete "$INSTDIR\vimfiles\ftplugin\scss.vim"
Delete "$INSTDIR\vimfiles\indent\sass.vim"
Delete "$INSTDIR\vimfiles\indent\scss.vim"
Delete "$INSTDIR\vimfiles\nerdtree_plugin\*"
Delete "$INSTDIR\vimfiles\plugin\NERD_commenter.vim"
Delete "$INSTDIR\vimfiles\plugin\NERD_tree.vim"
Delete "$INSTDIR\vimfiles\plugin\grep.vim"
Delete "$INSTDIR\vimfiles\plugin\minibufexpl.vim"
Delete "$INSTDIR\vimfiles\syntax\less.vim"
Delete "$INSTDIR\vimfiles\syntax\nerdtree.vim"
Delete "$INSTDIR\vimfiles\syntax\sass.vim"
Delete "$INSTDIR\vimfiles\syntax\scss.vim"
Delete "$INSTDIR\vimfiles\syntax\tt2.vim"
Delete "$INSTDIR\vimfiles\syntax\tt2html.vim"
Delete "$INSTDIR\.gitconfig"
Delete "$INSTDIR\.gitignore"
RMDir /r "$PROGRAMFILES\${Vendor}\${Title}"
RMDir /r "$PROGRAMFILES\${Vendor}"
DeleteRegKey HKCU "Software\${Vendor}\${Title}"
DeleteRegKey /ifempty HKCU "Software\${Vendor}"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}"
SectionEnd
;Section "Uninstall"
; ; Remove installed files here
; Delete "$PROGRAMFILES\${Vendor}\${Title}\Uninstall.exe"
; Delete "$INSTDIR\_vimrc"
; Delete "$INSTDIR\vimfiles\colors\sdbarker.vim"
; Delete "$INSTDIR\vimfiles\compiler\perl.vim"
; Delete "$INSTDIR\vimfiles\compiler\ruby.vim"
; Delete "$INSTDIR\vimfiles\configs\*.*"
; Delete "$INSTDIR\vimfiles\doc\*"
; Delete "$INSTDIR\vimfiles\ftdetect\sass-scss.vim"
; Delete "$INSTDIR\vimfiles\ftplugin\sass.vim"
; Delete "$INSTDIR\vimfiles\ftplugin\scss.vim"
; Delete "$INSTDIR\vimfiles\indent\sass.vim"
; Delete "$INSTDIR\vimfiles\indent\scss.vim"
; Delete "$INSTDIR\vimfiles\nerdtree_plugin\*"
; Delete "$INSTDIR\vimfiles\plugin\NERD_commenter.vim"
; Delete "$INSTDIR\vimfiles\plugin\NERD_tree.vim"
; Delete "$INSTDIR\vimfiles\plugin\grep.vim"
; Delete "$INSTDIR\vimfiles\plugin\minibufexpl.vim"
; Delete "$INSTDIR\vimfiles\syntax\less.vim"
; Delete "$INSTDIR\vimfiles\syntax\nerdtree.vim"
; Delete "$INSTDIR\vimfiles\syntax\sass.vim"
; Delete "$INSTDIR\vimfiles\syntax\scss.vim"
; Delete "$INSTDIR\vimfiles\syntax\tt2.vim"
; Delete "$INSTDIR\vimfiles\syntax\tt2html.vim"
;
; Delete "$INSTDIR\.gitconfig"
; Delete "$INSTDIR\.gitignore"
;
; RMDir /r "$PROGRAMFILES\${Vendor}\${Title}"
; RMDir /r "$PROGRAMFILES\${Vendor}"
;
; DeleteRegKey HKCU "Software\${Vendor}\${Title}"
; DeleteRegKey /ifempty HKCU "Software\${Vendor}"
; DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Title}"
;
;SectionEnd

Loading…
Cancel
Save