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