Skip to content

Commit

Permalink
Build Vim as a DLL with stubs
Browse files Browse the repository at this point in the history
Vim is substantially smaller because vim.exe and gvim.exe are now
effectively the same binary. On Windows these must be distinct binaries
since they target the "console" and "windows" subsystems separately.
"vim -g" now works correctly, though "vim -g -f" still does not work.

Enabling VIMDLL requires enabling IME (probably a bug). I also noticed
vimrun.exe isn't stripped, nor does it need to be installed on the PATH.
  • Loading branch information
skeeto committed Jul 26, 2022
1 parent 9202b2d commit f9947de
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,12 @@ RUN patch -d.. -p1 <$PREFIX/src/vim-markdown-italics.patch \
&& ARCH= make -j$(nproc) -f Make_ming.mak \
OPTIMIZE=SIZE STATIC_STDCPLUS=yes HAS_GCC_EH=no \
UNDER_CYGWIN=yes CROSS=yes CROSS_COMPILE=$ARCH- \
FEATURES=HUGE OLE=no IME=no NETBEANS=no WINDRES_FLAGS= \
&& ARCH= make -j$(nproc) -f Make_ming.mak \
OPTIMIZE=SIZE STATIC_STDCPLUS=yes HAS_GCC_EH=no \
UNDER_CYGWIN=yes CROSS=yes CROSS_COMPILE=$ARCH- \
FEATURES=HUGE OLE=no IME=no NETBEANS=no WINDRES_FLAGS= \
GUI=no vim.exe \
FEATURES=HUGE VIMDLL=yes NETBEANS=no WINDRES_FLAGS= \
&& $ARCH-strip vimrun.exe \
&& rm -rf ../runtime/tutor/tutor.* \
&& cp -r ../runtime $PREFIX/share/vim \
&& cp gvim.exe vim.exe $PREFIX/share/vim/ \
&& cp vimrun.exe xxd/xxd.exe $PREFIX/bin \
&& cp vimrun.exe gvim.exe vim.exe *.dll $PREFIX/share/vim/ \
&& cp xxd/xxd.exe $PREFIX/bin \
&& printf '@set SHELL=\r\n@start "" "%%~dp0/../share/vim/gvim.exe" %%*\r\n' \
>$PREFIX/bin/gvim.bat \
&& printf '@set SHELL=\r\n@"%%~dp0/../share/vim/vim.exe" %%*\r\n' \
Expand Down

0 comments on commit f9947de

Please sign in to comment.