annotate src/INSTALLpc.txt @ 43:f55897d6921d v7.0026

updated for version 7.0026
author vimboss
date Wed, 29 Dec 2004 21:03:02 +0000
parents 410fa1a31baf
children 5cc0aca13a3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 INSTALLpc.txt - Installation of Vim on PC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 This file contains instructions for compiling Vim. If you already have an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 executable version of Vim, you don't need this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 More information can be found here:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 http://mywebpage.netscape.com/sharppeople/vim/howto/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 The file "feature.h" can be edited to match your preferences. You can skip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 this, then you will get the default behavior as is documented, which should
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 be fine for most people.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 Contents:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 1. MS-DOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 2. Win32 (Windows NT and Windows 95)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 3. Windows NT with OpenNT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 4. Windows 3.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 5. Using Mingw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 6. Cross compiling for Win32 from a Linux machine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 7. Building with Python support
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 1. MS-DOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 =========
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 Summary:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 ren Make_tcc.mak Makefile; make 16 bit, Turbo C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 make -f Make_djg.mak 32 bit, DJGPP 2.0
39
410fa1a31baf updated for version 7.0023
vimboss
parents: 7
diff changeset
32 make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 define DOS)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 Warning: Be sure to use the right make.exe. Microsoft C make doesn't work;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 DJGPP/GNU make must be used for Make_djg.mak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 The Borland C++ compiler has been used to generate the MS-DOS executable; it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 should work without problems. You will probably have to change the paths for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 LIBPATH and INCLUDEPATH in the start of the Makefile. You will get two
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 warnings which can be ignored (one about _chmod and one about precompiled
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 header files).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 The "spawno" library by Ralf Brown was used in order to free memory when Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 starts a shell or other external command. Only about 200 bytes are taken from
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 conventional memory. When recompiling get the spawno library from Simtel,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 directory "msdos/c". It is called something like "spwno413.zip". Or follow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 the instructions in the Makefile to remove the library.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 The Turbo C Makefile has not been tested much lately. It is included for those
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 that don't have C++. You may need to make a few changes to get it to work.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 DJGPP needs to be installed properly to compile Vim; you need a lot of things
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 before it works. When your setup is OK, Vim should compile with just one
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 warning (about an argument to signal()).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 Make_bc5.mak is for those that have Borland C++ 5.0 or later. At the top of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 the file, there are some variables you can change to make either a 32-bit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 Windows exe (GUI or console mode), or a 16-bit MS-DOS version.
39
410fa1a31baf updated for version 7.0023
vimboss
parents: 7
diff changeset
61 NOTE: multi-byte support is broken in the Borland libraries, not everything
410fa1a31baf updated for version 7.0023
vimboss
parents: 7
diff changeset
62 will work properly! Esp. handling multi-byte file names.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
39
410fa1a31baf updated for version 7.0023
vimboss
parents: 7
diff changeset
64 If you get all kinds of strange error messages when compiling, try adding
410fa1a31baf updated for version 7.0023
vimboss
parents: 7
diff changeset
65 changing the file format from "unix" to "dos".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 2. Win32 (Windows NT and Windows 95)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 ====================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 Summary:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 vcvars32 Setup paths for nmake and MSVC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 Perl, Python, etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 Microsoft Visual C++
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 make -f Make_bc5.mak GUI Borland C++ 5.x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 make -f Make_bc5.mak console Borland C++ 5.x (change the file)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 GUI Microsoft Visual C++ 4.x or later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 OLE Microsoft Visual C++ 4.x or later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 make -f Make_cyg.mak various Cygnus gcc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 make -f Make_mingw.mak various MingW with gcc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 See the specific files for comments and options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 Ron Aaron; they have been tested. The Cygnus one many not fully work yet.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 With Cygnus gcc you can use the Unix Makefile instead (you need to get the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 Unix archive then). Then you get a Cygwin application (feels like Vim is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 runnin on Unix), while with Make_cyg.mak you get a Windows application (like
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 with the other makefiles).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 You can also use the Visual C++ IDE: use File/Open workspace, select the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 Make_ivc.mak file, then select Build/Build all. This builds the GUI version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 by default.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 Vim for Win32 compiles with the Microsoft Visual C++ 2.0 compiler and later,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 and with the Borland C++ 4.5 32-bit compiler and later. It compiles on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 Windows 95 and all four NT platforms: i386, Alpha, MIPS, and PowerPC. The
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 NT/i386 and the Windows 95 binaries are identical. Use Make_mvc.mak to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 compile with Visual C++ and Make_bc5.mak to compile with Borland C++.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 Make_mvc.mak allows a Vim to be built with various different features and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 For compiling Gvim with IME support on far-east Windows, uncomment the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 MULTI_BYTE_IME define in the src/feature.h file before compiling.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 The Win32 console binary was compiled with Visual C++ version 5.0, using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 Make_mvc.mak and Make_bc5.mak (Borland C). Other compilers should also work.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 If you get all kinds of strange error messages when compiling (you shouldn't
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 with the Microsoft or Borland 32-bit compilers), try adding <CR> characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 at the end of each line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 You probably need to run "vcvars32" before using "nmake".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 In version 4.2 support for Win32s was dropped! Use this command:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 nmake -f Make_mvc.mak GUI=yes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 See the respective Makefiles for more comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 3. Windows NT with OpenNT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 =========================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 (contributed by Michael A. Benzinger)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 Building Vim on OpenNT 2.0 on Windows NT 4.0, with Softway's prerelease gcc:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 1. export CONFIG_SHELL=//D/OpenNT/bin/sh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 2. Make the following exports for modifying config.mk:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 export CFLAGS=-O -Wshadow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 export X_PRE_LIBS=-lXmu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 2. Run configure as follows:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Motif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 If you don't have OpenNTif (Motif support), use this:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Athena
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 3. Edit Makefile to perform the following since the Makefile include syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 differs from that of gmake:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 #include config.mk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 .include "config.mk"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 4. Change all install links to be "ln -f" and not "ln -s".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 5. Change to the 'ctags' directory and configure.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 6. Edit the Makefile and remove spurious spaces from lines 99 and 114.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 7. Change slink to "ln -f" from "ln -s".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 8. Return to the src directory.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 9. make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 4. Windows 3.1x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 ===============
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 make -f Make_w16.mak 16 bit, Borland C++ 5.0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 Warning: Be sure to use the right make.exe. It should be Borland make.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 You will almost certainly have to change the paths for libs and include files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 warnings which can be ignored ( _chmod, precompiled header files, and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 "possibly incorrect assignment").
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 remove unsupported compiler & liker options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 5. Mingw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 ========
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 (written by Ron Aaron: <ronaharon@yahoo.com>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 This is about how to produce a Win32 binary of gvim with Mingw.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 First, you need to get the 'mingw32' compiler, which is free for the download
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 at:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 http://www.mingw.org/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 Once you have downloaded the compiler binaries, unpack them on your hard disk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 somewhere, and put them on your PATH. If you are on Win95/98 you can edit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 your AUTOEXEC.BAT file with a line like:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 set PATH=C:\GCC-2.95.2\BIN;%PATH%
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 or on NT/2000, go to the Control Panel, System, and edit the environment from
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 there.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 Test if gcc is on your path. From a CMD (or COMMAND on '95/98):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 C:\> gcc --version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 2.95.2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 C:\> make --version
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 GNU Make version 3.77 (...etc...)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 Now you are ready to rock 'n' roll. Unpack the vim sources (look on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 www.vim.org for exactly which version of the vim files you need).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 Change directory to 'vim\src':
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 C:\> cd vim\src
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 C:\VIM\SRC>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 and you type:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 make -f Make_ming.mak gvim.exe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 directory.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 You should not need to do *any* editing of any files to get vim compiled this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 way. If, for some reason, you want the console-mode-only version of vim (this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 is NOT recommended on Win32, especially on '95/'98!!!), you need only change
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 (also free!) and compress the file (typical compression is 50%). UPX can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 found at
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 http://upx.tsx.org/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 ADDITION: NLS support with Mingw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 (by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 If you want National Language Support, read the file src/po/README_mingw.txt.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 You need to uncomment lines in Make_ming.mak to have NLS defined.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 6. Cross compiling for Win32 from a Linux machine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 =================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 (written by Ron Aaron: <ronaharon@yahoo.com> with help from
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 Martin Kahlert <martin.kahlert@infineon.com>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 If you like, you can compile the 'mingw' Win32 version from the comfort of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 your Linux (or other unix) box. To do this, you need to follow a few steps:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 1) Install the mingw32 cross-compiler (if you have it, go to step 2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 1a) from 'ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1',
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 get:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 binutils-19990818-1-src.tar.gz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 mingw-msvcrt-20000203.zip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 gcc-2.95.2-1-x86-win32.diff.gz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 1b) from 'http://gcc.gnu.org/' get:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 gcc-2.95.2.tar.gz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 1c) create a place to put the compiler source and binaries:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 (assuming you are in the home directory)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 mkdir gcc-bin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 mkdir gcc-src
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 1d) unpack the sources:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 cd gcc-src
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 tar xzf ../binutils-19990818-1-src.tar.gz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 tar xzf ../gcc-2.95.2.tar.gz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 unzip ../mingw-msvcrt-20000203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 1e) build the different tools:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 export PREFIX=~/gcc-bin/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 cd gcc-2.95.2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 zcat ../gcc-2.95.2-1-x86-win32.diff.gz | patch -p1 -E
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 cd ../binutils-19990818
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 ./configure --target=i586-pc-mingw32msvc --prefix=$PREFIX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 make install
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 cd ../gcc-2.95.2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 ./configure --target=i586-pc-mingw32msvc \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 --with-libs=~/gcc-bin/i386-mingw32msvc/lib \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 --with-headers=~/gcc-bin/i386-mingw32msvc/include \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 --enable-languages=c++ \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 --prefix=$PREFIX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 make install
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 1f) Add $PREFIX/bin to your $PATH.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 2) get the *unix* version of the vim sources
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 3) in 'Make_ming.mak', set 'CROSS' to '1' instead of '0'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 4) make -f Make_ming.mak gvim.exe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 Now you have created the Windows binary from your Linux box! Have fun...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 7. Building with Python support
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 =================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 (written by Ron Aaron: <ronaharon@yahoo.com>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 This has been tested with the mingw32 compiler, and the ActiveState
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 ActivePython:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 http://www.ActiveState.com/Products/ActivePython/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 After installing the ActivePython, you will have to create a 'mingw32'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 'libpython20.a' to link with:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 cd $PYTHON/libs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 pexports python20.dll > python20.def
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 dlltool -d python20.def -l libpython20.a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 the root of the Python installation (C:\Python20, for example). If you are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 cross-compiling on Linux with the mingw32 setup, you need to also convert all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 the 'Include' files to *unix* line-endings. This bash command will do it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 easily:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 Now just do:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 make -f Make_ming.mak gvim.exe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 and you will end up with a Python-enabled, Win32 version. Enjoy!