summaryrefslogtreecommitdiff
path: root/nsis
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2021-07-24 21:19:42 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-24 21:19:42 +0200
commit7d60384a00755e5c0112cebeb5e232fc133c9eca (patch)
treeca16893982710bf286287f750e74becf64c6cf9f /nsis
parent9c9472ff49b09c3d8f747b330eeb1cdb92bab449 (diff)
downloadvim-git-7d60384a00755e5c0112cebeb5e232fc133c9eca.tar.gz
patch 8.2.3214: MS-Windows: passing /D does not set the install locationv8.2.3214
Problem: MS-Windows: passing /D does not set the install location. Solution: Adjust how the installer uses $VIM. Update the documentation. (Christian Brabandt, closes #8605)
Diffstat (limited to 'nsis')
-rw-r--r--nsis/gvim.nsi25
1 files changed, 11 insertions, 14 deletions
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
index 3fe0279b7..fc5713f79 100644
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -126,10 +126,11 @@ RequestExecutionLevel highest
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
!ifdef WIN64
-InstallDir "$PROGRAMFILES64\Vim"
+ !define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
!else
-InstallDir "$PROGRAMFILES\Vim"
+ !define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
!endif
+InstallDir ${DEFAULT_INSTDIR}
# Types of installs we can perform:
InstType $(str_type_typical)
@@ -710,8 +711,13 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!endif
- # Check $VIM
- ReadEnvStr $INSTDIR "VIM"
+ ${If} $INSTDIR == ${DEFAULT_INSTDIR}
+ # Check $VIM
+ ReadEnvStr $3 "VIM"
+ ${If} $3 != ""
+ StrCpy $INSTDIR $3
+ ${EndIf}
+ ${EndIf}
call CheckOldVim
Pop $3
@@ -721,20 +727,11 @@ Function .onInit
SectionSetInstTypes ${id_section_old_ver} 0
SectionSetText ${id_section_old_ver} ""
${Else}
- ${If} $INSTDIR == ""
+ ${If} $INSTDIR == ${DEFAULT_INSTDIR}
StrCpy $INSTDIR $3
${EndIf}
${EndIf}
- # If did not find a path: use the default dir.
- ${If} $INSTDIR == ""
-!ifdef WIN64
- StrCpy $INSTDIR "$PROGRAMFILES64\Vim"
-!else
- StrCpy $INSTDIR "$PROGRAMFILES\Vim"
-!endif
- ${EndIf}
-
${If} ${RunningX64}
SetRegView 64
${EndIf}