Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | INSTALLpc.txt - Installation of Vim on PC |
| 2 | |
| 3 | This file contains instructions for compiling Vim. If you already have an |
| 4 | executable version of Vim, you don't need this. |
| 5 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 6 | You can find the lastest here: https://github.com/vim/vim-win32-installer |
| 7 | This page also has links to install support for interfaces such as Perl, |
| 8 | Python, Lua, etc. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 9 | |
| 10 | The file "feature.h" can be edited to match your preferences. You can skip |
| 11 | this, then you will get the default behavior as is documented, which should |
| 12 | be fine for most people. |
| 13 | |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 14 | This document assumes that you are building Vim for Win32 or later (Windows |
| 15 | XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but |
| 16 | they might no longer work. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 17 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 18 | The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 19 | build a 64 bit Vim if you like, the executable will be bigger and Vim won't be |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 20 | any faster, but you can edit files larger than 2 Gbyte. |
| 21 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 22 | |
| 23 | Contents: |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 24 | 1. Microsoft Visual C++ |
| 25 | 2. Using MinGW |
| 26 | 3. Cygwin |
| 27 | 4. Borland |
| 28 | 5. Cross compiling for Win32 from a Linux machine |
| 29 | 6. Building with Python support |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 30 | 7. Building with Python3 support |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 31 | 8. Building with Racket or MzScheme support |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 32 | 9. Building with Lua support |
| 33 | 10. Building with Perl support |
| 34 | 11. Building with Ruby support |
| 35 | 12. Building with Tcl support |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 36 | 13. Building with Terminal support |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 37 | 14. Building with DirectX (DirectWrite) support |
| 38 | 15. Windows 3.1 |
| 39 | 16. MS-DOS |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 40 | |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 41 | 17. Installing after building from sources |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 42 | |
| 43 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 44 | The currently recommended way (that means it has been verified to work) is |
| 45 | using the "Visual Studio Community 2015" installation. This includes the SDK |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 46 | needed to target Windows XP. But not older Windows versions (95, 98), see |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 47 | |msvc-2008-express| below for that |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 48 | |
| 49 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 50 | 1. Microsoft Visual C++ |
| 51 | ======================= |
| 52 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 53 | We do not provide download links, since Microsoft keeps changing them. You |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 54 | can search for "Visual Studio Community 2015", for example. You will need to |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 55 | create a Microsoft account (it's free). |
| 56 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 57 | When installing "Visual Studio Community 2015 with Update 3" make sure to |
| 58 | select "custom" and check "Windows XP Support for C++" and all checkboxes |
| 59 | under "Universal Windows App Development Tools" |
| 60 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 61 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 62 | Visual Studio |
| 63 | ------------- |
| 64 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 65 | Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008, |
| 66 | VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions |
| 67 | should also work for VS 4 and VS 5.) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 68 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 69 | Using VS C++ 2008 Express is recommended if you need the binary to run on |
| 70 | Windows 95 or 97, see |msvc-2008-express| below. |
Bram Moolenaar | 97cc238 | 2012-10-03 21:46:54 +0200 | [diff] [blame] | 71 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 72 | To build Vim from the command line with MSVC, use Make_mvc.mak. |
| 73 | Visual Studio installed a batch file called vcvars32.bat, which you must |
| 74 | run to set up paths for nmake and MSVC. |
| 75 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 76 | nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++ |
| 77 | nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++ |
| 78 | nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++ |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 79 | nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc. |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 80 | Perl, Python, etc. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 81 | |
| 82 | Make_mvc.mak allows a Vim to be built with various different features and |
| 83 | debug support. Debugging with MS Devstudio is provided by Make_dvc.mak. |
| 84 | For a description of the use of Make_dvc.mak, look in Make_mvc.mak. |
| 85 | |
| 86 | For compiling Gvim with IME support on far-east Windows, add IME=yes |
| 87 | to the parameters you pass to Make_mvc.mak. |
| 88 | |
| 89 | To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project. |
| 90 | (Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for |
| 91 | far more configuration.) Make_ivc.mak can also be built with nmake. |
| 92 | |
| 93 | nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim" |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 94 | GUI Microsoft Visual C++ 4.x or later |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 95 | nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE" |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 96 | OLE Microsoft Visual C++ 4.x or later |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 97 | |
| 98 | See the specific files for comments and options. |
| 99 | |
| 100 | These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and |
| 101 | Ron Aaron; they have been tested. |
| 102 | |
| 103 | |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 104 | Visual C++ 2008 Express Edition *msvc-2008-express* |
| 105 | ------------------------------- |
| 106 | |
| 107 | Visual C++ 2008 Express Edition can be downloaded for free from: |
| 108 | http://www.microsoft.com/express/downloads/ |
| 109 | This includes the IDE and the debugger. |
| 110 | |
| 111 | To set the environment execute the msvc2008.bat script. You can then build |
| 112 | Vim with Make_mvc.mak. |
| 113 | |
| 114 | For building 64 bit binaries you also need to install the SDK: |
| 115 | "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" |
| 116 | You don't need the examples and documentation. |
| 117 | |
| 118 | If you get an error that Win32.mak can't be found, you have to set the |
| 119 | variable SDK_INCLUDE_DIR. For example, on Windows 10, installation of MSVC |
| 120 | puts include files in the following directory: |
| 121 | set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include |
| 122 | |
| 123 | |
| 124 | Visual C++ 2010 Express Edition *msvc-2010-express* |
| 125 | ------------------------------- |
| 126 | |
| 127 | Visual C++ 2010 Express Edition can be downloaded for free from: |
| 128 | http://www.microsoft.com/express/vc/Default.aspx |
| 129 | This includes the IDE and the debugger. |
| 130 | |
| 131 | To set the environment execute the msvc2010.bat script. You can then build |
| 132 | Vim with Make_mvc.mak. |
| 133 | |
| 134 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 135 | Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp* |
| 136 | --------------------------------------------- |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 137 | |
| 138 | Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE |
| 139 | so that it targets Windows 6.0 (Vista) by default. In order to override |
| 140 | this, the target Windows version number needs to be passed to LINK like |
| 141 | follows: |
| 142 | LINK ... /subsystem:console,5.01 |
| 143 | |
| 144 | Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version. |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 145 | Use lines like follows to target Windows XP x86 (assuming using Visual C++ |
| 146 | 2012 under 64-bit Windows): |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 147 | set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 148 | set INCLUDE=%WinSdk71%\Include;%INCLUDE% |
| 149 | set LIB=%WinSdk71%\Lib;%LIB% |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 150 | set CL=/D_USING_V110_SDK71_ |
| 151 | nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01 |
| 152 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 153 | To target Windows XP x64 instead of x86, you need to change the settings of |
| 154 | LIB and SUBSYSTEM_VER: |
| 155 | ... |
| 156 | set LIB=%WinSdk71%\Lib\x64;%LIB% |
| 157 | ... |
| 158 | nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.02 |
| 159 | |
| 160 | If you use Visual C++ 2015 (either Express or Community Edition), executing |
| 161 | msvc2015.bat will set them automatically. For x86 builds run this without |
| 162 | options: |
| 163 | msvc2015 |
| 164 | For x64 builds run this with the "x86_amd64" option: |
| 165 | msvc2015 x86_amd64 |
| 166 | |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 167 | The following Visual C++ team blog can serve as a reference page: |
| 168 | http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx |
| 169 | |
| 170 | |
| 171 | OLDER VERSIONS |
| 172 | |
| 173 | The minimal supported version is Windows XP. Building with older compilers |
| 174 | might still work, but these instructions might be outdated. |
| 175 | |
| 176 | If you need the executable to run on Windows 98 or ME, use the 2003 one |
| 177 | |msvc-2003-toolkit|. |
| 178 | |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 179 | Visual C++ Toolkit 2003 *msvc-2003-toolkit* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 180 | ----------------------- |
| 181 | |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 182 | You could download the Microsoft Visual C++ Toolkit 2003 from |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 183 | http://msdn.microsoft.com/visualc/vctoolkit2003/ |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 184 | Unfortunately this URL is no longer valid. Inofficial downloads appear to be |
| 185 | available from links mentioned on these pages (use at your own risk): |
| 186 | http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html |
| 187 | http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit |
| 188 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 189 | This contains the command-line tools (compiler, linker, CRT headers, |
| 190 | and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE. |
| 191 | To compile and debug Vim with the VC2003 Toolkit, you will also need |
| 192 | |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|, |
| 193 | and |windbg-download|. |
| 194 | |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 195 | It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|, |
| 196 | which is freely available in perpetuity. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 197 | |
| 198 | The free Code::Blocks IDE works with the VC2003 Toolkit, as described at |
| 199 | http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE |
| 200 | (This site also takes you through configuring a number of other |
| 201 | free C compilers for Win32.) |
| 202 | |
| 203 | To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first |
| 204 | execute the following commands in a cmd.exe window (the msvcsetup.bat batch |
| 205 | file can be used): |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 206 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 207 | set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH% |
| 208 | call "%VCToolkitInstallDir%vcvars32.bat" |
| 209 | set MSVCVer=7.1 |
| 210 | call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd" |
| 211 | set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB% |
| 212 | |
| 213 | Now you can build Vim with Make_mvc.mak. |
| 214 | |
| 215 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 216 | Getting the Windows Platform SDK *ms-platform-sdk* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 217 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 218 | You will also need a copy of the Windows Platform SDK. Specifically, you need |
| 219 | the Windows Core SDK subset of the Platform SDK, which contains the Windows |
| 220 | headers and libraries. You need to search for it, Microsoft keeps changing |
| 221 | the URL. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 222 | |
| 223 | |
| 224 | Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist* |
| 225 | |
| 226 | You need the .NET Framework 1.1 Redistributable Package from |
| 227 | http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3 |
| 228 | or from Windows Update: |
| 229 | http://windowsupdate.microsoft.com/ |
| 230 | This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe, |
| 231 | which is needed to link Vim. |
| 232 | |
| 233 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 234 | Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 235 | |
| 236 | You need the .NET Framework 1.1 SDK from |
| 237 | http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d |
| 238 | This contains some additional libraries needed to compile Vim, |
| 239 | such as msvcrt.lib. You must install |dotnet-1.1-redist| before |
| 240 | installing the .NET 1.1 SDK. |
| 241 | |
| 242 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 243 | Getting the WinDbg debugger *windbg-download* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 244 | |
| 245 | The Debugging Tools for Windows can be downloaded from |
| 246 | http://www.microsoft.com/whdc/devtools/debugging/default.mspx |
| 247 | This includes the WinDbg debugger, which you will want if you ever need |
| 248 | to debug Vim itself. An earlier version of the Debugging Tools |
| 249 | is also available through the Platform SDK, |ms-platform-sdk|. |
| 250 | |
| 251 | |
Bram Moolenaar | 98385dc | 2008-06-20 14:52:32 +0000 | [diff] [blame] | 252 | Visual C++ 2005 Express Edition *msvc-2005-express* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 253 | ------------------------------- |
| 254 | |
Bram Moolenaar | fc1421e | 2006-04-20 22:17:20 +0000 | [diff] [blame] | 255 | Visual C++ 2005 Express Edition can be downloaded for free from: |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 256 | http://msdn.microsoft.com/vstudio/express/visualC/default.aspx |
| 257 | This includes the IDE and the debugger. You will also need |
| 258 | |ms-platform-sdk|. You can build Vim with Make_mvc.mak. |
| 259 | |
| 260 | Instructions for integrating the Platform SDK into VC Express: |
| 261 | http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx |
| 262 | |
| 263 | |
Bram Moolenaar | ce2f2e0 | 2014-08-22 18:12:57 +0200 | [diff] [blame] | 264 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 265 | 2. MinGW |
| 266 | ======== |
| 267 | |
| 268 | (written by Ron Aaron: <ronaharon@yahoo.com>) |
| 269 | |
| 270 | This is about how to produce a Win32 binary of gvim with MinGW. |
| 271 | |
| 272 | First, you need to get the 'mingw32' compiler, which is free for the download |
| 273 | at: |
| 274 | |
| 275 | http://www.mingw.org/ |
| 276 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 277 | or you can use 'MinGW-w64' compiler. |
| 278 | |
| 279 | http://mingw-w64.sourceforge.net/ |
| 280 | |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 281 | Or a compiler provided on msys2: |
| 282 | |
| 283 | https://msys2.github.io/ |
| 284 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 285 | Once you have downloaded the compiler binaries, unpack them on your hard disk |
| 286 | somewhere, and put them on your PATH. If you are on Win95/98 you can edit |
| 287 | your AUTOEXEC.BAT file with a line like: |
| 288 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 289 | set PATH=C:\MinGW\bin;%PATH% |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 290 | |
| 291 | or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance), |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 292 | System, Advanced, and edit the environment from there. If you use msys2 |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 293 | compilers, set your installed paths (normally one of the following): |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 294 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 295 | C:\msys32\mingw32\bin (32-bit msys2, targeting 32-bit builds) |
| 296 | C:\msys64\mingw32\bin (64-bit msys2, targeting 32-bit builds) |
| 297 | C:\msys64\mingw64\bin (64-bit msys2, targeting 64-bit builds) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 298 | |
| 299 | Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: |
| 300 | |
| 301 | C:\> gcc --version |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 302 | gcc (GCC) 4.8.1 |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 303 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 304 | C:\> mingw32-make --version |
| 305 | GNU Make 3.82.90 (...etc...) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 306 | |
| 307 | Now you are ready to rock 'n' roll. Unpack the vim sources (look on |
| 308 | www.vim.org for exactly which version of the vim files you need). |
| 309 | |
| 310 | Change directory to 'vim\src': |
| 311 | |
| 312 | C:\> cd vim\src |
| 313 | C:\VIM\SRC> |
| 314 | |
| 315 | and you type: |
| 316 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 317 | mingw32-make -f Make_ming.mak gvim.exe |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 318 | |
| 319 | After churning for a while, you will end up with 'gvim.exe' in the 'vim\src' |
| 320 | directory. |
| 321 | |
| 322 | You should not need to do *any* editing of any files to get vim compiled this |
| 323 | way. If, for some reason, you want the console-mode-only version of vim (this |
Bram Moolenaar | 5e3dae8 | 2010-03-02 16:19:40 +0100 | [diff] [blame] | 324 | is NOT recommended on Win32, especially on '95/'98!!!), you can use: |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 325 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 326 | mingw32-make -f Make_ming.mak GUI=no vim.exe |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 327 | |
| 328 | If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' |
| 329 | (also free!) and compress the file (typical compression is 50%). UPX can be |
| 330 | found at |
| 331 | http://www.upx.org/ |
| 332 | |
Bram Moolenaar | 9185627 | 2012-02-29 16:56:39 +0100 | [diff] [blame] | 333 | As of 2011, UPX still does not support compressing 64-bit EXE's; if you have |
| 334 | built a 64-bit vim then an alternative to UPX is 'MPRESS'. MPRESS can be found |
| 335 | at: |
| 336 | http://www.matcode.com/mpress.htm |
| 337 | |
| 338 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 339 | ADDITION: NLS support with MinGW |
| 340 | |
| 341 | (by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>) |
| 342 | |
| 343 | If you want National Language Support, read the file src/po/README_mingw.txt. |
| 344 | You need to uncomment lines in Make_ming.mak to have NLS defined. |
| 345 | |
| 346 | |
| 347 | 3. Cygwin |
| 348 | ========= |
| 349 | |
| 350 | Use Make_cyg.mak with Cygwin's GCC. See |
| 351 | http://users.skynet.be/antoine.mechelynck/vim/compile.htm |
| 352 | |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 353 | With Cygnus gcc you should use the Unix Makefile instead (you need to get the |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 354 | Unix archive then). Then you get a Cygwin application (feels like Vim is |
Bram Moolenaar | 48f80c2 | 2010-02-24 15:08:27 +0100 | [diff] [blame] | 355 | running on Unix), while with Make_cyg.mak you get a Windows application (like |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 356 | with the other makefiles). |
| 357 | |
| 358 | |
| 359 | 4. Borland |
| 360 | =========== |
| 361 | |
| 362 | Use Make_bc5.mak with Borland C++ 5.x. See |
| 363 | http://users.skynet.be/antoine.mechelynck/vim/compile.htm |
| 364 | |
| 365 | |
| 366 | 5. Cross compiling for Win32 from a Linux machine |
| 367 | ================================================= |
| 368 | |
| 369 | [Update of 1) needs to be verified] |
| 370 | |
| 371 | If you like, you can compile the 'mingw' Win32 version from the comfort of |
| 372 | your Linux (or other unix) box. To do this, you need to follow a few steps: |
| 373 | 1) Install the mingw32 cross-compiler. See |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 374 | http://www.mingw.org/wiki/LinuxCrossMinGW |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 375 | http://www.libsdl.org/extras/win32/cross/README.txt |
Bram Moolenaar | a7241f5 | 2008-06-24 20:39:31 +0000 | [diff] [blame] | 376 | 2) Get and unpack both the Unix sources and the extra archive |
Bram Moolenaar | 4f7e821 | 2014-11-05 13:53:32 +0100 | [diff] [blame] | 377 | 3) in 'Make_cyg_ming.mak', set 'CROSS' to 'yes' instead of 'no'. |
| 378 | Make further changes to 'Make_cyg_ming.mak' and 'Make_ming.mak' as you |
| 379 | wish. If your cross-compiler prefix differs from the predefined value, |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 380 | set 'CROSS_COMPILE' corresponding. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 381 | 4) make -f Make_ming.mak gvim.exe |
| 382 | |
| 383 | Now you have created the Windows binary from your Linux box! Have fun... |
| 384 | |
| 385 | |
| 386 | 6. Building with Python support |
| 387 | =============================== |
| 388 | |
Bram Moolenaar | 97cc238 | 2012-10-03 21:46:54 +0200 | [diff] [blame] | 389 | For building with MSVC 2008 the "Windows Installer" from www.python.org |
| 390 | works fine. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 391 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 392 | When building, you need to set the following variables at least: |
| 393 | |
| 394 | PYTHON: Where Python is installed. E.g. C:\Python27 |
| 395 | DYNAMIC_PYTHON: Whether dynamic linking is used. Usually, set to yes. |
| 396 | PYTHON_VER: Python version. E.g. 27 for Python 2.7.X. |
| 397 | |
| 398 | E.g. When using MSVC (as one line): |
| 399 | |
| 400 | nmake -f Make_mvc.mak |
| 401 | PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 |
| 402 | |
Bram Moolenaar | 97cc238 | 2012-10-03 21:46:54 +0200 | [diff] [blame] | 403 | (rest written by Ron Aaron: <ronaharon@yahoo.com>) |
| 404 | |
| 405 | Building with the mingw32 compiler, and the ActiveState ActivePython: |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 406 | http://www.ActiveState.com/Products/ActivePython/ |
| 407 | |
| 408 | After installing the ActivePython, you will have to create a 'mingw32' |
| 409 | 'libpython20.a' to link with: |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 410 | cd $PYTHON/libs |
| 411 | pexports python20.dll > python20.def |
| 412 | dlltool -d python20.def -l libpython20.a |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 413 | |
| 414 | Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to |
| 415 | the root of the Python installation (C:\Python20, for example). If you are |
| 416 | cross-compiling on Linux with the mingw32 setup, you need to also convert all |
| 417 | the 'Include' files to *unix* line-endings. This bash command will do it |
| 418 | easily: |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 419 | for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 420 | |
| 421 | Now just do: |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 422 | make -f Make_ming.mak gvim.exe |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 423 | |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 424 | And if you use msys2 to build python support (as one line): |
| 425 | |
| 426 | mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64 |
| 427 | PYTHON_HOME=c:/msys64/mingw64 |
| 428 | PYTHONINC=-Ic:/msys64/mingw64/include/python2.7 |
| 429 | DYNAMIC_PYTHON=yes |
| 430 | PYTHON_VER=27 |
| 431 | DYNAMIC_PYTHON_DLL=libpython2.7.dll |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 432 | STATIC_STDCPLUS=yes |
| 433 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 434 | (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 435 | You will end up with a Python-enabled, Win32 version. Enjoy! |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 436 | |
| 437 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 438 | 7. Building with Python3 support |
| 439 | ================================ |
| 440 | |
| 441 | For building with MSVC 2008 the "Windows Installer" from www.python.org |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 442 | works fine. Python 3.6 is recommended. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 443 | |
| 444 | When building, you need to set the following variables at least: |
| 445 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 446 | PYTHON3: Where Python3 is installed. E.g. C:\Python36 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 447 | DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes. |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 448 | PYTHON3_VER: Python3 version. E.g. 36 for Python 3.6.X. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 449 | |
| 450 | E.g. When using MSVC (as one line): |
| 451 | |
| 452 | nmake -f Make_mvc.mak |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 453 | PYTHON3=C:\Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36 |
| 454 | |
| 455 | |
| 456 | When using msys2 and link with Python3 bundled with msys2 (as one line): |
| 457 | |
| 458 | mingw32-make -f Make_ming.mak PYTHON3=c:/msys64/mingw64 |
| 459 | PYTHON3_HOME=c:/msys64/mingw64 |
| 460 | PYTHON3INC=-Ic:/msys64/mingw64/include/python3.6m |
| 461 | DYNAMIC_PYTHON3=yes |
| 462 | PYTHON3_VER=36 |
| 463 | DYNAMIC_PYTHON3_DLL=libpython3.6m.dll |
| 464 | STATIC_STDCPLUS=yes |
| 465 | |
| 466 | (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 467 | |
| 468 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 469 | 8. Building with Racket or MzScheme support |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 470 | ======================================== |
| 471 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 472 | 1) Building with Racket support (newest) |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 473 | |
| 474 | MzScheme and PLT Scheme names have been rebranded as Racket. Vim with Racket |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 475 | support can be built with either MSVC or MinGW (or Cygwin). |
| 476 | Get it from https://download.racket-lang.org/ |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 477 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 478 | Copy lib/libracket{version}.dll to your Windows system directory. The system |
| 479 | directory depends on your Windows bitness and Vim bitness: |
| 480 | 32-bit Vim on 32-bit Windows: C:\Windows\System32 |
| 481 | 32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64 |
| 482 | 64-bit Vim on 64-bit Windows: C:\Windows\System32 |
| 483 | |
| 484 | For building you need to set the following variables: |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 485 | |
| 486 | MZSCHEME: Where Racket is installed. |
| 487 | E.g. C:\Program Files (x86)\Racket |
| 488 | DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes. |
Bram Moolenaar | f55e4c8 | 2017-08-01 20:44:53 +0200 | [diff] [blame] | 489 | MZSCHEME_VER: Racket DLL version which is used for the file name. |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 490 | See below for a list of MZSCHEME_VER. |
Bram Moolenaar | f55e4c8 | 2017-08-01 20:44:53 +0200 | [diff] [blame] | 491 | The DLL can be found under the lib directory. E.g. |
| 492 | C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 493 | MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at |
| 494 | runtime. Default: $(MZSCHEME)\collects |
| 495 | User can override this with the PLTCOLLECTS environment |
| 496 | variable. |
| 497 | |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 498 | List of MZSCHEME_VER (incomplete): |
| 499 | |
| 500 | Racket ver. | MZSCHEME_VER |
| 501 | ========================== |
| 502 | 6.3 | 3m_9z0ds0 |
| 503 | 6.6 | 3m_a0solc |
| 504 | 6.8 | 3m_a1zjsw |
| 505 | 6.10 | 3m_a36fs8 |
| 506 | |
| 507 | |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 508 | E.g. When using MSVC (as one line): |
| 509 | |
| 510 | nmake -f Make_mvc.mak |
| 511 | MZSCHEME="C:\Program Files (x86)\Racket" DYNAMIC_MZSCHEME=yes |
| 512 | MZSCHEME_VER=3m_9z0ds0 |
| 513 | |
| 514 | Or when using MinGW (as one line): |
| 515 | |
| 516 | mingw32-make -f Make_ming.mak |
| 517 | MZSCHEME='C:/Program\ Files\ (x86)/Racket' DYNAMIC_MZSCHEME=yes |
| 518 | MZSCHEME_VER=3m_9z0ds0 |
| 519 | |
| 520 | Spaces should be escaped with '\'. |
| 521 | |
| 522 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 523 | 2) Building with MzScheme support (older) |
| 524 | |
| 525 | (written by Sergey Khorev <sergey.khorev@gmail.com>) |
| 526 | |
| 527 | Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can |
| 528 | be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and |
| 529 | above (including 299 and 30x series). |
| 530 | |
| 531 | The MSVC build is quite straightforward. Simply invoke (in one line) |
| 532 | nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme> |
| 533 | [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>] |
| 534 | where <MzScheme-version> is the last seven characters from MzScheme dll name |
| 535 | (libmzschXXXXXXX.dll). |
| 536 | If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme |
| 537 | DLL's, but will load them in runtime on demand. |
| 538 | |
| 539 | Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into |
| 540 | account that <Path-to-MzScheme> should contain slashes rather than backslashes |
| 541 | (e.g. d:/Develop/MzScheme) |
| 542 | |
| 543 | "Static" MzScheme support (Vim executable will depend on MzScheme DLLs |
| 544 | explicitly) on MinGW and Cygwin requires additional step. |
| 545 | |
| 546 | libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from |
| 547 | %WINDOWS%\System32 to other location (either build directory, some temporary |
| 548 | dir or even MzScheme home). |
| 549 | |
| 550 | Pass that path as MZSCHEME_DLLS parameter for Make. E.g., |
| 551 | make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000 |
| 552 | MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no |
| 553 | |
| 554 | After a successful build, these dlls can be freely removed, leaving them in |
| 555 | %WINDOWS%\System32 only. |
| 556 | |
| 557 | |
| 558 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 559 | 9. Building with Lua support |
| 560 | ============================ |
| 561 | |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 562 | Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin). |
| 563 | You can use binaries from LuaBinaries: http://luabinaries.sourceforge.net/ |
| 564 | This also applies to when you get a Vim executable and don't build yourself, |
| 565 | do the part up to "Build". |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 566 | |
| 567 | 1) Download and install LuaBinaries |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 568 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 569 | Go to the Download page of LuaBinaries: |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 570 | http://luabinaries.sourceforge.net/download.html |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 571 | |
| 572 | Download lua-X.Y.Z_Win32_dllw4_lib.zip for x86 or |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 573 | lua-X.Y.Z_Win64_dllw4_lib.zip for x64. You can use them both for MSVC and |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 574 | MinGW. |
| 575 | |
| 576 | Unpack it to a working directory. E.g. C:\projects\lua53. |
| 577 | Lua's header files will be installed under the include directory. |
| 578 | |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 579 | Copy luaXY.dll to your Windows system directory. The system directory depends |
| 580 | on your Windows bitness and Vim bitness: |
| 581 | 32-bit Vim on 32-bit Windows: C:\Windows\System32 |
| 582 | 32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64 |
| 583 | 64-bit Vim on 64-bit Windows: C:\Windows\System32 |
| 584 | |
| 585 | Or another option is copying luaXY.dll to the directory where gvim.exe |
| 586 | (or vim.exe) is. |
| 587 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 588 | |
| 589 | 2) Build |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 590 | |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 591 | You need to set LUA, DYNAMIC_LUA and LUA_VER. |
| 592 | |
| 593 | LUA: Where Lua's header files are installed. E.g. C:\projects\lua53. |
| 594 | DYNAMIC_LUA: Whether dynamic linking is used. Set to yes. |
| 595 | LUA_VER: Lua version. E.g. 53 for Lua 5.3.X. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 596 | |
| 597 | E.g. When using MSVC (as one line): |
| 598 | |
| 599 | nmake -f Make_mvc.mak |
| 600 | LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53 |
| 601 | |
| 602 | Or when using MinGW (as one line): |
| 603 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 604 | mingw32-make -f Make_ming.mak |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 605 | LUA=C:/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 606 | |
Bram Moolenaar | 4e640bd | 2016-01-16 16:20:38 +0100 | [diff] [blame] | 607 | |
| 608 | Or when using Cygwin (as one line) (untested): |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 609 | |
| 610 | make -f Make_cyg.mak |
| 611 | LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53 |
| 612 | |
| 613 | |
| 614 | 10. Building with Perl support |
| 615 | ============================== |
| 616 | |
| 617 | Vim with Perl support can be built with either MSVC or MinGW (or Cygwin). |
| 618 | You can use binaries from ActiveState (ActivePerl) or Strawberry Perl. |
| 619 | |
| 620 | http://www.activestate.com/activeperl |
| 621 | http://strawberryperl.com/ |
| 622 | |
| 623 | When building, you need to set the following variables: |
| 624 | |
| 625 | PERL: Where perl is installed. E.g. C:\Perl, C:\Strawberry\perl |
| 626 | DYNAMIC_PERL: Whether dynamic linking is used. Usually, set to yes. |
| 627 | PERL_VER: Perl version. E.g. 522 for Perl 5.22.X. |
| 628 | |
| 629 | E.g. When using MSVC (as one line): |
| 630 | |
| 631 | nmake -f Make_mvc.mak |
| 632 | PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522 |
| 633 | |
| 634 | Or when using MinGW (as one line): |
| 635 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 636 | mingw32-make -f Make_ming.mak |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 637 | PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 638 | |
| 639 | |
| 640 | 11. Building with Ruby support |
| 641 | ============================== |
| 642 | |
| 643 | Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin). |
| 644 | Ruby doesn't provide the official Windows binaries. The most widely used |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 645 | Windows binaries might be RubyInstaller. Currently Ruby 2.4 is recommended. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 646 | |
| 647 | http://rubyinstaller.org/ |
| 648 | |
| 649 | If you use MinGW you can easily build with RubyInstaller, but if you use MSVC |
| 650 | you need some tricks described below. |
| 651 | (Another binary distribution is ActiveScriptRuby: |
| 652 | http://www.artonx.org/data/asr/) |
| 653 | |
| 654 | When building, you need to set the following variables at least: |
| 655 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 656 | RUBY: Where ruby is installed. E.g. C:\Ruby24 |
Bram Moolenaar | 6384c5d | 2016-09-06 22:06:35 +0200 | [diff] [blame] | 657 | DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes. |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 658 | RUBY_VER: Ruby version. E.g. 24 for Ruby 2.4.X. |
Bram Moolenaar | 6384c5d | 2016-09-06 22:06:35 +0200 | [diff] [blame] | 659 | RUBY_API_VER_LONG: Ruby API version in a long format. |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 660 | E.g. 2.4.0 for Ruby 2.4.X. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 661 | |
| 662 | Ruby version vs. Ruby API version: |
| 663 | |
| 664 | Ruby ver. | Ruby API ver. |
| 665 | ========================= |
| 666 | 1.8.X | 1.8 |
| 667 | 1.9.[1-3] | 1.9.1 |
| 668 | 2.0.0 | 2.0.0 |
| 669 | 2.X.Y | 2.X.0 |
| 670 | |
| 671 | (Ruby 1.9.0 is excluded from the table because it is an unstable version.) |
| 672 | |
| 673 | |
| 674 | A) Using MSVC |
| 675 | |
| 676 | If you want to link with ruby, normally you must use the same compiler as |
| 677 | which was used to build the ruby binary. RubyInstaller is built with MinGW, |
| 678 | so normally you cannot use MSVC for building Vim if you want to link with |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 679 | RubyInstaller. If you use a different compiler, there are mainly two problems: |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 680 | config.h and Ruby's DLL name. Here are the steps for working around them: |
| 681 | |
| 682 | 1) Download and Install RubyInstaller. |
| 683 | You can install RubyInstaller with the default options and directory. |
| 684 | E.g.: |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 685 | C:\Ruby24 (32-bit) or C:\Ruby24-x64 (64-bit) |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 686 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 687 | Ruby 2.4.X is used in this example. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 688 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 689 | 2) Download Ruby 2.4.X's source code and generate config.h: |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 690 | |
| 691 | cd C:\projects |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 692 | git clone https://github.com/ruby/ruby.git -b ruby_2_4 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 693 | cd ruby |
| 694 | win32\configure.bat |
| 695 | nmake .config.h.time |
| 696 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 697 | Note that ruby_2_4 is the branch name for Ruby 2.4.X's source code. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 698 | There is no need to build whole Ruby, just config.h is needed. |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 699 | If you use 32-bit MSVC 2015, the config.h is generated in the |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 700 | .ext\include\i386-mswin32_140 directory. |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 701 | If you use 64-bit MSVC 2015, the config.h is generated in the |
| 702 | .ext\include\x64-mswin64_140 directory. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 703 | |
| 704 | 3) Install the generated config.h. |
| 705 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 706 | For 32-bit version: |
| 707 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 708 | xcopy /s .ext\include C:\Ruby24\include\ruby-2.4.0 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 709 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 710 | For 64-bit version: |
| 711 | |
| 712 | xcopy /s .ext\include C:\Ruby24-x64\include\ruby-2.4.0 |
| 713 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 714 | Note that 2.4.0 is Ruby API version of Ruby 2.4.X. |
| 715 | You may need to close the console and reopen it to pick up the new $PATH. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 716 | |
| 717 | 4) Build Vim. Note that you need to adjust some variables (as one line): |
| 718 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 719 | For 32-bit version: |
| 720 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 721 | nmake -f Make_mvc.mak |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 722 | RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 723 | RUBY_MSVCRT_NAME=msvcrt |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 724 | WINVER=0x501 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 725 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 726 | For 64-bit version, replace RUBY=C:\Ruby24 with RUBY=C:\Ruby24-x64. |
| 727 | |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 728 | If you set WINVER explicitly, it must be set to >=0x500, when building |
| 729 | with Ruby 2.1 or later. (Default is 0x501.) |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 730 | When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt |
| 731 | which is used for the Ruby's DLL name. |
| 732 | |
| 733 | B) Using MinGW |
| 734 | |
| 735 | Using MinGW is easier than using MSVC when linking with RubyInstaller. |
| 736 | After you install RubyInstaller, just type this (as one line): |
| 737 | |
| 738 | mingw32-make -f Make_ming.mak |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 739 | RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 740 | WINVER=0x501 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 741 | |
Bram Moolenaar | 59eb016 | 2017-12-10 18:17:44 +0100 | [diff] [blame] | 742 | For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64. |
Bram Moolenaar | 02cfac8 | 2016-04-21 14:34:58 +0200 | [diff] [blame] | 743 | If you set WINVER explicitly, it must be set to >=0x500, when building with |
| 744 | Ruby 2.1 or later. (Default is 0x501.) |
| 745 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 746 | |
| 747 | |
| 748 | 12. Building with Tcl support |
| 749 | ============================= |
| 750 | |
| 751 | Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin). |
| 752 | You can use binaries from ActiveState (ActiveTcl). |
| 753 | |
| 754 | http://www.activestate.com/activetcl |
| 755 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 756 | For MSVC 2015 use version 8.6.6 or later. |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 757 | When building, you need to set the following variables: |
| 758 | |
| 759 | TCL: Where tcl is installed. E.g. C:\Tcl86 |
| 760 | DYNAMIC_TCL: Whether dynamic linking is used. Usually, set to yes. |
| 761 | TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X. |
| 762 | TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X. |
| 763 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 764 | Sometimes the Tcl dll name changes. E.g. ActiveTcl 8.6.4 comes with tcl86.dll, |
| 765 | but ActiveTcl 8.6.6 comes with tcl86t.dll. You can set the dll name by setting |
| 766 | the TCL_DLL variable: |
| 767 | TCL_DLL=tcl86t.dll |
| 768 | |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 769 | E.g. When using MSVC (as one line): |
| 770 | |
| 771 | nmake -f Make_mvc.mak |
| 772 | TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6 |
| 773 | |
| 774 | Or when using MinGW (as one line): |
| 775 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 776 | mingw32-make -f Make_ming.mak |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 777 | TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6 |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 778 | |
| 779 | |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 780 | 13. Building with Terminal support |
| 781 | ================================== |
| 782 | |
Bram Moolenaar | 8a77306 | 2017-07-24 22:29:21 +0200 | [diff] [blame] | 783 | Vim with Terminal support can be built with either MSVC, MinGW or Cygwin. |
Bram Moolenaar | 2aeaf3f | 2017-07-23 17:11:15 +0200 | [diff] [blame] | 784 | This uses the included libvterm and winpty. No extra header files or |
Bram Moolenaar | 8a77306 | 2017-07-24 22:29:21 +0200 | [diff] [blame] | 785 | libraries are needed for building. Just set TERMINAL to yes. |
Bram Moolenaar | 2aeaf3f | 2017-07-23 17:11:15 +0200 | [diff] [blame] | 786 | |
Bram Moolenaar | 8a77306 | 2017-07-24 22:29:21 +0200 | [diff] [blame] | 787 | E.g. When using MSVC: |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 788 | |
Bram Moolenaar | 8a77306 | 2017-07-24 22:29:21 +0200 | [diff] [blame] | 789 | nmake -f Make_mvc.mak TERMINAL=yes |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 790 | |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 791 | Or when using MinGW: |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 792 | |
Bram Moolenaar | 18cfa94 | 2017-10-08 17:58:44 +0200 | [diff] [blame] | 793 | mingw32-make -f Make_ming.mak TERMINAL=yes |
Bram Moolenaar | 8f84c3a | 2017-07-22 16:14:44 +0200 | [diff] [blame] | 794 | |
| 795 | |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 796 | 14. Building with DirectX (DirectWrite) support |
| 797 | =============================================== |
| 798 | |
| 799 | Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW. |
| 800 | This requires dwrite_2.h and some other header files which come with Windows |
| 801 | SDK 8.1 or later (or MinGW-w64), if you want to enable color emoji support. |
| 802 | This also requires MBYTE=yes which is enabled by default. |
| 803 | |
| 804 | A) Using MSVC |
| 805 | |
| 806 | If you use MSVC 2013 or later, Windows SDK 8.1 or later is used by default. |
| 807 | You just need to specify DIRECTX=yes: |
| 808 | |
| 809 | nmake -f Make_mvc.mak DIRECTX=yes |
| 810 | |
| 811 | If you use MSVC 2012 or earlier, the required header files are not available |
| 812 | by default. However, you can use the header files from newer SDKs with older |
| 813 | compilers. E.g.: |
| 814 | |
| 815 | set "INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\8.1\Include\um" |
| 816 | nmake -f Make_mvc.mak DIRECTX=yes |
| 817 | |
| 818 | If you don't need color emoji support, only dwrite.h is required. You can use |
| 819 | older compilers (e.g. VC2010) without Windows SDK 8.1. E.g.: |
| 820 | |
| 821 | nmake -f Make_mvc.mak DIRECTX=yes COLOR_EMOJI=no |
| 822 | |
| 823 | B) Using MinGW-w64 |
| 824 | |
| 825 | Just set DIRECTX to yes: |
| 826 | |
| 827 | mingw32-make -f Make_ming.mak DIRECTX=yes |
| 828 | |
| 829 | |
| 830 | 15. Windows 3.1x |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 831 | ================ |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 832 | |
Bram Moolenaar | 6e722e2 | 2016-02-26 19:58:58 +0100 | [diff] [blame] | 833 | The Windows 3.1x support was removed in patch 7.4.1364. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 834 | |
| 835 | |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 836 | 16. MS-DOS |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 837 | ========== |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 838 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 839 | The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions |
| 840 | work on MS-DOS because of the limited amount of memory available. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 841 | |
| 842 | |
Bram Moolenaar | 7f88b65 | 2017-12-14 13:15:19 +0100 | [diff] [blame] | 843 | 17. Installing after building from sources |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 844 | ========================================== |
| 845 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 846 | [provided by Michael Soyka, updated by Ken Takata] |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 847 | |
| 848 | After you've built the Vim binaries as described above, you're ready to |
| 849 | install Vim on your system. However, if you've obtained the Vim sources |
Bram Moolenaar | 30a8947 | 2016-01-10 14:35:58 +0100 | [diff] [blame] | 850 | using Git, Mercurial or by downloading them as a unix tar file, you must |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 851 | first create a "vim80" directory. If you instead downloaded the sources as |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 852 | zip files, you can skip this setup as the zip archives already have the |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 853 | correct directory structure. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 854 | |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 855 | A. Create a Vim "runtime" subdirectory named "vim80" |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 856 | ----------------------------------------------------- |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 857 | If you obtained your Vim sources as zip files, you can skip this step. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 858 | Otherwise, continue reading. |
| 859 | |
| 860 | Go to the directory that contains the Vim "src" and "runtime" |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 861 | directories and create a new subdirectory named "vim80". |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 862 | |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 863 | Copy the "runtime" files into "vim80": |
| 864 | copy runtime\* vim80 |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 865 | |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 866 | B. Copy the new binaries into the "vim80" directory |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 867 | ---------------------------------------------------- |
| 868 | Regardless of how you installed the Vim sources, you need to copy the |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 869 | new binaries you created above into "vim80": |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 870 | |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 871 | copy src\*.exe vim80 |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 872 | copy src\tee\tee.exe vim80 |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 873 | copy src\xxd\xxd.exe vim80 |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 874 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 875 | To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit |
| 876 | versions of gvimext.dll. They should be copied to "vim80\GvimExt32" and |
| 877 | "vim80\GvimExt64" respectively. |
| 878 | First, build the 32-bit version, then: |
| 879 | |
| 880 | mkdir vim80\GvimExt32 |
| 881 | copy src\GvimExt\gvimext.dll vim80\GvimExt32 |
| 882 | |
| 883 | Next, clean the 32-bit version and build the 64-bit version, then: |
| 884 | |
| 885 | mkdir vim80\GvimExt64 |
| 886 | copy src\GvimExt\gvimext.dll vim80\GvimExt64 |
| 887 | |
| 888 | C. Copy gettext and iconv DLLs into the "vim80" directory |
| 889 | ---------------------------------------------------------- |
| 890 | Get gettext and iconv DLLs from the following site: |
| 891 | https://github.com/mlocati/gettext-iconv-windows/releases |
| 892 | Both 64- and 32-bit versions are needed. |
| 893 | Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract |
| 894 | DLLs and place them as follows: |
| 895 | |
| 896 | vim80\ |
| 897 | | libintl-8.dll |
| 898 | | libiconv-2.dll |
| 899 | | libgcc_s_sjlj-1.dll (only for 32-bit) |
| 900 | | |
| 901 | + GvimExt32\ |
| 902 | | libintl-8.dll |
| 903 | | libiconv-2.dll |
| 904 | | libgcc_s_sjlj-1.dll |
| 905 | | |
| 906 | ` GvimExt64\ |
| 907 | libintl-8.dll |
| 908 | libiconv-2.dll |
| 909 | |
| 910 | The DLLs in the "vim80" should be the same bitness with the (g)vim.exe. |
| 911 | |
| 912 | D. Move the "vim80" directory into the Vim installation subdirectory |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 913 | --------------------------------------------------------------------- |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 914 | Move the "vim80" subdirectory into the subdirectory where you want Vim |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 915 | to be installed. Typically, this subdirectory will be named "vim". |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 916 | If you already have a "vim80" subdirectory in "vim", delete it first |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 917 | by running its uninstal.exe program. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 918 | |
Bram Moolenaar | 3bf8c3c | 2017-11-05 16:04:43 +0100 | [diff] [blame] | 919 | E. Install Vim |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 920 | --------------- |
Bram Moolenaar | bbe917d | 2016-09-21 22:41:24 +0200 | [diff] [blame] | 921 | "cd" to your Vim installation subdirectory "vim\vim80" and run the |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 922 | "install.exe" program. It will ask you a number of questions about |
| 923 | how you would like to have your Vim setup. Among these are: |
| 924 | - You can tell it to write a "_vimrc" file with your preferences in the |
| 925 | parent directory. |
| 926 | - It can also install an "Edit with Vim" entry in the Windows Explorer |
| 927 | popup menu. |
| 928 | - You can have it create batch files, so that you can run Vim from the |
| 929 | console or in a shell. You can select one of the directories in your |
Bram Moolenaar | 3c6f92e | 2016-01-02 20:26:36 +0100 | [diff] [blame] | 930 | PATH or add the directory to PATH using the Windows Control Panel. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 931 | - Create entries for Vim on the desktop and in the Start menu. |
| 932 | |
| 933 | Happy Vimming! |