blob: d868380f3686bfd43127ae80abfb4b1323e3100b [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
Christopher Plewright474f2262023-01-15 13:23:20 +00007:: Python3
8set PYTHON3_VER=311
9set PYTHON3_RELEASE=3.11.1
10set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
11set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
12
13if not exist downloads mkdir downloads
14
15:: Python 3
16if not exist %PYTHON3_DIR% (
17 call :downloadfile %PYTHON3_URL% downloads\python3.exe
18 cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0
19)
20
Bram Moolenaar81275ca2016-02-24 21:02:20 +010021cd src
Bram Moolenaar7ce2aa02019-07-16 20:00:11 +020022
Bram Moolenaar81275ca2016-02-24 21:02:20 +010023echo "Building MSVC 64bit console Version"
K.Takata47d16662022-01-26 16:20:21 +000024nmake -f Make_mvc.mak CPU=AMD64 ^
Bram Moolenaarf9a343f2020-07-29 16:32:21 +020025 OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
K.Takataf89be8d2021-05-29 12:42:47 +020026 FEATURES=%FEATURE%
27if not exist vim.exe (
28 echo Build failure.
29 exit 1
30)
Bram Moolenaar81275ca2016-02-24 21:02:20 +010031
32:: build MSVC huge version with python and channel support
33:: GUI needs to be last, so that testing works
34echo "Building MSVC 64bit GUI Version"
35if "%FEATURE%" == "HUGE" (
K.Takata47d16662022-01-26 16:20:21 +000036 nmake -f Make_mvc.mak CPU=AMD64 ^
Bram Moolenaarf9a343f2020-07-29 16:32:21 +020037 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
38 PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
Christopher Plewright474f2262023-01-15 13:23:20 +000039 PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
K.Takataf89be8d2021-05-29 12:42:47 +020040 FEATURES=%FEATURE%
Bram Moolenaar81275ca2016-02-24 21:02:20 +010041) ELSE (
K.Takata47d16662022-01-26 16:20:21 +000042 nmake -f Make_mvc.mak CPU=AMD64 ^
Bram Moolenaarf9a343f2020-07-29 16:32:21 +020043 OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
K.Takataf89be8d2021-05-29 12:42:47 +020044 FEATURES=%FEATURE%
Bram Moolenaar81275ca2016-02-24 21:02:20 +010045)
K.Takataf89be8d2021-05-29 12:42:47 +020046if not exist gvim.exe (
47 echo Build failure.
48 exit 1
49)
50.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010051
Bram Moolenaarf9a343f2020-07-29 16:32:21 +020052echo "version output MSVC console"
K.Takataf89be8d2021-05-29 12:42:47 +020053.\vim --version || exit 1
Bram Moolenaarf9a343f2020-07-29 16:32:21 +020054echo "version output MSVC GUI"
K.Takataf89be8d2021-05-29 12:42:47 +020055type ver_msvc.txt || exit 1
Bram Moolenaar81275ca2016-02-24 21:02:20 +010056cd ..
Christopher Plewright474f2262023-01-15 13:23:20 +000057
58goto :eof
59:: ----------------------------------------------------------------------
60
61:downloadfile
62:: call :downloadfile <URL> <localfile>
63if not exist %2 (
64 curl -f -L %1 -o %2
65)
66if ERRORLEVEL 1 (
67 rem Retry once.
68 curl -f -L %1 -o %2 || exit 1
69)
70@goto :eof