@echo off setlocal set "ROOT=%~dp0" if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%" if "%VCPKG_ROOT%"=="" set "VCPKG_ROOT=C:\src\vcpkg" set "VCPKG_EXE=%VCPKG_ROOT%\vcpkg.exe" set "PKGCONF_EXE=%VCPKG_ROOT%\installed\x64-windows\tools\pkgconf\pkgconf.exe" set "PKG_CONFIG_PATH=%VCPKG_ROOT%\installed\x64-windows\lib\pkgconfig;%VCPKG_ROOT%\installed\x64-windows\share\pkgconfig" if not exist "%VCPKG_EXE%" ( echo vcpkg.exe was not found at "%VCPKG_EXE%". echo Set VCPKG_ROOT to your vcpkg directory, or install vcpkg at C:\src\vcpkg. pause exit /b 1 ) echo Installing dependencies with vcpkg... "%VCPKG_EXE%" install raylib pugixml pkgconf --triplet x64-windows if errorlevel 1 ( echo vcpkg dependency installation failed. pause exit /b 1 ) echo Configuring Visual Studio solution... cmake -S "%ROOT%" -B "%ROOT%\build\vs2022" -G "Visual Studio 17 2022" -A x64 ^ -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" ^ -DPKG_CONFIG_EXECUTABLE="%PKGCONF_EXE%" if errorlevel 1 ( echo CMake configuration failed. pause exit /b 1 ) echo Building mana_pet_world... cmake --build "%ROOT%\build\vs2022" --config Release --target mana_pet_world if errorlevel 1 ( echo Build failed. pause exit /b 1 ) echo Opening Visual Studio solution... start "" "%ROOT%\build\vs2022\ManaPetWorld.sln" echo. echo In Visual Studio, click Run to start mana_pet_world. echo If Visual Studio does not select it automatically, set mana_pet_world as the startup project once. echo The debugger working directory and command argument are already set to the project root. pause