1
1
@ echo off
2
2
:: Batch file for building/testing Vim on AppVeyor
3
+ set target = %1
3
4
4
5
setlocal ENABLEDELAYEDEXPANSION
5
6
cd %APPVEYOR_BUILD_FOLDER%
@@ -10,13 +11,43 @@ set PYTHON3_RELEASE=3.11.1
10
11
set PYTHON3_URL = https://www.python.org/ftp/python/%PYTHON3_RELEASE% /python-%PYTHON3_RELEASE% -amd64.exe
11
12
set PYTHON3_DIR = C:\python%PYTHON3_VER% -x64
12
13
14
+ set " VSWHERE = %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe"
15
+
16
+ if exist " %VSWHERE% " (
17
+ for /f " usebackq delims=" %%i in (
18
+ `" %VSWHERE% " -products * -latest -property installationPath`
19
+ ) do (
20
+ set " VCVARSALL = %%i \VC\Auxiliary\Build\vcvarsall.bat"
21
+ )
22
+ )
23
+
24
+ if not exist " %VCVARSALL% " (
25
+ set " VCVARSALL = %ProgramFiles(x86)% \Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
26
+ )
27
+ call " %VCVARSALL% " x64
28
+
29
+ goto %target%
30
+ echo Unknown build target.
31
+ exit 1
32
+
33
+ :: ----------------------------------------------------------------------------
34
+ :install
35
+ @ echo on
13
36
if not exist downloads mkdir downloads
14
37
15
38
:: Python 3
16
39
if not exist %PYTHON3_DIR% (
17
40
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
41
+ cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^
42
+ Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^
43
+ AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
44
+ InstallLauncherAllUsers=0
19
45
)
46
+ @ echo off
47
+ goto :eof
48
+
49
+ :: ----------------------------------------------------------------------------
50
+ :build
20
51
21
52
cd src
22
53
@@ -53,11 +84,24 @@ echo "version output MSVC console"
53
84
.\vim --version || exit 1
54
85
echo " version output MSVC GUI"
55
86
type ver_msvc.txt || exit 1
56
- cd ..
57
87
58
88
goto :eof
59
- :: ----------------------------------------------------------------------
60
89
90
+ :: ----------------------------------------------------------------------------
91
+ :test
92
+ @ echo on
93
+ cd src/testdir
94
+ :: Testing with MSVC gvim
95
+ path %PYTHON3_DIR% ;%PATH%
96
+ nmake -f Make_mvc.mak VIMPROG=..\gvim
97
+ nmake -f Make_mvc.mak clean
98
+ :: Testing with MSVC console version
99
+ nmake -f Make_mvc.mak VIMPROG=..\vim
100
+
101
+ @ echo off
102
+ goto :eof
103
+
104
+ :: ----------------------------------------------------------------------------
61
105
:downloadfile
62
106
:: call :downloadfile <URL> <localfile>
63
107
if not exist %2 (
0 commit comments