blob: c24e980dbe454100d2de11a440b5bca7e7e84bf7 [file] [log] [blame]
Dylan Bakerf066c962019-01-23 14:21:26 -08001goto %1
2
3:install
4rem Check pip
Jose Fonseca0f9fb7f2020-08-05 10:01:24 +01005python --version
6python -m pip install --upgrade pip
7python -m pip --version
Dylan Bakerf066c962019-01-23 14:21:26 -08008if "%buildsystem%" == "scons" (
Dylan Bakerf066c962019-01-23 14:21:26 -08009 rem Install Mako
Jose Fonsecae2c614a2020-08-04 14:16:37 +010010 python -m pip install Mako==1.1.3
Dylan Bakerf066c962019-01-23 14:21:26 -080011 rem Install pywin32 extensions, needed by SCons
12 python -m pip install pypiwin32
13 rem Install python wheels, necessary to install SCons via pip
14 python -m pip install wheel
15 rem Install SCons
Jose Fonsecae2c614a2020-08-04 14:16:37 +010016 python -m pip install scons==3.1.2
Dylan Bakerf066c962019-01-23 14:21:26 -080017 call scons --version
18) else (
Prodea Alexandru-Liviucc758f12019-11-14 21:45:23 +000019 python -m pip install Mako meson
Dylan Bakerf066c962019-01-23 14:21:26 -080020 meson --version
21
22 rem Install pkg-config, which meson requires even on windows
23 cinst -y pkgconfiglite
24)
25
26rem Install flex/bison
27set WINFLEXBISON_ARCHIVE=win_flex_bison-%WINFLEXBISON_VERSION%.zip
28if not exist "%WINFLEXBISON_ARCHIVE%" appveyor DownloadFile "https://github.com/lexxmark/winflexbison/releases/download/v%WINFLEXBISON_VERSION%/%WINFLEXBISON_ARCHIVE%"
297z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul
30set Path=%CD%\winflexbison;%Path%
31win_flex --version
32win_bison --version
33rem Download and extract LLVM
34if not exist "%LLVM_ARCHIVE%" appveyor DownloadFile "https://people.freedesktop.org/~jrfonseca/llvm/%LLVM_ARCHIVE%"
357z x -y "%LLVM_ARCHIVE%" > nul
36if "%buildsystem%" == "scons" (
37 mkdir llvm\bin
38 set LLVM=%CD%\llvm
Dylan Bakerfbb969b2019-10-15 11:16:01 -070039) else (
40 move llvm subprojects\
41 copy .appveyor\llvm-wrap.meson subprojects\llvm\meson.build
Dylan Bakerf066c962019-01-23 14:21:26 -080042)
43goto :eof
44
45:build_script
46if "%buildsystem%" == "scons" (
Jose Fonsecae2c614a2020-08-04 14:16:37 +010047 call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.2 machine=x86 llvm=1
Dylan Bakerf066c962019-01-23 14:21:26 -080048) else (
Dylan Bakerfbb969b2019-10-15 11:16:01 -070049 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=x86
Dylan Bakerf066c962019-01-23 14:21:26 -080050 rem We use default-library as static to affect any wraps (such as expat and zlib)
51 rem it would be better if we could set subprojects buildtype independently,
52 rem but I haven't written that patch yet :)
Prodea Alexandru-Liviu48d61712019-10-19 14:44:44 +000053 call meson builddir --backend=vs2017 --default-library=static -Dbuild-tests=true -Db_vscrt=mtd --buildtype=release -Dllvm=true -Dgallium-drivers=swrast -Dosmesa=gallium
Dylan Bakerf066c962019-01-23 14:21:26 -080054 pushd builddir
55 call msbuild mesa.sln /m
56 popd
57)
58goto :eof
59
60:test_script
61if "%buildsystem%" == "scons" (
Jose Fonsecae2c614a2020-08-04 14:16:37 +010062 call scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.2 machine=x86 llvm=1 check
Dylan Bakerf066c962019-01-23 14:21:26 -080063) else (
64 call meson test -C builddir
65)
66goto :eof