blob: 9980d258c4eee6ef38fdc1b388f1107d0a2c5173 [file] [log] [blame]
Bram Moolenaar56994d22021-04-17 16:31:09 +02001INSTALLmac.txt - Installation of Vim on Apple MacOS
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3This file contains instructions for compiling Vim. If you already have an
4executable version of Vim, you don't need this.
5
Bram Moolenaar56994d22021-04-17 16:31:09 +02006MacOS Classic is no longer supported. If you really want it use Vim 6.4.
7Only '/' is supported as path separator.
8
9
10----------------------------------------------------------------------------
11Prerequisites
12----------------------------------------------------------------------------
13
14Make sure you've installed Xcode and CommandLineTools. You can download Xcode
15from the Mac App Store, for free.
16
17To check for CommandLineTools open a terminal and do:
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
Bram Moolenaard7a08a22016-01-03 22:51:16 +010019 $ make --version
20
Bram Moolenaar56994d22021-04-17 16:31:09 +020021If not installed yet a window pops up instructing you to install the developer
22tools.
23
24If you don't have the source yet, best is to use git (which you need to
25install first), see http://www.vim.org/git.php
26Or you can download and unpack the Unix tar archive, see
27 http://www.vim.org/download.php
Bram Moolenaard7a08a22016-01-03 22:51:16 +010028
Bram Moolenaar071d4272004-06-13 20:20:40 +000029
30----------------------------------------------------------------------------
Bram Moolenaar56994d22021-04-17 16:31:09 +020031Build and install the terminal version.
Bram Moolenaar071d4272004-06-13 20:20:40 +000032----------------------------------------------------------------------------
33
Bram Moolenaar56994d22021-04-17 16:31:09 +020034You can compile vim with the standard Unix routine:
35 cd vim/src
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000036 make
Bram Moolenaard7a08a22016-01-03 22:51:16 +010037 make test
38 sudo make install
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
Bram Moolenaar56994d22021-04-17 16:31:09 +020040If you get an error "glibtool: command not found" search on stackoverflow for
41mac-osx-where-can-i-download-glibtool.
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000042
Bram Moolenaar56994d22021-04-17 16:31:09 +020043With Homebrew, run:
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000044
Bram Moolenaar56994d22021-04-17 16:31:09 +020045 brew install libtool
46
47To build libtool from source:
48
49 1. Download the source code from https://www.gnu.org/software/libtool/.
50
51 2. Run these commands from the root of the source code directory:
52
53 ./configure --program-prefix=g
54 make
55 sudo make install
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000056
Bram Moolenaar7e8fd632006-02-18 22:14:51 +000057
Bram Moolenaar56994d22021-04-17 16:31:09 +020058----------------------------------------------------------------------------
59Build and install the GUI version with X-Windows
60----------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +000061
Bram Moolenaar56994d22021-04-17 16:31:09 +020062First, install XQuartz, which you can download from https://www.xquartz.org.
Bram Moolenaar071d4272004-06-13 20:20:40 +000063
Bram Moolenaar56994d22021-04-17 16:31:09 +020064To tell configure to use a GUI you can edit the Makefile and uncomment these
65two lines (remove the # at the start of the line):
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
Bram Moolenaar56994d22021-04-17 16:31:09 +020067 CONF_OPT_GUI = --enable-gui=athena
68 CONF_OPT_DARWIN = --disable-darwin
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaar56994d22021-04-17 16:31:09 +020070Do "make distclean" to start with a clean slate.
71Then build as with the terminal version above.
72Instead of "athena" you can try "gtk2" but you probably need to install GTK
73first.
Bram Moolenaar071d4272004-06-13 20:20:40 +000074
Bram Moolenaar56994d22021-04-17 16:31:09 +020075
76----------------------------------------------------------------------------
77Notes
78----------------------------------------------------------------------------
79
80Mac-specific configure options are explained in the Makefile:
81 --disable-darwin
82 --with-mac-arch
83