To: vim_dev@googlegroups.com Subject: Patch 7.4.1031 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1031 Problem: Can't build with Python interface using MingW. Solution: Update the Makefile. (Yasuhiro Matsumoto) Files: src/INSTALLpc.txt, src/Make_cyg_ming.mak *** ../vim-7.4.1030/src/INSTALLpc.txt 2014-11-05 13:53:13.184806497 +0100 --- src/INSTALLpc.txt 2016-01-02 20:23:38.326731170 +0100 *************** *** 232,237 **** --- 232,241 ---- http://mingw-w64.sourceforge.net/ + Or a compiler provided on msys2: + + https://msys2.github.io/ + Once you have downloaded the compiler binaries, unpack them on your hard disk somewhere, and put them on your PATH. If you are on Win95/98 you can edit your AUTOEXEC.BAT file with a line like: *************** *** 239,245 **** set PATH=C:\MinGW\bin;%PATH% or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance), ! System, Advanced, and edit the environment from there. Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: --- 243,256 ---- set PATH=C:\MinGW\bin;%PATH% or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance), ! System, Advanced, and edit the environment from there. If you use msys2 ! compilers, set your installed paths: ! ! C:\msys2\mingw32\bin ! ! for 32bit. And 64bit: ! ! C:\msys2\mingw64\bin Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: *************** *** 341,361 **** After installing the ActivePython, you will have to create a 'mingw32' 'libpython20.a' to link with: ! cd $PYTHON/libs ! pexports python20.dll > python20.def ! dlltool -d python20.def -l libpython20.a Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to the root of the Python installation (C:\Python20, for example). If you are cross-compiling on Linux with the mingw32 setup, you need to also convert all the 'Include' files to *unix* line-endings. This bash command will do it easily: ! for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil Now just do: ! make -f Make_ming.mak gvim.exe ! and you will end up with a Python-enabled, Win32 version. Enjoy! 7. Building with MzScheme support --- 352,383 ---- After installing the ActivePython, you will have to create a 'mingw32' 'libpython20.a' to link with: ! cd $PYTHON/libs ! pexports python20.dll > python20.def ! dlltool -d python20.def -l libpython20.a Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to the root of the Python installation (C:\Python20, for example). If you are cross-compiling on Linux with the mingw32 setup, you need to also convert all the 'Include' files to *unix* line-endings. This bash command will do it easily: ! for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil Now just do: ! make -f Make_ming.mak gvim.exe ! ! And if you use msys2 to build python support (as one line): ! mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64 ! PYTHON_HOME=c:/msys64/mingw64 ! PYTHONINC=-Ic:/msys64/mingw64/include/python2.7 ! DYNAMIC_PYTHON=yes ! PYTHON_VER=27 ! DYNAMIC_PYTHON_DLL=libpython2.7.dll ! ARCH=x86-64 ! STATIC_STDCPLUS=yes ! ! You will end up with a Python-enabled, Win32 version. Enjoy! 7. Building with MzScheme support *************** *** 464,482 **** After you've built the Vim binaries as described above, you're ready to install Vim on your system. However, if you've obtained the Vim sources ! using Mercurial or by downloading them as a unix tar file, you must first create a "vim73" directory. If you instead downloaded the sources as zip files, you can skip this setup as the zip archives already have the ! correct directory structure. A. Create a Vim "runtime" subdirectory named "vim73" ----------------------------------------------------- ! If you obtained your Vim sources as zip files, you can skip this step. Otherwise, continue reading. Go to the directory that contains the Vim "src" and "runtime" ! directories and create a new subdirectory named "vim73". ! Copy the "runtime" files into "vim73": copy runtime\* vim73 --- 486,504 ---- After you've built the Vim binaries as described above, you're ready to install Vim on your system. However, if you've obtained the Vim sources ! using Mercurial or by downloading them as a unix tar file, you must first create a "vim73" directory. If you instead downloaded the sources as zip files, you can skip this setup as the zip archives already have the ! correct directory structure. A. Create a Vim "runtime" subdirectory named "vim73" ----------------------------------------------------- ! If you obtained your Vim sources as zip files, you can skip this step. Otherwise, continue reading. Go to the directory that contains the Vim "src" and "runtime" ! directories and create a new subdirectory named "vim73". ! Copy the "runtime" files into "vim73": copy runtime\* vim73 *************** *** 492,500 **** C. Move the "vim73" directory into the Vim installation subdirectory --------------------------------------------------------------------- Move the "vim73" subdirectory into the subdirectory where you want Vim ! to be installed. Typically, this subdirectory will be named "vim". If you already have a "vim73" subdirectory in "vim", delete it first ! by running its uninstal.exe program. D. Install Vim --------------- --- 514,522 ---- C. Move the "vim73" directory into the Vim installation subdirectory --------------------------------------------------------------------- Move the "vim73" subdirectory into the subdirectory where you want Vim ! to be installed. Typically, this subdirectory will be named "vim". If you already have a "vim73" subdirectory in "vim", delete it first ! by running its uninstal.exe program. D. Install Vim --------------- *************** *** 507,513 **** popup menu. - You can have it create batch files, so that you can run Vim from the console or in a shell. You can select one of the directories in your ! PATH or add the directory to PATH using the Windows Control Panel. - Create entries for Vim on the desktop and in the Start menu. Happy Vimming! --- 529,535 ---- popup menu. - You can have it create batch files, so that you can run Vim from the console or in a shell. You can select one of the directories in your ! PATH or add the directory to PATH using the Windows Control Panel. - Create entries for Vim on the desktop and in the Start menu. Happy Vimming! *** ../vim-7.4.1030/src/Make_cyg_ming.mak 2015-06-25 16:13:37.775750104 +0200 --- src/Make_cyg_ming.mak 2016-01-02 20:04:24.003272008 +0100 *************** *** 212,218 **** endif ifndef PYTHON_VER ! PYTHON_VER=22 endif ifeq (no,$(DYNAMIC_PYTHON)) --- 212,224 ---- endif ifndef PYTHON_VER ! PYTHON_VER=27 ! endif ! ifndef DYNAMIC_PYTHON_DLL ! DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll ! endif ! ifdef PYTHON_HOME ! PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\" endif ifeq (no,$(DYNAMIC_PYTHON)) *************** *** 220,231 **** --- 226,239 ---- endif # my include files are in 'win32inc' on Linux, and 'include' in the standard # NT distro (ActiveState) + ifndef PYTHONINC ifeq ($(CROSS),no) PYTHONINC=-I $(PYTHON)/include else PYTHONINC=-I $(PYTHON)/win32inc endif endif + endif # Python3 interface: # PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak) *************** *** 772,778 **** gui.h $(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL) ! $(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@ $(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@ --- 780,786 ---- gui.h $(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL) ! $(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\" $< -o $@ $(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL) $(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@ *** ../vim-7.4.1030/src/version.c 2016-01-02 19:50:00.196639435 +0100 --- src/version.c 2016-01-02 20:26:04.809139405 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 1031, /**/ -- In Africa some of the native tribes have a custom of beating the ground with clubs and uttering spine chilling cries. Anthropologists call this a form of primitive self-expression. In America we call it golf. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///