2019-08-01 13:23:36 +02:00
|
|
|
@echo off
|
2019-08-07 17:51:21 +02:00
|
|
|
|
2019-08-13 22:04:20 +02:00
|
|
|
echo Cleanup
|
|
|
|
del v.exe
|
2019-08-17 12:26:26 +02:00
|
|
|
del v_win.c
|
2019-08-13 22:04:20 +02:00
|
|
|
del v2.exe
|
|
|
|
|
2019-08-17 15:31:44 +02:00
|
|
|
echo fetch v_win.c
|
2019-08-17 12:26:26 +02:00
|
|
|
curl -O https://raw.githubusercontent.com/vlang/vc/master/v_win.c
|
2019-08-10 10:26:42 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
|
|
|
echo build vc using gcc
|
2019-08-17 12:26:26 +02:00
|
|
|
gcc -std=gnu11 -DUNICODE -D_UNICODE -w -o vc.exe v_win.c
|
2019-08-17 15:31:44 +02:00
|
|
|
del v_win.c
|
2019-08-10 10:26:42 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
2019-08-07 17:51:21 +02:00
|
|
|
|
2019-08-10 10:26:42 +02:00
|
|
|
echo build v using vc
|
2019-07-30 16:47:55 +02:00
|
|
|
vc.exe -o v.exe compiler
|
2019-08-10 10:26:42 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
2019-08-13 22:04:20 +02:00
|
|
|
echo build vc.msvc using vc
|
|
|
|
vc.exe -os msvc -o v.msvc.exe compiler
|
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
2019-08-01 13:23:36 +02:00
|
|
|
setlocal EnableDelayedExpansion
|
2019-08-10 10:26:42 +02:00
|
|
|
echo testing v
|
2019-08-18 16:25:33 +02:00
|
|
|
v test v
|
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
|
|
|
|
2019-08-10 10:26:42 +02:00
|
|
|
echo testing v.msvc -os msvc
|
2019-08-18 16:25:33 +02:00
|
|
|
v.msvc.exe -os msvc test v
|
|
|
|
if %ERRORLEVEL% NEQ 0 goto :fail
|
2019-08-07 17:51:21 +02:00
|
|
|
|
2019-08-01 13:23:36 +02:00
|
|
|
goto :done
|
|
|
|
|
|
|
|
:fail
|
2019-08-08 07:30:05 +02:00
|
|
|
echo fail
|
2019-08-01 13:23:36 +02:00
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:done
|
2019-08-13 22:04:20 +02:00
|
|
|
echo pass
|