Skip to content

Commit 63f0f7e

Browse files
authored
Merge pull request #1418 from ychin/cleanup-runtime-dir-post-build
Clean up runtime dir after copying them to the app bundle
2 parents ac9cd1c + 0222294 commit 63f0f7e

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/MacVim/scripts/cleanup-after-build

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ if [ "$remove_sparkle" == "1" ]; then
1919
# Using a clean up script is easier because there isn't an easy way to tell
2020
# Xcode not to link/copy it unless we make another target, or dynamically
2121
# patch the project file.
22-
set -x
23-
rm -rf "$sparkle_path"
22+
(set -x
23+
rm -rf "$sparkle_path")
2424
fi
2525
else
2626
sparkle_xpcservices_symlink="$macvim_path/Contents/Frameworks/Sparkle.framework/XPCServices"
@@ -30,8 +30,21 @@ else
3030
# This only happens when building using Sparkle 2. It contains XPC Services
3131
# files which are only necessary for sandboxed apps, and not recommended
3232
# otherwise. See https://sparkle-project.org/documentation/sandboxing/.
33-
set -x
33+
(set -x
3434
rm -rf "$sparkle_xpcservices"
35-
rm "$sparkle_xpcservices_symlink"
35+
rm "$sparkle_xpcservices_symlink")
3636
fi
3737
fi
38+
39+
# This is a temporary measure to remove unnecessary files in the runtime
40+
# folder. Ideally we should move to use Vim's built-in `make install` mechanism
41+
# instead of copying all the files from the runtime over to the app blindly.
42+
# See https://github.com/macvim-dev/macvim/issues/1417
43+
set -x
44+
rm -rf $macvim_path/Contents/Resources/vim/runtime/indent/testdir
45+
rm -rf $macvim_path/Contents/Resources/vim/runtime/syntax/testdir
46+
rm -f $macvim_path/Contents/Resources/vim/runtime/doc/Makefile
47+
rm -f $macvim_path/Contents/Resources/vim/runtime/indent/Makefile
48+
rm -f $macvim_path/Contents/Resources/vim/runtime/lang/Makefile
49+
rm -f $macvim_path/Contents/Resources/vim/runtime/syntax/Makefile
50+
rm -f $macvim_path/Contents/Resources/vim/runtime/tutor/Makefile

0 commit comments

Comments
 (0)