dcafferty / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Allow NSIS installer to install Vim in a directory with a name not ending with "Vim" #272

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start the Windows installer
2. choose as installation directory one named "Vim huge"

What is the expected output? What do you see instead?
The expected output would be a normal Vim installation, an error message is 
shown instead.

What version of the product are you using? On what operating system?
7.4, Windows 7 64 bit

Please provide any additional information below.
Here is the proposed patch:
diff -r 187798e5e4b5 nsis/gvim.nsi
--- a/nsis/gvim.nsi     Tue Sep 23 21:53:41 2014 +0200
+++ b/nsis/gvim.nsi     Wed Sep 24 23:50:57 2014 +0200
@@ -1,6 +1,5 @@
 # NSIS file to create a self-installing exe for Vim.
 # It requires NSIS version 2.0 or later.
-# Last Change: 2010 Jul 30

 # WARNING: if you make changes to this script, look out for $0 to be valid,
 # because uninstall deletes most files in $0.
@@ -38,7 +37,7 @@
 RequestExecutionLevel highest

 ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
-DirText "Choose a directory to install Vim (must end in 'vim')"
+DirText "Choose a directory to install Vim"
 Icon icons\vim_16c.ico
 # NSIS2 uses a different strategy with six different images in a strip...
 #EnabledBitmap icons\enabled.bmp
@@ -132,14 +131,10 @@
   NoCancelAbort:
 FunctionEnd

-# We only accept the directory if it ends in "vim".  Using .onVerifyInstDir has
+# Using .onVerifyInstDir has
 # the disadvantage that the browse dialog is difficult to use.
 Function CheckInstallDir
   StrCpy $0 $INSTDIR 3 -3
-  StrCmp $0 "vim" PathGood
-    MessageBox MB_OK "The path must end in 'vim'."
-    Abort
-  PathGood:
 FunctionEnd

 Function .onInstSuccess

Original issue reported on code.google.com by tim.lebe...@gmail.com on 19 Oct 2014 at 6:06

GoogleCodeExporter commented 9 years ago
Included as patch 7.4.504

Original comment by brammool...@gmail.com on 5 Nov 2014 at 5:17