From fcc68cbdd6f3384cdbd86cb9868416eec26db5f8 Mon Sep 17 00:00:00 2001 From: BlankenshipG Date: Sun, 4 Oct 2026 16:52:23 -0400 Subject: [PATCH] fix(launcher,installer): stamp launcher with the release version; stable notes baseline on rebuild Co-authored-by: Cursor --- ...nstaller-2026.10.4.7-deployment-package.md | 5 +++ installer/Build-Installer.ps1 | 35 ++++++++++++++----- .../RynthCore.App.Avalonia.csproj | 11 +++--- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/Changelog/2026-10-04-installer-2026.10.4.7-deployment-package.md b/Changelog/2026-10-04-installer-2026.10.4.7-deployment-package.md index bc8133e..7d7c68a 100644 --- a/Changelog/2026-10-04-installer-2026.10.4.7-deployment-package.md +++ b/Changelog/2026-10-04-installer-2026.10.4.7-deployment-package.md @@ -38,3 +38,8 @@ - **False "SehTrampoline.dll is STALE" after checkouts/merges:** the check compared file times, and git rewrites `SehTrampoline.c` (new mtime, same content) on checkout. When the source matches HEAD its last commit time is used instead; local edits still use the file time. +- **Launcher showed `0.1.3-x64-prereq-probe` instead of the release:** the SK-era launcher `.csproj` hard-coded + `InformationalVersion`, which overrides the `-p:Version` release stamp. Removed; launcher file version + 0.1.3 -> 0.1.4. The launcher / About now report `2026.10.4.7 ()`. +- Rebuilding the same `-Version` keeps that release's original "changes since" baseline (stored as + `changelogSince` in the manifest) instead of diffing against itself. diff --git a/installer/Build-Installer.ps1 b/installer/Build-Installer.ps1 index 6550f63..4f2d62b 100644 --- a/installer/Build-Installer.ps1 +++ b/installer/Build-Installer.ps1 @@ -586,13 +586,28 @@ if ($Version -and -not $NoPackage) { if (Test-Path $lastManifestFile) { try { $prevManifest = Get-Content $lastManifestFile -Raw | ConvertFrom-Json } catch { $prevManifest = $null } } - $sinceDate = "" - if ($lastVer -and $lastVer -ne $Version) { - $lp = $lastVer.Split('.') - if ($lp.Count -eq 4) { $sinceDate = '{0:D4}-{1:D2}-{2:D2}' -f [int]$lp[0], [int]$lp[1], [int]$lp[2] } + # Baseline for "changes since": a rebuild of the same version reuses that build's baseline; + # otherwise the previous release's commits, or (no manifest yet) the previous version's date. + function ConvertTo-SinceDate([string]$Ver) { + $vp = "$Ver".Split('.') + if ($vp.Count -eq 4) { return '{0:D4}-{1:D2}-{2:D2}' -f [int]$vp[0], [int]$vp[1], [int]$vp[2] } + return "" + } + $prevRelease = if ($lastVer -ne $Version) { $lastVer } else { "" } + $coreSince = ""; $suiteSince = ""; $sinceDate = "" + if ($prevManifest -and $prevManifest.version -eq $Version) { + $prevRelease = "$($prevManifest.previous)" + if ($prevManifest.changelogSince) { + $coreSince = "$($prevManifest.changelogSince.rynthCore)" + $suiteSince = "$($prevManifest.changelogSince.rynthSuite)" + $sinceDate = "$($prevManifest.changelogSince.date)" + } else { $sinceDate = ConvertTo-SinceDate $prevRelease } + } elseif ($prevManifest) { + $coreSince = "$($prevManifest.source.rynthCore.commit)" + $suiteSince = "$($prevManifest.source.rynthSuite.commit)" + } else { + $sinceDate = ConvertTo-SinceDate $prevRelease } - $coreSince = if ($prevManifest) { $prevManifest.source.rynthCore.commit } else { "" } - $suiteSince = if ($prevManifest) { $prevManifest.source.rynthSuite.commit } else { "" } $notesFrom = @( @{ Repo = 'RynthCore'; Root = $RepoRoot; Files = (Get-ChangelogFiles $RepoRoot $coreSince $sinceDate) }, @{ Repo = 'RynthSuite'; Root = $RynthSuiteRoot; Files = (Get-ChangelogFiles $RynthSuiteRoot $suiteSince $sinceDate) } @@ -604,7 +619,7 @@ if ($Version -and -not $NoPackage) { version = $Version release = $release builtUtc = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ') - previous = $lastVer + previous = $prevRelease installer = [ordered]@{ file = $setupName; size = (Get-Item (Join-Path $pkgDir $setupName)).Length; sha256 = $setupHash } source = [ordered]@{ rynthCore = [ordered]@{ branch = $CoreState.branch; commit = $CoreState.commit; dirty = $CoreState.dirty } @@ -612,6 +627,8 @@ if ($Version -and -not $NoPackage) { } components = @($components) changelog = @($notesFrom | ForEach-Object { $r = $_.Repo; $_.Files | ForEach-Object { "$r/$_" } }) + # Baseline the notes were built from (reused when this version is rebuilt). + changelogSince = [ordered]@{ rynthCore = $coreSince; rynthSuite = $suiteSince; date = $sinceDate } } $manifestJson = $manifest | ConvertTo-Json -Depth 6 Write-Utf8 (Join-Path $pkgDir 'release-manifest.json') $manifestJson @@ -622,7 +639,7 @@ if ($Version -and -not $NoPackage) { $short = { param($s) if ($s.commit) { "$($s.branch)@$($s.commit.Substring(0,7))$(if ($s.dirty) { ' (uncommitted changes!)' })" } else { 'unknown' } } [void]$sb.AppendLine("# RynthCore + RynthSuite $Version") [void]$sb.AppendLine() - [void]$sb.AppendLine("Release $release, built $($manifest.builtUtc). Previous release: $(if ($lastVer) { $lastVer } else { 'none recorded' }).") + [void]$sb.AppendLine("Release $release, built $($manifest.builtUtc). Previous release: $(if ($prevRelease) { $prevRelease } else { 'none recorded' }).") [void]$sb.AppendLine("Source: RynthCore $(& $short $CoreState), RynthSuite $(& $short $SuiteState).") [void]$sb.AppendLine() [void]$sb.AppendLine("## Install") @@ -637,7 +654,7 @@ if ($Version -and -not $NoPackage) { [void]$sb.AppendLine("|---|---|") foreach ($c in $components) { [void]$sb.AppendLine("| $($c.name) | $($c.version) |") } [void]$sb.AppendLine() - [void]$sb.AppendLine("## Changes$(if ($lastVer -and $lastVer -ne $Version) { " since $lastVer" })") + [void]$sb.AppendLine("## Changes$(if ($prevRelease) { " since $prevRelease" })") $anyNotes = $false foreach ($src in $notesFrom) { foreach ($rel in $src.Files) { diff --git a/src/RynthCore.App.Avalonia/RynthCore.App.Avalonia.csproj b/src/RynthCore.App.Avalonia/RynthCore.App.Avalonia.csproj index 9ecd40f..8fd5137 100644 --- a/src/RynthCore.App.Avalonia/RynthCore.App.Avalonia.csproj +++ b/src/RynthCore.App.Avalonia/RynthCore.App.Avalonia.csproj @@ -1,11 +1,12 @@ - - 0.1.3 - 0.1.3.0 - 0.1.3.0 - 0.1.3-x64-prereq-probe + + 0.1.4 + 0.1.4.0 + 0.1.4.0 WinExe net10.0-windows7.0 x86