2019-08-01 14:23:36 +03:00
|
|
|
@echo off
|
2019-08-07 18:51:21 +03:00
|
|
|
|
2019-08-13 23:04:20 +03:00
|
|
|
echo Cleanup
|
|
|
|
del v.exe
|
2019-08-17 13:26:26 +03:00
|
|
|
del v_win.c
|
2019-08-13 23:04:20 +03:00
|
|
|
del v2.exe
|
|
|
|
|
2019-08-10 11:26:42 +03:00
|
|
|
echo fetch v.c
|
2019-08-17 13:26:26 +03:00
|
|
|
curl -O https://raw.githubusercontent.com/vlang/vc/master/v_win.c
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
|
|
|
echo build vc using gcc
|
2019-08-17 13:26:26 +03:00
|
|
|
gcc -std=gnu11 -DUNICODE -D_UNICODE -w -o vc.exe v_win.c
|
2019-07-30 17:47:55 +03:00
|
|
|
del v.c
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
2019-08-07 18:51:21 +03:00
|
|
|
|
2019-08-10 11:26:42 +03:00
|
|
|
echo build v using vc
|
2019-07-30 17:47:55 +03:00
|
|
|
vc.exe -o v.exe compiler
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
2019-08-13 23:04:20 +03:00
|
|
|
echo build vc.msvc using vc
|
|
|
|
vc.exe -os msvc -o v.msvc.exe compiler
|
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
|
|
|
echo build v.msvc.3 using v
|
|
|
|
v.exe -os msvc -o v.msvc.2.exe compiler
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
2019-08-13 23:04:20 +03:00
|
|
|
echo build v.msvc.3 using v.msvc
|
|
|
|
v.msvc.exe -os msvc -o v.msvc.3.exe compiler
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
|
|
|
echo build v.gcc using v.msvc
|
2019-08-05 11:03:38 +03:00
|
|
|
v.msvc.exe -o v.gcc.exe compiler
|
2019-08-10 11:26:42 +03:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
2019-08-07 18:51:21 +03:00
|
|
|
|
2019-08-01 14:23:36 +03:00
|
|
|
setlocal EnableDelayedExpansion
|
2019-08-10 11:26:42 +03:00
|
|
|
echo testing v
|
2019-08-01 14:23:36 +03:00
|
|
|
for /r . %%x in (*_test.v) do (
|
|
|
|
v -o test.exe -debug %%x
|
|
|
|
if !ERRORLEVEL! NEQ 0 goto :fail
|
|
|
|
)
|
2019-08-10 11:26:42 +03:00
|
|
|
echo testing v.msvc
|
2019-08-05 11:03:38 +03:00
|
|
|
for /r . %%x in (*_test.v) do (
|
|
|
|
v.msvc.exe -o test.exe -debug %%x
|
|
|
|
if !ERRORLEVEL! NEQ 0 goto :fail
|
|
|
|
)
|
2019-08-07 18:51:21 +03:00
|
|
|
|
2019-08-10 11:26:42 +03:00
|
|
|
echo testing v -os msvc
|
2019-08-05 11:03:38 +03:00
|
|
|
for /r . %%x in (*_test.v) do (
|
2019-08-07 18:51:21 +03:00
|
|
|
v -os msvc -o test.exe -debug %%x
|
2019-08-05 11:03:38 +03:00
|
|
|
if !ERRORLEVEL! NEQ 0 goto :fail
|
|
|
|
)
|
2019-08-08 10:49:56 +03:00
|
|
|
|
2019-08-10 11:26:42 +03:00
|
|
|
echo testing v.msvc -os msvc
|
2019-08-05 11:03:38 +03:00
|
|
|
for /r . %%x in (*_test.v) do (
|
2019-08-07 18:51:21 +03:00
|
|
|
v.msvc.exe -os msvc -o test.exe -debug %%x
|
2019-08-05 11:03:38 +03:00
|
|
|
if !ERRORLEVEL! NEQ 0 goto :fail
|
|
|
|
)
|
2019-08-07 18:51:21 +03:00
|
|
|
|
2019-08-01 14:23:36 +03:00
|
|
|
goto :done
|
|
|
|
|
|
|
|
:fail
|
2019-08-08 08:30:05 +03:00
|
|
|
echo fail
|
2019-08-01 14:23:36 +03:00
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:done
|
2019-08-13 23:04:20 +03:00
|
|
|
echo pass
|