blob: b1e2309c394f77435f5ff6058930f45f0e028b5b [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001INSTALLpc.txt - Installation of Vim on PC
2
3This file contains instructions for compiling Vim. If you already have an
4executable version of Vim, you don't need this.
5
Bram Moolenaar362e1a32006-03-06 23:29:24 +00006More information can be found here: (Very stale now.)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
Bram Moolenaar362e1a32006-03-06 23:29:24 +00008 http://mywebpage.netscape.com/sharppeople/vim/howto/
Bram Moolenaar071d4272004-06-13 20:20:40 +00009
10The file "feature.h" can be edited to match your preferences. You can skip
11this, then you will get the default behavior as is documented, which should
12be fine for most people.
13
Bram Moolenaar734d9982011-07-15 13:52:04 +020014With the exception of two sections (Windows 3.1 and MS-DOS), this document
15assumes that you are building Vim for Win32 or later.
16(Windows 95/98/Me/NT/2000/XP/2003/Vista/7)
Bram Moolenaar362e1a32006-03-06 23:29:24 +000017
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
19Contents:
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000201. Microsoft Visual C++
212. Using MinGW
223. Cygwin
234. Borland
245. Cross compiling for Win32 from a Linux machine
256. Building with Python support
267. Building with MzScheme support
278. Windows 3.1
289. MS-DOS
29
Bram Moolenaar734d9982011-07-15 13:52:04 +02003010. Installing after building from sources
31
32
Bram Moolenaarc236c162008-07-13 17:41:49 +000033The currently preferred method is using the free Visual C++ Toolkit 2008
Bram Moolenaar536d95f2011-06-12 20:36:09 +020034|msvc-2008-express|, the produced binary runs on most MS-Windows systems. If
35you need the executable to run on Windows 98 or ME, use the 2003 one
36|msvc-2003-toolkit|.
Bram Moolenaar071d4272004-06-13 20:20:40 +000037
38
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000391. Microsoft Visual C++
40=======================
41
42Visual Studio
43-------------
44
Bram Moolenaar98385dc2008-06-20 14:52:32 +000045Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008)
Bram Moolenaar362e1a32006-03-06 23:29:24 +000046is straightforward. (These instructions should also work for VS 4 and VS 5.)
47
Bram Moolenaar97cc2382012-10-03 21:46:54 +020048Using VS C++ 2008 Express is recommended, the binaries build with that run on
49nearly all platforms. Binaries from later versions may not run on Windows 95
50or XP.
51
Bram Moolenaar362e1a32006-03-06 23:29:24 +000052To build Vim from the command line with MSVC, use Make_mvc.mak.
53Visual Studio installed a batch file called vcvars32.bat, which you must
54run to set up paths for nmake and MSVC.
55
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000056nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
57nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
58nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
Bram Moolenaar362e1a32006-03-06 23:29:24 +000059nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000060 Perl, Python, etc.
Bram Moolenaar362e1a32006-03-06 23:29:24 +000061
62Make_mvc.mak allows a Vim to be built with various different features and
63debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
64For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
65
66For compiling Gvim with IME support on far-east Windows, add IME=yes
67to the parameters you pass to Make_mvc.mak.
68
69To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project.
70(Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for
71far more configuration.) Make_ivc.mak can also be built with nmake.
72
73nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000074 GUI Microsoft Visual C++ 4.x or later
Bram Moolenaar362e1a32006-03-06 23:29:24 +000075nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000076 OLE Microsoft Visual C++ 4.x or later
Bram Moolenaar362e1a32006-03-06 23:29:24 +000077
78See the specific files for comments and options.
79
80These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
81Ron Aaron; they have been tested.
82
83
Bram Moolenaarc236c162008-07-13 17:41:49 +000084Visual C++ Toolkit 2003 *msvc-2003-toolkit*
Bram Moolenaar362e1a32006-03-06 23:29:24 +000085-----------------------
86
Bram Moolenaarc236c162008-07-13 17:41:49 +000087You could download the Microsoft Visual C++ Toolkit 2003 from
Bram Moolenaar362e1a32006-03-06 23:29:24 +000088 http://msdn.microsoft.com/visualc/vctoolkit2003/
Bram Moolenaarc236c162008-07-13 17:41:49 +000089Unfortunately this URL is no longer valid. Inofficial downloads appear to be
90available from links mentioned on these pages (use at your own risk):
91 http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html
92 http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit
93
Bram Moolenaar362e1a32006-03-06 23:29:24 +000094This contains the command-line tools (compiler, linker, CRT headers,
95and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE.
96To compile and debug Vim with the VC2003 Toolkit, you will also need
97|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
98and |windbg-download|.
99
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000100It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
101which is freely available in perpetuity.
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000102
103The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
104 http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
105(This site also takes you through configuring a number of other
106free C compilers for Win32.)
107
108To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first
109execute the following commands in a cmd.exe window (the msvcsetup.bat batch
110file can be used):
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000111
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000112 set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
113 call "%VCToolkitInstallDir%vcvars32.bat"
114 set MSVCVer=7.1
115 call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
116 set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
117
118Now you can build Vim with Make_mvc.mak.
119
120
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000121Getting the Windows Platform SDK *ms-platform-sdk*
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000122
123You will also need a copy of the Windows Platform SDK from
124 http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
125Specifically, you need the Windows Core SDK subset of the Platform SDK,
126which contains the Windows headers and libraries.
127
128
129Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist*
130
131You need the .NET Framework 1.1 Redistributable Package from
132 http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3
133or from Windows Update:
134 http://windowsupdate.microsoft.com/
135This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe,
136which is needed to link Vim.
137
138
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000139Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk*
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000140
141You need the .NET Framework 1.1 SDK from
142 http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d
143This contains some additional libraries needed to compile Vim,
144such as msvcrt.lib. You must install |dotnet-1.1-redist| before
145installing the .NET 1.1 SDK.
146
147
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000148Getting the WinDbg debugger *windbg-download*
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000149
150The Debugging Tools for Windows can be downloaded from
151 http://www.microsoft.com/whdc/devtools/debugging/default.mspx
152This includes the WinDbg debugger, which you will want if you ever need
153to debug Vim itself. An earlier version of the Debugging Tools
154is also available through the Platform SDK, |ms-platform-sdk|.
155
156
Bram Moolenaar98385dc2008-06-20 14:52:32 +0000157Visual C++ 2005 Express Edition *msvc-2005-express*
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000158-------------------------------
159
Bram Moolenaarfc1421e2006-04-20 22:17:20 +0000160Visual C++ 2005 Express Edition can be downloaded for free from:
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000161 http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
162This includes the IDE and the debugger. You will also need
163|ms-platform-sdk|. You can build Vim with Make_mvc.mak.
164
165Instructions for integrating the Platform SDK into VC Express:
166 http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
167
168
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000169Visual C++ 2008 Express Edition *msvc-2008-express*
170-------------------------------
171
172Visual C++ 2008 Express Edition can be downloaded for free from:
Bram Moolenaar442b4222010-05-24 21:34:22 +0200173 http://www.microsoft.com/express/downloads/
174This includes the IDE and the debugger.
175
176To set the environment execute the msvc2008.bat script. You can then build
177Vim with Make_mvc.mak.
178
Bram Moolenaar97cc2382012-10-03 21:46:54 +0200179For building 64 bit binaries you also need to install the SDK:
180"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
181You don't need the examples and documentation.
182
Bram Moolenaar442b4222010-05-24 21:34:22 +0200183
184Visual C++ 2010 Express Edition *msvc-2010-express*
185-------------------------------
186
187Visual C++ 2010 Express Edition can be downloaded for free from:
Bram Moolenaara7241f52008-06-24 20:39:31 +0000188 http://www.microsoft.com/express/vc/Default.aspx
189This includes the IDE and the debugger.
Bram Moolenaar0fde2902008-03-16 13:54:13 +0000190
Bram Moolenaar536d95f2011-06-12 20:36:09 +0200191To set the environment execute the msvc2010.bat script. You can then build
Bram Moolenaara7241f52008-06-24 20:39:31 +0000192Vim with Make_mvc.mak.
Bram Moolenaar98385dc2008-06-20 14:52:32 +0000193
194
Bram Moolenaarce2f2e02014-08-22 18:12:57 +0200195Targeting Windows XP with new MSVC *new-msvc-windows-xp*
196----------------------------------
197
198Beginning with Visual C++ 2010, Microsoft changed the behavior of LINK.EXE
199so that it targets Windows 6.0 (Vista) by default. In order to override
200this, the target Windows version number needs to be passed to LINK like
201follows:
202 LINK ... /subsystem:console,5.01
203
204Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
205Use lines like follows to target Windows XP (assuming using Visual C++ 2012
206under 64-bit Windows):
207 set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
208 set SDK_INCLUDE_DIR=%WinSdk71%\Include
209 set INCLUDE=%WinSdk71%\Include;%INCLUDE%
210 set LIB=%WinSdk71%\Lib;%LIB%
211 set PATH=%WinSdk71%\Bin;%PATH%
212 set CL=/D_USING_V110_SDK71_
213 nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
214
215The following Visual C++ team blog can serve as a reference page:
216 http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
217
218
Bram Moolenaar362e1a32006-03-06 23:29:24 +00002192. MinGW
220========
221
222(written by Ron Aaron: <ronaharon@yahoo.com>)
223
224This is about how to produce a Win32 binary of gvim with MinGW.
225
226First, you need to get the 'mingw32' compiler, which is free for the download
227at:
228
229 http://www.mingw.org/
230
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100231or you can use 'MinGW-w64' compiler.
232
233 http://mingw-w64.sourceforge.net/
234
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100235Or a compiler provided on msys2:
236
237 https://msys2.github.io/
238
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000239Once you have downloaded the compiler binaries, unpack them on your hard disk
240somewhere, and put them on your PATH. If you are on Win95/98 you can edit
241your AUTOEXEC.BAT file with a line like:
242
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100243 set PATH=C:\MinGW\bin;%PATH%
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000244
245or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100246System, Advanced, and edit the environment from there. If you use msys2
247compilers, set your installed paths:
248
249 C:\msys2\mingw32\bin
250
251for 32bit. And 64bit:
252
253 C:\msys2\mingw64\bin
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000254
255Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
256
257 C:\> gcc --version
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100258 gcc (GCC) 4.8.1
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000259
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100260 C:\> mingw32-make --version
261 GNU Make 3.82.90 (...etc...)
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000262
263Now you are ready to rock 'n' roll. Unpack the vim sources (look on
264www.vim.org for exactly which version of the vim files you need).
265
266Change directory to 'vim\src':
267
268 C:\> cd vim\src
269 C:\VIM\SRC>
270
271and you type:
272
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100273 mingw32-make -f Make_ming.mak gvim.exe
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000274
275After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
276directory.
277
278You should not need to do *any* editing of any files to get vim compiled this
279way. If, for some reason, you want the console-mode-only version of vim (this
Bram Moolenaar5e3dae82010-03-02 16:19:40 +0100280is NOT recommended on Win32, especially on '95/'98!!!), you can use:
Bram Moolenaard8e21d32010-01-06 21:16:31 +0100281
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100282 mingw32-make -f Make_ming.mak GUI=no vim.exe
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000283
284If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
285(also free!) and compress the file (typical compression is 50%). UPX can be
286found at
287 http://www.upx.org/
288
Bram Moolenaar91856272012-02-29 16:56:39 +0100289As of 2011, UPX still does not support compressing 64-bit EXE's; if you have
290built a 64-bit vim then an alternative to UPX is 'MPRESS'. MPRESS can be found
291at:
292 http://www.matcode.com/mpress.htm
293
294
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000295ADDITION: NLS support with MinGW
296
297(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
298
299If you want National Language Support, read the file src/po/README_mingw.txt.
300You need to uncomment lines in Make_ming.mak to have NLS defined.
301
302
3033. Cygwin
304=========
305
306Use Make_cyg.mak with Cygwin's GCC. See
307 http://users.skynet.be/antoine.mechelynck/vim/compile.htm
308
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100309With Cygnus gcc you should use the Unix Makefile instead (you need to get the
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000310Unix archive then). Then you get a Cygwin application (feels like Vim is
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100311running on Unix), while with Make_cyg.mak you get a Windows application (like
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000312with the other makefiles).
313
314
3154. Borland
316===========
317
318Use Make_bc5.mak with Borland C++ 5.x. See
319 http://users.skynet.be/antoine.mechelynck/vim/compile.htm
320
321
3225. Cross compiling for Win32 from a Linux machine
323=================================================
324
325[Update of 1) needs to be verified]
326
327If you like, you can compile the 'mingw' Win32 version from the comfort of
328your Linux (or other unix) box. To do this, you need to follow a few steps:
329 1) Install the mingw32 cross-compiler. See
Bram Moolenaard8e21d32010-01-06 21:16:31 +0100330 http://www.mingw.org/wiki/LinuxCrossMinGW
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000331 http://www.libsdl.org/extras/win32/cross/README.txt
Bram Moolenaara7241f52008-06-24 20:39:31 +0000332 2) Get and unpack both the Unix sources and the extra archive
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100333 3) in 'Make_cyg_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
334 Make further changes to 'Make_cyg_ming.mak' and 'Make_ming.mak' as you
335 wish. If your cross-compiler prefix differs from the predefined value,
Bram Moolenaard8e21d32010-01-06 21:16:31 +0100336 set 'CROSS_COMPILE' corresponding.
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000337 4) make -f Make_ming.mak gvim.exe
338
339Now you have created the Windows binary from your Linux box! Have fun...
340
341
3426. Building with Python support
343===============================
344
Bram Moolenaar97cc2382012-10-03 21:46:54 +0200345For building with MSVC 2008 the "Windows Installer" from www.python.org
346works fine.
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000347
Bram Moolenaar97cc2382012-10-03 21:46:54 +0200348(rest written by Ron Aaron: <ronaharon@yahoo.com>)
349
350Building with the mingw32 compiler, and the ActiveState ActivePython:
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000351 http://www.ActiveState.com/Products/ActivePython/
352
353After installing the ActivePython, you will have to create a 'mingw32'
354'libpython20.a' to link with:
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100355 cd $PYTHON/libs
356 pexports python20.dll > python20.def
357 dlltool -d python20.def -l libpython20.a
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000358
359Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
360the root of the Python installation (C:\Python20, for example). If you are
361cross-compiling on Linux with the mingw32 setup, you need to also convert all
362the 'Include' files to *unix* line-endings. This bash command will do it
363easily:
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100364 for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000365
366Now just do:
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100367 make -f Make_ming.mak gvim.exe
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000368
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100369And if you use msys2 to build python support (as one line):
370
371 mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64
372 PYTHON_HOME=c:/msys64/mingw64
373 PYTHONINC=-Ic:/msys64/mingw64/include/python2.7
374 DYNAMIC_PYTHON=yes
375 PYTHON_VER=27
376 DYNAMIC_PYTHON_DLL=libpython2.7.dll
377 ARCH=x86-64
378 STATIC_STDCPLUS=yes
379
380You will end up with a Python-enabled, Win32 version. Enjoy!
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000381
382
3837. Building with MzScheme support
384=================================
385
386(written by Sergey Khorev <sergey.khorev@gmail.com>)
387
388Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
389be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
390above (including 299 and 30x series).
391
392The MSVC build is quite straightforward. Simply invoke (in one line)
393nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
394 [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
395where <MzScheme-version> is the last seven characters from MzScheme dll name
396(libmzschXXXXXXX.dll).
397If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
398DLL's, but will load them in runtime on demand.
399
400Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
401account that <Path-to-MzScheme> should contain slashes rather than backslashes
402(e.g. d:/Develop/MzScheme)
403
404"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
405explicitly) on MinGW and Cygwin requires additional step.
406
407libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
408%WINDOWS%\System32 to other location (either build directory, some temporary
409dir or even MzScheme home).
410
411Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
412make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
413 MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
414
415After a successful build, these dlls can be freely removed, leaving them in
416%WINDOWS%\System32 only.
417
418
4198. Windows 3.1x
420===============
421
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000422make -f Make_w16.mak 16 bit, Borland C++ 5.0
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000423
424Warning: Be sure to use the right make.exe. It should be Borland make.
425
426You will almost certainly have to change the paths for libs and include files
427in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
428warnings which can be ignored ( _chmod, precompiled header files, and
429"possibly incorrect assignment").
430
431The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
432remove unsupported compiler & liker options.
433
434For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
435In MSVC 4.2 support for Win32s was dropped! Use this command:
436 nmake -f Make_mvc.mak GUI=yes
437
438
4399. MS-DOS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000440=========
441
442Summary:
Bram Moolenaar362e1a32006-03-06 23:29:24 +0000443ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
444ren Make_tcc.mak Makefile; make 16 bit, Turbo C
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000445make -f Make_djg.mak 32 bit, DJGPP 2.0
446make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to
447 define DOS)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000448
449Warning: Be sure to use the right make.exe. Microsoft C make doesn't work;
450Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak;
451DJGPP/GNU make must be used for Make_djg.mak.
452
453The Borland C++ compiler has been used to generate the MS-DOS executable; it
454should work without problems. You will probably have to change the paths for
455LIBPATH and INCLUDEPATH in the start of the Makefile. You will get two
456warnings which can be ignored (one about _chmod and one about precompiled
457header files).
458
459The "spawno" library by Ralf Brown was used in order to free memory when Vim
460starts a shell or other external command. Only about 200 bytes are taken from
461conventional memory. When recompiling get the spawno library from Simtel,
462directory "msdos/c". It is called something like "spwno413.zip". Or follow
463the instructions in the Makefile to remove the library.
464
465The Turbo C Makefile has not been tested much lately. It is included for those
466that don't have C++. You may need to make a few changes to get it to work.
467
468DJGPP needs to be installed properly to compile Vim; you need a lot of things
469before it works. When your setup is OK, Vim should compile with just one
470warning (about an argument to signal()).
471
472Make_bc5.mak is for those that have Borland C++ 5.0 or later. At the top of
473the file, there are some variables you can change to make either a 32-bit
474Windows exe (GUI or console mode), or a 16-bit MS-DOS version.
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000475NOTE: multi-byte support is broken in the Borland libraries, not everything
476will work properly! Esp. handling multi-byte file names.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000477
Bram Moolenaar97293012011-07-18 19:40:27 +0200478If you get all kinds of strange error messages when compiling, try changing
479the file format from "unix" to "dos".
Bram Moolenaar734d9982011-07-15 13:52:04 +0200480
481
48210. Installing after building from sources
483==========================================
484
485[provided by Michael Soyka]
486
487After you've built the Vim binaries as described above, you're ready to
488install Vim on your system. However, if you've obtained the Vim sources
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100489using Mercurial or by downloading them as a unix tar file, you must first
Bram Moolenaar734d9982011-07-15 13:52:04 +0200490create a "vim73" directory. If you instead downloaded the sources as
491zip files, you can skip this setup as the zip archives already have the
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100492correct directory structure.
Bram Moolenaar734d9982011-07-15 13:52:04 +0200493
494 A. Create a Vim "runtime" subdirectory named "vim73"
495 -----------------------------------------------------
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100496 If you obtained your Vim sources as zip files, you can skip this step.
Bram Moolenaar734d9982011-07-15 13:52:04 +0200497 Otherwise, continue reading.
498
499 Go to the directory that contains the Vim "src" and "runtime"
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100500 directories and create a new subdirectory named "vim73".
501
Bram Moolenaar734d9982011-07-15 13:52:04 +0200502 Copy the "runtime" files into "vim73":
503 copy runtime\* vim73
504
505 B. Copy the new binaries into the "vim73" directory
506 ----------------------------------------------------
507 Regardless of how you installed the Vim sources, you need to copy the
508 new binaries you created above into "vim73":
509
510 copy src\*.exe vim73
511 copy src\GvimExt\gvimext.dll vim73
512 copy src\xxd\xxd.exe vim73
513
514 C. Move the "vim73" directory into the Vim installation subdirectory
515 ---------------------------------------------------------------------
516 Move the "vim73" subdirectory into the subdirectory where you want Vim
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100517 to be installed. Typically, this subdirectory will be named "vim".
Bram Moolenaar734d9982011-07-15 13:52:04 +0200518 If you already have a "vim73" subdirectory in "vim", delete it first
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100519 by running its uninstal.exe program.
Bram Moolenaar734d9982011-07-15 13:52:04 +0200520
521 D. Install Vim
522 ---------------
523 "cd" to your Vim installation subdirectory "vim\vim73" and run the
524 "install.exe" program. It will ask you a number of questions about
525 how you would like to have your Vim setup. Among these are:
526 - You can tell it to write a "_vimrc" file with your preferences in the
527 parent directory.
528 - It can also install an "Edit with Vim" entry in the Windows Explorer
529 popup menu.
530 - You can have it create batch files, so that you can run Vim from the
531 console or in a shell. You can select one of the directories in your
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100532 PATH or add the directory to PATH using the Windows Control Panel.
Bram Moolenaar734d9982011-07-15 13:52:04 +0200533 - Create entries for Vim on the desktop and in the Start menu.
534
535Happy Vimming!