|
Building
How to build MacVim
Building MacVim from the Git repositorySummaryIf you know what you are doing, then this should be enough to get you going:
Downloading and buildingTo get the source code you need Git, see below for installation instructions if you have not installed Git already. (Note that it is possible to get the source code without installing Git but it will be much easier to keep your local copy of the source code up to date once you have installed Git. See the comment at the end of this page on how to download the source code without using Git.) Once you have Git installed you first have to clone the MacVim.git repo, so open up Terminal and type the following commands: localhost:~ user$ git clone git://repo.or.cz/MacVim.git vim7 This will create a folder named vim7 and populate it with all the source code needed to build MacVim (you can choose any name you want instead of vim7). Next, you have to configure Vim to include the MacVim specific code (see the next section on how to enable extra features) and then build it localhost:~ user$ cd vim7/src localhost:~/vim7/src user$ ./configure localhost:~/vim7/src user$ make After make finishes you can find MacVim.app in the MacVim/build/Release/ folder; try to run it by typing localhost:~/vim7/src user$ open MacVim/build/Release/MacVim.app Once you are satisfied with the build, simply drag and drop MacVim.app into the /Applications folder (this is the preferred location, but it can be run from any folder). Enabling extra featuresThese are the parameters to configure you are most likely to want to enable:
As an example, say you are on OS X 10.6 and want to build a 32 bit binary (64 bit is the default on 10.6) with the "usual" features, and Python support. Then call configure like this: localhost:~/vim7/src user$ ./configure --with-macarchs=i386 --with-features=huge --enable-pythoninterp To see the list of all parameters, type ./configure --help (note that not all parameters in that list apply to Mac OS X). Updating an existing Git repositoryIf you already have the MacVim.git repo then updating it is as easy as localhost:~ user$ cd vim7 localhost:~/vim7 user$ git pull Contributing with patchesSee the wiki page on Contributing. Installing GitUsing the installerA prebuilt binary of Git for Mac OS X can be found here. Using MacPortsNote! If you do not already have MacPorts installed then be warned that installing both MacPorts and Git will take a long time. If you already have MacPorts installed, then you can install Git by opening a Terminal window and typing localhost:~ user$ sudo port install git-core +svn (The +svn flag is not strictly necessary, but if you might ever need to use the git-svn command in the future it is best to include it.) From the Git source codeThe source code for Git can be downloaded from http://git-scm.com. Using the ASL logging systemThere are four different filters controlling what gets logged or not
localhost:~ user$ defaults write org.vim.MacVim MMLogLevel 7 will enable all log messages past the local filter (requires a restart of MacVim). ASL will still block them however since the database filter blocks Debug and Info level messages as well. To change this use the syslog command: localhost:~ user$ sudo syslog -c syslogd -d Now you'll be able to see all logs from MacVim in Console.app, or by using syslog: localhost:~ user$ syslog -w | grep Vim When you are done debugging you can reset the database filter as follows: localhost:~ user$ sudo syslog -c syslogd off It is also possible to have MacVim log to stderr as follows: localhost:~ user$ defaults write org.vim.MacVim MMLogToStdErr 1 This requires a restart of MacVim. To disable substitute the 1 for a 0. Note that getting the logs to appear on stder does not require that you change the database filter as described above. A tip: instead of using defaults to change MMLogLevel and MMLogToStdErr you can pass these as command line options to the MacVim binary (inside the app bundle) as follows: localhost:~ user$ ./MacVim.app/Contents/MacOS/MacVim -MMLogLevel 7 -MMLogToStdErr 1 The levels passed to MMLogLevel are the same as are used by ASL, see man syslog for a complete list (5 is the default level). Random notes
cd /usr/lib/ruby/1.8/powerpc-darwin8.0 sudo ln -s ../universal-darwin8.0/*.h ./ Building MacVim from the Subversion repositoryThe subversion repository has been deprecated, please use Git to download and build MacVim. |