diff options
Diffstat (limited to '')
-rw-r--r-- | src/INSTALL | 384 | ||||
-rw-r--r-- | src/INSTALLami.txt | 34 | ||||
-rw-r--r-- | src/INSTALLmac.txt | 72 | ||||
-rw-r--r-- | src/INSTALLpc.txt | 1051 | ||||
-rw-r--r-- | src/INSTALLvms.txt | 393 | ||||
-rw-r--r-- | src/INSTALLx.txt | 165 |
6 files changed, 2099 insertions, 0 deletions
diff --git a/src/INSTALL b/src/INSTALL new file mode 100644 index 0000000..3da9141 --- /dev/null +++ b/src/INSTALL @@ -0,0 +1,384 @@ +INSTALL - Installation of Vim on different machines. + +This file contains instructions for compiling Vim. If you already have an +executable version of Vim, you don't need this. + +Contents: +1. Generic +2. Unix +3. OS/2 (with EMX 0.9b) +4. Atari MiNT + +See INSTALLami.txt for Amiga +See INSTALLmac.txt for Macintosh +See INSTALLpc.txt for PC (Windows XP/Vista/7/8/10) +See INSTALLvms.txt for VMS +See INSTALLx.txt for cross-compiling on Unix +See ../READMEdir/README_390.txt for z/OS and OS/390 Unix +See ../runtime/doc/os_beos.txt for BeBox + + +1. Generic +========== + +If you compile Vim without specifying anything, you will get the default +behaviour as is documented, which should be fine for most people. + +For features that you can't enable/disable in another way, you can edit the +file "feature.h" to match your preferences. + + +2. Unix +======= + +Summary: +1. make run configure, compile and link +2. make install installation in /usr/local + +This will include the GUI and X11 libraries, if you have them. If you want a +version of Vim that is small and starts up quickly, see the Makefile for how +to disable the GUI and X11. If you don't have GUI libraries and/or X11, these +features will be disabled automatically. + +See the start of Makefile for more detailed instructions about how to compile +Vim. + +If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS +before starting configure. Example: + + env CFLAGS=-I/usr/local/include LIBS=-lm make + +This is only needed for things that configure doesn't offer a specific argument +for or figures out by itself. First try running configure without extra +arguments. + +GNU Autoconf and a few other tools have been used to make Vim work on many +different Unix systems. The advantage of this is that Vim should compile +on most systems without any adjustments. The disadvantage is that when +adjustments are required, it takes some time to understand what is happening. + +If configure finds all library files and then complains when linking that some +of them can't be found, your linker doesn't return an error code for missing +libraries. Vim should be linked fine anyway, mostly you can just ignore these +errors. + +If you run configure by hand (not using the Makefile), remember that any +changes in the Makefile have no influence on configure. This may be what you +want, but maybe not! + +The advantage of running configure separately, is that you can write a script +to build Vim, without changing the Makefile or feature.h. Example (using sh): + + CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif + +One thing to watch out for: If the configure script itself changes, running +"make" will execute it again, but without your arguments. Do "make clean" and +run configure again. + +If you are compiling Vim for several machines, for each machine: + a. make shadow + b. mv shadow machine_name + c. cd machine_name + d. make; make install + +[Don't use a path for machine_name, just a directory name, otherwise the links +that "make shadow" creates won't work.] + + +Unix: COMPILING WITH/WITHOUT GUI + +NOTE: This is incomplete, look in Makefile for more info. + +These configure arguments can be used to select which GUI to use: +--enable-gui=gtk or: gtk2, motif, athena or auto +--disable-gtk-check +--disable-motif-check +--disable-athena-check + +--enable-gui defaults to "auto", so it will automatically look for a GUI (in +the order of GTK, Motif, then Athena). If one is found, then is uses it and +does not proceed to check any of the remaining ones. Otherwise, it moves on +to the next one. + +--enable-{gtk,gtk2,kde,motif,athena}-check all default to "yes", such that if +--enable-gui is "auto" (which it is by default), GTK, Motif, and Athena will +be checked for. If you want to *exclude* a certain check, then you use +--disable-{gtk,gtk2,kde,motif,athena}-check. + +For example, if --enable-gui is set to "auto", but you don't want it look for +Motif, you then also specify --disable-motif-check. This results in only +checking for GTK and Athena. + +Lastly, if you know which one you want to use, then you can just do +--enable-gui={gtk,gtk2,kde,motif,athena}. So if you wanted to only use Motif, +then you'd specify --enable-gui=motif. Once you specify what you want, the +--enable-{gtk,gtk2,kde,motif,athena}-check options are ignored. + +On Linux you usually need GUI "-devel" packages. You may already have GTK +libraries installed, but that doesn't mean you can compile Vim with GTK, you +also need the header files. + +For compiling with the GTK+ GUI, you need a recent version of glib and gtk+. +Configure checks for at least version 1.1.16. An older version is not selected +automatically. If you want to use it anyway, run configure with +"--disable-gtktest". +GTK requires an ANSI C compiler. If you fail to compile Vim with GTK+ (it +is the preferred choice), try selecting another one in the Makefile. +If you are sure you have GTK installed, but for some reason configure says you +do not, you may have left-over header files and/or library files from an older +(and incompatible) version of GTK. if this is the case, please check +auto/config.log for any error messages that may give you a hint as to what's +happening. + +There used to be a KDE version of Vim, using Qt libraries, but since it didn't +work very well and there was no maintainer it was dropped. + + +Unix: COMPILING WITH MULTI-BYTE + +When you want to compile with the multi-byte features enabled, make sure you +compile on a machine where the locale settings actually work, otherwise the +configure tests may fail. You need to compile with "big" features: + + ./configure --with-features=big + +Unix: COMPILING ON LINUX + +On Linux, when using -g to compile (which is default for gcc), the executable +will probably be statically linked. If you don't want this, remove the -g +option from CFLAGS. + +Unix: PUTTING vimrc IN /etc + +Some Linux distributions prefer to put the global vimrc file in /etc, and the +Vim runtime files in /usr. This can be done with: + ./configure --prefix=/usr + make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e" + +Unix: COMPILING ON NeXT + +Add the "-posix" argument to the compiler by using one of these commands: + setenv CC 'cc -posix' (csh) + export CC='cc -posix' (sh) +And run configure with "--disable-motif-check". + +Unix: LOCAL HEADERS AND LIBRARIES NOT IN /usr/local + +Sometimes it is necessary to search different path than /usr/local for locally +installed headers (/usr/local/include) and libraries (/usr/local/lib). +To search /stranger/include and /stranger/lib for locally installed +headers and libraries, use: + ./configure --with-local-dir=/stranger +And to not search for locally installed headers and libraries at all, use: + ./configure --without-local-dir + + +3. OS/2 +======= + +OS/2 support was removed in patch 7.4.1008 + + +4. Atari MiNT +============= + +[NOTE: this is quite old, it might not work anymore] + +To compile Vim for MiNT you may either copy Make_mint.mak to Makefile or use +the Unix Makefile adapted for the MiNT configuration. + +Now proceed as described in the Unix section. + +Prerequisites: + +You need a curses or termcap library that supports non-alphanumeric +termcap names. If you don't have any, link with termlib.o. + +----------------------------------------------------------------------------- + +The rest of this file is based on the INSTALL file that comes with GNU +autoconf 2.12. Not everything applies to Vim. Read Makefile too! + + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.ac' is used to create `configure' by a program +called `autoconf'. You only need `configure.ac' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/src/INSTALLami.txt b/src/INSTALLami.txt new file mode 100644 index 0000000..0acd6fd --- /dev/null +++ b/src/INSTALLami.txt @@ -0,0 +1,34 @@ +INSTALLami.txt - Installation of Vim from source on Amiga + +This file contains instructions for compiling Vim. If you already have an +executable version of Vim, you don't need this. + +The file "feature.h" can be edited to match your preferences. You can skip +this, then you will get the default behavior as is documented, which should +be fine for most people. + + +Summary: +make -f Make_manx.mak Manx C +make -f Make_sas.mak Lattice/SAS C +make -f Make_dice.mak DICE + +The Manx compiler is preferred, it was used to produce the Amiga executable +and has been tested most. You should not get any errors or warnings. + +The SAS compiler can be used. Older versions (6.0 to 6.3) don't work with the +optimizer switched on. This seems to be fixed with 6.5 or 6.56, but this has +not been tested much. Also disable optimizing when the compiler runs out of +memory or crashes the system (yes, that happens; did I say the Manx compiler +is preferred?). + +The DICE makefile has been reported to work by one person only. + +You will have to set the "VIM" environment variable to the location of the +documentation files. + + +MorphOS + +Use the Make_morph.mak Makefile: + make -f Make_morph.mak diff --git a/src/INSTALLmac.txt b/src/INSTALLmac.txt new file mode 100644 index 0000000..e957682 --- /dev/null +++ b/src/INSTALLmac.txt @@ -0,0 +1,72 @@ +INSTALLmac.txt - Installation of Vim on Macintosh + +This file contains instructions for compiling Vim. If you already have an +executable version of Vim, you don't need this. + +First, make sure you've installed Xcode or CommandLineToots. If not, open a +terminal and do + + $ make --version + +A window pops up instructing you to install the developer tools. + + +---------------------------------------------------------------------------- +Summary +---------------------------------------------------------------------------- + +1 MacOS X + 1.1. Carbon interface + 1.2. X (Athena, GTK, Motif) or plain text. + +MacOS Classic is no longer supported. If you really want it use Vim 6.4. + +---------------------------------------------------------------------------- +1 MacOS X +---------------------------------------------------------------------------- + +1.0 Considerations + + Only '/' supported as path separator. + +1.1 Carbon interface (default) + + You can compile vim with the standard Unix routine: + cd .../src + make + make test + sudo make install + + "make" will create a working Vim.app application bundle in the src + directory. You can move this bundle (the Vim.app directory) anywhere + you want. Or use "make install" to move it to /Applications. + + You need at least Xcode 1.5 to compile Vim 7.0. + + Configure will create a universal binary if possible. This requires + installing the universal SDK (currently for 10.4). + + To overrule the architecture do this before running make: + + ./configure --with-mac-arch=intel + or + ./configure --with-mac-arch=ppc + + +1.2 X-Windows or Plain Text + + If you do not want the Carbon interface, you must explicitly tell + configure to use a different GUI. + + cd .../src + ./configure --disable-darwin --enable-gui=gtk2 + make; make install + + NOTE: The following GUI options are supported: + no (for text), motif, athena, nextaw + gtk, gtk2, gnome, gnome2, + + NOTE: You need to first install XFree86 and XDarwin. + Please visit http://www.XDarwin.org + +------------------------------------------------------ diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt new file mode 100644 index 0000000..634f4ad --- /dev/null +++ b/src/INSTALLpc.txt @@ -0,0 +1,1051 @@ +INSTALLpc.txt - Installation of Vim on PC + +This file contains instructions for compiling Vim. If you already have an +executable version of Vim, you don't need this. + +You can find the latest here: https://github.com/vim/vim-win32-installer +This page also has links to install support for interfaces such as Perl, +Python, Lua, etc. + +The file "feature.h" can be edited to match your preferences. You can skip +this, then you will get the default behavior as is documented, which should +be fine for most people. + +This document assumes that you are building Vim for Win32 or later (Windows +XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but +they might no longer work. + +The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can +build a 64 bit Vim if you like, the executable will be bigger and Vim won't be +any faster, but you can edit files larger than 2 Gbyte. + + +Contents: +1. Microsoft Visual C++ +2. Using MSYS2 with MinGW +3. Using MinGW +4. Cygwin +5. Borland +6. Cross compiling for Win32 from a Linux machine +7. Building with Python support +8. Building with Python3 support +9. Building with Racket or MzScheme support +10. Building with Lua support +11. Building with Perl support +12. Building with Ruby support +13. Building with Tcl support +14. Building with Terminal support +15. Building with DirectX (DirectWrite) support +16. Windows 3.1 +17. MS-DOS + +18. Installing after building from sources + + +The currently recommended way (that means it has been verified to work) is +using the "Visual Studio Community 2015" installation. This includes the SDK +needed to target Windows XP. But not older Windows versions (95, 98), see +|msvc-2008-express| below for that + + +1. Microsoft Visual C++ +======================= + +We do not provide download links, since Microsoft keeps changing them. You +can search for "Visual Studio Community 2015", for example. You will need to +create a Microsoft account (it's free). + +When installing "Visual Studio Community 2015 with Update 3" make sure to +select "custom" and check "Windows XP Support for C++" and all checkboxes +under "Universal Windows App Development Tools" + + +Visual Studio +------------- + +Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008, +VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions +should also work for VS 4 and VS 5.) + +Using VS C++ 2008 Express is recommended if you need the binary to run on +Windows 95 or 97, see |msvc-2008-express| below. + +To build Vim from the command line with MSVC, use Make_mvc.mak. +Visual Studio installed a batch file called vcvars32.bat, which you must +run to set up paths for nmake and MSVC. + +nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++ +nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++ +nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++ +nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc. + Perl, Python, etc. + +Make_mvc.mak allows a Vim to be built with various different features and +debug support. Debugging with MS Devstudio is provided by Make_dvc.mak. +For a description of the use of Make_dvc.mak, look in Make_mvc.mak. + +For compiling Gvim with IME support on far-east Windows, add IME=yes +to the parameters you pass to Make_mvc.mak. + +To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project. +(Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for +far more configuration.) Make_ivc.mak can also be built with nmake. + +nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim" + GUI Microsoft Visual C++ 4.x or later +nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE" + OLE Microsoft Visual C++ 4.x or later + +See the specific files for comments and options. + +These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and +Ron Aaron; they have been tested. + + +Visual C++ 2008 Express Edition *msvc-2008-express* +------------------------------- + +Visual C++ 2008 Express Edition can be downloaded for free from: + http://www.microsoft.com/express/downloads/ +This includes the IDE and the debugger. + +To set the environment execute the msvc2008.bat script. You can then build +Vim with Make_mvc.mak. + +For building 64 bit binaries you also need to install the SDK: +"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" +You don't need the examples and documentation. + +If you get an error that Win32.mak can't be found, you have to set the +variable SDK_INCLUDE_DIR. For example, on Windows 10, installation of MSVC +puts include files in the following directory: + set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include + + +Visual C++ 2010 Express Edition *msvc-2010-express* +------------------------------- + +Visual C++ 2010 Express Edition can be downloaded for free from: + http://www.microsoft.com/express/vc/Default.aspx +This includes the IDE and the debugger. + +To set the environment execute the msvc2010.bat script. You can then build +Vim with Make_mvc.mak. + + +Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp* +--------------------------------------------- + +Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE +so that it targets Windows 6.0 (Vista) by default. In order to override +this, the target Windows version number needs to be passed to LINK like +follows: + LINK ... /subsystem:console,5.01 + +Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version. +Use lines like follows to target Windows XP x86 (assuming using Visual C++ +2012 under 64-bit Windows): + set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A + set INCLUDE=%WinSdk71%\Include;%INCLUDE% + set LIB=%WinSdk71%\Lib;%LIB% + set CL=/D_USING_V110_SDK71_ + nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01 + +To target Windows XP x64 instead of x86, you need to change the settings of +LIB and SUBSYSTEM_VER: + ... + set LIB=%WinSdk71%\Lib\x64;%LIB% + ... + nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.02 + +If you use Visual C++ 2015 (either Express or Community Edition), executing +msvc2015.bat will set them automatically. For x86 builds run this without +options: + msvc2015 +For x64 builds run this with the "x86_amd64" option: + msvc2015 x86_amd64 +This enables x86_x64 cross compiler. This works on any editions including +Express edition. +If you use Community (or Professional) edition, you can enable the x64 native +compiler by using the "x64" option: + msvc2015 x64 + +The following Visual C++ team blog can serve as a reference page: + http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx + + +OLDER VERSIONS + +The minimal supported version is Windows XP. Building with older compilers +might still work, but these instructions might be outdated. + +If you need the executable to run on Windows 98 or ME, use the 2003 one +|msvc-2003-toolkit|. + +Visual C++ Toolkit 2003 *msvc-2003-toolkit* +----------------------- + +You could download the Microsoft Visual C++ Toolkit 2003 from + http://msdn.microsoft.com/visualc/vctoolkit2003/ +Unfortunately this URL is no longer valid. Unofficial downloads appear to be +available from links mentioned on these pages (use at your own risk): + http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html + http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit + +This contains the command-line tools (compiler, linker, CRT headers, +and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE. +To compile and debug Vim with the VC2003 Toolkit, you will also need +|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|, +and |windbg-download|. + +It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|, +which is freely available in perpetuity. + +The free Code::Blocks IDE works with the VC2003 Toolkit, as described at + http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE +(This site also takes you through configuring a number of other +free C compilers for Win32.) + +To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first +execute the following commands in a cmd.exe window (the msvcsetup.bat batch +file can be used): + + set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH% + call "%VCToolkitInstallDir%vcvars32.bat" + set MSVCVer=7.1 + call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd" + set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB% + +Now you can build Vim with Make_mvc.mak. + + +Getting the Windows Platform SDK *ms-platform-sdk* + +You will also need a copy of the Windows Platform SDK. Specifically, you need +the Windows Core SDK subset of the Platform SDK, which contains the Windows +headers and libraries. You need to search for it, Microsoft keeps changing +the URL. + + +Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist* + +You need the .NET Framework 1.1 Redistributable Package from + http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3 +or from Windows Update: + http://windowsupdate.microsoft.com/ +This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe, +which is needed to link Vim. + + +Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk* + +You need the .NET Framework 1.1 SDK from + http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d +This contains some additional libraries needed to compile Vim, +such as msvcrt.lib. You must install |dotnet-1.1-redist| before +installing the .NET 1.1 SDK. + + +Getting the WinDbg debugger *windbg-download* + +The Debugging Tools for Windows can be downloaded from + http://www.microsoft.com/whdc/devtools/debugging/default.mspx +This includes the WinDbg debugger, which you will want if you ever need +to debug Vim itself. An earlier version of the Debugging Tools +is also available through the Platform SDK, |ms-platform-sdk|. + + +Visual C++ 2005 Express Edition *msvc-2005-express* +------------------------------- + +Visual C++ 2005 Express Edition can be downloaded for free from: + http://msdn.microsoft.com/vstudio/express/visualC/default.aspx +This includes the IDE and the debugger. You will also need +|ms-platform-sdk|. You can build Vim with Make_mvc.mak. + +Instructions for integrating the Platform SDK into VC Express: + http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx + + +2. MSYS2 with MinGW +=================== + +2.1. Setup the basic msys2 environment + +Go to the official page of MSYS2: https://www.msys2.org +Download an installer: + +* msys2-x86_64-YYYYMMDD.exe for 64-bit Windows + (Even if you want to build 32-bit Vim) +* msys2-i686-YYYYMMDD.exe for 32-bit Windows + +Execute the installer and follow the instructions to update basic packages. +At the end keep the checkbox checked to run msys2 now. If needed, you can +open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS. + +Execute: + $ pacman -Syu + +And restart MSYS2 console (select "MSYS2 MSYS" icon from the Start Menu). +Then execute: + $ pacman -Su + +If pacman complains that `catgets` and `libcatgets` conflict with another +package, select `y` to remove them. + + +2.2. Install additional packages for building Vim + +The following package groups are required for building Vim: + +* base-devel +* mingw-w64-i686-toolchain (for building 32-bit Vim) +* mingw-w64-x86_64-toolchain (for building 64-bit Vim) + +(These groups also include some useful packages which are not used by Vim.) +Use the following command to install them: + + $ pacman -S base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain + +Or you can use the `pacboy` command to avoid long package names: + + $ pacboy -S base-devel: toolchain:m + +The suffix ":" means that it disables the package name translation. +The suffix ":m" means both i686 and x86_64. You can also use the ":i" suffix +to install only i686, and the ":x" suffix to install only x86_64. +(See `pacboy help` for the help.) + +See also the pacman page in ArchWiki for the general usage of pacman: + https://wiki.archlinux.org/index.php/pacman + +MSYS2 has its own git package, and you can also install it via pacman: + + $ pacman -S git + + +2.3. Keep the build environment up-to-date + +After you have installed the build environment, you may want to keep it +up-to-date (E.g. always use the latest GCC). +In that case, you just need to execute the command: + $ pacman -Syu + + +2.4. Build Vim + +Select one of the following icon from the Start Menu: + +* MSYS2 MinGW 32-bit (To build 32-bit versions of Vim) +* MSYS2 MinGW 64-bit (To build 64-bit versions of Vim) + +Go to the source directory of Vim, then execute the make command. E.g.: + + make -f Make_ming.mak + make -f Make_ming.mak GUI=no + make -f Make_ming.mak GUI=no DEBUG=yes + +NOTE: you can't execute vim.exe in the MSYS2 console, open a normal Windows +console for that. You need to set $PATH to be able to build there, e.g.: + + set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH% + +This command is in msys32.bat. Or for the 64 bit compiler use msys64.bat: + + set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH% + +If you have msys64 in another location you will need to adjust the paths for +that. + + +3. MinGW +======== + +(written by Ron Aaron: <ronaharon@yahoo.com>) + +This is about how to produce a Win32 binary of gvim with MinGW. + +First, you need to get the 'mingw32' compiler, which is free for the download +at: + + http://www.mingw.org/ + +or you can use 'MinGW-w64' compiler. + + http://mingw-w64.sourceforge.net/ + +Or a compiler provided on msys2: + + https://msys2.github.io/ + +Once you have downloaded the compiler binaries, unpack them on your hard disk +somewhere, and put them on your PATH. If you are on Win95/98 you can edit +your AUTOEXEC.BAT file with a line like: + + set PATH=C:\MinGW\bin;%PATH% + +or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance), +System, Advanced, and edit the environment from there. If you use msys2 +compilers, set your installed paths (normally one of the following): + + C:\msys32\mingw32\bin (32-bit msys2, targeting 32-bit builds) + C:\msys64\mingw32\bin (64-bit msys2, targeting 32-bit builds) + C:\msys64\mingw64\bin (64-bit msys2, targeting 64-bit builds) + +Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: + + C:\> gcc --version + gcc (GCC) 4.8.1 + + C:\> mingw32-make --version + GNU Make 3.82.90 (...etc...) + +Now you are ready to rock 'n' roll. Unpack the vim sources (look on +www.vim.org for exactly which version of the vim files you need). + +Change directory to 'vim\src': + + C:\> cd vim\src + C:\VIM\SRC> + +and you type: + + mingw32-make -f Make_ming.mak gvim.exe + +After churning for a while, you will end up with 'gvim.exe' in the 'vim\src' +directory. + +You should not need to do *any* editing of any files to get vim compiled this +way. If, for some reason, you want the console-mode-only version of vim (this +is NOT recommended on Win32, especially on '95/'98!!!), you can use: + + mingw32-make -f Make_ming.mak GUI=no vim.exe + +If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX' +(also free!) and compress the file (typical compression is 50%). UPX can be +found at + http://www.upx.org/ + +As of 2011, UPX still does not support compressing 64-bit EXE's; if you have +built a 64-bit vim then an alternative to UPX is 'MPRESS'. MPRESS can be found +at: + http://www.matcode.com/mpress.htm + + +ADDITION: NLS support with MinGW + +(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>) + +If you want National Language Support, read the file src/po/README_mingw.txt. +You need to uncomment lines in Make_ming.mak to have NLS defined. + + +4. Cygwin +========= + +Use Make_cyg.mak with Cygwin's GCC. See + http://users.skynet.be/antoine.mechelynck/vim/compile.htm + +With Cygnus gcc you should use the Unix Makefile instead (you need to get the +Unix archive then). Then you get a Cygwin application (feels like Vim is +running on Unix), while with Make_cyg.mak you get a Windows application (like +with the other makefiles). + + +5. Borland +=========== + +Use Make_bc5.mak with Borland C++ 5.x. See + http://users.skynet.be/antoine.mechelynck/vim/compile.htm + + +6. Cross compiling for Win32 from a Linux machine +================================================= + +[Update of 1) needs to be verified] + +If you like, you can compile the 'mingw' Win32 version from the comfort of +your Linux (or other unix) box. To do this, you need to follow a few steps: + 1) Install the mingw32 cross-compiler. See + http://www.mingw.org/wiki/LinuxCrossMinGW + http://www.libsdl.org/extras/win32/cross/README.txt + 2) Get and unpack both the Unix sources and the extra archive + 3) in 'Make_cyg_ming.mak', set 'CROSS' to 'yes' instead of 'no'. + Make further changes to 'Make_cyg_ming.mak' and 'Make_ming.mak' as you + wish. If your cross-compiler prefix differs from the predefined value, + set 'CROSS_COMPILE' corresponding. + 4) make -f Make_ming.mak gvim.exe + +Now you have created the Windows binary from your Linux box! Have fun... + + +7. Building with Python support +=============================== + +For building with MSVC 2008 the "Windows Installer" from www.python.org +works fine. + +When building, you need to set the following variables at least: + + PYTHON: Where Python is installed. E.g. C:\Python27 + DYNAMIC_PYTHON: Whether dynamic linking is used. Usually, set to yes. + PYTHON_VER: Python version. E.g. 27 for Python 2.7.X. + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 + +When using MinGW and link with the official Python (as one line): + + mingw32-make -f Make_ming.mak + PYTHON=C:/Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 + +When using msys2 and link with Python2 bundled with msys2 (as one line): + + mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64 + PYTHON_HOME=c:/msys64/mingw64 + PYTHONINC=-Ic:/msys64/mingw64/include/python2.7 + DYNAMIC_PYTHON=yes + PYTHON_VER=27 + DYNAMIC_PYTHON_DLL=libpython2.7.dll + STATIC_STDCPLUS=yes + +(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) +(STATIC_STDCPLUS is optional. Set to yes if you don't want to require +libstdc++-6.dll.) + + +(rest written by Ron Aaron: <ronaharon@yahoo.com>) + +Building with the mingw32 compiler, and the ActiveState ActivePython: + http://www.ActiveState.com/Products/ActivePython/ + +After installing the ActivePython, you will have to create a 'mingw32' +'libpython20.a' to link with: + cd $PYTHON/libs + pexports python20.dll > python20.def + dlltool -d python20.def -l libpython20.a + +Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to +the root of the Python installation (C:\Python20, for example). If you are +cross-compiling on Linux with the mingw32 setup, you need to also convert all +the 'Include' files to *unix* line-endings. This bash command will do it +easily: + for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil + +Now just do: + make -f Make_ming.mak gvim.exe + +You will end up with a Python-enabled, Win32 version. Enjoy! + + +8. Building with Python3 support +================================ + +For building with MSVC 2008 the "Windows Installer" from www.python.org +works fine. Python 3.6 is recommended. + +When building, you need to set the following variables at least: + + PYTHON3: Where Python3 is installed. E.g. C:\Python36 + DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes. + PYTHON3_VER: Python3 version. E.g. 36 for Python 3.6.X. + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + PYTHON3=C:\Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36 + +When using MinGW and link with the official Python3 (as one line): + + mingw32-make -f Make_ming.mak + PYTHON3=C:/Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36 + +When using msys2 and link with Python3 bundled with msys2 (as one line): + + mingw32-make -f Make_ming.mak PYTHON3=c:/msys64/mingw64 + PYTHON3_HOME=c:/msys64/mingw64 + PYTHON3INC=-Ic:/msys64/mingw64/include/python3.6m + DYNAMIC_PYTHON3=yes + PYTHON3_VER=36 + DYNAMIC_PYTHON3_DLL=libpython3.6m.dll + STATIC_STDCPLUS=yes + +(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) +(STATIC_STDCPLUS is optional. Set to yes if you don't want to require +libstdc++-6.dll.) + + +9. Building with Racket or MzScheme support +======================================== + +1) Building with Racket support (newest) + +MzScheme and PLT Scheme names have been rebranded as Racket. Vim with Racket +support can be built with either MSVC or MinGW (or Cygwin). +Get it from https://download.racket-lang.org/ + +Copy lib/libracket{version}.dll to your Windows system directory. The system +directory depends on your Windows bitness and Vim bitness: + 32-bit Vim on 32-bit Windows: C:\Windows\System32 + 32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64 + 64-bit Vim on 64-bit Windows: C:\Windows\System32 + +For building you need to set the following variables: + + MZSCHEME: Where Racket is installed. + E.g. C:\Program Files (x86)\Racket + DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes. + MZSCHEME_VER: Racket DLL version which is used for the file name. + See below for a list of MZSCHEME_VER. + The DLL can be found under the lib directory. E.g. + C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll + MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at + runtime. Default: $(MZSCHEME)\collects + User can override this with the PLTCOLLECTS environment + variable. + +List of MZSCHEME_VER (incomplete): + + Racket ver. | MZSCHEME_VER + ========================== + 6.3 | 3m_9z0ds0 + 6.6 | 3m_a0solc + 6.8 | 3m_a1zjsw + 6.10 | 3m_a36fs8 + + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + MZSCHEME="C:\Program Files (x86)\Racket" DYNAMIC_MZSCHEME=yes + MZSCHEME_VER=3m_9z0ds0 + +Or when using MinGW (as one line): + + mingw32-make -f Make_ming.mak + MZSCHEME='C:/Program\ Files\ (x86)/Racket' DYNAMIC_MZSCHEME=yes + MZSCHEME_VER=3m_9z0ds0 + + Spaces should be escaped with '\'. + + +2) Building with MzScheme support (older) + +(written by Sergey Khorev <sergey.khorev@gmail.com>) + +Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can +be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and +above (including 299 and 30x series). + +The MSVC build is quite straightforward. Simply invoke (in one line) +nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme> + [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>] +where <MzScheme-version> is the last seven characters from MzScheme dll name +(libmzschXXXXXXX.dll). +If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme +DLL's, but will load them in runtime on demand. + +Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into +account that <Path-to-MzScheme> should contain slashes rather than backslashes +(e.g. d:/Develop/MzScheme) + +"Static" MzScheme support (Vim executable will depend on MzScheme DLLs +explicitly) on MinGW and Cygwin requires additional step. + +libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from +%WINDOWS%\System32 to other location (either build directory, some temporary +dir or even MzScheme home). + +Pass that path as MZSCHEME_DLLS parameter for Make. E.g., +make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000 + MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no + +After a successful build, these dlls can be freely removed, leaving them in +%WINDOWS%\System32 only. + + + +10. Building with Lua support +============================ + +Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin). +You can use binaries from LuaBinaries: http://luabinaries.sourceforge.net/ +This also applies to when you get a Vim executable and don't build yourself, +do the part up to "Build". + +1) Download and install LuaBinaries + +Go to the Download page of LuaBinaries: + http://luabinaries.sourceforge.net/download.html + +Download lua-X.Y.Z_Win32_dllw4_lib.zip for x86 or +lua-X.Y.Z_Win64_dllw4_lib.zip for x64. You can use them both for MSVC and +MinGW. + +Unpack it to a working directory. E.g. C:\projects\lua53. +Lua's header files will be installed under the include directory. + +Copy luaXY.dll to your Windows system directory. The system directory depends +on your Windows bitness and Vim bitness: + 32-bit Vim on 32-bit Windows: C:\Windows\System32 + 32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64 + 64-bit Vim on 64-bit Windows: C:\Windows\System32 + +Or another option is copying luaXY.dll to the directory where gvim.exe +(or vim.exe) is. + + +2) Build + +You need to set LUA, DYNAMIC_LUA and LUA_VER. + + LUA: Where Lua's header files are installed. E.g. C:\projects\lua53. + DYNAMIC_LUA: Whether dynamic linking is used. Set to yes. + LUA_VER: Lua version. E.g. 53 for Lua 5.3.X. + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53 + +Or when using MinGW (as one line): + + mingw32-make -f Make_ming.mak + LUA=C:/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53 + + +Or when using Cygwin (as one line) (untested): + + make -f Make_cyg.mak + LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53 + + +11. Building with Perl support +============================== + +Vim with Perl support can be built with either MSVC or MinGW (or Cygwin). +You can use binaries from ActiveState (ActivePerl) or Strawberry Perl. + + http://www.activestate.com/activeperl + http://strawberryperl.com/ + +When building, you need to set the following variables: + + PERL: Where perl is installed. E.g. C:\Perl, C:\Strawberry\perl + DYNAMIC_PERL: Whether dynamic linking is used. Usually, set to yes. + PERL_VER: Perl version. E.g. 522 for Perl 5.22.X. + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522 + +Or when using MinGW (as one line): + + mingw32-make -f Make_ming.mak + PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522 + + +12. Building with Ruby support +============================== + +Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin). +Ruby doesn't provide the official Windows binaries. The most widely used +Windows binaries might be RubyInstaller. Currently Ruby 2.4 is recommended. + + http://rubyinstaller.org/ + +If you use MinGW you can easily build with RubyInstaller, but if you use MSVC +you need some tricks described below. +(Another binary distribution is ActiveScriptRuby: + http://www.artonx.org/data/asr/) + +When building, you need to set the following variables at least: + + RUBY: Where ruby is installed. E.g. C:\Ruby24 + DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes. + RUBY_VER: Ruby version. E.g. 24 for Ruby 2.4.X. + RUBY_API_VER_LONG: Ruby API version in a long format. + E.g. 2.4.0 for Ruby 2.4.X. + +Ruby version vs. Ruby API version: + + Ruby ver. | Ruby API ver. + ========================= + 1.8.X | 1.8 + 1.9.[1-3] | 1.9.1 + 2.0.0 | 2.0.0 + 2.X.Y | 2.X.0 + +(Ruby 1.9.0 is excluded from the table because it is an unstable version.) + + +A) Using MSVC + +If you want to link with ruby, normally you must use the same compiler as +which was used to build the ruby binary. RubyInstaller is built with MinGW, +so normally you cannot use MSVC for building Vim if you want to link with +RubyInstaller. If you use a different compiler, there are mainly two problems: +config.h and Ruby's DLL name. Here are the steps for working around them: + + 1) Download and Install RubyInstaller. + You can install RubyInstaller with the default options and directory. + E.g.: + C:\Ruby24 (32-bit) or C:\Ruby24-x64 (64-bit) + + Ruby 2.4.X is used in this example. + + 2) Download Ruby 2.4.X's source code and generate config.h: + + cd C:\projects + git clone https://github.com/ruby/ruby.git -b ruby_2_4 + cd ruby + win32\configure.bat + nmake .config.h.time + + Note that ruby_2_4 is the branch name for Ruby 2.4.X's source code. + There is no need to build whole Ruby, just config.h is needed. + If you use 32-bit MSVC 2015, the config.h is generated in the + .ext\include\i386-mswin32_140 directory. + If you use 64-bit MSVC 2015, the config.h is generated in the + .ext\include\x64-mswin64_140 directory. + + 3) Install the generated config.h. + + For 32-bit version: + + xcopy /s .ext\include C:\Ruby24\include\ruby-2.4.0 + + For 64-bit version: + + xcopy /s .ext\include C:\Ruby24-x64\include\ruby-2.4.0 + + Note that 2.4.0 is Ruby API version of Ruby 2.4.X. + You may need to close the console and reopen it to pick up the new $PATH. + + 4) Build Vim. Note that you need to adjust some variables (as one line): + + For 32-bit version: + + nmake -f Make_mvc.mak + RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 + RUBY_MSVCRT_NAME=msvcrt + WINVER=0x501 + + For 64-bit version, replace RUBY=C:\Ruby24 with RUBY=C:\Ruby24-x64. + + If you set WINVER explicitly, it must be set to >=0x500, when building + with Ruby 2.1 or later. (Default is 0x501.) + When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt + which is used for the Ruby's DLL name. + +B) Using MinGW + +Using MinGW is easier than using MSVC when linking with RubyInstaller. +After you install RubyInstaller, just type this (as one line): + + mingw32-make -f Make_ming.mak + RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 + WINVER=0x600 + +For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64. +If you set WINVER explicitly, it must be set to >=0x500, when building with +Ruby 2.1 or later. (Default is 0x600.) + + + +13. Building with Tcl support +============================= + +Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin). +You can use binaries from ActiveState (ActiveTcl). + + http://www.activestate.com/activetcl + +Alternatively, you can use the binaries provided by IronTcl from + + https://www.irontcl.com/ + +They might lack behind the latest version a bit, but should provide 64bit +and 32bit versions even if ActiveTcl does not provide them anymore. + +For building with MSVC 2015 use version 8.6.6 or later. +When building, you need to set the following variables: + + TCL: Where tcl is installed. E.g. C:\Tcl86 + DYNAMIC_TCL: Whether dynamic linking is used. Usually, set to yes. + TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X. + TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X. + +Sometimes the Tcl dll name changes. E.g. ActiveTcl 8.6.4 comes with tcl86.dll, +but ActiveTcl 8.6.6 comes with tcl86t.dll. You can set the dll name by setting +the TCL_DLL variable: + TCL_DLL=tcl86t.dll + +E.g. When using MSVC (as one line): + + nmake -f Make_mvc.mak + TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6 + +Or when using MinGW (as one line): + + mingw32-make -f Make_ming.mak + TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6 + + +14. Building with Terminal support +================================== + +Vim with Terminal support can be built with either MSVC, MinGW or Cygwin. +This uses the included libvterm and winpty. No extra header files or +libraries are needed for building. Just set TERMINAL to yes. + +E.g. When using MSVC: + + nmake -f Make_mvc.mak TERMINAL=yes + +Or when using MinGW: + + mingw32-make -f Make_ming.mak TERMINAL=yes + + +15. Building with DirectX (DirectWrite) support +=============================================== + +Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW. +This requires dwrite_2.h and some other header files which come with Windows +SDK 8.1 or later (or MinGW-w64), if you want to enable color emoji support. +This also requires MBYTE=yes which is enabled by default. + +A) Using MSVC + +If you use MSVC 2013 or later, Windows SDK 8.1 or later is used by default. +You just need to specify DIRECTX=yes: + + nmake -f Make_mvc.mak DIRECTX=yes + +If you use MSVC 2012 or earlier, the required header files are not available +by default. However, you can use the header files from newer SDKs with older +compilers. E.g.: + + set "INCLUDE=%INCLUDE%;C:\Program Files (x86)\Windows Kits\8.1\Include\um" + nmake -f Make_mvc.mak DIRECTX=yes + +If you don't need color emoji support, only dwrite.h is required. You can use +older compilers (e.g. VC2010) without Windows SDK 8.1. E.g.: + + nmake -f Make_mvc.mak DIRECTX=yes COLOR_EMOJI=no + +B) Using MinGW-w64 + +Just set DIRECTX to yes: + + mingw32-make -f Make_ming.mak DIRECTX=yes + + +16. Windows 3.1x +================ + +The Windows 3.1x support was removed in patch 7.4.1364. + + +17. MS-DOS +========== + +The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions +work on MS-DOS because of the limited amount of memory available. + + +18. Installing after building from sources +========================================== + +[provided by Michael Soyka, updated by Ken Takata] + +After you've built the Vim binaries as described above, you're ready to +install Vim on your system. However, if you've obtained the Vim sources +using Git, Mercurial or by downloading them as a unix tar file, you must +first create a "vim81" directory. If you instead downloaded the sources as +zip files, you can skip this setup as the zip archives already have the +correct directory structure. + + A. Create a Vim "runtime" subdirectory named "vim81" + ----------------------------------------------------- + If you obtained your Vim sources as zip files, you can skip this step. + Otherwise, continue reading. + + Go to the directory that contains the Vim "src" and "runtime" + directories and create a new subdirectory named "vim81". + + Copy the "runtime" files into "vim81": + copy runtime\* vim81 + + B. Copy the new binaries into the "vim81" directory + ---------------------------------------------------- + Regardless of how you installed the Vim sources, you need to copy the + new binaries you created above into "vim81": + + copy src\*.exe vim81 + copy src\tee\tee.exe vim81 + copy src\xxd\xxd.exe vim81 + + To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit + versions of gvimext.dll. They should be copied to "vim81\GvimExt32" and + "vim81\GvimExt64" respectively. + First, build the 32-bit version, then: + + mkdir vim81\GvimExt32 + copy src\GvimExt\gvimext.dll vim81\GvimExt32 + + Next, clean the 32-bit version and build the 64-bit version, then: + + mkdir vim81\GvimExt64 + copy src\GvimExt\gvimext.dll vim81\GvimExt64 + + C. Copy gettext and iconv DLLs into the "vim81" directory + ---------------------------------------------------------- + Get gettext and iconv DLLs from the following site: + https://github.com/mlocati/gettext-iconv-windows/releases + Both 64- and 32-bit versions are needed. + Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract + DLLs and place them as follows: + + vim81\ + | libintl-8.dll + | libiconv-2.dll + | libgcc_s_sjlj-1.dll (only for 32-bit) + | + + GvimExt32\ + | libintl-8.dll + | libiconv-2.dll + | libgcc_s_sjlj-1.dll + | + ` GvimExt64\ + libintl-8.dll + libiconv-2.dll + + The DLLs in the "vim81" should be the same bitness with the (g)vim.exe. + + D. Move the "vim81" directory into the Vim installation subdirectory + --------------------------------------------------------------------- + Move the "vim81" subdirectory into the subdirectory where you want Vim + to be installed. Typically, this subdirectory will be named "vim". + If you already have a "vim81" subdirectory in "vim", delete it first + by running its uninstal.exe program. + + E. Install Vim + --------------- + "cd" to your Vim installation subdirectory "vim\vim81" and run the + "install.exe" program. It will ask you a number of questions about + how you would like to have your Vim setup. Among these are: + - You can tell it to write a "_vimrc" file with your preferences in the + parent directory. + - It can also install an "Edit with Vim" entry in the Windows Explorer + popup menu. + - You can have it create batch files, so that you can run Vim from the + console or in a shell. You can select one of the directories in your + PATH or add the directory to PATH using the Windows Control Panel. + - Create entries for Vim on the desktop and in the Start menu. + +Happy Vimming! diff --git a/src/INSTALLvms.txt b/src/INSTALLvms.txt new file mode 100644 index 0000000..cbcbc49 --- /dev/null +++ b/src/INSTALLvms.txt @@ -0,0 +1,393 @@ +INSTALLvms.txt - Installation of Vim on OpenVMS + +Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> +Last change: 2008 Jan 06 + +This file contains instructions for compiling Vim on Openvms. +If you already have an executable version of Vim, you don't need this. + +If you skip settings described here, then you will get the default Vim +behavior as it is documented, which should be fine for most users. + +The file "feature.h" can be edited to match your preferences, but this files +does not describe possibilities hidden in feature.h acrobatics, however +parameters from MAKE_VMS.MMS actively uses and sets up parameters in relation +with feature.h + +More information and case analysis you can found in os_vms.txt +([runtime.doc]os_vms.txt or :help vms from vim prompt) + +Contents: +1. Download files +2. Configuration +3. Compilation DECC +4. Compilation VAXC +5. CTAGS, XXD +6. Deployment +7. GTK and other features +8. Notes +9. Authors + +---------------------------------------------------------------------------- +1. Download files + +1.1. Visit the Vim ftp site (see ftp://ftp.vim.org/pub/vim/MIRRORS) + and obtain the following three files: + + unix/vim-X.X-src.tar.gz + unix/vim-X.X-rt.tar.gz + extra/vim-X.X-extra.tar.gz + + where X.X is the version number. + +1.2. Expand the three archives. + +1.3. Apply patches if they exist. (Patch files are found in the ftp + site in the "patches" directory.) + +1.4. You will need either the DECSET mms utility or the freely available clone + of it called mmk (VMS has no make utility in the standard distribution). + You can download mmk from http://www.openvms.digital.com/freeware/MMK/ + +1.5. If you want to have Perl, Python or Tcl support in Vim you will need VMS + distributions for them as well. + +1.6 If you want to have GTK executable, you need to have properly installed + GTK libraries. + +NOTE: procedure in chapter 1 describes source code preparation from multi OS +code, however it is available OpenVMS optimized (and tested) source code from: +ftp://ftp.polarhome.com/pub/vim/source/vms/ +(http://www.polarhome.com/vim/files/source/vms/) + +Current OpenVMS source code as .zip or .tar.gz file is possible to download +from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ +(http://www.polarhome.com/cvs/SOURCE/) + +2. Configuration + +2.1. Edit vim-X.X/src/feature.h for your preference. (You can skip + this, then you will get the default behavior as is documented, + which should be fine for most people.) + + For example, if you want to add the MULTI_BYTE feature, turn on + #define MULTI_BYTE + +2.2 Edit vim-X.X/src/Make_vms.mms to customize your Vim. Options are: + + Parameter name : MODEL + Description : Build model selection + Options: : TINY - Almost no features enabled, not even + multiple windows + SMALL - Few features enabled, as basic as possible + NORMAL - A default selection of features enabled + BIG - Many features enabled, as rich as possible. + (OpenVMS default) + HUGE - All possible features enabled. + Uncommented - will default to BIG + Default : MODEL = BIG + + Parameter name : GUI + Description : GUI or terminal mode executable + Options: : YES - GUI executable + Uncommented - char only + Default : GUI = YES + + Parameter name : GTK + Description : Enable GTK in GUI mode. + It enables features as toolbar etc. + Options: : YES - GTK executable + Uncommented - without GTK + Default : Uncommented + + Parameter name : XPM + Description : Enable XPM libraries in GUI/Motif mode. + It enables features as toolbar etc. + Options: : YES - GUI executable + Uncommented - without XPM + Default : Uncommented + + Parameter name : DECC + Description : Compiler selection + Options: : YES - DECC compiler + Uncommented - VAXC compiler + Default : DECC = YES + + Parameter name : CCVER + Description : Compiler version with :ver command + Options: : YES - Compiler version info will be added + Uncommented - will not be added + Default : CCVER = YES + + Parameter name : DEBUG + Description : Building a debug version + Options: : YES - debug version will be built + Uncommented - building normal executable + Default : Uncommented + + Parameter name : VIM_TCL + Description : Add Tcl support + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_PERL + Description : Add Perl support + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_PYTHON + Description : Add Python support + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_XIM + Description : X Input Method. For entering special languages + like chinese and Japanese. Please define just + one: VIM_XIM or VIM_HANGULIN + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_HANGULIN + Description : Internal Hangul input method. GUI only. + Please define just one: VIM_XIM or VIM_HANGULIN + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + Parameter name : VIM_TAG_ANYWHITE + Description : Allow any white space to separate the fields in a + tags file + When not defined, only a TAB is allowed. + Options: : YES - Build with support + Uncommented - build without support. + Default : Uncommented + + You can edit the *_INC and *_LIB qualifiers, but it is really + not recommended for beginners. + +3. Compilation DECC + +3.1. If you have MSS on your system, the command + + mms /descrip=Make_vms.mms + + will start building your own customized version of Vim. + The adequate command for mmk is: + + mmk /descrip=Make_vms.mms + + NOTE: Because of empty /auto/config.h (needed for Unix configure) build + will fail with very strange messages. Therefore before building, it is + recommended to make one clean up, to prepare everything for OpenVMS + development. The command is: + + mms /descrip=Make_vms.mms clean + +4. Compilation VAXC + +4.1. VAXC compiler is not fully ANSI C compatible in pre-processor directives + semantics, therefore you have to use a converter program what will do the + lion part of the job. + + @os_vms_fix.com *.c *.h <.proto>*.pro + + more information can be found in os_vms_fix.com file itself. + + NOTE: even if os_vms_fix.com will fix all pre-processor directives it will + leave singe (long) line directives. You have to fix them manually. + Known problematic files are option.h and option.c + +4.2. After the conversion you can continue building as it has been described + above. + +5. CTAGS, XXD + +5.1. MMS_VIM.EXE is building together with VIM.EXE, but for CTAGS.EXE and + XXD.EXE you should change to subdirectory <.CTAGS> or <.XXD> and build + them separately. + +5.2. In these directories you can found one make file for VMS as well. + Please read the detailed build instructions in the related *.MMS file. + +6. Deployment + +6.1. Copy over all executables to the deployment directory. + +6.2. Vim uses a special directory structure to hold the document and runtime + files: + + vim (or wherever) + |-- doc + |-- syntax + vimrc (system rc files) + gvimrc + +6.3 Define logicals VIM + + define/nolog VIM device:[leading-path-here.vim] + + to get vim.exe to find its document, filetype, and syntax files. + + Now, if you are lucky you should have one own built, customized and + working Vim. + +7. GTK and other features + +7.1 General notes + + To be able to build external GUI or language support you have to enable + related feature in MAKE_VMS.MMS file. Usually it need some extra tuning + around include files, shared libraries etc. + + Please note, that leading "," are valuable for MMS/MMK syntax. + + MAKE_VMS.MMS uses defines as described below: + +7.1.1 feature_DEF = ,"SOME_FEATURE" + + Submits definition to compiler preprocessor to enable code blocks + defined with + #ifdef SOME_FEATURE + {some code here} + #endif + + Example: TCL_DEF = ,"FEAT_TCL" + + +7.1.2 feature_SRC = code1.c code2.c + + Defines source code related with particular feature. + Example: TCL_SRC = if_tcl.c + +7.1.3 feature_OBJ = code1.obj code2.obj + + Lists objects created from source codes listed in feature_SRC + Example: PERL_OBJ = if_perlsfio.obj if_perl.obj + +7.1.4 feature_LIB = ,OS_VMS_TCL.OPT/OPT + + Defines the libraries that have to be used for build. + If it is an OPT file then MAKE_VMS.MMS creates OPT files + in gen_feature procedure. + + Example: + PERL_LIB = ,OS_VMS_PERL.OPT/OPT + +.IFDEF VIM_PERL +perl_env : + -@ write sys$output "creating OS_VMS_PERL.OPT file." + -@ open/write opt_file OS_VMS_PERL.OPT + -@ write opt_file "PERLSHR /share" + -@ close opt_file +.ELSE +perl_env : + -@ ! +.ENDIF + + +7.1.5 feature_INC = ,dka0:[tcl80.generic] + + Defines the directory where the necessary include files are. + Example: TCL_INC = ,dka0:[tcl80.generic] + +7.2 GTK + + To build VIM with GTK you have to install GTK on your OpenVMS. + So far it works just on Alpha and IA64. More information at: + http://www.openvms.compaq.com/openvms/products/ips/gtk.html + + You need also the OpenVMS Porting Library: + http://www.openvms.compaq.com/openvms/products/ips/porting.html + + Source code for GTK and porting library that is used to build + VMS executables at polarhome.com are at + http://www.polarhome.com/vim/files/source/vms/ + + Enable GTK in make_vms.mms file with GTK = YES + Define GTK_ROOT that points to your GTK root directory. + + You will need to edit GTKDIR variable in order to point + to GTK header files and libraries. + + GTK_DIR = ALPHA$DKA0:[GTK128.] + + ".]" at the end is very important. + + Build it as normally. + + Used sharable images are: + gtk_root:[glib]libglib.exe /share,- + gtk_root:[glib.gmodule]libgmodule.exe /share,- + gtk_root:[gtk.gdk]libgdk.exe /share,- + gtk_root:[gtk.gtk]libgtk.exe /share + + During runtime it is suggested to have all these files installed and + copied to SYS$LIBRARY: to be able to use it without problems. + Also VMS_JACKETS.EXE from OpenVMS Porting Library. + + Please note, that GTK uses /name=(as_is,short)/float=ieee/ieee=denorm + compiler directives that is not compatible with "standard" VMS usage, + therefore other external features might fail as PERL, PYTHON and TCL + support. + +7.3 PERL + + You have to install OpenVMS perl package from: + http://www.openvms.compaq.com/openvms/products/ips/apache/csws_perl_relnotes.html or build on your own from sources downloaded from http://www.perl.org + + You need defined PERLSHR logical that points to PERL shareable image + (or you can just copy over to SYS$LIBRARY:) + + Enable Perl feature at make_vms.mms with VIM_PERL = YES + + Edit PERL_INC = to point to perl includes directory where is extern.h + + Build as usually. + +7.4 PYTHON + + You have to install an OpenVMS python package. + Set up the normal Python work environment. + + You have to have defined PYTHON_INCLUDE and PYTHON_OLB logicals. + PYTHON_INCLUDE should point to Python include files where for ex: + python.h is located. + Enable Python feature at make_vms.mms with VIM_PYTHON = YES + + Build as usually. + +7.5 TCL + + You have to install an OpenVMS TCL package. + Set up the normal TCL work environment. + + You have to have defined TCLSHR logical that points to shareable image. + + Enable TCL feature at make_vms.mms with VIM_TCL = YES + + Edit TCL_INC = to point to TCL includes directory where is tcl.h + + Build as usually. + +8. Notes + +8.1. New Compaq C compiler + + If you are using Compaq C compiler V6.2 or newer, Informational messages + of the type QUESTCOMPARE will be displayed. You should ignore those + messages ; they are generated only because some test comparisons are done + with variables which type vary depending on the OS. Under VMS, those are + "unsigned" and the compiler issue a message whenever the comparison is + done with '<=' to 0. However, the code is correct and will behave as + expected. + ( Jerome Lauret <JLAURET@mail.chem.sunysb.edu> Vim 6.0n ) + NOTE: from version 6.0ad Vim code has been reviewed and these warnings + have been corrected. + +9. Authors + + Initial version, 2000 Jul 19, Zoltan Arpadffy <arpadffy@polarhome.com> diff --git a/src/INSTALLx.txt b/src/INSTALLx.txt new file mode 100644 index 0000000..e03f54d --- /dev/null +++ b/src/INSTALLx.txt @@ -0,0 +1,165 @@ +INSTALLx.txt - cross-compiling Vim on Unix + +Content: + 1. Introduction + 2. Necessary arguments for "configure" + 3. Necessary environment variables for "configure" + 4. Example + + +1. INTRODUCTION +=============== + +This document discusses cross-compiling VIM on Unix-like systems. We assume +you are already familiar with cross-compiling and have a working cross-compile +environment with at least the following components: + + * a cross-compiler + * a libc to link against + * ncurses library to link against + +Discussing how to set up a cross-compile environment would go beyond the scope +of this document. See http://www.kegel.com/crosstool/ for more information and +a script that aids in setting up such an environment. + + +The problem is that "configure" needs to compile and run small test programs +to check for certain features. Running these test programs can't be done when +cross-compiling so we need to pass the results these checks would produce via +environment variables. See the list of variables and the examples at the end of +this document. + + +2. NECESSARY ARGUMENTS FOR "configure" +====================================== + +You need to set the following "configure" command line switches: + +--build=... : + The build system (i.e. the platform name of the system you compile on + right now). + For example, "i586-linux". + +--host=... : + The system on which VIM will be run. Quite often this the name of your + cross-compiler without the "-gcc". + For example, "powerpc-603-linux-gnu". + +--target=... : + Only relevant for compiling compilers. Set this to the same value as + --host. + +--with-tlib=... : + Which terminal library to use. + For example, "ncurses". + + +3. NECESSARY ENVIRONMENT VARIABLES FOR "configure" +================================================== + +Additionally to the variables listed here you might want to set the CPPFLAGS +environment variable to enable optimization for your target system (e.g. +"CPPFLAGS=-march=arm5te"). + +The following variables need to be set: + +ac_cv_sizeof_int: + The size of an "int" C type in bytes. Should be "4" on all 32bit + machines. + +vi_cv_path_python_conf: + If Python support is enabled, set this variable to the path for + Python's library implementation. This is a path like + "/usr/lib/pythonX.Y/config" (the directory contains a file + "config.c"). + +vi_cv_var_python_epfx: + If Python support is enabled, set this variable to the execution + prefix of your Python interpreter (that is, where it thinks it is + running). + This is the output of the following Python script: + import sys; print sys.exec_prefix + +vi_cv_var_python_pfx: + If Python support is enabled, set this variable to the prefix of your + Python interpreter (that is, where it was installed). + This is the output of the following Python script: + import sys; print sys.prefix + +vi_cv_var_python_version: + If Python support is enabled, set this variable to the version of the + Python interpreter that will be used. + This is the output of the following Python script: + import sys; print sys.version[:3] + +vim_cv_bcopy_handles_overlap: + Whether the "memmove" C library call is able to copy overlapping + memory regions. Set to "yes" if it does or "no" if it does not. + You only need to set this if vim_cv_memmove_handles_overlap is set + to "no". + +vim_cv_getcwd_broken: + Whether the "getcwd" C library call is broken. Set to "yes" if you + know that "getcwd" is implemented as 'system("sh -c pwd")', set to + "no" otherwise. + +vim_cv_memcpy_handles_overlap: + Whether the "memcpy" C library call is able to copy overlapping + memory regions. Set to "yes" if it does or "no" if it does not. + You only need to set this if both vim_cv_memmove_handles_overlap + and vim_cv_bcopy_handles_overlap are set to "no". + +vim_cv_memmove_handles_overlap: + Whether the "memmove" C library call is able to copy overlapping + memory regions. Set to "yes" if it does or "no" if it does not. + +vim_cv_stat_ignores_slash: + Whether the "stat" C library call ignores trailing slashes in the path + name. Set to "yes" if it ignores them or "no" if it does not ignore + them. + +vim_cv_tgetent: + Whether the "tgetent" terminal library call returns a zero or non-zero + value when it encounters an unknown terminal. Set to either the string + "zero" or "non-zero", corresponding. + +vim_cv_terminfo: + Whether the environment has terminfo support. Set to "yes" if so, + otherwise set to "no". + +vim_cv_toupper_broken: + Whether the "toupper" C library function works correctly. Set to "yes" + if you know it's broken, otherwise set to "no". + +vim_cv_tty_group: + The default group of pseudo terminals. Either set to the numeric value + of your tty group or to "world" if they are world accessible. + +vim_cv_tty_mode: + The default mode of pseudo terminals if they are not world accessible. + Most probably the value "0620". + + +4. EXAMPLE: +=========== + +Assuming the target system string is "armeb-xscale-linux-gnu" (a Intel XScale +system) with glibc and ncurses, the call to configure would look like this: + +ac_cv_sizeof_int=4 \ +vim_cv_getcwd_broken=no \ +vim_cv_memmove_handles_overlap=yes \ +vim_cv_stat_ignores_slash=yes \ +vim_cv_tgetent=zero \ +vim_cv_terminfo=yes \ +vim_cv_toupper_broken=no \ +vim_cv_tty_group=world \ +./configure \ + --build=i586-linux \ + --host=armeb-xscale-linux-gnu \ + --target=armeb-xscale-linux-gnu \ + --with-tlib=ncurses + + + +Written 2007 by Marc Haisenko <marc@darkdust.net> for the VIM project. |