comparison nsis/gvim.nsi @ 12708:77960063e2e7 v8.0.1232

patch 8.0.1232: MS-Windows users are confused about default mappings commit https://github.com/vim/vim/commit/c3fdf7f80b2febdd8a8f7a1310631567d257d66a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 28 18:36:48 2017 +0200 patch 8.0.1232: MS-Windows users are confused about default mappings Problem: MS-Windows users are confused about default mappings. Solution: Don't map keys in the console where they don't work. Add a choice in the installer to use MS-Windows key bindings or not. (Christian Brabandt, Ken Takata, closes #2093)
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2017 18:45:04 +0200
parents 52d928d016bc
children 218102da5226
comparison
equal deleted inserted replaced
12707:f7c8b09dd510 12708:77960063e2e7
81 SilentInstall normal 81 SilentInstall normal
82 82
83 # These are the pages we use 83 # These are the pages we use
84 Page license 84 Page license
85 Page components 85 Page components
86 Page custom SetCustom ValidateCustom ": _vimrc setting"
86 Page directory "" "" CheckInstallDir 87 Page directory "" "" CheckInstallDir
87 Page instfiles 88 Page instfiles
88 UninstPage uninstConfirm 89 UninstPage uninstConfirm
89 UninstPage instfiles 90 UninstPage instfiles
90 91
133 # $2 - holds the names to create batch files for 134 # $2 - holds the names to create batch files for
134 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" 135 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
135 StrCpy $1 "-register-OLE" 136 StrCpy $1 "-register-OLE"
136 StrCpy $2 "gvim evim gview gvimdiff vimtutor" 137 StrCpy $2 "gvim evim gview gvimdiff vimtutor"
137 138
139 # Extract InstallOptions files
140 # $PLUGINSDIR will automatically be removed when the installer closes
141 InitPluginsDir
142 File /oname=$PLUGINSDIR\vimrc.ini "vimrc.ini"
138 FunctionEnd 143 FunctionEnd
139 144
140 Function .onUserAbort 145 Function .onUserAbort
141 MessageBox MB_YESNO|MB_ICONQUESTION "Abort install?" IDYES NoCancelAbort 146 MessageBox MB_YESNO|MB_ICONQUESTION "Abort install?" IDYES NoCancelAbort
142 Abort ; causes installer to not quit. 147 Abort ; causes installer to not quit.
402 # the user wants either both or none. 407 # the user wants either both or none.
403 StrCpy $1 "$1 -install-popup -install-openwith" 408 StrCpy $1 "$1 -install-popup -install-openwith"
404 SectionEnd 409 SectionEnd
405 410
406 ########################################################## 411 ##########################################################
407 Section "Create a _vimrc if it doesn't exist" 412 Section "Create a _vimrc if it doesn't exist" sec_vimrc_id
408 SectionIn 1 3 413 SectionIn 1 3
409 414
410 StrCpy $1 "$1 -create-vimrc" 415 StrCpy $1 "$1 -create-vimrc"
411 SectionEnd 416 SectionEnd
412 417
459 464
460 ########################################################## 465 ##########################################################
461 Section -post 466 Section -post
462 BringToFront 467 BringToFront
463 SectionEnd 468 SectionEnd
469
470 ##########################################################
471 Function SetCustom
472 # Display the InstallOptions dialog
473
474 # Check if a _vimrc should be created
475 SectionGetFlags ${sec_vimrc_id} $0
476 IntOp $0 $0 & 1
477 StrCmp $0 "1" +2 0
478 Abort
479
480 Push $3
481 InstallOptions::dialog "$PLUGINSDIR\vimrc.ini"
482 Pop $3
483 Pop $3
484 FunctionEnd
485
486 Function ValidateCustom
487 ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 2" "State"
488 StrCmp $3 "1" 0 +3
489 StrCpy $1 "$1 -vimrc-remap no"
490 Goto behave
491
492 StrCpy $1 "$1 -vimrc-remap win"
493
494 behave:
495 ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 5" "State"
496 StrCmp $3 "1" 0 +3
497 StrCpy $1 "$1 -vimrc-behave unix"
498 Goto done
499
500 ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 6" "State"
501 StrCmp $3 "1" 0 +3
502 StrCpy $1 "$1 -vimrc-behave mswin"
503 Goto done
504
505 StrCpy $1 "$1 -vimrc-behave default"
506 done:
507 FunctionEnd
464 508
465 ########################################################## 509 ##########################################################
466 Section Uninstall 510 Section Uninstall
467 # Apparently $INSTDIR is set to the directory where the uninstaller is 511 # Apparently $INSTDIR is set to the directory where the uninstaller is
468 # created. Thus the "vim61" directory is included in it. 512 # created. Thus the "vim61" directory is included in it.