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 | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 14 | With the exception of two sections (Windows 3.1 and MS-DOS), this document |
| 15 | assumes that you are building Vim for Win32 or later. |
| 16 | (Windows 95/98/Me/NT/2000/XP/2003/Vista/7) |
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 |
| 26 | 7. Building with MzScheme support |
| 27 | 8. Windows 3.1 |
| 28 | 9. MS-DOS |
| 29 | |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 30 | 10. Installing after building from sources |
| 31 | |
| 32 | |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 33 | The currently preferred method is using the free Visual C++ Toolkit 2008 |
Bram Moolenaar | 536d95f | 2011-06-12 20:36:09 +0200 | [diff] [blame] | 34 | |msvc-2008-express|, the produced binary runs on most MS-Windows systems. If |
| 35 | you need the executable to run on Windows 98 or ME, use the 2003 one |
| 36 | |msvc-2003-toolkit|. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 37 | |
| 38 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 39 | 1. Microsoft Visual C++ |
| 40 | ======================= |
| 41 | |
| 42 | Visual Studio |
| 43 | ------------- |
| 44 | |
Bram Moolenaar | 98385dc | 2008-06-20 14:52:32 +0000 | [diff] [blame] | 45 | Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 46 | is straightforward. (These instructions should also work for VS 4 and VS 5.) |
| 47 | |
| 48 | To build Vim from the command line with MSVC, use Make_mvc.mak. |
| 49 | Visual Studio installed a batch file called vcvars32.bat, which you must |
| 50 | run to set up paths for nmake and MSVC. |
| 51 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 52 | nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++ |
| 53 | nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++ |
| 54 | nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++ |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 55 | nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc. |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 56 | Perl, Python, etc. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 57 | |
| 58 | Make_mvc.mak allows a Vim to be built with various different features and |
| 59 | debug support. Debugging with MS Devstudio is provided by Make_dvc.mak. |
| 60 | For a description of the use of Make_dvc.mak, look in Make_mvc.mak. |
| 61 | |
| 62 | For compiling Gvim with IME support on far-east Windows, add IME=yes |
| 63 | to the parameters you pass to Make_mvc.mak. |
| 64 | |
| 65 | To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project. |
| 66 | (Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for |
| 67 | far more configuration.) Make_ivc.mak can also be built with nmake. |
| 68 | |
| 69 | nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim" |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 70 | GUI Microsoft Visual C++ 4.x or later |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 71 | nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE" |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 72 | OLE Microsoft Visual C++ 4.x or later |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 73 | |
| 74 | See the specific files for comments and options. |
| 75 | |
| 76 | These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and |
| 77 | Ron Aaron; they have been tested. |
| 78 | |
| 79 | |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 80 | Visual C++ Toolkit 2003 *msvc-2003-toolkit* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 81 | ----------------------- |
| 82 | |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 83 | You could download the Microsoft Visual C++ Toolkit 2003 from |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 84 | http://msdn.microsoft.com/visualc/vctoolkit2003/ |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 85 | Unfortunately this URL is no longer valid. Inofficial downloads appear to be |
| 86 | available from links mentioned on these pages (use at your own risk): |
| 87 | http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html |
| 88 | http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit |
| 89 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 90 | This contains the command-line tools (compiler, linker, CRT headers, |
| 91 | and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE. |
| 92 | To compile and debug Vim with the VC2003 Toolkit, you will also need |
| 93 | |ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|, |
| 94 | and |windbg-download|. |
| 95 | |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 96 | It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|, |
| 97 | which is freely available in perpetuity. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 98 | |
| 99 | The free Code::Blocks IDE works with the VC2003 Toolkit, as described at |
| 100 | http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE |
| 101 | (This site also takes you through configuring a number of other |
| 102 | free C compilers for Win32.) |
| 103 | |
| 104 | To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first |
| 105 | execute the following commands in a cmd.exe window (the msvcsetup.bat batch |
| 106 | file can be used): |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 107 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 108 | set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH% |
| 109 | call "%VCToolkitInstallDir%vcvars32.bat" |
| 110 | set MSVCVer=7.1 |
| 111 | call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd" |
| 112 | set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB% |
| 113 | |
| 114 | Now you can build Vim with Make_mvc.mak. |
| 115 | |
| 116 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 117 | Getting the Windows Platform SDK *ms-platform-sdk* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 118 | |
| 119 | You will also need a copy of the Windows Platform SDK from |
| 120 | http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ |
| 121 | Specifically, you need the Windows Core SDK subset of the Platform SDK, |
| 122 | which contains the Windows headers and libraries. |
| 123 | |
| 124 | |
| 125 | Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist* |
| 126 | |
| 127 | You need the .NET Framework 1.1 Redistributable Package from |
| 128 | http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3 |
| 129 | or from Windows Update: |
| 130 | http://windowsupdate.microsoft.com/ |
| 131 | This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe, |
| 132 | which is needed to link Vim. |
| 133 | |
| 134 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 135 | Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 136 | |
| 137 | You need the .NET Framework 1.1 SDK from |
| 138 | http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d |
| 139 | This contains some additional libraries needed to compile Vim, |
| 140 | such as msvcrt.lib. You must install |dotnet-1.1-redist| before |
| 141 | installing the .NET 1.1 SDK. |
| 142 | |
| 143 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 144 | Getting the WinDbg debugger *windbg-download* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 145 | |
| 146 | The Debugging Tools for Windows can be downloaded from |
| 147 | http://www.microsoft.com/whdc/devtools/debugging/default.mspx |
| 148 | This includes the WinDbg debugger, which you will want if you ever need |
| 149 | to debug Vim itself. An earlier version of the Debugging Tools |
| 150 | is also available through the Platform SDK, |ms-platform-sdk|. |
| 151 | |
| 152 | |
Bram Moolenaar | 98385dc | 2008-06-20 14:52:32 +0000 | [diff] [blame] | 153 | Visual C++ 2005 Express Edition *msvc-2005-express* |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 154 | ------------------------------- |
| 155 | |
Bram Moolenaar | fc1421e | 2006-04-20 22:17:20 +0000 | [diff] [blame] | 156 | Visual C++ 2005 Express Edition can be downloaded for free from: |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 157 | http://msdn.microsoft.com/vstudio/express/visualC/default.aspx |
| 158 | This includes the IDE and the debugger. You will also need |
| 159 | |ms-platform-sdk|. You can build Vim with Make_mvc.mak. |
| 160 | |
| 161 | Instructions for integrating the Platform SDK into VC Express: |
| 162 | http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx |
| 163 | |
| 164 | |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 165 | Visual C++ 2008 Express Edition *msvc-2008-express* |
| 166 | ------------------------------- |
| 167 | |
| 168 | Visual C++ 2008 Express Edition can be downloaded for free from: |
Bram Moolenaar | 442b422 | 2010-05-24 21:34:22 +0200 | [diff] [blame] | 169 | http://www.microsoft.com/express/downloads/ |
| 170 | This includes the IDE and the debugger. |
| 171 | |
| 172 | To set the environment execute the msvc2008.bat script. You can then build |
| 173 | Vim with Make_mvc.mak. |
| 174 | |
| 175 | |
| 176 | Visual C++ 2010 Express Edition *msvc-2010-express* |
| 177 | ------------------------------- |
| 178 | |
| 179 | Visual C++ 2010 Express Edition can be downloaded for free from: |
Bram Moolenaar | a7241f5 | 2008-06-24 20:39:31 +0000 | [diff] [blame] | 180 | http://www.microsoft.com/express/vc/Default.aspx |
| 181 | This includes the IDE and the debugger. |
Bram Moolenaar | 0fde290 | 2008-03-16 13:54:13 +0000 | [diff] [blame] | 182 | |
Bram Moolenaar | 536d95f | 2011-06-12 20:36:09 +0200 | [diff] [blame] | 183 | To set the environment execute the msvc2010.bat script. You can then build |
Bram Moolenaar | a7241f5 | 2008-06-24 20:39:31 +0000 | [diff] [blame] | 184 | Vim with Make_mvc.mak. |
Bram Moolenaar | 98385dc | 2008-06-20 14:52:32 +0000 | [diff] [blame] | 185 | |
| 186 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 187 | 2. MinGW |
| 188 | ======== |
| 189 | |
| 190 | (written by Ron Aaron: <ronaharon@yahoo.com>) |
| 191 | |
| 192 | This is about how to produce a Win32 binary of gvim with MinGW. |
| 193 | |
| 194 | First, you need to get the 'mingw32' compiler, which is free for the download |
| 195 | at: |
| 196 | |
| 197 | http://www.mingw.org/ |
| 198 | |
| 199 | Once you have downloaded the compiler binaries, unpack them on your hard disk |
| 200 | somewhere, and put them on your PATH. If you are on Win95/98 you can edit |
| 201 | your AUTOEXEC.BAT file with a line like: |
| 202 | |
| 203 | set PATH=C:\GCC-2.95.2\BIN;%PATH% |
| 204 | |
| 205 | or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance), |
| 206 | System, Advanced, and edit the environment from there. |
| 207 | |
| 208 | Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: |
| 209 | |
| 210 | C:\> gcc --version |
| 211 | 2.95.2 |
| 212 | |
| 213 | C:\> make --version |
| 214 | GNU Make version 3.77 (...etc...) |
| 215 | |
| 216 | Now you are ready to rock 'n' roll. Unpack the vim sources (look on |
| 217 | www.vim.org for exactly which version of the vim files you need). |
| 218 | |
| 219 | Change directory to 'vim\src': |
| 220 | |
| 221 | C:\> cd vim\src |
| 222 | C:\VIM\SRC> |
| 223 | |
| 224 | and you type: |
| 225 | |
| 226 | make -f Make_ming.mak gvim.exe |
| 227 | |
| 228 | After churning for a while, you will end up with 'gvim.exe' in the 'vim\src' |
| 229 | directory. |
| 230 | |
| 231 | You should not need to do *any* editing of any files to get vim compiled this |
| 232 | 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] | 233 | is NOT recommended on Win32, especially on '95/'98!!!), you can use: |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 234 | |
| 235 | make -f Make_ming.mak GUI=no vim.exe |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 236 | |
| 237 | If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' |
| 238 | (also free!) and compress the file (typical compression is 50%). UPX can be |
| 239 | found at |
| 240 | http://www.upx.org/ |
| 241 | |
Bram Moolenaar | 9185627 | 2012-02-29 16:56:39 +0100 | [diff] [blame] | 242 | As of 2011, UPX still does not support compressing 64-bit EXE's; if you have |
| 243 | built a 64-bit vim then an alternative to UPX is 'MPRESS'. MPRESS can be found |
| 244 | at: |
| 245 | http://www.matcode.com/mpress.htm |
| 246 | |
| 247 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 248 | ADDITION: NLS support with MinGW |
| 249 | |
| 250 | (by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>) |
| 251 | |
| 252 | If you want National Language Support, read the file src/po/README_mingw.txt. |
| 253 | You need to uncomment lines in Make_ming.mak to have NLS defined. |
| 254 | |
| 255 | |
| 256 | 3. Cygwin |
| 257 | ========= |
| 258 | |
| 259 | Use Make_cyg.mak with Cygwin's GCC. See |
| 260 | http://users.skynet.be/antoine.mechelynck/vim/compile.htm |
| 261 | |
| 262 | The Cygnus one many not fully work yet. |
| 263 | With Cygnus gcc you can use the Unix Makefile instead (you need to get the |
| 264 | 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] | 265 | 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] | 266 | with the other makefiles). |
| 267 | |
| 268 | |
| 269 | 4. Borland |
| 270 | =========== |
| 271 | |
| 272 | Use Make_bc5.mak with Borland C++ 5.x. See |
| 273 | http://users.skynet.be/antoine.mechelynck/vim/compile.htm |
| 274 | |
| 275 | |
| 276 | 5. Cross compiling for Win32 from a Linux machine |
| 277 | ================================================= |
| 278 | |
| 279 | [Update of 1) needs to be verified] |
| 280 | |
| 281 | If you like, you can compile the 'mingw' Win32 version from the comfort of |
| 282 | your Linux (or other unix) box. To do this, you need to follow a few steps: |
| 283 | 1) Install the mingw32 cross-compiler. See |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 284 | http://www.mingw.org/wiki/LinuxCrossMinGW |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 285 | http://www.libsdl.org/extras/win32/cross/README.txt |
Bram Moolenaar | a7241f5 | 2008-06-24 20:39:31 +0000 | [diff] [blame] | 286 | 2) Get and unpack both the Unix sources and the extra archive |
| 287 | 3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'. |
| 288 | Make further changes to 'Make_ming.mak' as you wish. |
Bram Moolenaar | d8e21d3 | 2010-01-06 21:16:31 +0100 | [diff] [blame] | 289 | If your cross-compiler prefix differs from the predefined value, |
| 290 | set 'CROSS_COMPILE' corresponding. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 291 | 4) make -f Make_ming.mak gvim.exe |
| 292 | |
| 293 | Now you have created the Windows binary from your Linux box! Have fun... |
| 294 | |
| 295 | |
| 296 | 6. Building with Python support |
| 297 | =============================== |
| 298 | |
| 299 | (written by Ron Aaron: <ronaharon@yahoo.com>) |
| 300 | |
| 301 | This has been tested with the mingw32 compiler, and the ActiveState |
| 302 | ActivePython: |
| 303 | http://www.ActiveState.com/Products/ActivePython/ |
| 304 | |
| 305 | After installing the ActivePython, you will have to create a 'mingw32' |
| 306 | 'libpython20.a' to link with: |
| 307 | cd $PYTHON/libs |
| 308 | pexports python20.dll > python20.def |
| 309 | dlltool -d python20.def -l libpython20.a |
| 310 | |
| 311 | Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to |
| 312 | the root of the Python installation (C:\Python20, for example). If you are |
| 313 | cross-compiling on Linux with the mingw32 setup, you need to also convert all |
| 314 | the 'Include' files to *unix* line-endings. This bash command will do it |
| 315 | easily: |
| 316 | for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil |
| 317 | |
| 318 | Now just do: |
| 319 | make -f Make_ming.mak gvim.exe |
| 320 | |
| 321 | and you will end up with a Python-enabled, Win32 version. Enjoy! |
| 322 | |
| 323 | |
| 324 | 7. Building with MzScheme support |
| 325 | ================================= |
| 326 | |
| 327 | (written by Sergey Khorev <sergey.khorev@gmail.com>) |
| 328 | |
| 329 | Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can |
| 330 | be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and |
| 331 | above (including 299 and 30x series). |
| 332 | |
| 333 | The MSVC build is quite straightforward. Simply invoke (in one line) |
| 334 | nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme> |
| 335 | [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>] |
| 336 | where <MzScheme-version> is the last seven characters from MzScheme dll name |
| 337 | (libmzschXXXXXXX.dll). |
| 338 | If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme |
| 339 | DLL's, but will load them in runtime on demand. |
| 340 | |
| 341 | Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into |
| 342 | account that <Path-to-MzScheme> should contain slashes rather than backslashes |
| 343 | (e.g. d:/Develop/MzScheme) |
| 344 | |
| 345 | "Static" MzScheme support (Vim executable will depend on MzScheme DLLs |
| 346 | explicitly) on MinGW and Cygwin requires additional step. |
| 347 | |
| 348 | libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from |
| 349 | %WINDOWS%\System32 to other location (either build directory, some temporary |
| 350 | dir or even MzScheme home). |
| 351 | |
| 352 | Pass that path as MZSCHEME_DLLS parameter for Make. E.g., |
| 353 | make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000 |
| 354 | MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no |
| 355 | |
| 356 | After a successful build, these dlls can be freely removed, leaving them in |
| 357 | %WINDOWS%\System32 only. |
| 358 | |
| 359 | |
| 360 | 8. Windows 3.1x |
| 361 | =============== |
| 362 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 363 | make -f Make_w16.mak 16 bit, Borland C++ 5.0 |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 364 | |
| 365 | Warning: Be sure to use the right make.exe. It should be Borland make. |
| 366 | |
| 367 | You will almost certainly have to change the paths for libs and include files |
| 368 | in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of |
| 369 | warnings which can be ignored ( _chmod, precompiled header files, and |
| 370 | "possibly incorrect assignment"). |
| 371 | |
| 372 | The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to |
| 373 | remove unsupported compiler & liker options. |
| 374 | |
| 375 | For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER. |
| 376 | In MSVC 4.2 support for Win32s was dropped! Use this command: |
| 377 | nmake -f Make_mvc.mak GUI=yes |
| 378 | |
| 379 | |
| 380 | 9. MS-DOS |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 381 | ========= |
| 382 | |
| 383 | Summary: |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 384 | ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++ |
| 385 | ren Make_tcc.mak Makefile; make 16 bit, Turbo C |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 386 | make -f Make_djg.mak 32 bit, DJGPP 2.0 |
| 387 | make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to |
| 388 | define DOS) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 389 | |
| 390 | Warning: Be sure to use the right make.exe. Microsoft C make doesn't work; |
| 391 | Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak; |
| 392 | DJGPP/GNU make must be used for Make_djg.mak. |
| 393 | |
| 394 | The Borland C++ compiler has been used to generate the MS-DOS executable; it |
| 395 | should work without problems. You will probably have to change the paths for |
| 396 | LIBPATH and INCLUDEPATH in the start of the Makefile. You will get two |
| 397 | warnings which can be ignored (one about _chmod and one about precompiled |
| 398 | header files). |
| 399 | |
| 400 | The "spawno" library by Ralf Brown was used in order to free memory when Vim |
| 401 | starts a shell or other external command. Only about 200 bytes are taken from |
| 402 | conventional memory. When recompiling get the spawno library from Simtel, |
| 403 | directory "msdos/c". It is called something like "spwno413.zip". Or follow |
| 404 | the instructions in the Makefile to remove the library. |
| 405 | |
| 406 | The Turbo C Makefile has not been tested much lately. It is included for those |
| 407 | that don't have C++. You may need to make a few changes to get it to work. |
| 408 | |
| 409 | DJGPP needs to be installed properly to compile Vim; you need a lot of things |
| 410 | before it works. When your setup is OK, Vim should compile with just one |
| 411 | warning (about an argument to signal()). |
| 412 | |
| 413 | Make_bc5.mak is for those that have Borland C++ 5.0 or later. At the top of |
| 414 | the file, there are some variables you can change to make either a 32-bit |
| 415 | Windows exe (GUI or console mode), or a 16-bit MS-DOS version. |
Bram Moolenaar | 1cd871b | 2004-12-19 22:46:22 +0000 | [diff] [blame] | 416 | NOTE: multi-byte support is broken in the Borland libraries, not everything |
| 417 | will work properly! Esp. handling multi-byte file names. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 418 | |
Bram Moolenaar | 9729301 | 2011-07-18 19:40:27 +0200 | [diff] [blame] | 419 | If you get all kinds of strange error messages when compiling, try changing |
| 420 | the file format from "unix" to "dos". |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 421 | |
| 422 | |
| 423 | 10. Installing after building from sources |
| 424 | ========================================== |
| 425 | |
| 426 | [provided by Michael Soyka] |
| 427 | |
| 428 | After you've built the Vim binaries as described above, you're ready to |
| 429 | install Vim on your system. However, if you've obtained the Vim sources |
| 430 | using Mercurial or by downloading them as a unix tar file, you must first |
| 431 | create a "vim73" directory. If you instead downloaded the sources as |
| 432 | zip files, you can skip this setup as the zip archives already have the |
| 433 | correct directory structure. |
| 434 | |
| 435 | A. Create a Vim "runtime" subdirectory named "vim73" |
| 436 | ----------------------------------------------------- |
| 437 | If you obtained your Vim sources as zip files, you can skip this step. |
| 438 | Otherwise, continue reading. |
| 439 | |
| 440 | Go to the directory that contains the Vim "src" and "runtime" |
| 441 | directories and create a new subdirectory named "vim73". |
| 442 | |
| 443 | Copy the "runtime" files into "vim73": |
| 444 | copy runtime\* vim73 |
| 445 | |
| 446 | B. Copy the new binaries into the "vim73" directory |
| 447 | ---------------------------------------------------- |
| 448 | Regardless of how you installed the Vim sources, you need to copy the |
| 449 | new binaries you created above into "vim73": |
| 450 | |
| 451 | copy src\*.exe vim73 |
| 452 | copy src\GvimExt\gvimext.dll vim73 |
| 453 | copy src\xxd\xxd.exe vim73 |
| 454 | |
| 455 | C. Move the "vim73" directory into the Vim installation subdirectory |
| 456 | --------------------------------------------------------------------- |
| 457 | Move the "vim73" subdirectory into the subdirectory where you want Vim |
| 458 | to be installed. Typically, this subdirectory will be named "vim". |
| 459 | If you already have a "vim73" subdirectory in "vim", delete it first |
Bram Moolenaar | 9729301 | 2011-07-18 19:40:27 +0200 | [diff] [blame] | 460 | by running its uninstal.exe program. |
Bram Moolenaar | 734d998 | 2011-07-15 13:52:04 +0200 | [diff] [blame] | 461 | |
| 462 | D. Install Vim |
| 463 | --------------- |
| 464 | "cd" to your Vim installation subdirectory "vim\vim73" and run the |
| 465 | "install.exe" program. It will ask you a number of questions about |
| 466 | how you would like to have your Vim setup. Among these are: |
| 467 | - You can tell it to write a "_vimrc" file with your preferences in the |
| 468 | parent directory. |
| 469 | - It can also install an "Edit with Vim" entry in the Windows Explorer |
| 470 | popup menu. |
| 471 | - You can have it create batch files, so that you can run Vim from the |
| 472 | console or in a shell. You can select one of the directories in your |
| 473 | PATH or add the directory to PATH using the Windows Control Panel. |
| 474 | - Create entries for Vim on the desktop and in the Start menu. |
| 475 | |
| 476 | Happy Vimming! |