Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 1 | INSTALLmac.txt - Installation of Vim on Apple MacOS |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | This file contains instructions for compiling Vim. If you already have an |
| 4 | executable version of Vim, you don't need this. |
| 5 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 6 | MacOS Classic is no longer supported. If you really want it use Vim 6.4. |
| 7 | Only '/' is supported as path separator. |
| 8 | |
| 9 | |
| 10 | ---------------------------------------------------------------------------- |
| 11 | Prerequisites |
| 12 | ---------------------------------------------------------------------------- |
| 13 | |
| 14 | Make sure you've installed Xcode and CommandLineTools. You can download Xcode |
| 15 | from the Mac App Store, for free. |
| 16 | |
| 17 | To check for CommandLineTools open a terminal and do: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 18 | |
Bram Moolenaar | d7a08a2 | 2016-01-03 22:51:16 +0100 | [diff] [blame] | 19 | $ make --version |
| 20 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 21 | If not installed yet a window pops up instructing you to install the developer |
| 22 | tools. |
| 23 | |
| 24 | If you don't have the source yet, best is to use git (which you need to |
| 25 | install first), see http://www.vim.org/git.php |
| 26 | Or you can download and unpack the Unix tar archive, see |
| 27 | http://www.vim.org/download.php |
Bram Moolenaar | d7a08a2 | 2016-01-03 22:51:16 +0100 | [diff] [blame] | 28 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 29 | |
| 30 | ---------------------------------------------------------------------------- |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 31 | Build and install the terminal version. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 32 | ---------------------------------------------------------------------------- |
| 33 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 34 | You can compile vim with the standard Unix routine: |
| 35 | cd vim/src |
Bram Moolenaar | fd2ac76 | 2006-03-01 22:09:21 +0000 | [diff] [blame] | 36 | make |
Bram Moolenaar | d7a08a2 | 2016-01-03 22:51:16 +0100 | [diff] [blame] | 37 | make test |
| 38 | sudo make install |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 40 | If you get an error "glibtool: command not found" search on stackoverflow for |
| 41 | mac-osx-where-can-i-download-glibtool. |
Bram Moolenaar | fd2ac76 | 2006-03-01 22:09:21 +0000 | [diff] [blame] | 42 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 43 | With Homebrew, run: |
Bram Moolenaar | fd2ac76 | 2006-03-01 22:09:21 +0000 | [diff] [blame] | 44 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 45 | brew install libtool |
| 46 | |
| 47 | To 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 Moolenaar | fd2ac76 | 2006-03-01 22:09:21 +0000 | [diff] [blame] | 56 | |
Bram Moolenaar | 7e8fd63 | 2006-02-18 22:14:51 +0000 | [diff] [blame] | 57 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 58 | ---------------------------------------------------------------------------- |
| 59 | Build and install the GUI version with X-Windows |
| 60 | ---------------------------------------------------------------------------- |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 61 | |
Bram Moolenaar | b7398fe | 2023-05-14 18:50:25 +0100 | [diff] [blame] | 62 | NOTE: this probably no longer works, since Athena support has been removed. |
| 63 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 64 | First, install XQuartz, which you can download from https://www.xquartz.org. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 65 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 66 | To tell configure to use a GUI you can edit the Makefile and uncomment these |
| 67 | two lines (remove the # at the start of the line): |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 68 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 69 | CONF_OPT_GUI = --enable-gui=athena |
| 70 | CONF_OPT_DARWIN = --disable-darwin |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 71 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 72 | Do "make distclean" to start with a clean slate. |
| 73 | Then build as with the terminal version above. |
| 74 | Instead of "athena" you can try "gtk2" but you probably need to install GTK |
| 75 | first. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 76 | |
Bram Moolenaar | 56994d2 | 2021-04-17 16:31:09 +0200 | [diff] [blame] | 77 | |
| 78 | ---------------------------------------------------------------------------- |
| 79 | Notes |
| 80 | ---------------------------------------------------------------------------- |
| 81 | |
| 82 | Mac-specific configure options are explained in the Makefile: |
| 83 | --disable-darwin |
| 84 | --with-mac-arch |
| 85 | |