Bots really play: shared understanding for headless bots, social layer (bot-to-bot talk, squads, invites), castle sieges, economy (sell/buy/professions/jewelry/buffs), telemetry, brain (loot, fight back, leash, spoil/sweep), 43 combat profiles, zones rebuilt from real spawns, tools (harness, data checks, zone fixer, build/deploy)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Сборка и деплой SPP-сервера одной командой (Windows).
|
||||
# powershell -ExecutionPolicy Bypass -File build.ps1 # ant jar + деплой в server\ + restart game
|
||||
# powershell -ExecutionPolicy Bypass -File build.ps1 -NoRestart # только собрать и разложить файлы
|
||||
# powershell -ExecutionPolicy Bypass -File build.ps1 -DeployOnly # без сборки: только данные/конфиги/скрипты
|
||||
# Нужны JDK 25 (JAVA_HOME) и Apache Ant в PATH.
|
||||
param(
|
||||
[switch]$NoRestart,
|
||||
[switch]$DeployOnly
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Base = $PSScriptRoot
|
||||
$Src = Join-Path $Base "src_mobius\mobius\L2J_Mobius_CT_0_Interlude"
|
||||
$Build = Join-Path $Base "src_mobius\mobius\build\dist\libs"
|
||||
$Server = Join-Path $Base "server"
|
||||
$Compose = Join-Path $Server "docker\docker-compose.yml"
|
||||
|
||||
if (-not $DeployOnly) {
|
||||
Push-Location $Src
|
||||
try {
|
||||
Write-Host "ant jar..." -ForegroundColor Cyan
|
||||
ant -q jar
|
||||
if ($LASTEXITCODE -ne 0) { throw "ant failed" }
|
||||
} finally { Pop-Location }
|
||||
Copy-Item (Join-Path $Build "GameServer.jar") (Join-Path $Server "libs\GameServer.jar") -Force
|
||||
Copy-Item (Join-Path $Build "LoginServer.jar") (Join-Path $Server "libs\LoginServer.jar") -Force
|
||||
Write-Host "jar -> server\libs" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# Оверлей датапака: данные ботов, конфиги, чат-хендлеры, SQL-сиды. libs не копируем (это зависимости сборки).
|
||||
$Dist = Join-Path $Src "dist"
|
||||
Get-ChildItem -Path $Dist -Recurse -File | Where-Object { $_.FullName -notlike "*\dist\libs\*" } | ForEach-Object {
|
||||
$rel = $_.FullName.Substring($Dist.Length + 1)
|
||||
$dst = Join-Path $Server $rel
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path $dst) | Out-Null
|
||||
Copy-Item $_.FullName $dst -Force
|
||||
}
|
||||
Write-Host "оверлей -> server\ (data, config, scripts, sql)" -ForegroundColor Green
|
||||
|
||||
if (-not $NoRestart) {
|
||||
if (Test-Path $Compose) {
|
||||
docker compose -f $Compose restart game
|
||||
Write-Host "game перезапущен. Лог: docker compose -f server\docker\docker-compose.yml logs -f game" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "docker-compose не найден, перезапусти сервер вручную." -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user