New files: - prompts/win.md: Complete Windows execution guide covering build dependencies (libpq), compilation steps, runtime compatibility table (3rdparty.toml Windows URLs), shell command adaptations, GPU detection for LLM, directory structure, and troubleshooting - DEPENDENCIES.ps1: PowerShell script to auto-install PostgreSQL binaries and set PQ_LIB_DIR for Windows builds - restart.ps1: PowerShell restart script for Windows dev env Submodule updates: - botserver: Full Windows compatibility (21 files changed) including 3rdparty.toml Windows URLs, installer/cache/facade Windows process management, certificate generation, #[cfg(unix)] guards, and clippy zero-warnings refactors - bottest: #[cfg(unix)] guards for nix crate in postgres.rs, minio.rs, redis.rs service managers - botapp: Remove unused import (clippy auto-fix) Config: - .cargo/config.toml: Updated for Windows toolchain - Cargo.lock: Dependency updates
32 lines
1.4 KiB
PowerShell
32 lines
1.4 KiB
PowerShell
$ErrorActionPreference = "Continue"
|
|
|
|
Write-Host "Stopping..."
|
|
Stop-Process -Name "botserver" -Force -ErrorAction SilentlyContinue
|
|
Stop-Process -Name "botui" -Force -ErrorAction SilentlyContinue
|
|
Stop-Process -Name "rustc" -Force -ErrorAction SilentlyContinue
|
|
|
|
Write-Host "Cleaning..."
|
|
Remove-Item -Path "botserver.log", "botui.log" -Force -ErrorAction SilentlyContinue
|
|
|
|
Write-Host "Building..."
|
|
cargo build -p botserver
|
|
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to build botserver"; exit 1 }
|
|
|
|
cargo build -p botui
|
|
if ($LASTEXITCODE -ne 0) { Write-Host "Failed to build botui"; exit 1 }
|
|
|
|
Write-Host "Starting botserver..."
|
|
$env:PORT = "8080"
|
|
$env:RUST_LOG = "debug"
|
|
$env:PATH += ";C:\pgsql\pgsql\bin;C:\pgsql\pgsql\lib"
|
|
$botserverProcess = Start-Process -PassThru -NoNewWindow -FilePath ".\target\debug\botserver.exe" -ArgumentList "--noconsole" -RedirectStandardOutput "botserver.log" -RedirectStandardError "botserver.log"
|
|
Write-Host " PID: $($botserverProcess.Id)"
|
|
|
|
Write-Host "Starting botui..."
|
|
$env:BOTSERVER_URL = "http://localhost:8080"
|
|
$env:PORT = "3000"
|
|
$botuiProcess = Start-Process -PassThru -NoNewWindow -FilePath ".\target\debug\botui.exe" -RedirectStandardOutput "botui.log" -RedirectStandardError "botui.log"
|
|
Write-Host " PID: $($botuiProcess.Id)"
|
|
|
|
Write-Host "Done. Logs are being written to botserver.log and botui.log"
|
|
Write-Host "To view logs, you can use: Get-Content botserver.log -Wait"
|