To: vim_dev@googlegroups.com Subject: Patch 9.0.0524 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0524 Problem: Build instructions for MS-Windows are outdated. Solution: Remove instructions for old MSVC versions. Files: Filelist, runtime/doc/develop.txt, src/msvc2008.bat, src/msvc2010.bat, src/INSTALLpc.txt *** ../vim-9.0.0523/Filelist 2022-09-09 10:51:14.415772399 +0100 --- Filelist 2022-09-20 21:01:29.773811462 +0100 *************** *** 538,545 **** tools/rename.bat \ src/bigvim.bat \ src/bigvim64.bat \ - src/msvc2008.bat \ - src/msvc2010.bat \ src/msvc2015.bat \ src/msys32.bat \ src/msys64.bat \ --- 538,543 ---- *** ../vim-9.0.0523/runtime/doc/develop.txt 2022-06-28 11:21:05.000000000 +0100 --- runtime/doc/develop.txt 2022-09-20 21:21:39.056274351 +0100 *************** *** 188,195 **** The minimal C compiler version supported is C89, also known as ANSI C. Later standards, such as C99, are not widely supported, or at least not 100% ! supported. Therefore we use only some of the C99 features and disallow some ! (at least for now). Please don't make changes everywhere to use the C99 features, it causes merge problems for existing patches. Only use them for new and changed code. --- 188,195 ---- The minimal C compiler version supported is C89, also known as ANSI C. Later standards, such as C99, are not widely supported, or at least not 100% ! supported. Therefore we use only some of the C99 features and explicitly ! disallow some (this will gradually be adjusted over time). Please don't make changes everywhere to use the C99 features, it causes merge problems for existing patches. Only use them for new and changed code. *************** *** 215,226 **** "long long" is allowed and can be expected to be 64 bits. Use %lld in printf formats. Also "long long unsigned" with %llu. Not to be used ~ These C99 features are not to be used, because not enough compilers support them: - - Declaration after Statements (MSVC 2012 does not support it). All - declarations need to be at the start of the block. - Variable length arrays (even in C11 this is an optional feature). - _Bool and _Complex types. - "inline" (it's hardly ever needed, let the optimizer do its work) --- 215,235 ---- "long long" is allowed and can be expected to be 64 bits. Use %lld in printf formats. Also "long long unsigned" with %llu. + Declarations ~ + + Now that the minimal supported compiler is MSVC 2015 declarations do not need + to be at the start of a block. However, it is often a good idea to do this + anyway. + + Declaration of the for loop variable inside the loop is recommended: + for (int i = 0; i < len; ++i) + Since this is clearly an advantage we'll use this more often. + + Not to be used ~ These C99 features are not to be used, because not enough compilers support them: - Variable length arrays (even in C11 this is an optional feature). - _Bool and _Complex types. - "inline" (it's hardly ever needed, let the optimizer do its work) *** ../vim-9.0.0523/src/msvc2008.bat 2013-06-22 11:39:17.000000000 +0100 --- src/msvc2008.bat 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - @echo off - rem To be used on MS-Windows for Visual C++ 2008 Express Edition - rem aka Microsoft Visual Studio 9.0. - rem See INSTALLpc.txt for information. - @echo on - - call "%VS90COMNTOOLS%vsvars32.bat" --- 0 ---- *** ../vim-9.0.0523/src/msvc2010.bat 2013-06-22 11:39:30.000000000 +0100 --- src/msvc2010.bat 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,7 **** - @echo off - rem To be used on MS-Windows for Visual C++ 2010 Express Edition - rem aka Microsoft Visual Studio 10.0. - rem See INSTALLpc.txt for information. - @echo on - - call "%VS100COMNTOOLS%vsvars32.bat" --- 0 ---- *** ../vim-9.0.0523/src/INSTALLpc.txt 2022-09-18 12:24:30.542430902 +0100 --- src/INSTALLpc.txt 2022-09-20 21:15:33.200738190 +0100 *************** *** 60,77 **** select "custom" and check all checkboxes under "Universal Windows App Development Tools". Or whatever they are called now. (If you still want to target Windows XP, check also "Windows XP Support for ! C++". Note that this is no longer supported.) Visual Studio ------------- ! Building with Visual Studio (VS2010, VS2012, VS2013, VS2015, VS2017, VS2019 ! and VS2022) is straightforward. - To build Vim from the command line with MSVC, use Make_mvc.mak. Visual Studio installed a batch file called vcvars32.bat, which you must ! run to set up paths for nmake and MSVC. nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++ nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++ --- 60,81 ---- select "custom" and check all checkboxes under "Universal Windows App Development Tools". Or whatever they are called now. (If you still want to target Windows XP, check also "Windows XP Support for ! C++". Note that with the current source code this is no longer supported, you ! will have to check out an older version). Visual Studio ------------- ! Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is ! straightforward. Older versions probably don't work. Visual Studio installed a batch file called vcvars32.bat, which you must ! run to set up paths for nmake and MSVC. We provide a batch file ! "msvc2015.bat" for this. You may need to edit it if you didn't instal Visual ! Studio in the standard location. ! ! To build Vim from the command line with MSVC, use Make_mvc.mak. nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++ nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++ *************** *** 88,111 **** See the specific files for comments and options. These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and ! Ron Aaron; they have been tested. ! ! ! Visual C++ 2010 Express Edition *msvc-2010-express* ! ------------------------------- - Visual C++ 2010 Express Edition can be downloaded for free from: - http://www.microsoft.com/express/vc/Default.aspx - This includes the IDE and the debugger. ! To set the environment execute the msvc2010.bat script. You can then build ! Vim with Make_mvc.mak. ! ! ! Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp* --------------------------------------------- ! (The support for pre-Vista was removed in patch 9.0.0xxx. If you want to target Windows XP, use the source code before that.) Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE --- 92,104 ---- See the specific files for comments and options. These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and ! Ron Aaron; they have been tested. But several things changed after that... ! Targeting Windows XP with MSVC 2015 and later *new-msvc-windows-xp* --------------------------------------------- ! (The support for pre-Vista was removed in patch 9.0.0496. If you want to target Windows XP, use the source code before that.) Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE *************** *** 157,198 **** OLDER VERSIONS ! The minimal supported version is Windows 7. Building with older compilers ! might still work, but these instructions might be outdated. If you need the executable to run on Windows 98 or ME, use the 2005 one ! |msvc-2005-express|, and use the source code before 8.0.0029. ! ! ! Visual C++ 2005 Express Edition *msvc-2005-express* ! ------------------------------- ! ! NOTE: this most likely does not work ! ! Visual C++ 2005 Express Edition can be downloaded for free from: ! http://msdn.microsoft.com/vstudio/express/visualC/default.aspx ! This includes the IDE and the debugger. You will also need ! |ms-platform-sdk|. You can build Vim with Make_mvc.mak. ! ! Instructions for integrating the Platform SDK into VC Express: ! http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx ! ! ! Visual C++ 2008 Express Edition *msvc-2008-express* ! ------------------------------- ! ! NOTE: this most likely does not work ! ! Visual C++ 2008 Express Edition can be downloaded for free from: ! http://www.microsoft.com/express/downloads/ ! This includes the IDE and the debugger. ! ! To set the environment execute the msvc2008.bat script. You can then build ! Vim with Make_mvc.mak. ! ! For building 64 bit binaries you also need to install the SDK: ! "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" ! You don't need the examples and documentation. 2. MSYS2 with MinGW --- 150,162 ---- OLDER VERSIONS ! The minimal supported version is Windows 7. Building with compilers ! older than 2015 most likely doesn't work. Since MSVC 2015 can be obtained for ! free there is no point in supporting older versions. If you need the executable to run on Windows 98 or ME, use the 2005 one ! |msvc-2005-express|, and use the source code before 8.0.0029. See the ! src/INSTALLpc.txt file for instructions. 2. MSYS2 with MinGW *** ../vim-9.0.0523/src/version.c 2022-09-20 21:09:38.317219912 +0100 --- src/version.c 2022-09-20 21:22:18.132225976 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 524, /**/ -- hundred-and-one symptoms of being an internet addict: 115. You are late picking up your kid from school and try to explain to the teacher you were stuck in Web traffic. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///