Ship the WeChat hot-update catalogs and the camp, TideWhale T2, UI atlas, and animation-lab work.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateRange(1,65535)][int]$Port = 15888,
|
||||
[string]$ListenAddress = '127.0.0.1',
|
||||
[string]$DatabasePath = ''
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$serverRoot = $PSScriptRoot
|
||||
$executable = Join-Path $serverRoot 'aiserver.exe'
|
||||
if (-not (Test-Path -LiteralPath $executable)) { throw "Missing $executable" }
|
||||
if (-not $DatabasePath) { $DatabasePath = Join-Path $serverRoot 'data/aiserver.db' }
|
||||
$DatabasePath = [IO.Path]::GetFullPath($DatabasePath)
|
||||
$dataDirectory = Split-Path -Parent $DatabasePath
|
||||
$logs = Join-Path $serverRoot 'logs'
|
||||
New-Item -ItemType Directory -Path $dataDirectory,$logs -Force | Out-Null
|
||||
$log = Join-Path $logs ("aiserver-{0}.log" -f (Get-Date -Format yyyyMMdd))
|
||||
Push-Location $serverRoot
|
||||
try {
|
||||
"$(Get-Date -Format o) Starting AIServer on ${ListenAddress}:$Port" | Add-Content -LiteralPath $log
|
||||
& $executable --host $ListenAddress --port $Port --db $DatabasePath --daemon 2>&1 |
|
||||
Tee-Object -FilePath $log -Append
|
||||
$serverExit = $LASTEXITCODE
|
||||
if ($serverExit -eq 0) { $serverExit = 1 } # A daemon exiting should trigger task recovery.
|
||||
exit $serverExit
|
||||
} finally { Pop-Location }
|
||||
Reference in New Issue
Block a user