blob: 590c48a7c461b92d6652b68e4bffa694c87f6022 [file] [log] [blame]
Bram Moolenaar81275ca2016-02-24 21:02:20 +01001@echo off
2:: Batch file for building/testing Vim on AppVeyor
3
4setlocal ENABLEDELAYEDEXPANSION
5cd %APPVEYOR_BUILD_FOLDER%
6
7cd src
8echo "Building MinGW 32bit console version"
9set PATH=c:\msys64\mingw32\bin;%PATH%
Bram Moolenaar30276f22019-01-24 17:59:39 +010010mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
Bram Moolenaar10893742020-06-19 22:37:47 +020011.\vim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
Bram Moolenaar81275ca2016-02-24 21:02:20 +010012:: Save vim.exe before Make clean, moved back below.
13copy vim.exe testdir
14mingw32-make.exe -f Make_ming.mak clean
15
16:: Build Mingw huge version with python and channel support, or
17:: with specified features without python.
18echo "Building MinGW 32bit GUI version"
19if "%FEATURE%" == "HUGE" (
Bram Moolenaar30276f22019-01-24 17:59:39 +010020 mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35 FEATURES=%FEATURE% || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010021) ELSE (
Bram Moolenaar30276f22019-01-24 17:59:39 +010022 mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010023)
Bram Moolenaar10893742020-06-19 22:37:47 +020024.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming_gui.txt
Bram Moolenaar81275ca2016-02-24 21:02:20 +010025
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020026:: Filter out the progress bar from the build log
27sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
28
Bram Moolenaar81275ca2016-02-24 21:02:20 +010029echo "Building MSVC 64bit console Version"
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020030nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
Bram Moolenaar10893742020-06-19 22:37:47 +020031:: The executable is not used
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020032nmake -f Make_mvc2.mak clean
Bram Moolenaar81275ca2016-02-24 21:02:20 +010033
34:: build MSVC huge version with python and channel support
35:: GUI needs to be last, so that testing works
36echo "Building MSVC 64bit GUI Version"
37if "%FEATURE%" == "HUGE" (
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020038 nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 FEATURES=%FEATURE% || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010039) ELSE (
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020040 nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010041)
42.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
43
44:: Restore vim.exe, tests will run with this.
45move /Y testdir\vim.exe .
46echo "version output MinGW"
47type ver_ming.txt
Bram Moolenaar10893742020-06-19 22:37:47 +020048echo "version output MinGW GUI"
49type ver_ming_gui.txt
Bram Moolenaar81275ca2016-02-24 21:02:20 +010050echo "version output MVC"
51type ver_msvc.txt
52cd ..