SHADE_Y3/Dependencies.bat

151 lines
5.7 KiB
Batchfile

rem If there are any issues with this bat file, contact Sham
@echo off
echo.
echo ---------------------------------------------------
echo "SHADE DEPENDENCIES (Default - All in 10 Seconds)"
echo "A - All"
echo "B - VMA"
echo "C - msdf"
echo "D - assimp"
echo "E - spdlog"
echo "F - reactphysics3d"
echo "G - imgui"
echo "H - imguizmo"
echo "I - imnodes"
echo "J - tracy"
echo "K - RTTR"
echo "L - yamlcpp"
echo "M - SDL"
echo "N - dotnet"
echo "O - tinyddsloader"
echo ---------------------------------------------------
echo.
choice /C ABCDEFGHIJKLMNO /T 10 /D A
set _e=%ERRORLEVEL%
if %_e%==1 goto VMA
if %_e%==2 goto VMA
if %_e%==3 goto MSDF
if %_e%==4 goto assimp
if %_e%==5 goto spdlog
if %_e%==6 goto reactphysics3d
if %_e%==7 goto imgui
if %_e%==8 goto imguizmo
if %_e%==9 goto imnodes
if %_e%==10 goto tracy
if %_e%==11 goto RTTR
if %_e%==12 goto yamlcpp
if %_e%==13 goto SDL
if %_e%==14 goto dotnet
if %_e%==15 goto tinyddsloader
:VMA
echo -----------------------VMA----------------------------
rmdir "Dependencies/VMA" /S /Q
git clone https://github.com/SHADE-DP/VulkanMemoryAllocator.git "Dependencies/VMA"
if %_e%==2 (goto :done) else (goto :MSDF)
:MSDF
echo -----------------------MSDF----------------------------
rmdir "Dependencies/msdf" /S /Q
git clone --recurse-submodules https://github.com/SHADE-DP/msdf-atlas-gen.git "Dependencies/msdf"
if %_e%==3 (goto :done) else (goto :assimp)
:assimp
echo -----------------------assimp----------------------------
rmdir "Dependencies/assimp" /S /Q
git clone https://github.com/SHADE-DP/assimp.git "Dependencies/assimp"
if %_e%==4 (goto :done) else (goto :spdlog)
@REM :ktx
@REM rmdir "Dependencies/ktx" /S /Q
@REM echo -----------------------ktx----------------------------
@REM git clone https://github.com/SHADE-DP/ktx.git "Dependencies/ktx"
@REM if %_e%==5 (goto :done) else (goto :spdlog)
:spdlog
echo -----------------------spdlog----------------------------
rmdir "Dependencies/spdlog" /S /Q
git clone https://github.com/SHADE-DP/spdlog.git "Dependencies/spdlog"
if %_e%==5 (goto :done) else (goto :reactphysics3d)
:reactphysics3d
echo -----------------------reactphysics3d----------------------------
rmdir "Dependencies/reactphysics3d" /S /Q
git clone https://github.com/SHADE-DP/reactphysics3d.git "Dependencies/reactphysics3d"
if %_e%==6 (goto :done) else (goto :imgui)
:imgui
echo -----------------------imgui----------------------------
rmdir "Dependencies/imgui" /S /Q
git clone https://github.com/SHADE-DP/imgui.git "Dependencies/imgui"
if %_e%==7 (goto :done) else (goto :imguizmo)
:imguizmo
echo -----------------------imguizmo----------------------------
rmdir "Dependencies/imguizmo" /S /Q
git clone https://github.com/SHADE-DP/ImGuizmo.git "Dependencies/imguizmo"
if %_e%==8 (goto :done) else (goto :imnodes)
:imnodes
echo -----------------------imnodes----------------------------
rmdir "Dependencies/imnodes" /S /Q
git clone https://github.com/SHADE-DP/imnodes.git "Dependencies/imnodes"
if %_e%==9 (goto :done) else (goto :tracy)
:tracy
echo -----------------------tracy----------------------------
rmdir "Dependencies/tracy" /S /Q
git clone https://github.com/SHADE-DP/tracy.git "Dependencies/tracy"
if %_e%==10 (goto :done) else (goto :RTTR)
:RTTR
echo -----------------------RTTR----------------------------
rmdir "Dependencies/RTTR" /S /Q
git clone https://github.com/SHADE-DP/RTTR.git "Dependencies/RTTR"
if %_e%==11 (goto :done) else (goto :yamlcpp)
:yamlcpp
echo -----------------------yamlcpp----------------------------
rmdir "Dependencies/yamlcpp" /S /Q
git clone https://github.com/SHADE-DP/yaml-cpp.git "Dependencies/yamlcpp"
if %_e%==12 (goto :done) else (goto :SDL)
:SDL
echo -----------------------SDL----------------------------
rmdir "Dependencies/SDL" /S /Q
mkdir "Dependencies/SDL/include"
mkdir "Dependencies/SDL/lib"
powershell -Command "& {wget https://github.com/libsdl-org/SDL/releases/download/release-2.24.0/SDL2-devel-2.24.0-VC.zip -OutFile "Dependencies/SDL/SDL.zip"}"
powershell -Command "& {Expand-Archive -LiteralPath Dependencies/SDL/SDL.zip -DestinationPath Dependencies/SDL/tmp}"
robocopy "Dependencies/SDL/tmp/SDL2-2.24.0/lib/x64" "Dependencies/SDL/lib/" /ns /nfl /ndl /nc /njh
robocopy "Dependencies/SDL/tmp/SDL2-2.24.0/include/" "Dependencies/SDL/include/" /ns /nfl /ndl /nc /njh
rmdir "Dependencies/SDL/tmp/" /s /q
powershell -Command "& {Remove-Item "Dependencies/SDL/SDL.zip"}"
if %_e%==13 (goto :done) else (goto :dotnet)
:dotnet
echo -----------------------dotnet----------------------------
rmdir "Dependencies/dotnet" /S /Q
mkdir "Dependencies/dotnet/include"
mkdir "Dependencies/dotnet/bin"
powershell -Command "& {wget https://raw.githubusercontent.com/dotnet/runtime/main/src/coreclr/hosts/inc/coreclrhost.h -OutFile "Dependencies/dotnet/include/coreclrhost.h"}"
powershell -Command "& {wget https://download.visualstudio.microsoft.com/download/pr/8686fa48-b378-424e-908b-afbd66d6e120/2d75d5c3574fb5d917c5a3cd3f624287/dotnet-sdk-6.0.400-win-x64.zip -OutFile "Dependencies/dotnet/dotnet.zip"}"
powershell -Command "& {Expand-Archive -LiteralPath Dependencies/dotnet/dotnet.zip -DestinationPath Dependencies/dotnet/tmp}"
robocopy "Dependencies/dotnet/tmp/shared/Microsoft.NETCore.App/6.0.8/" "Dependencies/dotnet/bin/" *.dll /ns /nfl /ndl /nc /njh
rmdir "Dependencies/dotnet/tmp/" /s /q
del "Dependencies/dotnet/dotnet.zip"
powershell -Command "& {Remove-Item "Dependencies/dotnet/dotnet.zip"}"
if %_e%==14 (goto :done) else (goto :tinyddsloader)
:tinyddsloader
echo --------------------tinyddsloader-------------------------
rmdir "Dependencies/tinyddsloader" /S /Q
git clone https://github.com/benikabocha/tinyddsloader.git "Dependencies/tinyddsloader"
:done
echo DONE!
pause