Install Vim runtime to the MacVim app bundle properly #1430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, MacVim's build process simply used an Xcode post-build script to copy the runtime folder to the target app bundle's Contents/Resources/vim/runtime folder and called it a day. However, that's actually not the correct procedure because the runtime folder contains misc files (e.g. Makefile/testdir for testing) and they should go through a install step using
make install
to properly deploy the proper files to the target folder.Fix this by changing the post-build script to call the relevant make targets instead of just blindly copying it over. We still copy the vim/view/etc and vimtutor binaries separately for now, because the mvim script is a custom script for MacVim, although that could change in future.
One of the corollary of using the builtin installation scripts is that man pages (for CLI vim/gvim usage) are now properly generated. They are now stored under
MacVim.app/Contents/man
, and a user can set MANPATH to it if they so wish.Another corollary is that we now bundle xxd with MacVim like most Vim distributions. It was probably an oversight before, and now it's built and bundled in the
MacVim.app/Contents/bin
folder like the vim/view/mvim scripts.One annoying thing with Xcode is that in order for incremental builds to work properly we want it to only run this installation step if the runtime folder has changed (it takes a couple secs to finish) and Xcode's input file lists doesn't support recursive folder search. To fix this, add a build step to manually generate the list of all runtime folders called runtime_folder_list.xcfilelist which we pass to the build step.
Fix #1417