RynthCore as of 2026-10-04 (internal 843c801): RynthNav auto-travel and the navigation map, plugin API v75 (server and titles), launcher with Available plugins, download progress and the update on the front page, opt-in usage statistics, NPC names, radar colours, title-bar text size, FPS limiter, client action unlocks, release 2026.10.4.6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b5e2765b7
commit
a24ed6df7c
322 changed files with 83009 additions and 7504 deletions
|
|
@ -5,12 +5,18 @@
|
|||
|
||||
.DESCRIPTION
|
||||
1. Publishes the Avalonia launcher (self-contained, x86)
|
||||
2. Publishes RynthCore.Engine (NativeAOT, x86 -- ~2 min)
|
||||
3. Publishes RynthCore.Loader (NativeAOT, x86) -- the DLL the launcher injects
|
||||
4. Publishes RynthCore.Plugin.RynthAi (NativeAOT, x86)
|
||||
2+3. The engine and the loader. By default the unloadable engine
|
||||
(docs/UNLOADABLE_ENGINE_PLAN.md): scripts\Publish-EngineCoreClr.ps1 stages the native
|
||||
loader (native\Loader), RynthCore.Shim, the CoreCLR engine (ReadyToRun) and the
|
||||
app-local .NET runtime (Runtime\dotnet) straight into staging\app\Runtime.
|
||||
-NativeAot builds the old NativeAOT engine + loader instead.
|
||||
4. Publishes RynthCore.Plugin.RynthAi (NativeAOT, x86: the release plugins stay NativeAOT
|
||||
- the CoreCLR engine loads them - until the update feed can carry a managed plugin's
|
||||
dependency DLLs)
|
||||
5. Publishes the Loot Editor
|
||||
6. Stages all output under installer\staging\app\, plus the hand-built
|
||||
RynthCore.SehTrampoline.dll, and checks every required runtime file is there
|
||||
RynthCore.SehTrampoline.dll and the Decal bridge (DecalBridge\RynthCore.DecalBridge.dll,
|
||||
built here against Decal's reference assemblies), and checks every required file is there
|
||||
7. Invokes ISCC.exe to produce installer\Output\RynthCore-Setup.exe
|
||||
|
||||
.PARAMETER Configuration
|
||||
|
|
@ -32,7 +38,19 @@ param(
|
|||
# Version string injected into the installer (e.g. "0.3"). When omitted,
|
||||
# the version defined in RynthCore.iss is used as-is.
|
||||
[string]$Version = "",
|
||||
[switch]$SkipBuild
|
||||
[switch]$SkipBuild,
|
||||
# The old NativeAOT engine + loader (a hot reload leaks every engine generation).
|
||||
[switch]$NativeAot,
|
||||
# The Decal bridge (src\RynthCore.DecalBridge, docs/DECAL_BRIDGE_PLAN.md) is staged into
|
||||
# {app}\DecalBridge by default: every release ships it (experimental, opt-in per account;
|
||||
# nothing registers it unless the player picks "Decal + RynthCore"). Building it needs
|
||||
# Decal installed (its public reference assemblies); without Decal this script fails.
|
||||
# -SkipDecalBridge leaves it out (dev builds on a machine without Decal; never a release).
|
||||
[switch]$SkipDecalBridge,
|
||||
# Old opt-in switch, kept so existing command lines still work; the bridge is the default now.
|
||||
[switch]$IncludeDecalBridge,
|
||||
# Decal's install folder, when not the default C:\Program Files (x86)\Decal 3.0.
|
||||
[string]$DecalDir = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
@ -80,7 +98,7 @@ $LootEditorPublish = "$RynthSuiteRoot\Tools\RynthCore.LootEditor\bin\$Configurat
|
|||
$StagingDir = "$ScriptDir\staging\app"
|
||||
|
||||
# ── Validate projects ───────────────────────────────────────────────────────
|
||||
foreach ($p in @($LauncherProject, $EngineProject, $LoaderProject, $PluginProject, $LootEditorProject)) {
|
||||
foreach ($p in @($LauncherProject, $EngineProject, $PluginProject, $LootEditorProject) + @(if ($NativeAot) { $LoaderProject })) {
|
||||
if (-not (Test-Path $p)) {
|
||||
throw "Project not found: $p`nUpdate paths in Build-Installer.ps1 if your repo layout differs."
|
||||
}
|
||||
|
|
@ -93,17 +111,20 @@ if (-not $SkipBuild) {
|
|||
dotnet publish $LauncherProject -c $Configuration -r win-x86 --self-contained true @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Launcher publish failed (exit $LASTEXITCODE)" }
|
||||
|
||||
# ── 2. Engine (NativeAOT — the slow one) ──────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "[2/5] Publishing Engine (NativeAOT, ~2 min)..." -ForegroundColor Cyan
|
||||
dotnet publish $EngineProject -c $Configuration @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Engine publish failed (exit $LASTEXITCODE)" }
|
||||
if ($NativeAot) {
|
||||
# ── 2. Engine (NativeAOT — the slow one) ──────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "[2/5] Publishing Engine (NativeAOT, ~2 min)..." -ForegroundColor Cyan
|
||||
dotnet publish $EngineProject -c $Configuration @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Engine publish failed (exit $LASTEXITCODE)" }
|
||||
|
||||
# ── 3. Loader (NativeAOT, small) ──────────────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "[3/5] Publishing Loader (NativeAOT)..." -ForegroundColor Cyan
|
||||
dotnet publish $LoaderProject -c $Configuration @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Loader publish failed (exit $LASTEXITCODE)" }
|
||||
# ── 3. Loader (NativeAOT, small) ──────────────────────────────────────
|
||||
Write-Host ""
|
||||
Write-Host "[3/5] Publishing Loader (NativeAOT)..." -ForegroundColor Cyan
|
||||
dotnet publish $LoaderProject -c $Configuration @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Loader publish failed (exit $LASTEXITCODE)" }
|
||||
}
|
||||
# (Default: the CoreCLR engine and native loader are built straight into staging below.)
|
||||
|
||||
# ── 4. Plugin (NativeAOT) ─────────────────────────────────────────────────
|
||||
Write-Host ""
|
||||
|
|
@ -143,18 +164,30 @@ foreach ($file in (Get-ChildItem "$LauncherPublish" -File)) {
|
|||
Copy-Item $file.FullName "$StagingDir\$destName" -Force
|
||||
}
|
||||
|
||||
# Engine runtime files (into Runtime\, skip .pdb)
|
||||
foreach ($file in (Get-ChildItem "$EnginePublish" -File)) {
|
||||
if ($file.Extension -eq '.pdb') { continue }
|
||||
Copy-Item $file.FullName "$StagingDir\Runtime\$($file.Name)" -Force
|
||||
}
|
||||
if ($NativeAot) {
|
||||
# Engine runtime files (into Runtime\, skip .pdb)
|
||||
foreach ($file in (Get-ChildItem "$EnginePublish" -File)) {
|
||||
if ($file.Extension -eq '.pdb') { continue }
|
||||
Copy-Item $file.FullName "$StagingDir\Runtime\$($file.Name)" -Force
|
||||
}
|
||||
|
||||
# Loader — the DLL the launcher injects (EngineInjectionService.EngineDllName); it
|
||||
# maps RynthCore.Engine.dll and provides hot-reload. Without it a fresh install's
|
||||
# launcher can't auto-find an engine to inject.
|
||||
$loaderDll = "$LoaderPublish\RynthCore.Loader.dll"
|
||||
if (-not (Test-Path $loaderDll)) { throw "Loader DLL not found at: $loaderDll" }
|
||||
Copy-Item $loaderDll "$StagingDir\Runtime\" -Force
|
||||
# Loader — the DLL the launcher injects (EngineInjectionService.EngineDllName); it
|
||||
# maps RynthCore.Engine.dll and provides hot-reload. Without it a fresh install's
|
||||
# launcher can't auto-find an engine to inject.
|
||||
$loaderDll = "$LoaderPublish\RynthCore.Loader.dll"
|
||||
if (-not (Test-Path $loaderDll)) { throw "Loader DLL not found at: $loaderDll" }
|
||||
Copy-Item $loaderDll "$StagingDir\Runtime\" -Force
|
||||
} else {
|
||||
# The unloadable engine: native loader (same RynthCoreInit contract with the launcher's
|
||||
# injector), RynthCore.Shim, the CoreCLR engine (ReadyToRun) + its dependencies, and
|
||||
# Runtime\dotnet (the app-local x86 .NET runtime). Needs Visual Studio's C++ tools (cl.exe)
|
||||
# for the loader, like the SEH trampoline.
|
||||
Write-Host ""
|
||||
Write-Host "[2+3/5] Building the unloadable engine + native loader into staging..." -ForegroundColor Cyan
|
||||
& "$RepoRoot\scripts\Publish-EngineCoreClr.ps1" -Target "$StagingDir\Runtime" -Configuration $Configuration -MsBuildArgs $VersionArgs
|
||||
# Keep the engine's pdb (its stack traces get line numbers); drop the loader's and shim's.
|
||||
Remove-Item "$StagingDir\Runtime\RynthCore.Loader.pdb", "$StagingDir\Runtime\RynthCore.Shim.pdb" -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# SEH trampoline — hand-built native DLL (native\SehTrampoline\Build-SehTrampoline.ps1),
|
||||
# NOT part of the engine publish output. Without it SehTrampoline.IsAvailable stays
|
||||
|
|
@ -169,8 +202,8 @@ if ((Test-Path $sehSrc) -and (Get-Item $sehSrc).LastWriteTime -gt (Get-Item $seh
|
|||
}
|
||||
Copy-Item $sehDll "$StagingDir\Runtime\" -Force
|
||||
|
||||
# Engine Native subfolder
|
||||
if (Test-Path "$EnginePublish\Native") {
|
||||
# Engine Native subfolder (NativeAOT layout)
|
||||
if ($NativeAot -and (Test-Path "$EnginePublish\Native")) {
|
||||
foreach ($file in (Get-ChildItem "$EnginePublish\Native" -File)) {
|
||||
if ($file.Extension -eq '.pdb') { continue }
|
||||
Copy-Item $file.FullName "$StagingDir\Runtime\Native\$($file.Name)" -Force
|
||||
|
|
@ -196,6 +229,38 @@ foreach ($dir in (Get-ChildItem "$LootEditorPublish" -Directory)) {
|
|||
Get-ChildItem "$StagingDir\Tools\LootEditor\$($dir.Name)" -Recurse -File -Filter '*.pdb' | Remove-Item -Force
|
||||
}
|
||||
|
||||
# Decal bridge (docs/DECAL_BRIDGE_PLAN.md, experimental): the net48 x86 Decal network filter
|
||||
# goes to {app}\DecalBridge\, the folder the launcher registers for "Decal + RynthCore"
|
||||
# accounts (and only for those). Built against Decal's public reference assemblies, so the
|
||||
# build machine needs Decal; -p:RequireDecal=true turns "no Decal" into a build error rather
|
||||
# than the empty assembly a plain solution build makes. Never ships any Decal file.
|
||||
if ($SkipDecalBridge) {
|
||||
Write-Warning "-SkipDecalBridge: this build has no Decal bridge; 'Decal + RynthCore' accounts can't launch with it. Not for a release."
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "Building the Decal bridge (net48 x86, against Decal's reference assemblies)..." -ForegroundColor Cyan
|
||||
$bridgeProject = "$RepoRoot\src\RynthCore.DecalBridge\RynthCore.DecalBridge.csproj"
|
||||
$bridgeDll = "$RepoRoot\src\RynthCore.DecalBridge\bin\$Configuration\RynthCore.DecalBridge.dll"
|
||||
$decalArgs = @("-p:RequireDecal=true")
|
||||
if ($DecalDir) { $decalArgs += "-p:DecalDir=$DecalDir" }
|
||||
# A DLL left over from an earlier build must never be shipped in place of this one.
|
||||
Remove-Item $bridgeDll -Force -ErrorAction SilentlyContinue
|
||||
if (Test-Path $bridgeDll) { throw "Could not remove the old $bridgeDll (in use by a Decal client?)" }
|
||||
dotnet build $bridgeProject -c $Configuration -nologo -v q @decalArgs @VersionArgs
|
||||
if ($LASTEXITCODE -ne 0) { throw "Decal bridge build failed (exit $LASTEXITCODE). Is Decal 3.0 installed? (-DecalDir for another folder, -SkipDecalBridge for a dev build)" }
|
||||
if (-not (Test-Path $bridgeDll)) { throw "Decal bridge not built at $bridgeDll" }
|
||||
# The real bridge has its filter type; the no-Decal build is an empty assembly.
|
||||
$bridgeBytes = [System.IO.File]::ReadAllBytes($bridgeDll)
|
||||
if ([System.Text.Encoding]::ASCII.GetString($bridgeBytes).IndexOf("BridgeFilter") -lt 0) {
|
||||
throw "$bridgeDll has no BridgeFilter type - it was built without Decal's reference assemblies."
|
||||
}
|
||||
New-Item -ItemType Directory -Path "$StagingDir\DecalBridge" -Force | Out-Null
|
||||
Copy-Item $bridgeDll "$StagingDir\DecalBridge\" -Force
|
||||
$staleDecal = @(Get-ChildItem "$StagingDir\DecalBridge" -File | Where-Object { $_.Name -ne "RynthCore.DecalBridge.dll" })
|
||||
if ($staleDecal.Count -gt 0) { throw "Unexpected files in the staged DecalBridge folder: $($staleDecal.Name -join ', ')" }
|
||||
Write-Host " RynthCore.DecalBridge.dll $((Get-Item $bridgeDll).VersionInfo.FileVersion)"
|
||||
}
|
||||
|
||||
# release.txt — which core release this install is ($release, from -Version at the top).
|
||||
Set-Content -Path "$StagingDir\release.txt" -Value @($release, $Version) -Encoding ASCII
|
||||
|
||||
|
|
@ -210,6 +275,16 @@ $required = @(
|
|||
"$StagingDir\Runtime\cimgui.dll",
|
||||
"$pluginStagingDir\RynthAi\RynthCore.Plugin.RynthAi.dll"
|
||||
)
|
||||
if (-not $NativeAot) {
|
||||
$required += @(
|
||||
"$StagingDir\Runtime\RynthCore.Shim.dll",
|
||||
"$StagingDir\Runtime\dotnet\coreclr.dll",
|
||||
"$StagingDir\Runtime\dotnet\System.Private.CoreLib.dll"
|
||||
)
|
||||
}
|
||||
if (-not $SkipDecalBridge) {
|
||||
$required += "$StagingDir\DecalBridge\RynthCore.DecalBridge.dll"
|
||||
}
|
||||
$missing = @($required | Where-Object { -not (Test-Path $_) })
|
||||
if ($missing.Count -gt 0) { throw "Staging is missing required files:`n $($missing -join "`n ")" }
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
One command per release:
|
||||
1. Refuses if the signing key isn't set up or isn't trusted by the launcher being shipped,
|
||||
if either repo has uncommitted changes, or if -Version isn't newer than the live feed.
|
||||
2. Builds the installer (Build-Installer.ps1 -Version) and the RynthSuite plugins into
|
||||
2. Builds the installer (Build-Installer.ps1 -Version; it includes the Decal bridge, so the
|
||||
build machine needs Decal installed) and the RynthSuite plugins into
|
||||
installer\Releases\<release>\ — never into the live C:\Games folders.
|
||||
3. Writes the manifest (sizes + SHA-256 of every file), signs it with the DPAPI key
|
||||
(Sign-Update.ps1, no prompt) and checks the signature the way the launcher will.
|
||||
|
|
@ -37,7 +38,12 @@ param(
|
|||
[string]$BaseUrl = "https://aelrynth.com/downloads/rynth",
|
||||
[string]$KeyDir = (Join-Path $env:USERPROFILE ".rynthcore-update-signing"),
|
||||
[string]$RynthSuiteRoot = "",
|
||||
[string]$TrustFile = "" # defaults to the launcher's UpdateTrust.cs; override for tests
|
||||
[string]$TrustFile = "", # defaults to the launcher's UpdateTrust.cs; override for tests
|
||||
# RynthNav's data shipped to launchers as the signed "navdata" archive: tiles (nav_XXXX.tile),
|
||||
# portals.tsv and locations.json from this folder. Only re-uploaded when the set changes
|
||||
# (its id is a hash of every file); otherwise the live feed's entry is carried over.
|
||||
[string]$NavDataDir = "C:\Games\RynthCore\NavData",
|
||||
[switch]$SkipNavData # leave navdata out of this feed (launchers then keep what they have)
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
@ -48,6 +54,7 @@ if (-not $TrustFile) { $TrustFile = Join-Path $RepoRoot "src\RynthCore.App.Avalo
|
|||
|
||||
function Step($m) { Write-Host ""; Write-Host "== $m" -ForegroundColor Cyan }
|
||||
function Sha256([string]$path) { (Get-FileHash $path -Algorithm SHA256).Hash.ToLowerInvariant() }
|
||||
function Sha256Text([string]$text) { [Convert]::ToHexString([System.Security.Cryptography.SHA256]::HashData([Text.Encoding]::UTF8.GetBytes($text))).ToLowerInvariant() }
|
||||
|
||||
# Same check as RynthUpdater.VerifyEnvelope: any trusted key's signature over the payload bytes.
|
||||
function Test-Envelope([string]$path, [string[]]$keys) {
|
||||
|
|
@ -99,9 +106,11 @@ if (-not $AllowDirty) {
|
|||
Write-Host " RynthCore $(git -C $RepoRoot rev-parse --short HEAD), RynthSuite $(git -C $RynthSuiteRoot rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
$liveManifest = $null
|
||||
try {
|
||||
$live = Invoke-RestMethod "$BaseUrl/update.json" -TimeoutSec 20
|
||||
$liveRelease = ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($live.payload)) | ConvertFrom-Json).release
|
||||
$liveManifest = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($live.payload)) | ConvertFrom-Json
|
||||
$liveRelease = $liveManifest.release
|
||||
if ($release -le $liveRelease) { throw "Release $release is not newer than the live feed's $liveRelease — bump -Version." }
|
||||
Write-Host " live feed is at $liveRelease; publishing $release"
|
||||
} catch [Microsoft.PowerShell.Commands.HttpResponseException] {
|
||||
|
|
@ -116,10 +125,16 @@ New-Item -ItemType Directory -Force "$rel\plugins", "$rel\build" | Out-Null
|
|||
Step "Building the installer ($Version)"
|
||||
& (Join-Path $ScriptDir "Build-Installer.ps1") -Version $Version -RynthSuiteRoot $RynthSuiteRoot
|
||||
if (-not $?) { throw "Build-Installer.ps1 failed" }
|
||||
# The Decal bridge ships in every release (experimental, opt-in per account): the installer
|
||||
# carries it, so a launcher that updates through this feed gets it as a fresh install does.
|
||||
# Build-Installer.ps1 fails without Decal; this guards against a -SkipDecalBridge staging.
|
||||
$bridgeStaged = Join-Path $ScriptDir "staging\app\DecalBridge\RynthCore.DecalBridge.dll"
|
||||
if (-not (Test-Path $bridgeStaged)) { throw "The installer was built without the Decal bridge ($bridgeStaged missing) - not publishing." }
|
||||
Write-Host " Decal bridge in the installer: $((Get-Item $bridgeStaged).VersionInfo.FileVersion)"
|
||||
Copy-Item (Join-Path $ScriptDir "Output\RynthCore-Setup.exe") "$rel\RynthCore-Setup.exe"
|
||||
Copy-Item (Join-Path $ScriptDir "staging\plugins\RynthAi\RynthCore.Plugin.RynthAi.dll") "$rel\plugins\"
|
||||
|
||||
$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision"
|
||||
$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision", "RynthLua", "RynthOracle", "RynthInventory"
|
||||
foreach ($name in $suitePlugins) {
|
||||
Step "Building $name"
|
||||
$proj = Join-Path $RynthSuiteRoot "Plugins\RynthCore.Plugin.$name\RynthCore.Plugin.$name.csproj"
|
||||
|
|
@ -134,11 +149,26 @@ $zipRoot = "$rel\build\zip"
|
|||
foreach ($name in $suitePlugins) {
|
||||
New-Item -ItemType Directory -Force "$zipRoot\RynthSuite\$name" | Out-Null
|
||||
Copy-Item "$rel\plugins\RynthCore.Plugin.$name.dll" "$zipRoot\RynthSuite\$name\"
|
||||
# Third-party licence notices travel with the plugin (RynthOracle: Oracle of Dereth, MIT).
|
||||
$notice = "$rel\build\$name\THIRD_PARTY_NOTICES.md"
|
||||
if (Test-Path $notice) { Copy-Item $notice "$zipRoot\RynthSuite\$name\" }
|
||||
}
|
||||
$navSrc = "C:\Games\RynthCore\NavData"
|
||||
$navSrc = $NavDataDir
|
||||
New-Item -ItemType Directory -Force "$zipRoot\RynthCore\NavData" | Out-Null
|
||||
Get-ChildItem $navSrc -File | Where-Object { $_.Extension -eq ".tile" -or $_.Name -eq "portals.tsv" } |
|
||||
# The route planner's portals.tsv and the Atlas's locations.json (both made by
|
||||
# tools\navdata\gen_locations.py from the world database), and the Town Network's townnet.json
|
||||
# (tools\navdata\Build-TownNet.ps1: the world database plus the walks inside from the dats).
|
||||
# Never the player's own files
|
||||
# there (atlas.txt, recalls.txt, _player.txt). The tiles are no longer in this zip (the whole
|
||||
# world is ~40,000 of them): the launcher installs them from the feed's navdata archive.
|
||||
Get-ChildItem $navSrc -File | Where-Object { $_.Name -eq "portals.tsv" -or $_.Name -eq "locations.json" -or $_.Name -eq "townnet.json" } |
|
||||
Copy-Item -Destination "$zipRoot\RynthCore\NavData\"
|
||||
if (-not (Test-Path "$navSrc\locations.json")) {
|
||||
Write-Warning "NavData has no locations.json: RynthNav's Atlas ships empty. Run tools\navdata\gen_locations.py and copy its output there."
|
||||
}
|
||||
if (-not (Test-Path "$navSrc\townnet.json")) {
|
||||
Write-Warning "NavData has no townnet.json: routes won't use the Town Network. Run tools\navdata\Build-TownNet.ps1 and copy its townnet.json there."
|
||||
}
|
||||
@"
|
||||
RynthSuite plugins for RynthCore (Asheron's Call, retail client) - $Version
|
||||
|
||||
|
|
@ -147,28 +177,108 @@ Extract this zip into C:\Games - it creates:
|
|||
C:\Games\RynthSuite\RynthNav\ RynthNav plugin
|
||||
C:\Games\RynthSuite\RynthTracker\ RynthTracker plugin
|
||||
C:\Games\RynthSuite\RynthVision\ RynthVision plugin
|
||||
C:\Games\RynthCore\NavData\ RynthNav's baked navmesh tiles
|
||||
C:\Games\RynthSuite\RynthLua\ RynthLua plugin (Lua scripting; was part of RynthAi)
|
||||
C:\Games\RynthSuite\RynthOracle\ RynthOracle plugin (quests, character, titles; based on Oracle of Dereth by Advis Eveldan)
|
||||
C:\Games\RynthSuite\RynthInventory\ RynthInventory plugin (search every character's items)
|
||||
C:\Games\RynthCore\NavData\ RynthNav's portals and Atlas
|
||||
|
||||
Then, in the RynthCore launcher's Plugins tab, add the full path of each
|
||||
plugin DLL you want. Install RynthCore first (RynthCore-Setup.exe), which
|
||||
also installs RynthAi and the Loot Editor. After that the launcher keeps
|
||||
the plugins up to date by itself.
|
||||
the plugins up to date by itself, and once RynthNav is in the list it also
|
||||
downloads RynthNav's navmesh tiles into C:\Games\RynthCore\NavData.
|
||||
|
||||
MIT licensed. https://aelrynth.com/projects.html
|
||||
"@ -replace "`n", "`r`n" | Set-Content "$zipRoot\README.txt" -NoNewline
|
||||
Compress-Archive -Path "$zipRoot\*" -DestinationPath "$rel\RynthSuite-Plugins.zip" -CompressionLevel Optimal
|
||||
|
||||
# RynthNav's data for the launchers (RynthUpdater.NavData.cs): one archive, flat, only the file
|
||||
# names RynthNav reads. Its id is a hash over every file's name and SHA-256, so an unchanged
|
||||
# set reuses the live entry (and the archive already on the server) instead of re-uploading.
|
||||
$navData = $null
|
||||
$navZip = $null
|
||||
if (-not $SkipNavData) {
|
||||
Step "RynthNav data (tiles, route graph, portals, Atlas, Town Network) from $NavDataDir"
|
||||
$navFiles = @(Get-ChildItem $NavDataDir -File | Where-Object { $_.Name -match '^(nav_[0-9A-Fa-f]{4}\.tile|portals\.tsv|locations\.json|navgraph\.bin|townnet\.json)$' } | Sort-Object Name)
|
||||
$tileCount = @($navFiles | Where-Object { $_.Extension -eq ".tile" }).Count
|
||||
if ($tileCount -eq 0) { throw "$NavDataDir has no tiles. Pass -NavDataDir, or -SkipNavData to publish without them." }
|
||||
# The long-range route graph (RynthNav.Baker --graph) must come from these very tiles: the
|
||||
# plugin ignores a graph whose tiles don't match (long gotos then walk the straight line).
|
||||
$graph = $navFiles | Where-Object { $_.Name -eq "navgraph.bin" }
|
||||
$newestTile = ($navFiles | Where-Object { $_.Extension -eq ".tile" } | Measure-Object LastWriteTimeUtc -Maximum).Maximum
|
||||
if (-not $graph) { Write-Warning "No navgraph.bin in ${NavDataDir}: long gotos will walk the straight line. Run: RynthNav.Baker --graph $NavDataDir" }
|
||||
elseif ($graph.LastWriteTimeUtc -lt $newestTile) { Write-Warning "navgraph.bin is older than the newest tile: rebuild it (RynthNav.Baker --graph $NavDataDir), or RynthNav will ignore it." }
|
||||
$idText = ($navFiles | ForEach-Object { "$($_.Name) $(Sha256 $_.FullName)" }) -join "`n"
|
||||
$navId = (Sha256Text $idText).Substring(0, 32)
|
||||
# [long]: Measure-Object's Sum is a double, which ConvertTo-Json writes as 1383002945.0, and the
|
||||
# launcher reads "bytes" with GetInt64 - a ".0" failed every launcher's update check (2026.10.3.1/2).
|
||||
$navBytes = [long](($navFiles | Measure-Object Length -Sum).Sum)
|
||||
if ($liveManifest -and $liveManifest.navdata -and $liveManifest.navdata.id -eq $navId) {
|
||||
$navData = $liveManifest.navdata
|
||||
# Carried over from the live feed (ConvertFrom-Json): force the whole numbers back to integers.
|
||||
$navData = [ordered]@{
|
||||
id = [string]$navData.id
|
||||
release = [long]$navData.release
|
||||
url = [string]$navData.url
|
||||
size = [long]$navData.size
|
||||
sha256 = [string]$navData.sha256
|
||||
files = [long]$navData.files
|
||||
bytes = [long]$navData.bytes
|
||||
}
|
||||
Write-Host " unchanged ($($navFiles.Count) files, id $navId): the live archive from release $($navData.release) stays"
|
||||
} else {
|
||||
$navZip = "$rel\RynthNav-NavData.zip"
|
||||
Add-Type -AssemblyName System.IO.Compression, System.IO.Compression.FileSystem
|
||||
$fs = [IO.File]::Open($navZip, 'CreateNew')
|
||||
try {
|
||||
$za = New-Object IO.Compression.ZipArchive($fs, [IO.Compression.ZipArchiveMode]::Create)
|
||||
foreach ($f in $navFiles) {
|
||||
[void][IO.Compression.ZipFileExtensions]::CreateEntryFromFile($za, $f.FullName, $f.Name, [IO.Compression.CompressionLevel]::Optimal)
|
||||
}
|
||||
$za.Dispose()
|
||||
} finally { $fs.Dispose() }
|
||||
$zi = Get-Item $navZip
|
||||
$navData = [ordered]@{
|
||||
id = $navId
|
||||
release = $release
|
||||
url = "$BaseUrl/releases/$release/RynthNav-NavData.zip"
|
||||
size = $zi.Length
|
||||
sha256 = Sha256 $zi.FullName
|
||||
files = $navFiles.Count
|
||||
bytes = $navBytes
|
||||
}
|
||||
Write-Host (" new set: {0} files ({1} tiles), {2:N0} MB packed into {3:N0} MB, id {4}" -f $navFiles.Count, $tileCount, ($navBytes / 1MB), ($zi.Length / 1MB), $navId)
|
||||
}
|
||||
}
|
||||
|
||||
# ── 3. Manifest + signature ──────────────────────────────────────────────────
|
||||
Step "Writing and signing the manifest"
|
||||
$setup = Get-Item "$rel\RynthCore-Setup.exe"
|
||||
# One line per plugin for the launcher's Available plugins list (launchers from 2026.10.5 on;
|
||||
# older ones ignore the field, and a plugin without one falls back to the launcher's own table
|
||||
# in RynthUpdater.Available.cs). Plain English for players, no names.
|
||||
$pluginDescriptions = @{
|
||||
RynthAi = "The bot: combat, buffs, looting, navigation routes and metas."
|
||||
RynthChat = "A chat window that sorts messages into tabs."
|
||||
RynthTracker = "Kills, experience and luminance per hour for each session."
|
||||
RynthNav = "Walks you to coordinates and towns, with route planning and the Atlas. Downloads its map (about 540 MB)."
|
||||
RynthVision = "Shows unclimbable slopes, impassable water and your radar range in the world."
|
||||
RynthLua = "Lua scripting for metas and your own scripts."
|
||||
RynthOracle = "Quests, character, titles and leaderboards."
|
||||
RynthInventory = "Search every character's items."
|
||||
}
|
||||
$plugins = foreach ($dll in Get-ChildItem "$rel\plugins\*.dll" | Sort-Object Name) {
|
||||
[ordered]@{
|
||||
name = $dll.BaseName -replace '^RynthCore\.Plugin\.', ''
|
||||
$pluginName = $dll.BaseName -replace '^RynthCore\.Plugin\.', ''
|
||||
$entry = [ordered]@{
|
||||
name = $pluginName
|
||||
file = $dll.Name
|
||||
url = "$BaseUrl/releases/$release/plugins/$($dll.Name)"
|
||||
size = $dll.Length
|
||||
sha256 = Sha256 $dll.FullName
|
||||
}
|
||||
if ($pluginDescriptions[$pluginName]) { $entry.description = $pluginDescriptions[$pluginName] }
|
||||
else { Write-Warning "No description for $pluginName - the launcher shows its own (or none). Add one to `$pluginDescriptions." }
|
||||
$entry
|
||||
}
|
||||
$manifest = [ordered]@{
|
||||
schema = 1
|
||||
|
|
@ -176,6 +286,9 @@ $manifest = [ordered]@{
|
|||
version = $Version
|
||||
published = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||
notes = $Notes
|
||||
# The changes, one line each: the launcher's update card shows a few as "What's new"
|
||||
# (signed with the rest; launchers before 2026.10.5 ignore it and show the notes).
|
||||
changes = @($Changes)
|
||||
core = [ordered]@{
|
||||
release = $release
|
||||
version = $Version
|
||||
|
|
@ -185,6 +298,7 @@ $manifest = [ordered]@{
|
|||
}
|
||||
plugins = @($plugins)
|
||||
}
|
||||
if ($navData) { $manifest.navdata = $navData }
|
||||
Set-Content "$rel\update.payload.json" ($manifest | ConvertTo-Json -Depth 5) -Encoding utf8NoBOM
|
||||
& (Join-Path $ScriptDir "Sign-Update.ps1") -PayloadPath "$rel\update.payload.json" -OutPath "$rel\update.json" -KeyDir $KeyDir
|
||||
if (-not (Test-Envelope "$rel\update.json" $trusted)) { throw "Signed feed does not verify against UpdateTrust.cs" }
|
||||
|
|
@ -213,9 +327,16 @@ scp -q "$rel\RynthCore-Setup.exe" "${SshHost}:$remoteRel/RynthCore-Setup.exe"
|
|||
if ($LASTEXITCODE -ne 0) { throw "scp of the installer failed" }
|
||||
scp -q (Get-ChildItem "$rel\plugins\*.dll").FullName "${SshHost}:$remoteRel/plugins/"
|
||||
if ($LASTEXITCODE -ne 0) { throw "scp of the plugins failed" }
|
||||
$navSum = ""
|
||||
if ($navZip) {
|
||||
scp -q $navZip "${SshHost}:$remoteRel/RynthNav-NavData.zip"
|
||||
if ($LASTEXITCODE -ne 0) { throw "scp of the RynthNav data archive failed" }
|
||||
$navSum = " RynthNav-NavData.zip"
|
||||
}
|
||||
|
||||
$remoteSums = ssh $SshHost "cd '$remoteRel' && sha256sum RynthCore-Setup.exe plugins/*.dll"
|
||||
$remoteSums = ssh $SshHost "cd '$remoteRel' && sha256sum RynthCore-Setup.exe plugins/*.dll$navSum"
|
||||
$expect = @{ "RynthCore-Setup.exe" = $manifest.core.sha256 }
|
||||
if ($navZip) { $expect["RynthNav-NavData.zip"] = $navData.sha256 }
|
||||
foreach ($pl in $plugins) { $expect["plugins/$($pl.file)"] = $pl.sha256 }
|
||||
foreach ($line in $remoteSums) {
|
||||
$sum, $name = $line -split '\s+', 2
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ AppId={{A8B4C2D1-E3F5-4678-9ABC-DEF012345678}
|
|||
AppName=RynthCore
|
||||
AppVersion=0.0.0
|
||||
AppPublisher=RynthCore
|
||||
AppPublisherURL=https://github.com/tombohar/RynthCore
|
||||
AppPublisherURL=https://aelrynth.com/git/rynth/RynthCore
|
||||
DefaultDirName=C:\Games\RynthCore
|
||||
DisableDirPage=no
|
||||
DefaultGroupName=RynthCore
|
||||
|
|
@ -79,6 +79,16 @@ Filename: "{app}\RynthCore.exe"; WorkingDir: "{app}"; Description: "Launch Rynth
|
|||
; bring it back when the upgrade is done.
|
||||
Filename: "{app}\RynthCore.exe"; WorkingDir: "{app}"; Flags: nowait runasoriginaluser; Check: CmdLineParamExists('/RELAUNCH')
|
||||
|
||||
[UninstallRun]
|
||||
; Decal + RynthCore (experimental): remove the Decal bridge's registration, only
|
||||
; what the launcher added (see docs/DECAL_BRIDGE_PLAN.md). Every release ships the bridge
|
||||
; ({app}\DecalBridge, staged by Build-Installer.ps1), so this always runs; with nothing
|
||||
; registered it changes nothing. Runs before the files are removed. It removes both entries
|
||||
; the installer writes (see RegisterDecalBridge in [Code]): the per-user one, and the
|
||||
; machine-wide one - directly when the uninstaller is elevated, otherwise after Windows'
|
||||
; administrator prompt, which appears only when a machine-wide entry exists.
|
||||
Filename: "{app}\RynthCore.exe"; Parameters: "--decal-bridge-unregister"; Flags: runhidden waituntilterminated; RunOnceId: "RynthCoreDecalBridgeUnregister"
|
||||
|
||||
[Code]
|
||||
function CmdLineParamExists(const Value: string): Boolean;
|
||||
var
|
||||
|
|
@ -92,3 +102,106 @@ begin
|
|||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
(* -------------------------------------------------------------------------------------
|
||||
Decal + RynthCore (experimental): register the RynthCore Decal bridge on every install
|
||||
AND every update (the launcher's updater runs this installer with /SILENT), in BOTH
|
||||
places a Decal client can read its filter list from:
|
||||
|
||||
1. Machine-wide: HKLM\SOFTWARE\WOW6432Node\Decal\NetworkFilters\{5B3E0D57-...}
|
||||
(32-bit view). An elevated AC (RynthCore or AC run as administrator), or any AC when
|
||||
UAC or its registry virtualization is off, reads ONLY this key - the per-user entry
|
||||
is invisible to it (a player's Decal + RynthCore client never loaded the bridge,
|
||||
2026-10-03). A non-elevated AC without a per-user copy reads it too.
|
||||
2. Per-user: this user's VirtualStore copy of that key, ONLY if the copy already exists.
|
||||
A non-elevated AC is virtualized and, once a copy exists, reads nothing but the copy.
|
||||
A missing copy is never created: it would hide every HKLM filter added later from
|
||||
this user's non-elevated clients.
|
||||
|
||||
Both entries are harmless while no account uses Decal + RynthCore: every Decal client
|
||||
loads the bridge, which stays idle (no hooks, no threads) unless the RynthCore loader is
|
||||
in the same client. Uninstall removes both ([UninstallRun] --decal-bridge-unregister).
|
||||
|
||||
Rights. This installer runs with the lowest privileges (PrivilegesRequired=lowest; the
|
||||
updater starts it without elevation). Writing HKLM needs administrator rights, so:
|
||||
- Setup already elevated (installed "for all users", or started by an elevated
|
||||
launcher): written directly, no prompt.
|
||||
- Not elevated: Windows' administrator prompt is shown ONCE - only when Decal is
|
||||
installed, the machine-wide entry is missing or points at another folder, and this
|
||||
user has a Decal + RynthCore account (decal-accounts.json). Saying no is harmless:
|
||||
the launcher checks before every Decal + RynthCore launch and repairs it (writing it
|
||||
directly when it runs elevated, the case that needs it).
|
||||
The commands are RynthCore.exe's own (Program.cs): --decal-bridge-register-machine and
|
||||
--decal-bridge-install-user, so the installer and the launcher write identical entries.
|
||||
------------------------------------------------------------------------------------- *)
|
||||
const
|
||||
BridgeEntryKey = 'SOFTWARE\Decal\NetworkFilters\{5B3E0D57-2C41-4F8A-9D6E-8C1B70DECA11}';
|
||||
BridgeObject = 'RynthCore.DecalBridge.BridgeFilter';
|
||||
|
||||
function DecalInstalled: Boolean;
|
||||
begin
|
||||
Result := RegKeyExists(HKLM32, 'SOFTWARE\Decal\Agent');
|
||||
end;
|
||||
|
||||
function BridgeDir: String;
|
||||
begin
|
||||
Result := ExpandConstant('{app}\DecalBridge');
|
||||
end;
|
||||
|
||||
function MachineBridgeEntryCurrent: Boolean;
|
||||
var
|
||||
P, O: String;
|
||||
E: Cardinal;
|
||||
begin
|
||||
Result := RegQueryStringValue(HKLM32, BridgeEntryKey, 'Path', P) and
|
||||
(CompareText(RemoveBackslashUnlessRoot(P), BridgeDir) = 0) and
|
||||
RegQueryStringValue(HKLM32, BridgeEntryKey, 'Object', O) and (O = BridgeObject) and
|
||||
RegQueryDWordValue(HKLM32, BridgeEntryKey, 'Enabled', E) and (E = 1);
|
||||
end;
|
||||
|
||||
function UsesDecalBridge: Boolean;
|
||||
begin
|
||||
Result := FileExists(ExpandConstant('{userappdata}\RynthCore\decal-accounts.json'));
|
||||
end;
|
||||
|
||||
procedure RegisterDecalBridge;
|
||||
var
|
||||
Exe, Params: String;
|
||||
Code: Integer;
|
||||
begin
|
||||
if not DecalInstalled then Exit;
|
||||
if not FileExists(BridgeDir + '\RynthCore.DecalBridge.dll') then Exit;
|
||||
Exe := ExpandConstant('{app}\RynthCore.exe');
|
||||
Params := '--decal-bridge-register-machine "' + BridgeDir + '"';
|
||||
if not MachineBridgeEntryCurrent then
|
||||
begin
|
||||
if IsAdmin then
|
||||
begin
|
||||
if not Exec(Exe, Params, ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, Code) then
|
||||
Log('Decal bridge: machine-wide registration did not start: ' + SysErrorMessage(Code))
|
||||
else
|
||||
Log('Decal bridge: machine-wide registration exit code ' + IntToStr(Code));
|
||||
end
|
||||
else if UsesDecalBridge then
|
||||
begin
|
||||
if not ShellExec('runas', Exe, Params, ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, Code) then
|
||||
Log('Decal bridge: elevated machine-wide registration not done (declined or failed): ' + SysErrorMessage(Code))
|
||||
else
|
||||
Log('Decal bridge: elevated machine-wide registration exit code ' + IntToStr(Code));
|
||||
end
|
||||
else
|
||||
Log('Decal bridge: machine-wide entry missing; not elevated and no Decal + RynthCore account - left to the launcher.');
|
||||
end;
|
||||
{ Per-user half, as the user who started Setup (the same user unless Setup was elevated
|
||||
with other credentials). }
|
||||
if not ExecAsOriginalUser(Exe, '--decal-bridge-install-user "' + BridgeDir + '"', ExpandConstant('{app}'),
|
||||
SW_HIDE, ewWaitUntilTerminated, Code) then
|
||||
Log('Decal bridge: per-user step did not start: ' + SysErrorMessage(Code));
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
{ After the files, before [Run] (which relaunches the launcher after an update). }
|
||||
if CurStep = ssPostInstall then
|
||||
RegisterDecalBridge;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Reference in a new issue