Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions compile.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@echo off
setlocal EnableDelayedExpansion

set ROOTDIR=%CD%
for %%I in ("%~dp0.") do set "ROOTDIR=%%~fI"

echo Compiling BlitzForge Toolchain...
call .\scripts\msbuild_init.bat
call "%ROOTDIR%\scripts\msbuild_init.bat"

cd %ROOTDIR%
cd /d "%ROOTDIR%"

call .\scripts\msbuild_blitzforge.bat
call "%ROOTDIR%\scripts\msbuild_blitzforge.bat"

cd %ROOTDIR%
endlocal
cd /d "%ROOTDIR%"
endlocal
10 changes: 5 additions & 5 deletions publish.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@echo off
setlocal

set ROOTDIR=%CD%
for %%I in ("%~dp0.") do set "ROOTDIR=%%~fI"

call .\compile.bat
call "%ROOTDIR%\compile.bat"

cd %ROOTDIR%
cd /d "%ROOTDIR%"

if exist "%ROOTDIR%\release" rmdir /S /Q "%ROOTDIR%\release"

Expand All @@ -25,12 +25,12 @@ REM Copy the compiled vscode extension
if exist "%ROOTDIR%\..\..\extras\vscode-blitz-forge" (
call "%ROOTDIR%\..\..\extras\vscode-blitz-forge\compile.bat"

cd %ROOTDIR%
cd /d "%ROOTDIR%"

xcopy /Y "%ROOTDIR%\..\..\extras\vscode-blitz-forge\*.vsix" "%ROOTDIR%\release\"
)

REM Create a README.txt file
echo "BlitzForge is a compiler for an enhanced version of the Blitz3D language. It is a fork of the Blitz3D compiler and adds support for the BlitzForge commands and syntax. You can develop with BlitzForge in Visual Studio Code by installing the .vsix extension. Press Ctrl+Shift+P and search for vsix to install the extension." > "%ROOTDIR%\release\README.txt"

endlocal
endlocal
6 changes: 3 additions & 3 deletions test.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
setlocal EnableDelayedExpansion

set ROOTDIR=%CD%
for %%I in ("%~dp0.") do set "ROOTDIR=%%~fI"

set BLITZPATH=%ROOTDIR%
set FAILED=0
Expand All @@ -11,14 +11,14 @@ call :expect_success "host alias compiles NumberTest" -c +q -target host "%SAMPL
call :expect_success "native Windows target compiles NumberTest" -c +q -target windows-x86 "%SAMPLE%"
call :expect_failure "foreign macOS target is rejected" "Unsupported -target" -c +q -target macos-arm64 "%SAMPLE%"

cd %ROOTDIR%\tests
cd /d "%ROOTDIR%\tests"

for /R %%f in (*.bb) do (
"%BLITZPATH%\bin\blitzcc.exe" -t "%%f" || (echo "%%f failed at least one test" && SET FAILED=1)
echo.
)

cd %ROOTDIR%
cd /d "%ROOTDIR%"

if !FAILED! == 1 (
echo "Tests failed"
Expand Down
Loading