File size: 1,398 Bytes
3768ef0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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"