mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-04 03:37:59 -04:00
Fix the bat file.
This commit is contained in:
parent
e358832f2f
commit
39f5111528
32
run.bat
32
run.bat
@ -2,23 +2,23 @@
|
|||||||
|
|
||||||
set version=zig-windows-x86_64-0.12.0-dev.706+62a0fbdae
|
set version=zig-windows-x86_64-0.12.0-dev.706+62a0fbdae
|
||||||
|
|
||||||
if not exist "./compiler" mkdir "./compiler"
|
if not exist compiler mkdir compiler
|
||||||
if not exist "./compiler/zig" mkdir "./compiler/zig"
|
if not exist compiler\version.txt copy NUL compiler\version.txt >NUL
|
||||||
if not exist "./compiler/version.txt" copy NUL "./compiler/version.txt"
|
|
||||||
|
|
||||||
set /p curVersion=<"./compiler/version.txt"
|
set currVersion=
|
||||||
|
set /p currVersion=<"compiler\version.txt"
|
||||||
|
|
||||||
if not "%version%" == "%curVersion%" (
|
if not "%version%" == "%currVersion%" (
|
||||||
echo "Deleting old zig installation..."
|
echo Deleting old zig installation ...
|
||||||
rmdir /s /q "./compiler/zig"
|
if exist compiler\zig rmdir /s /q compiler\zig
|
||||||
mkdir "./compiler/zig"
|
echo Downloading zig version %version% ...
|
||||||
echo "Downloading %version%..."
|
powershell -Command $ProgressPreference = 'SilentlyContinue'; "Invoke-WebRequest -uri https://ziglang.org/builds/%version%.zip -OutFile compiler\archive.zip"
|
||||||
powershell -Command "Invoke-WebRequest -uri https://ziglang.org/builds/%version%.zip -OutFile ./compiler/archive.zip"
|
echo Extracting zip file ...
|
||||||
echo "Extracting zip file..."
|
powershell $ProgressPreference = 'SilentlyContinue'; Expand-Archive compiler\archive.zip -DestinationPath compiler
|
||||||
powershell Expand-Archive ".\compiler\archive.zip" -DestinationPath ".\compiler\zig"
|
ren compiler\%version% zig
|
||||||
echo "Done."
|
echo Done.
|
||||||
del ./compiler/archive.zip
|
del compiler\archive.zip
|
||||||
echo %version%> "./compiler/version.txt"
|
echo %version%> compiler\version.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
./compiler/zig/zig build run %*
|
compiler\zig\zig build run %*
|
Loading…
x
Reference in New Issue
Block a user