@echo off echo ... echo Must ***RUN AS ADMINISTRATOR***. Right-click this file echo and choose to run as ADMINISTRATOR or the System PATH cannot be modified! echo ... This should take 5-25 seconds... echo ... This will update any old variables to point here. @setlocal enableextensions @cd /d "%~dp0" REM setx /M PATH "%PATH%;" REM To make path size longer, use this command, but then must reboot... REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH2 /d 16384 REM .\util\SetEnv -d AFTR_3RD_PARTY_ROOT .\util\SetEnv -ap AFTR_3RD_PARTY_ROOT %cd% set AFTR_3RD_PARTY_ROOT=%cd% /m set cwd=%cd% echo ... echo ... echo AftrBurner adding 3rd Party binaries to PATH echo Must RERUN this script if this folder is moved or modified. echo ... echo ... echo Placing 3rd party .dlls in PATH so modules will run without echo complaining about missing dlls like SDL2.dll, OpenCV, etc. echo ... echo ... echo ...Current working directory is %cwd% set aftr_path=%cwd%/SDL2-2.30.10/bin set aftr_path=%aftr_path%;%cwd%/SDL2_image-2.8.4/bin REM set aftr_path=%aftr_path%;%cwd%/ImageMagick-7.1.0-5-portable-Q16-x64 set aftr_path=%aftr_path%;%cwd%/opencv_contrib_4.11_cuda_12.8_cudnn_9.7/x64/vc17/bin set aftr_path=%aftr_path%;%cwd%/PCL-1.12.1-AllInOne-msvc2019-win64/bin set aftr_path=%aftr_path%;%cwd%/PCL-1.12.1-AllInOne-msvc2019-win64/3rdParty/VTK/bin set aftr_path=%aftr_path%;%cwd%/PCL-1.12.1-AllInOne-msvc2019-win64/3rdParty/Qhull/bin REM OpenNI install is located in .../repos/libs/PCL-1.12.1-AllInOne-msvc2019-win64/3rdParty/OpenNI2/ set aftr_path=%aftr_path%;"C:/Program Files/OpenNI2/Redist" set aftr_path=%aftr_path%;"C:/Program Files/NVIDIA/CUDNN/v9.7/bin/12.8" set aftr_path=%aftr_path%;"C:/Program Files (x86)/Intel RealSense SDK 2.0/bin/x64" set aftr_path=%aftr_path%;%cwd%/gdal-3.0.4/bin set aftr_path=%aftr_path%;%cwd%/assimp-5.0.1/bin set aftr_path=%aftr_path%;%cwd%/freetype-2.9/bin set aftr_path=%aftr_path%;%cwd%/cal3d-0.11rc2/bin set aftr_path=%aftr_path%;%cwd%/ode-0.16.2/bin set aftr_path=%aftr_path%;%cwd%/CGAL-5.5.2/auxiliary/gmp/lib set aftr_path=%aftr_path%;%cwd%/glew-2.1.0/bin/Release/x64 REM set aftr_path=%aftr_path%;%cwd%/googletest-distribution/bin REM Set the environment variables to point to this location for CMake to scour for 3rd Party libs REM Used by AftrBurner (if selected in the Engine's CMake configuration). REM This will *REMOVE OLD* declarations and update them to this new location. .\util\SetEnv -d fmt_DIR .\util\SetEnv -ap fmt_DIR ~AFTR_3RD_PARTY_ROOT~/fmt-11.0.2/lib/cmake/fmt .\util\SetEnv -d range-v3_DIR .\util\SetEnv -ap range-v3_DIR ~AFTR_3RD_PARTY_ROOT~/range-v3-0.12.0/lib/cmake/range-v3 .\util\SetEnv -d glm_DIR .\util\SetEnv -ap glm_DIR ~AFTR_3RD_PARTY_ROOT~/glm-0.9.9.8/glm/cmake/glm .\util\SetEnv -d SDL2_DIR .\util\SetEnv -ap SDL2_DIR ~AFTR_3RD_PARTY_ROOT~/SDL2-2.30.10/cmake .\util\SetEnv -d SDL2_image_DIR .\util\SetEnv -ap SDL2_image_DIR ~AFTR_3RD_PARTY_ROOT~/SDL2_image-2.8.4/cmake .\util\SetEnv -d OpenCV_DIR .\util\SetEnv -ap OpenCV_DIR ~AFTR_3RD_PARTY_ROOT~/opencv_contrib_4.11_cuda_12.8_cudnn_9.7/x64/vc17/lib ECHO "SLN NOTE: If you want OpenCV cuDNN to work, do NOT FORGET to INSTALL /c/repos/libs/cudnn_9.4.0_windows.exe" .\util\SetEnv -d Eigen3_DIR .\util\SetEnv -ap Eigen3_DIR ~AFTR_3RD_PARTY_ROOT~/eigen-3.4.0/share/eigen3/cmake .\util\SetEnv -d GTest_DIR .\util\SetEnv -ap GTest_DIR ~AFTR_3RD_PARTY_ROOT~/googletest-1.16.0/lib/cmake/GTest .\util\SetEnv -d PCL_ROOT .\util\SetEnv -d PCL_DIR .\util\SetEnv -ap PCL_DIR ~AFTR_3RD_PARTY_ROOT~/PCL-1.12.1-AllInOne-msvc2019-win64/cmake .\util\SetEnv -d BOOST_DIR .\util\SetEnv -ap BOOST_DIR ~AFTR_3RD_PARTY_ROOT~/boost_1_86_0/lib64-msvc-14.3/cmake/Boost-1.86.0 .\util\SetEnv -d ASSIMP_DIR .\util\SetEnv -ap ASSIMP_DIR ~AFTR_3RD_PARTY_ROOT~/assimp-5.0.1/lib/cmake/assimp-5.0 .\util\SetEnv -d ode_DIR .\util\SetEnv -ap ode_DIR ~AFTR_3RD_PARTY_ROOT~/ode-0.16.2/lib/cmake/ode-0.16.2 .\util\SetEnv -d apriltag_DIR .\util\SetEnv -ap apriltag_DIR ~AFTR_3RD_PARTY_ROOT~/apriltag/share/apriltag/cmake .\util\SetEnv -d CGAL_DIR .\util\SetEnv -ap CGAL_DIR ~AFTR_3RD_PARTY_ROOT~/CGAL-5.5.2/lib/cmake/CGAL .\util\SetEnv -d GLEW_DIR .\util\SetEnv -ap GLEW_DIR ~AFTR_3RD_PARTY_ROOT~/glew-2.1.0/bin/Release/x64 .\util\SetEnv -d GLEW_DIR .\util\SetEnv -ap GLEW_DIR ~AFTR_3RD_PARTY_ROOT~/glew-2.1.0/bin/Release/x64 .\util\SetEnv -d ONNXRUNTIME_DIR .\util\SetEnv -ap ONNXRUNTIME_DIR ~AFTR_3RD_PARTY_ROOT~/onnxruntime-win-x64-gpu-1.21.0/ .\util\SetEnv -d ONNXRUNTIME_INCLUDE_DIR .\util\SetEnv -ap ONNXRUNTIME_INCLUDE_DIR ~AFTR_3RD_PARTY_ROOT~/onnxruntime-win-x64-gpu-1.21.0/include/ .\util\SetEnv -d ONNXRUNTIME_LIBRARY_DIR .\util\SetEnv -ap ONNXRUNTIME_LIBRARY_DIR ~AFTR_3RD_PARTY_ROOT~/onnxruntime-win-x64-gpu-1.21.0/lib/ REM echo %aftr_path% REM setx AFTR_3RD_PARTY_BIN "$aftr_path" REM setx PATH2 "$aftr_path:$PATH" REM This doesn't work because windows' setx doesn't let REM a param be longer than 1024 even though REM the actual limit for a env var is 32678. .\util\SetEnv -d AFTR_3RD_PARTY_BIN .\util\SetEnv -ap AFTR_3RD_PARTY_BIN %aftr_path% .\util\SetEnv -ap PATH_test ~AFTR_3RD_PARTY_BIN~ .\util\SetEnv -ap PATH ~AFTR_3RD_PARTY_BIN~ echo ... echo ... echo ...Creating the following Environment Variable(s): echo ...AFTR_3RD_PARTY_BIN=%aftr_path% echo ... echo ...Appending ~AFTR_3RD_PARTY_BIN~ to the PATH variable echo ...MUST open a *NEW* shell for PATH to take effect! echo ...If the word error *never* appeared above, this was SUCCESSFUL. pause