Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101# Setup Perforce for SpiderLily on Windows# Run this first to sync the project before building
param( [string]$WorkspacePath = "C:\Perforce\SpiderLily")
Write-Host "=========================================" -ForegroundColor CyanWrite-Host "Perforce Setup for SpiderLily" -ForegroundColor CyanWrite-Host "=========================================" -ForegroundColor CyanWrite-Host ""
# Check if p4 is installedif (!(Get-Command p4 -ErrorAction SilentlyContinue)) { Write-Host "[ERROR] Perforce (p4) not found!" -ForegroundColor Red Write-Host "" Write-Host "Please install Perforce P4V client from:" Write-Host " https://www.perforce.com/downloads/helix-visual-client-p4v" Write-Host "" Write-Host "Or install p4 command line:" Write-Host " https://www.perforce.com/downloads/helix-command-line-client-p4" Write-Host "" exit 1}
Write-Host "[OK] Found p4 command" -ForegroundColor GreenWrite-Host ""
# Set Perforce environment$P4PORT = "ssl:falsework.helixcore.io:1666"$env:P4PORT = $P4PORT
Write-Host "Perforce Server: $P4PORT" -ForegroundColor CyanWrite-Host ""
# Prompt for credentials$P4USER = Read-Host "Enter your Perforce username"$P4PASSWORD = Read-Host "Enter your Perforce password" -AsSecureString$P4PASSWORD_Plain = [Runtime.InteropServices.Marshal]::PtrToStringAuto( [Runtime.InteropServices.Marshal]::SecureStringToBSTR($P4PASSWORD))
$env:P4USER = $P4USER$env:P4PASSWD = $P4PASSWORD_Plain
# Test connectionWrite-Host "Testing connection to $P4PORT..." -ForegroundColor Yellowp4 infoif ($LASTEXITCODE -ne 0) { Write-Host "" Write-Host "[ERROR] Could not connect to Perforce server!" -ForegroundColor Red Write-Host "Please check:" Write-Host " - Server address: $P4PORT" Write-Host " - Your username and password" Write-Host " - Network/firewall settings" Write-Host "" exit 1}
Write-Host ""Write-Host "[OK] Connected to Perforce!" -ForegroundColor GreenWrite-Host ""
# Create workspace directoryif (!(Test-Path $WorkspacePath)) { Write-Host "Creating workspace directory: $WorkspacePath" -ForegroundColor Yellow New-Item -ItemType Directory -Path $WorkspacePath -Force | Out-Null}
# List available workspaces/clientsWrite-Host "Your Perforce workspaces:" -ForegroundColor Cyanp4 clients -u $P4USER
Write-Host ""Write-Host "=========================================" -ForegroundColor CyanWrite-Host ""Write-Host "Next steps:" -ForegroundColor YellowWrite-Host "1. Create or select a Perforce workspace/client for SpiderLily"Write-Host "2. Set your workspace root to: $WorkspacePath"Write-Host "3. Sync the project: p4 sync"Write-Host ""Write-Host "Or use P4V GUI:"Write-Host " - Connection: $P4PORT"Write-Host " - User: $P4USER"Write-Host " - Create workspace mapping to: $WorkspacePath"Write-Host ""Write-Host "After syncing, update build-false-work.ps1:"Write-Host " Set ProjectRoot = `"$WorkspacePath`""Write-Host ""
# Save connection info for future use$p4ConfigPath = "$WorkspacePath\.p4config"Write-Host "Saving Perforce config to: $p4ConfigPath" -ForegroundColor Yellow@"P4PORT=$P4PORTP4USER=$P4USER"@ | Out-File -FilePath $p4ConfigPath -Encoding ASCII
Write-Host "[OK] Setup complete!" -ForegroundColor GreenWrite-Host ""