diff --git a/.gitignore b/.gitignore index 9a82e11a..30c19c98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,4 @@ -autoload/vimproc_*.so -autoload/vimproc_*.dll -autoload/vimproc_*.dll.old -autoload/vimproc_*.dll.manifest -autoload/vimproc_*.exp -autoload/vimproc_*.lib -autoload/*.pdb +lib/* doc/tags *.obj *.o diff --git a/README.mkd b/README.mkd index d0becd99..7c5a6725 100644 --- a/README.mkd +++ b/README.mkd @@ -25,8 +25,8 @@ Not supported platforms: * Clone this repo * Build vimproc's native extensions (see Building for details) -* Copy `autoload/*` and `plugin/*` files to your 'runtimepath' directory (see - `:help runtimepath`). +* Copy `autoload/*`, `lib/*` and `plugin/*` files to your 'runtimepath' + directory (see `:help runtimepath`). ### NeoBundle diff --git a/appveyor.yml b/appveyor.yml index 120a2380..e28e732b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ build_script: test_script: - '%APPVEYOR_BUILD_FOLDER%\tools\appveyor.bat test' artifacts: - - path: autoload/vimproc_*.dll + - path: lib/vimproc_*.dll name: vimproc.dll deploy: provider: GitHub diff --git a/autoload/vimproc.vim b/autoload/vimproc.vim index 63925a1f..baa0f7ab 100644 --- a/autoload/vimproc.vim +++ b/autoload/vimproc.vim @@ -71,7 +71,7 @@ endif call vimproc#util#set_default( \ 'g:vimproc#dll_path', - \ expand(':p:h') . '/' . s:vimproc_dll_basename, + \ expand(':p:h:h') . '/lib/' . s:vimproc_dll_basename, \ 'g:vimproc_dll_path') unlet s:vimproc_dll_basename @@ -141,7 +141,7 @@ if !filereadable(g:vimproc#dll_path) || !has('libcall') "{{{ endif"}}} function! vimproc#version() "{{{ - return str2nr(printf('%2d%02d', 9, 1)) + return str2nr(printf('%2d%02d', 9, 2)) endfunction"}}} function! vimproc#dll_version() "{{{ let [dll_version] = s:libcall('vp_dlversion', []) diff --git a/doc/vimproc.txt b/doc/vimproc.txt index 1f7c719a..844c2617 100644 --- a/doc/vimproc.txt +++ b/doc/vimproc.txt @@ -1,6 +1,6 @@ *vimproc.txt* Asynchronous execution plugin for Vim -Version: 9.1 +Version: 9.2 Author : Shougo Original Author : Yukihiro Nakadaira License: MIT license {{{ @@ -48,7 +48,7 @@ I'm maintaining it now. Instead of external shell (example: 'shell'), ============================================================================== INSTALL *vimproc-install* -In first, you get vimproc from git repository. +In first, you must get vimproc from git repository. http://github.com/Shougo/vimproc.vim @@ -92,7 +92,8 @@ Mac OS X > $ make < -Note: If you want to build for multiple architectures, you can use $ARCHS and $CC variables. +Note: If you want to build for multiple architectures, you can use $ARCHS and +$CC variables. Build for i386 and x86-64: > @@ -379,13 +380,13 @@ VARIABLES *vimproc-variables* *g:vimproc#dll_path* g:vimproc#dll_path (default - Win32: "$VIMRUNTIME/autoload/vimproc_win32.dll" - Win64: "$VIMRUNTIME/autoload/vimproc_win64.dll" - Cygwin: "$VIMRUNTIME/autoload/vimproc_cygwin.dll" - Mac: "$VIMRUNTIME/autoload/vimproc_mac.so" - Linux32: "$VIMRUNTIME/autoload/vimproc_linux32.so" - Linux64: "$VIMRUNTIME/autoload/vimproc_linux64.so" - Others: "$VIMRUNTIME/autoload/vimproc_unix.so") + Win32: "$VIMRUNTIME/lib/vimproc_win32.dll" + Win64: "$VIMRUNTIME/lib/vimproc_win64.dll" + Cygwin: "$VIMRUNTIME/lib/vimproc_cygwin.dll" + Mac: "$VIMRUNTIME/lib/vimproc_mac.so" + Linux32: "$VIMRUNTIME/lib/vimproc_linux32.so" + Linux64: "$VIMRUNTIME/lib/vimproc_linux64.so" + Others: "$VIMRUNTIME/lib/vimproc_unix.so") This variable stores a dll name used by vimproc. You must compile this dll file. If this dll does not exist, vimproc will echo error. diff --git a/lib/.gitkeep b/lib/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/make_android.mak b/make_android.mak index f8d9e816..2e4c5dc1 100644 --- a/make_android.mak +++ b/make_android.mak @@ -8,9 +8,9 @@ CFLAGS+=-W -Wall -Wno-unused -Wno-unused-parameter -std=c99 -O2 -fPIC -pedantic LDFLAGS+=-shared -TARGET=autoload/vimproc_unix.so -SRC=autoload/proc.c autoload/ptytty.c -INC=autoload/vimstack.c autoload/ptytty.h +TARGET=lib/vimproc_unix.so +SRC=src/proc.c src/ptytty.c +INC=src/vimstack.c src/ptytty.h all: $(TARGET) diff --git a/make_bsd.mak b/make_bsd.mak index 535912e2..3a23207f 100644 --- a/make_bsd.mak +++ b/make_bsd.mak @@ -2,15 +2,15 @@ SUFFIX!=uname -sm | tr '[:upper:]' '[:lower:]' | sed -e 's/ /_/' -TARGET=autoload/vimproc_$(SUFFIX).so +TARGET=lib/vimproc_$(SUFFIX).so -SRC=autoload/proc.c +SRC=src/proc.c CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC LDFLAGS+=-lutil all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: diff --git a/make_cygwin.mak b/make_cygwin.mak index 89305873..87f5ad76 100644 --- a/make_cygwin.mak +++ b/make_cygwin.mak @@ -1,11 +1,11 @@ CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -use=gnu99 -shared -TARGET=autoload/vimproc_cygwin.dll -SRC=autoload/proc.c +TARGET=lib/vimproc_cygwin.dll +SRC=src/proc.c LDFLAGS+=-lutil all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c gcc $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: diff --git a/make_mac.mak b/make_mac.mak index 9b1c6ca3..97ead7c7 100644 --- a/make_mac.mak +++ b/make_mac.mak @@ -10,15 +10,15 @@ CC=gcc endif endif -TARGET=autoload/vimproc_mac.so -SRC=autoload/proc.c +TARGET=lib/vimproc_mac.so +SRC=src/proc.c ARCHS= CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -bundle -fPIC $(foreach ARCH,$(ARCHS),-arch $(ARCH)) LDFLAGS= all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) .PHONY : clean diff --git a/make_mingw32.mak b/make_mingw32.mak index 002fd935..5302166b 100644 --- a/make_mingw32.mak +++ b/make_mingw32.mak @@ -1,14 +1,14 @@ # for MinGW. -TARGET=autoload/vimproc_win32.dll -SRC=autoload/proc_w32.c +TARGET=lib/vimproc_win32.dll +SRC=src/proc_w32.c CC=gcc CFLAGS+=-O2 -Wall -shared -m32 LDFLAGS+=-lwsock32 all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: diff --git a/make_mingw64.mak b/make_mingw64.mak index 6c690e52..32d737dd 100644 --- a/make_mingw64.mak +++ b/make_mingw64.mak @@ -1,14 +1,14 @@ # for MinGW. -TARGET=autoload/vimproc_win64.dll -SRC=autoload/proc_w32.c +TARGET=lib/vimproc_win64.dll +SRC=src/proc_w32.c CC=x86_64-w64-mingw32-gcc CFLAGS+=-O2 -Wall -shared -m64 LDFLAGS+=-lwsock32 all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: diff --git a/make_msvc.mak b/make_msvc.mak index c8a4987c..e452ab83 100644 --- a/make_msvc.mak +++ b/make_msvc.mak @@ -42,7 +42,8 @@ VIMPROC=vimproc_win64 VIMPROC=vimproc_win32 !endif -SRCDIR = autoload +SRCDIR = src +LIBDIR = lib OUTDIR = $(SRCDIR)\obj$(CPU) OBJS = $(OUTDIR)/proc_w32.obj @@ -52,16 +53,16 @@ CFLAGS = $(CFLAGS) $(DEFINES) /wd4100 /wd4127 /O2 # RULES -build: $(SRCDIR)\$(VIMPROC).dll +build: $(LIBDIR)\$(VIMPROC).dll clean: -IF EXIST $(OUTDIR)/nul RMDIR /s /q $(OUTDIR) - -DEL /F /Q $(SRCDIR)\vimproc_win32.* - -DEL /F /Q $(SRCDIR)\vimproc_win64.* + -DEL /F /Q $(LIBDIR)\vimproc_win32.* + -DEL /F /Q $(LIBDIR)\vimproc_win64.* -DEL /F /Q $(SRCDIR)\*.obj -DEL /F /Q $(SRCDIR)\*.pdb -$(SRCDIR)\$(VIMPROC).dll: $(OBJS) +$(LIBDIR)\$(VIMPROC).dll: $(OBJS) $(link) /NOLOGO $(ldebug) $(dlllflags) $(conlibsdll) $(LFLAGS) \ /OUT:$@ $(OBJS) shell32.lib IF EXIST $@.manifest \ diff --git a/make_sunos.mak b/make_sunos.mak index 4aadcc10..416ec4ae 100644 --- a/make_sunos.mak +++ b/make_sunos.mak @@ -11,9 +11,9 @@ LDFLAGS+=-shared endif CPPFLAGS+=-D_XPG6 -D__EXTENSIONS__ -TARGET=autoload/vimproc_unix.so -SRC=autoload/proc.c autoload/ptytty.c -INC=autoload/vimstack.c autoload/ptytty.h +TARGET=lib/vimproc_unix.so +SRC=src/proc.c src/ptytty.c +INC=src/vimstack.c src/ptytty.h all: $(TARGET) diff --git a/make_unix.mak b/make_unix.mak index 055bd1b8..85eeaedd 100644 --- a/make_unix.mak +++ b/make_unix.mak @@ -5,15 +5,15 @@ ifneq (,$(wildcard /lib*/ld-linux*.so.2)) else SUFFIX=unix endif -TARGET=autoload/vimproc_$(SUFFIX).so +TARGET=lib/vimproc_$(SUFFIX).so -SRC=autoload/proc.c +SRC=src/proc.c CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC LDFLAGS+=-lutil all: $(TARGET) -$(TARGET): $(SRC) autoload/vimstack.c +$(TARGET): $(SRC) src/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: diff --git a/autoload/fakepoll.h b/src/fakepoll.h similarity index 100% rename from autoload/fakepoll.h rename to src/fakepoll.h diff --git a/autoload/proc.c b/src/proc.c similarity index 99% rename from autoload/proc.c rename to src/proc.c index 9c58a1c8..b8f174d7 100644 --- a/autoload/proc.c +++ b/src/proc.c @@ -168,7 +168,7 @@ vp_dlclose(char *args) const char * vp_dlversion(char *args) { - vp_stack_push_num(&_result, "%2d%02d", 9, 1); + vp_stack_push_num(&_result, "%2d%02d", 9, 2); return vp_stack_return(&_result); } diff --git a/autoload/proc_w32.c b/src/proc_w32.c similarity index 99% rename from autoload/proc_w32.c rename to src/proc_w32.c index d391b4be..e69daa71 100644 --- a/autoload/proc_w32.c +++ b/src/proc_w32.c @@ -228,7 +228,7 @@ vp_dlclose(char *args) const char * vp_dlversion(char *args) { - vp_stack_push_num(&_result, "%2d%02d", 9, 1); + vp_stack_push_num(&_result, "%2d%02d", 9, 2); return vp_stack_return(&_result); } diff --git a/autoload/ptytty.c b/src/ptytty.c similarity index 100% rename from autoload/ptytty.c rename to src/ptytty.c diff --git a/autoload/ptytty.h b/src/ptytty.h similarity index 100% rename from autoload/ptytty.h rename to src/ptytty.h diff --git a/autoload/vimstack.c b/src/vimstack.c similarity index 100% rename from autoload/vimstack.c rename to src/vimstack.c diff --git a/tools/update-dll-mingw.bat b/tools/update-dll-mingw.bat index 185f300a..af51ee5b 100755 --- a/tools/update-dll-mingw.bat +++ b/tools/update-dll-mingw.bat @@ -47,10 +47,10 @@ if ERRORLEVEL 1 ( rem Build failed. rem Try to delete old DLLs. - if exist autoload\%vimproc_dllname%.old del autoload\%vimproc_dllname%.old - if exist autoload\%vimproc_dllname% del autoload\%vimproc_dllname% + if exist lib\%vimproc_dllname%.old del lib\%vimproc_dllname%.old + if exist lib\%vimproc_dllname% del lib\%vimproc_dllname% rem If the DLL couldn't delete (may be it is in use), rename it. - if exist autoload\%vimproc_dllname% ren autoload\%vimproc_dllname% %vimproc_dllname%.old + if exist lib\%vimproc_dllname% ren lib\%vimproc_dllname% %vimproc_dllname%.old mingw32-make -f make_mingw%vimproc_arch%.mak %1 %2 %3 %4 %5 %6 %7 %8 %9 )