v/make.bat

36 lines
735 B
Batchfile
Raw Normal View History

2019-08-28 23:18:30 +02:00
set exiterror=0
@echo off
echo Building V for Windows...
if exist "vc" (
rd /s /q vc
2019-08-28 23:18:30 +02:00
)
git version
2019-08-17 18:24:22 +02:00
git clone --depth 1 --quiet https://github.com/vlang/vc
2019-08-28 23:18:30 +02:00
echo Building v.c...
gcc -std=gnu11 -DUNICODE -D_UNICODE -w -o v2.exe vc/v_win.c 2>&1
2019-08-28 23:18:30 +02:00
if %ERRORLEVEL% GEQ 1 (
echo gcc failed to compile - Create an issue at 'https://github.com/vlang'
exit /b 1
2019-08-28 23:18:30 +02:00
)
echo Building v.v...
2019-08-11 19:10:22 +02:00
v2.exe -o v.exe compiler
if %ERRORLEVEL% GEQ 1 (
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
exit /b 1
)
2019-08-28 23:18:30 +02:00
echo Cleaning up...
rem del v2.exe
rd /s /q vc
2019-08-28 23:18:30 +02:00
if exist "v.exe" (
echo V has been successfully built
) else (
echo v.exe was not generated - Create an issue at 'https://github.com/vlang'
exit /b 1
)