diff --git a/Dependencies.bat b/Dependencies.bat index bbce926b..ab015bab 100644 --- a/Dependencies.bat +++ b/Dependencies.bat @@ -17,10 +17,11 @@ echo "J - imnodes" echo "K - tracy" echo "L - RTTR" echo "M - yamlcpp" +echo "O - SDL" echo --------------------------------------------------- echo. -choice /C ABCDEFGHIJKLM /T 10 /D A +choice /C ABCDEFGHIJKLMNO /T 10 /D A set _e=%ERRORLEVEL% if %_e%==1 goto VMA @@ -36,6 +37,7 @@ if %_e%==10 goto imnodes if %_e%==11 goto tracy if %_e%==12 goto RTTR if %_e%==13 goto yamlcpp +if %_e%==15 goto SDL :VMA echo -----------------------VMA---------------------------- @@ -107,6 +109,20 @@ if %_e%==12 (goto :done) else (goto :yamlcpp) echo -----------------------yamlcpp---------------------------- rmdir "Dependencies/yamlcpp" /S /Q git clone https://github.com/SHADE-DP/yaml-cpp.git "Dependencies/yamlcpp" +if %_e%==13 (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 +del "Dependencies/SDL/SDL.zip" +powershell -Command "& {Remove-Item "Dependencies/SDL/SDL.zip"}" :done echo DONE! diff --git a/Dependencies.lua b/Dependencies.lua index 32382cf9..712f1a89 100644 --- a/Dependencies.lua +++ b/Dependencies.lua @@ -12,4 +12,5 @@ IncludeDir["yamlcpp"] = "%{wks.location}/Dependencies/yamlcpp/include" IncludeDir["RTTR"] = "%{wks.location}/Dependencies/RTTR" IncludeDir["ktx"] = "%{wks.location}/Dependencies/ktx" IncludeDir["reactphysics3d"] = "%{wks.location}/Dependencies/reactphysics3d" +IncludeDir["SDL"] = "%{wks.location}/Dependencies/SDL" IncludeDir["VULKAN"] = "$(VULKAN_SDK)" diff --git a/SHADE_Application/premake5.lua b/SHADE_Application/premake5.lua index 8aa03a13..0830a8e1 100644 --- a/SHADE_Application/premake5.lua +++ b/SHADE_Application/premake5.lua @@ -26,6 +26,7 @@ project "SHADE_Application" "../SHADE_Engine/src", "src", "%{IncludeDir.dotnet}/include", + "%{IncludeDir.SDL}/include", } flags @@ -36,11 +37,14 @@ project "SHADE_Application" links { "SHADE_Engine", + "SDL2.lib", + "SDL2main.lib" } libdirs { "%{IncludeDir.spdlog}/lib", + "%{IncludeDir.SDL}/lib", } postbuildcommands diff --git a/SHADE_Engine/premake5.lua b/SHADE_Engine/premake5.lua index 41693aa8..12b526b1 100644 --- a/SHADE_Engine/premake5.lua +++ b/SHADE_Engine/premake5.lua @@ -31,7 +31,7 @@ project "SHADE_Engine" "%{IncludeDir.tracy}", "%{IncludeDir.VMA}/include", "%{IncludeDir.yamlcpp}", - "%{IncludeDir.ktx}/include", + "%{IncludeDir.SDL}/include", "%{IncludeDir.RTTR}/include", "%{IncludeDir.reactphysics3d}/include", "%{IncludeDir.VULKAN}/include", @@ -45,8 +45,7 @@ project "SHADE_Engine" "%{IncludeDir.assimp}/lib/Debug", "%{IncludeDir.assimp}/lib/Release", "%{IncludeDir.RTTR}/lib", - "%{IncludeDir.ktx}/lib/Debug", - "%{IncludeDir.ktx}/lib/Release", + "%{IncludeDir.SDL}/lib", } links @@ -57,7 +56,9 @@ project "SHADE_Engine" "reactphysics3d", "imgui", "vulkan-1.lib", - "shaderc_shared.lib" + "shaderc_shared.lib", + "SDL2.lib", + "SDL2main.lib" } defines @@ -93,11 +94,11 @@ project "SHADE_Engine" filter "configurations:Debug" symbols "On" defines {"_DEBUG"} - links{"assimp-vc142-mtd.lib", "ktxd.lib", "librttr_core_d.lib"} + links{"assimp-vc142-mtd.lib", "librttr_core_d.lib"} --links{"fmodstudioL_vc.lib", "fmodL_vc.lib"} filter "configurations:Release" optimize "On" defines{"_RELEASE"} - links{"assimp-vc142-mt.lib", "ktx.lib", "librttr_core.lib"} + links{"assimp-vc142-mt.lib", "librttr_core.lib"} --links{"fmodstudio_vc.lib", "fmod_vc.lib"} \ No newline at end of file