/vimx64

using vs2015 to build win64 vim

Primary LanguageBatchfileApache License 2.0Apache-2.0

Vimx64

老早就想自己在 Windows 上编译个 Vim 来玩玩的,只是一直没这个需求,也算是自己懒。

编译 64 位 Vim

  • 首先得从 Github 上把 Vim 的仓库 克隆代码下来。
  • 然后要有 Visual Studio 2017 的编译环境,至于怎么安装,我就不多说了,可以搜索出一大堆东西来。
  • 最后就是编译。我参考了这位德国大大的 编译脚本 (之前都是下载他编译好的),然后写了个自己的 编译脚本
  • build.bat 变量说明
    1. LUA PYTHON TCL 三个变量指向各自的二进制安装路径。
    2. VIM_SRC 是指克隆下来的 Vim 源代码的完整路径。
    3. ZIP_DIR 是指最终的 vim-win64.7z 的放置路径。
    4. 其他变量请参考源代码里的 Make_mvc.mak 文件。
  • 我编译好的 64 位 Vim,自己上传一份。

vim 支持库列表

  • ctags (用 Visual Studio 2017 编译,源码来自 universal-ctags)
  • lua 5.3.2 (用 Visual Studio 2017 编译)
  • python 2.7.13 (官方下载的最新版本二进制安装包)
  • python 3.6.2 (官方下载的最新版本二进制安装包)
  • tcl 8.6.4 (用 Visual Studio 2015 自行编译)

几点说明

ctags.exe 版本信息

Universal Ctags 0.0.0(4a06dc9e), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Aug  6 2017, 10:27:29
  URL: https://ctags.io/
  Optional compiled features: +win32, +wildcards, +regex, +internal-sort, +case-insensitive-filenames

gvim.exe:ver 命令输出为

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug  6 2017 10:29:37)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-876
Huge version with GUI.  Features included (+) or not (-):
+acl                +eval               +mouse              +syntax
+arabic             +ex_extra           +mouseshape         +tag_binary
+autocmd            +extra_search       +multi_byte_ime/dyn +tag_old_static
+balloon_eval       +farsi              +multi_lang         -tag_any_white
+browse             +file_in_path       -mzscheme           +tcl/dyn
++builtin_terms     +find_in_path       -netbeans_intg      -termguicolors
+byte_offset        +float              +num64              -tgetent
+channel            +folding            +ole                -termresponse
+cindent            -footer             +packages           +textobjects
+clientserver       +gettext/dyn        +path_extra         +timers
+clipboard          -hangul_input       -perl               +title
+cmdline_compl      +iconv/dyn          +persistent_undo    +toolbar
+cmdline_hist       +insert_expand      -postscript         +user_commands
+cmdline_info       +job                +printer            +vertsplit
+comments           +jumplist           +profile            +virtualedit
+conceal            +keymap             +python/dyn         +visual
+cryptv             +lambda             +python3/dyn        +visualextra
+cscope             +langmap            +quickfix           +viminfo
+cursorbind         +libcall            +reltime            +vreplace
+cursorshape        +linebreak          +rightleft          +wildignore
+dialog_con_gui     +lispindent         -ruby               +wildmenu
+diff               +listcmds           +scrollbind         +windows
+digraphs           +localmap           +signs              +writebackup
+directx            +lua/dyn            +smartindent        -xfontset
-dnd                +menu               +startuptime        -xim
-ebcdic             +mksession          +statusline         +xpm_w32
+emacs_tags         +modify_fname       -sun_workshop       -xterm_save
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl /favor:blend /w -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE  -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32   -DWINVER=0x0500 -D_WIN32_WINNT=0x0500  /Fo.\ObjGXOUYHTAMD64/ /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_HUGE /Fd.\ObjGXOUYHTAMD64/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:AMD64  libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib   /nodefaultlib:python27.lib /nodefaultlib:python36.lib   "C:\Dev\Utils\tcl\lib\tclstub86.lib" WSock32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug