# Start local Open-MT2 stack (engine first — no client art required for server boot) $ErrorActionPreference = "Stop" $root = Resolve-Path (Join-Path $PSScriptRoot "..") $open = Join-Path $root "vendor\open-mt2" $data = Join-Path $root "runtime\mariadb-data" $log = Join-Path $root "runtime\mysqld.log" New-Item -ItemType Directory -Force -Path (Join-Path $root "runtime") | Out-Null # Redis $redis = "C:\Program Files\Redis\redis-server.exe" if (Test-Path $redis) { $r = Get-Process redis-server -EA SilentlyContinue if (-not $r) { Start-Process $redis -WindowStyle Minimized } } # MariaDB (project datadir, small buffer) $mysqld = "C:\Program Files\MariaDB 12.3\bin\mysqld.exe" if (-not (Get-Process mysqld -EA SilentlyContinue)) { Start-Process $mysqld -ArgumentList @( "--datadir=$data", "--port=3306", "--bind-address=127.0.0.1", "--innodb-buffer-pool-size=128M", "--console" ) -WindowStyle Hidden Start-Sleep 5 } Write-Host "Start auth: 11002 and game: 13001 in two terminals, or:" Write-Host " cd $open" Write-Host " npx cross-env LOG_LEVEL=info tsnd -r tsconfig-paths/register --transpile-only --env-file=.env src/auth/main.ts" Write-Host " npx cross-env LOG_LEVEL=info tsnd -r tsconfig-paths/register --transpile-only --env-file=.env src/game/main.ts" Write-Host "Login (default): admin / admin" Write-Host "Client serverinfo: AUTH 11002 GAME 13001"