Integrate vcpkg support for Windows builds and enhance documentation
- Added vcpkg integration in CMake for Windows, enabling automatic dependency management. - Updated CMakePresets.json to include presets for debug and release builds with vcpkg. - Created setup scripts for easy vcpkg installation on Windows. - Enhanced documentation to guide users on vcpkg setup and usage with YAZE. - Improved logging in Overworld class to track expanded tile flags during map assembly.
This commit is contained in:
54
scripts/setup-vcpkg-windows.bat
Normal file
54
scripts/setup-vcpkg-windows.bat
Normal file
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
REM Setup script for vcpkg on Windows
|
||||
REM This script helps set up vcpkg for YAZE Windows builds
|
||||
|
||||
echo Setting up vcpkg for YAZE Windows builds...
|
||||
|
||||
REM Check if vcpkg directory exists
|
||||
if not exist "vcpkg" (
|
||||
echo Cloning vcpkg...
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to clone vcpkg repository
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
REM Bootstrap vcpkg
|
||||
cd vcpkg
|
||||
if not exist "vcpkg.exe" (
|
||||
echo Bootstrapping vcpkg...
|
||||
call bootstrap-vcpkg.bat
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to bootstrap vcpkg
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
REM Integrate vcpkg with Visual Studio (optional)
|
||||
echo Integrating vcpkg with Visual Studio...
|
||||
vcpkg integrate install
|
||||
|
||||
REM Set environment variable for this session
|
||||
set VCPKG_ROOT=%CD%
|
||||
echo VCPKG_ROOT set to: %VCPKG_ROOT%
|
||||
|
||||
cd ..
|
||||
|
||||
echo.
|
||||
echo vcpkg setup complete!
|
||||
echo.
|
||||
echo To use vcpkg with YAZE:
|
||||
echo 1. Use the Windows presets in CMakePresets.json:
|
||||
echo - windows-debug (Debug build)
|
||||
echo - windows-release (Release build)
|
||||
echo.
|
||||
echo 2. Or set VCPKG_ROOT environment variable:
|
||||
echo set VCPKG_ROOT=%CD%\vcpkg
|
||||
echo.
|
||||
echo 3. Dependencies will be automatically installed via vcpkg manifest mode
|
||||
echo.
|
||||
|
||||
pause
|
||||
54
scripts/setup-vcpkg-windows.ps1
Normal file
54
scripts/setup-vcpkg-windows.ps1
Normal file
@@ -0,0 +1,54 @@
|
||||
# Setup script for vcpkg on Windows (PowerShell)
|
||||
# This script helps set up vcpkg for YAZE Windows builds
|
||||
|
||||
Write-Host "Setting up vcpkg for YAZE Windows builds..." -ForegroundColor Green
|
||||
|
||||
# Check if vcpkg directory exists
|
||||
if (-not (Test-Path "vcpkg")) {
|
||||
Write-Host "Cloning vcpkg..." -ForegroundColor Yellow
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Error: Failed to clone vcpkg repository" -ForegroundColor Red
|
||||
Read-Host "Press Enter to continue"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Bootstrap vcpkg
|
||||
Set-Location vcpkg
|
||||
if (-not (Test-Path "vcpkg.exe")) {
|
||||
Write-Host "Bootstrapping vcpkg..." -ForegroundColor Yellow
|
||||
& .\bootstrap-vcpkg.bat
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Error: Failed to bootstrap vcpkg" -ForegroundColor Red
|
||||
Read-Host "Press Enter to continue"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Integrate vcpkg with Visual Studio (optional)
|
||||
Write-Host "Integrating vcpkg with Visual Studio..." -ForegroundColor Yellow
|
||||
& .\vcpkg.exe integrate install
|
||||
|
||||
# Set environment variable for this session
|
||||
$vcpkgRoot = Get-Location
|
||||
$env:VCPKG_ROOT = $vcpkgRoot.Path
|
||||
Write-Host "VCPKG_ROOT set to: $($env:VCPKG_ROOT)" -ForegroundColor Green
|
||||
|
||||
Set-Location ..
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "vcpkg setup complete!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "To use vcpkg with YAZE:" -ForegroundColor Cyan
|
||||
Write-Host "1. Use the Windows presets in CMakePresets.json:" -ForegroundColor White
|
||||
Write-Host " - windows-debug (Debug build)" -ForegroundColor Gray
|
||||
Write-Host " - windows-release (Release build)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
Write-Host "2. Or set VCPKG_ROOT environment variable:" -ForegroundColor White
|
||||
Write-Host " `$env:VCPKG_ROOT = `"$vcpkgRoot`"" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
Write-Host "3. Dependencies will be automatically installed via vcpkg manifest mode" -ForegroundColor White
|
||||
Write-Host ""
|
||||
|
||||
Read-Host "Press Enter to continue"
|
||||
Reference in New Issue
Block a user