comparison src/INSTALLpc.txt @ 14222:78449866e9a9 v8.1.0128

patch 8.1.0128: building with MinGW does not work out-of-the-box commit https://github.com/vim/vim/commit/304925e75031751fc87b51e387eb079bf3ae2066 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 30 16:27:02 2018 +0200 patch 8.1.0128: building with MinGW does not work out-of-the-box Problem: Building with MinGW does not work out-of-the-box. Solution: Add instructions for MSYS2. Set default WINVER. Add batch files to set $PATH for MSYS2.
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jun 2018 16:30:06 +0200
parents cfce9ac1d1e8
children 8eb8200a55b2
comparison
equal deleted inserted replaced
14221:21a68013cae2 14222:78449866e9a9
20 any faster, but you can edit files larger than 2 Gbyte. 20 any faster, but you can edit files larger than 2 Gbyte.
21 21
22 22
23 Contents: 23 Contents:
24 1. Microsoft Visual C++ 24 1. Microsoft Visual C++
25 2. Using MinGW 25 2. Using MSYS2 with MinGW
26 3. Cygwin 26 3. Using MinGW
27 4. Borland 27 4. Cygwin
28 5. Cross compiling for Win32 from a Linux machine 28 5. Borland
29 6. Building with Python support 29 6. Cross compiling for Win32 from a Linux machine
30 7. Building with Python3 support 30 7. Building with Python support
31 8. Building with Racket or MzScheme support 31 8. Building with Python3 support
32 9. Building with Lua support 32 9. Building with Racket or MzScheme support
33 10. Building with Perl support 33 10. Building with Lua support
34 11. Building with Ruby support 34 11. Building with Perl support
35 12. Building with Tcl support 35 12. Building with Ruby support
36 13. Building with Terminal support 36 13. Building with Tcl support
37 14. Building with DirectX (DirectWrite) support 37 14. Building with Terminal support
38 15. Windows 3.1 38 15. Building with DirectX (DirectWrite) support
39 16. MS-DOS 39 16. Windows 3.1
40 40 17. MS-DOS
41 17. Installing after building from sources 41
42 18. Installing after building from sources
42 43
43 44
44 The currently recommended way (that means it has been verified to work) is 45 The currently recommended way (that means it has been verified to work) is
45 using the "Visual Studio Community 2015" installation. This includes the SDK 46 using the "Visual Studio Community 2015" installation. This includes the SDK
46 needed to target Windows XP. But not older Windows versions (95, 98), see 47 needed to target Windows XP. But not older Windows versions (95, 98), see
259 260
260 Instructions for integrating the Platform SDK into VC Express: 261 Instructions for integrating the Platform SDK into VC Express:
261 http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx 262 http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
262 263
263 264
264 265 2. MSYS2 with MinGW
265 2. MinGW 266 ===================
267
268 2.1. Setup the basic msys2 environment
269
270 Go to the official page of MSYS2: https://www.msys2.org
271 Download an installer:
272
273 * msys2-x86_64-YYYYMMDD.exe for 64-bit Windows
274 (Even if you want to build 32-bit Vim)
275 * msys2-i686-YYYYMMDD.exe for 32-bit Windows
276
277 Execute the installer and follow the instructions to update basic packages.
278 At the end keep the checkbox checked to run msys2 now. If needed, you can
279 open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS
280
281 Execute:
282 $ pacman -Syu
283
284 And restart MSYS2 window (select "MSYS2 MSYS" icon from the Start Menu).
285 Then execute:
286 $ pacman -Su
287
288 If pacman complains that `catgets` and `libcatgets` conflict with another
289 package, select `y` to remove them.
290
291
292 2.2. Install additional packages for building Vim
293
294 The following package groups are required for building Vim:
295
296 * base-devel
297 * mingw-w64-i686-toolchain (for building 32-bit Vim)
298 * mingw-w64-x86_64-toolchain (for building 64-bit Vim)
299
300 Use the following command to install them:
301
302 $ pacman -S base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
303
304 Or you can use the `pacboy` command to avoid long package names:
305
306 $ pacboy -S base-devel: toolchain:m
307
308 (See `pacboy help` for the help.)
309
310
311 2.3. Keep the build environment up-to-date
312
313 After you have installed the build environment, you may want to keep it
314 up-to-date (E.g. always use the latest GCC).
315 In that case, you just need to execute the command:
316 $ pacman -Syu
317
318
319 # Build Vim
320
321 Select one of the following icon from the Start Menu:
322
323 * MSYS2 MinGW 32-bit (To build 32-bit versions of Vim)
324 * MSYS2 MinGW 64-bit (To build 64-bit versions of Vim)
325
326 Go to the source directory of Vim, then execute the make command. E.g.:
327
328 make -f Make_ming.mak
329 make -f Make_ming.mak GUI=no
330 make -f Make_ming.mak GUI=no DEBUG=yes
331
332 NOTE: you can't execute the vim.exe in the MSYS console, open a normal Windows
333 console for that. You need to set $PATH to be able to build there, e.g.:
334
335 set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%
336
337 This command is in msys32.bat. Or or the 64 bit compiler use msys64.bat:
338
339 set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
340
341 If you have msys64 in another location you will need to adjust the paths for
342 that.
343
344
345 3. MinGW
266 ======== 346 ========
267 347
268 (written by Ron Aaron: <ronaharon@yahoo.com>) 348 (written by Ron Aaron: <ronaharon@yahoo.com>)
269 349
270 This is about how to produce a Win32 binary of gvim with MinGW. 350 This is about how to produce a Win32 binary of gvim with MinGW.
342 422
343 If you want National Language Support, read the file src/po/README_mingw.txt. 423 If you want National Language Support, read the file src/po/README_mingw.txt.
344 You need to uncomment lines in Make_ming.mak to have NLS defined. 424 You need to uncomment lines in Make_ming.mak to have NLS defined.
345 425
346 426
347 3. Cygwin 427 4. Cygwin
348 ========= 428 =========
349 429
350 Use Make_cyg.mak with Cygwin's GCC. See 430 Use Make_cyg.mak with Cygwin's GCC. See
351 http://users.skynet.be/antoine.mechelynck/vim/compile.htm 431 http://users.skynet.be/antoine.mechelynck/vim/compile.htm
352 432
354 Unix archive then). Then you get a Cygwin application (feels like Vim is 434 Unix archive then). Then you get a Cygwin application (feels like Vim is
355 running on Unix), while with Make_cyg.mak you get a Windows application (like 435 running on Unix), while with Make_cyg.mak you get a Windows application (like
356 with the other makefiles). 436 with the other makefiles).
357 437
358 438
359 4. Borland 439 5. Borland
360 =========== 440 ===========
361 441
362 Use Make_bc5.mak with Borland C++ 5.x. See 442 Use Make_bc5.mak with Borland C++ 5.x. See
363 http://users.skynet.be/antoine.mechelynck/vim/compile.htm 443 http://users.skynet.be/antoine.mechelynck/vim/compile.htm
364 444
365 445
366 5. Cross compiling for Win32 from a Linux machine 446 6. Cross compiling for Win32 from a Linux machine
367 ================================================= 447 =================================================
368 448
369 [Update of 1) needs to be verified] 449 [Update of 1) needs to be verified]
370 450
371 If you like, you can compile the 'mingw' Win32 version from the comfort of 451 If you like, you can compile the 'mingw' Win32 version from the comfort of
381 4) make -f Make_ming.mak gvim.exe 461 4) make -f Make_ming.mak gvim.exe
382 462
383 Now you have created the Windows binary from your Linux box! Have fun... 463 Now you have created the Windows binary from your Linux box! Have fun...
384 464
385 465
386 6. Building with Python support 466 7. Building with Python support
387 =============================== 467 ===============================
388 468
389 For building with MSVC 2008 the "Windows Installer" from www.python.org 469 For building with MSVC 2008 the "Windows Installer" from www.python.org
390 works fine. 470 works fine.
391 471
433 513
434 (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) 514 (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
435 You will end up with a Python-enabled, Win32 version. Enjoy! 515 You will end up with a Python-enabled, Win32 version. Enjoy!
436 516
437 517
438 7. Building with Python3 support 518 8. Building with Python3 support
439 ================================ 519 ================================
440 520
441 For building with MSVC 2008 the "Windows Installer" from www.python.org 521 For building with MSVC 2008 the "Windows Installer" from www.python.org
442 works fine. Python 3.6 is recommended. 522 works fine. Python 3.6 is recommended.
443 523
464 STATIC_STDCPLUS=yes 544 STATIC_STDCPLUS=yes
465 545
466 (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.) 546 (This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
467 547
468 548
469 8. Building with Racket or MzScheme support 549 9. Building with Racket or MzScheme support
470 ======================================== 550 ========================================
471 551
472 1) Building with Racket support (newest) 552 1) Building with Racket support (newest)
473 553
474 MzScheme and PLT Scheme names have been rebranded as Racket. Vim with Racket 554 MzScheme and PLT Scheme names have been rebranded as Racket. Vim with Racket
554 After a successful build, these dlls can be freely removed, leaving them in 634 After a successful build, these dlls can be freely removed, leaving them in
555 %WINDOWS%\System32 only. 635 %WINDOWS%\System32 only.
556 636
557 637
558 638
559 9. Building with Lua support 639 10. Building with Lua support
560 ============================ 640 ============================
561 641
562 Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin). 642 Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin).
563 You can use binaries from LuaBinaries: http://luabinaries.sourceforge.net/ 643 You can use binaries from LuaBinaries: http://luabinaries.sourceforge.net/
564 This also applies to when you get a Vim executable and don't build yourself, 644 This also applies to when you get a Vim executable and don't build yourself,
609 689
610 make -f Make_cyg.mak 690 make -f Make_cyg.mak
611 LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53 691 LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
612 692
613 693
614 10. Building with Perl support 694 11. Building with Perl support
615 ============================== 695 ==============================
616 696
617 Vim with Perl support can be built with either MSVC or MinGW (or Cygwin). 697 Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
618 You can use binaries from ActiveState (ActivePerl) or Strawberry Perl. 698 You can use binaries from ActiveState (ActivePerl) or Strawberry Perl.
619 699
635 715
636 mingw32-make -f Make_ming.mak 716 mingw32-make -f Make_ming.mak
637 PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522 717 PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
638 718
639 719
640 11. Building with Ruby support 720 12. Building with Ruby support
641 ============================== 721 ==============================
642 722
643 Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin). 723 Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
644 Ruby doesn't provide the official Windows binaries. The most widely used 724 Ruby doesn't provide the official Windows binaries. The most widely used
645 Windows binaries might be RubyInstaller. Currently Ruby 2.4 is recommended. 725 Windows binaries might be RubyInstaller. Currently Ruby 2.4 is recommended.
743 If you set WINVER explicitly, it must be set to >=0x500, when building with 823 If you set WINVER explicitly, it must be set to >=0x500, when building with
744 Ruby 2.1 or later. (Default is 0x501.) 824 Ruby 2.1 or later. (Default is 0x501.)
745 825
746 826
747 827
748 12. Building with Tcl support 828 13. Building with Tcl support
749 ============================= 829 =============================
750 830
751 Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin). 831 Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
752 You can use binaries from ActiveState (ActiveTcl). 832 You can use binaries from ActiveState (ActiveTcl).
753 833
775 855
776 mingw32-make -f Make_ming.mak 856 mingw32-make -f Make_ming.mak
777 TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6 857 TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
778 858
779 859
780 13. Building with Terminal support 860 14. Building with Terminal support
781 ================================== 861 ==================================
782 862
783 Vim with Terminal support can be built with either MSVC, MinGW or Cygwin. 863 Vim with Terminal support can be built with either MSVC, MinGW or Cygwin.
784 This uses the included libvterm and winpty. No extra header files or 864 This uses the included libvterm and winpty. No extra header files or
785 libraries are needed for building. Just set TERMINAL to yes. 865 libraries are needed for building. Just set TERMINAL to yes.
791 Or when using MinGW: 871 Or when using MinGW:
792 872
793 mingw32-make -f Make_ming.mak TERMINAL=yes 873 mingw32-make -f Make_ming.mak TERMINAL=yes
794 874
795 875
796 14. Building with DirectX (DirectWrite) support 876 15. Building with DirectX (DirectWrite) support
797 =============================================== 877 ===============================================
798 878
799 Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW. 879 Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW.
800 This requires dwrite_2.h and some other header files which come with Windows 880 This requires dwrite_2.h and some other header files which come with Windows
801 SDK 8.1 or later (or MinGW-w64), if you want to enable color emoji support. 881 SDK 8.1 or later (or MinGW-w64), if you want to enable color emoji support.
825 Just set DIRECTX to yes: 905 Just set DIRECTX to yes:
826 906
827 mingw32-make -f Make_ming.mak DIRECTX=yes 907 mingw32-make -f Make_ming.mak DIRECTX=yes
828 908
829 909
830 15. Windows 3.1x 910 16. Windows 3.1x
831 ================ 911 ================
832 912
833 The Windows 3.1x support was removed in patch 7.4.1364. 913 The Windows 3.1x support was removed in patch 7.4.1364.
834 914
835 915
836 16. MS-DOS 916 17. MS-DOS
837 ========== 917 ==========
838 918
839 The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions 919 The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions
840 work on MS-DOS because of the limited amount of memory available. 920 work on MS-DOS because of the limited amount of memory available.
841 921
842 922
843 17. Installing after building from sources 923 18. Installing after building from sources
844 ========================================== 924 ==========================================
845 925
846 [provided by Michael Soyka, updated by Ken Takata] 926 [provided by Michael Soyka, updated by Ken Takata]
847 927
848 After you've built the Vim binaries as described above, you're ready to 928 After you've built the Vim binaries as described above, you're ready to