diff --git a/.github/workflows/v037-acceptance.yml b/.github/workflows/v037-acceptance.yml
index 43688f4..25af596 100644
--- a/.github/workflows/v037-acceptance.yml
+++ b/.github/workflows/v037-acceptance.yml
@@ -2,7 +2,9 @@ name: SpatialViewer v0.3.7 Acceptance Package
on:
push:
- branches: ['codex/v0.3.7-startup-screen']
+ branches:
+ - 'codex/v0.3.7-startup-screen'
+ - 'codex/v0.3.7-cadcore-v0.12.3-integration'
workflow_dispatch:
permissions:
@@ -37,15 +39,19 @@ jobs:
$release = Get-Content release/release.json -Raw | ConvertFrom-Json
$version = @($project.Project.PropertyGroup | ForEach-Object Version | Where-Object { $_ })[0]
$assemblyVersion = @($project.Project.PropertyGroup | ForEach-Object AssemblyVersion | Where-Object { $_ })[0]
+ $bundledCadCoreVersion = @($project.Project.PropertyGroup | ForEach-Object CadCoreBundledVersion | Where-Object { $_ })[0]
+ $sourceCadCoreCommit = (git rev-parse HEAD:external/SpatialViewer.CadCore).Trim()
if ([string]$version -cne '0.3.7') { throw "Project version is not 0.3.7: $version" }
if ([string]$assemblyVersion -cne '0.3.7.0') { throw "Assembly version is not 0.3.7.0: $assemblyVersion" }
if ([string]$manifest.Package.Identity.Version -cne '0.3.7.0' -or [string]$manifest.Package.Identity.Publisher -cne 'CN=AppPublisher') { throw 'MSIX identity is not the v0.3.7 release identity.' }
if ([string]$release.product.version -cne '0.3.7' -or [string]$release.product.packageVersion -cne '0.3.7.0') { throw 'Release metadata is not v0.3.7.' }
+ if ([string]$bundledCadCoreVersion -cne '0.12.3') { throw "Source build still declares an obsolete CadCore bundle: $bundledCadCoreVersion" }
+ if ($sourceCadCoreCommit -cne '2f150fbdcf380fba6f60df7f8a41361322afdd8f') { throw "Source submodule is not CadCore v0.12.3: $sourceCadCoreCommit" }
foreach ($asset in @('Square44x44Logo.png','Square150x150Logo.png','StoreLogo.png','SplashScreen.png','Square44x44Logo.targetsize-24.png','Square44x44Logo.targetsize-24_altform-unplated.png','AppIcon.ico')) {
$path = Join-Path 'src/SpatialViewer.App/Assets' $asset
if (-not (Test-Path -LiteralPath $path -PathType Leaf) -or (Get-Item -LiteralPath $path).Length -le 0) { throw "Required branding/startup asset missing or empty: $asset" }
}
- Write-Host 'v0.3.7 source, localization, update, branding, and startup contracts PASS.'
+ Write-Host "v0.3.7 source contracts PASS; source CadCore=v$bundledCadCoreVersion @ $sourceCadCoreCommit."
- name: Restore and test
shell: pwsh
@@ -68,6 +74,8 @@ jobs:
$payload = Join-Path $env:RUNNER_TEMP 'SpatialViewer-v037-CadCore'
$resolved = @(./packaging/Resolve-LatestIntegratedCadCore.ps1 -OutputDirectory $payload) | Select-Object -Last 1
if (-not $resolved -or [string]::IsNullOrWhiteSpace([string]$resolved.version)) { throw 'Latest integrated CadCore resolution failed.' }
+ if ([string]$resolved.version -cne '0.12.3') { throw "v0.3.7 acceptance must exercise CadCore v0.12.3, resolved v$($resolved.version)." }
+ if ([string]$resolved.commit -cne '2f150fbdcf380fba6f60df7f8a41361322afdd8f') { throw "Resolved CadCore v0.12.3 commit mismatch: $($resolved.commit)" }
"CADCORE_PAYLOAD=$payload" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
"CADCORE_VERSION=$($resolved.version)" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
"CADCORE_ABI=$($resolved.abiVersion)" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
@@ -93,6 +101,30 @@ jobs:
"BUNDLE_PATH=$finalBundle" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
"ASSETS_DIRECTORY=$assets" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
+ - name: Verify v0.12.3 is physically bundled
+ shell: pwsh
+ run: |
+ $ErrorActionPreference = 'Stop'
+ $makeappx = Get-ChildItem (Join-Path ${env:ProgramFiles(x86)} 'Windows Kits\10\bin') -Recurse -Filter makeappx.exe | Where-Object FullName -match '\\x64\\makeappx.exe$' | Sort-Object FullName -Descending | Select-Object -First 1
+ if (-not $makeappx) { throw 'x64 makeappx.exe was not found.' }
+ $unbundle = Join-Path $env:RUNNER_TEMP 'SpatialViewer-v037-unbundle'
+ $unpack = Join-Path $env:RUNNER_TEMP 'SpatialViewer-v037-unpack'
+ Remove-Item $unbundle, $unpack -Recurse -Force -ErrorAction SilentlyContinue
+ & $makeappx.FullName unbundle /p $env:BUNDLE_PATH /d $unbundle /o | Out-Host
+ if ($LASTEXITCODE -ne 0) { throw "makeappx unbundle failed: $LASTEXITCODE" }
+ $inner = @(Get-ChildItem $unbundle -Filter '*.msix' -File) | Select-Object -First 1
+ if (-not $inner) { throw 'Inner x64 MSIX was not found.' }
+ & $makeappx.FullName unpack /p $inner.FullName /d $unpack /o | Out-Host
+ if ($LASTEXITCODE -ne 0) { throw "makeappx unpack failed: $LASTEXITCODE" }
+ foreach ($name in @('SpatialViewer.Core.dll','SpatialViewer.Rendering.dll','SpatialViewer.Rendering.Windows.dll','SpatialViewer.Formats.Cad.dll','SpatialViewer.Formats.Cad.ACadSharp.dll')) {
+ if (Test-Path -LiteralPath (Join-Path $unpack $name) -PathType Leaf) { throw "CadCore resolver isolation failed; root copy still packaged: $name" }
+ $source = Join-Path $env:CADCORE_PAYLOAD $name
+ $bundled = Join-Path $unpack "Kernels\Bundled\0.12.3\$name"
+ if (-not (Test-Path -LiteralPath $bundled -PathType Leaf)) { throw "CadCore v0.12.3 payload missing from bundle: $bundled" }
+ if ((Get-FileHash $source -Algorithm SHA256).Hash -cne (Get-FileHash $bundled -Algorithm SHA256).Hash) { throw "Bundled CadCore differs from the published v0.12.3 payload: $name" }
+ }
+ Write-Host 'Physical bundle verification PASS: SpatialViewer v0.3.7 contains CadCore v0.12.3 byte-for-byte.'
+
- name: Sign bundle and export public certificate
shell: pwsh
env:
@@ -153,6 +185,8 @@ jobs:
"CadCore version: $env:CADCORE_VERSION",
"CadCore ABI: $env:CADCORE_ABI",
"CadCore commit: $env:CADCORE_COMMIT",
+ 'CadCore source submodule pinned to v0.12.3: PASS',
+ 'CadCore v0.12.3 physical MSIX payload hash verification: PASS',
'Signer subject: CN=AppPublisher',
"Signer thumbprint: $env:CERTIFICATE_THUMBPRINT",
"Bundle SHA256: $bundleHash",
diff --git a/docs/RELEASE-NOTES-v0.3.7.en.md b/docs/RELEASE-NOTES-v0.3.7.en.md
index 9508f70..f2917c1 100644
--- a/docs/RELEASE-NOTES-v0.3.7.en.md
+++ b/docs/RELEASE-NOTES-v0.3.7.en.md
@@ -1,18 +1,37 @@
-# SpatialViewer v0.3.7 Startup Screen
+# SpatialViewer v0.3.7 Startup and CadCore v0.12.3 Integration
-SpatialViewer v0.3.7 now follows the current two-stage startup design used by UrbanPlanToolbox and PageArc: the native Windows splash covers earliest process startup, then the real WinUI window takes over with a transparent in-window startup layer on Mica until the shell is ready.
+SpatialViewer v0.3.7 keeps the current two-stage startup design used by UrbanPlanToolbox and PageArc and also corrects a critical acceptance gap: the Viewer builds being tested were not actually executing the CadCore v0.12.3 real-drawing fixes.
-## Highlights
+## Startup
- Keeps MSIX `uap:SplashScreen` as the Stage 1 cold-start bootstrap with dedicated 100%, 125%, 150%, 200%, and 400% DPI resources and `uap5:Optional="true"`.
-- Adds a Stage 2 transparent `StartupOverlay` inside the real main window so the window's own `MicaBackdrop` is visible immediately instead of jumping straight from a fixed `#202020` bitmap to the complete shell.
-- Builds the real shell behind the startup logo while keeping it non-interactive until the startup presentation finishes.
-- Starts the minimum display timer only after the logo has actually rendered a frame; fast launches keep a complete logo visible for about 500 ms, while slower initialization naturally extends the presentation without an extra blocking delay.
-- Once the shell, logo, and minimum display time are ready, reveals the complete shell first and fades the startup layer out over about 200 ms with EaseOut timing.
-- Adds a 1-second logo-decode fallback and a 5-second startup watchdog so the startup layer can never become a permanent blocking state.
-- Replaces the old native-only startup contract with a hybrid Stage 1 + Mica Stage 2 contract and explicitly locks the accepted title-bar geometry against regression.
+- Uses a transparent `StartupOverlay` inside the real WinUI main window for Stage 2 so the window's own `MicaBackdrop` is visible immediately.
+- Builds the real shell behind the startup logo and keeps it non-interactive until startup presentation completes.
+- Starts the minimum timer after the logo actually renders, keeps a complete logo visible for about 500 ms on fast launches, then fades the overlay over about 200 ms with EaseOut timing.
+- Retains the 1-second logo fallback and 5-second fail-open startup watchdog.
+
+## CadCore delivery correction
+
+Passing CadCore v0.12.3 unit tests did not prove the Viewer defects were fixed because the product was still running older kernels:
+
+- the published SpatialViewer v0.3.6 package bundled CadCore v0.12.2;
+- the v0.3.7 source project still declared `CadCoreBundledVersion=0.9.0`;
+- its CadCore submodule also still pointed to v0.9.0.
+
+v0.3.7 now pins both the source submodule and bundled source-build version to **CadCore v0.12.3 / commit `2f150fbdcf380fba6f60df7f8a41361322afdd8f`**. Acceptance adds two hard gates:
+
+1. source builds fail unless the declared version and gitlink are exactly v0.12.3;
+2. the final MSIXBundle is unpacked and all five assemblies under `Kernels/Bundled/0.12.3` must match the published CadCore v0.12.3 release payload byte-for-byte by SHA-256.
+
+This prevents a kernel-only change from being reported as a Viewer fix while the application still runs an older kernel.
+
+## Real-drawing acceptance boundary
+
+The v0.12.3 changes for the long perpendicular lines, dimension text anchoring/colors/architectural ticks, and legacy CJK SHX fallback will now actually ship inside v0.3.7. Without the original failing DWG, however, they remain **candidate fixes** rather than completed visual fixes.
+
+Final acceptance must compare the original drawing in AutoCAD and SpatialViewer. The three defects are only considered fixed after those real-drawing differences disappear.
## Preserved
-- The title bar, hamburger menu, NavigationView, page surfaces, tabs, CAD rendering, and Cad Core behavior remain unchanged.
+- The accepted title bar, hamburger menu, NavigationView, page surfaces, tabs, and existing interaction layout are not redesigned by this integration.
- No second standalone WinUI window, text, controls, or fake progress indicator is introduced.
diff --git a/docs/RELEASE-NOTES-v0.3.7.ja.md b/docs/RELEASE-NOTES-v0.3.7.ja.md
index f25e21e..e2b3563 100644
--- a/docs/RELEASE-NOTES-v0.3.7.ja.md
+++ b/docs/RELEASE-NOTES-v0.3.7.ja.md
@@ -1,18 +1,37 @@
-# SpatialViewer v0.3.7 起動画面
+# SpatialViewer v0.3.7 起動画面と CadCore v0.12.3 統合
-SpatialViewer v0.3.7 は、UrbanPlanToolbox と PageArc の現行実装と同じ2段階の起動方式へ修正しました。Windows ネイティブの SplashScreen が最初のプロセス起動を覆い、その後は実際の WinUI メインウィンドウ上で Mica を透過表示する起動レイヤーへ引き継ぎ、Shell の準備完了後に滑らかに消えます。
+SpatialViewer v0.3.7 は UrbanPlanToolbox と PageArc と同じ2段階起動方式を維持すると同時に、CAD 実図面修正の検証で見つかった重要な問題を修正します。これまでテストしていた Viewer は、実際には CadCore v0.12.3 のコードを実行していませんでした。
-## 主な変更
+## 起動画面
- Stage 1 として MSIX `uap:SplashScreen` を残し、100%、125%、150%、200%、400% の DPI リソースと `uap5:Optional="true"` を維持します。
-- Stage 2 として実際のメインウィンドウ内に透明な `StartupOverlay` を追加し、固定 `#202020` 画像から完成済み UI へ直接切り替えるのではなく、ウィンドウ自身の `MicaBackdrop` を起動直後から見せます。
+- Stage 2 では実際の WinUI メインウィンドウ内に透明な `StartupOverlay` を使用し、ウィンドウ自身の `MicaBackdrop` を起動直後から表示します。
- 実際の Shell は Logo の背後で初期化し、起動画面終了までは操作を受け付けません。
-- Logo が実際に1フレーム描画された後に最短表示時間を計測し、高速起動時でも約 500 ms は完全な Logo を表示します。初期化が長い場合は追加の固定待機を入れず、そのまま Shell 完了を待ちます。
-- Shell・Logo・最短表示時間がそろった後、完成した UI を先に表示し、約 200 ms の EaseOut で起動レイヤーをフェードアウトします。
-- 1 秒の Logo デコード・フォールバックと 5 秒の startup watchdog を追加し、起動レイヤー自体が停止原因にならないよう fail-open します。
-- ビルド契約を「ネイティブ Stage 1 + Mica Stage 2」に変更し、既存タイトルバーのジオメトリも回帰防止対象にします。
+- Logo の実描画後に最短表示時間を計測し、高速起動時でも約 500 ms 表示した後、約 200 ms の EaseOut でフェードアウトします。
+- 1 秒の Logo フォールバックと 5 秒の fail-open watchdog を維持します。
+
+## CadCore 配布経路の修正
+
+CadCore v0.12.3 の単体テストが通っていても Viewer の表示不具合が直ったことにはなりませんでした。実際の製品側は古いカーネルを使用していたためです。
+
+- 公開済み SpatialViewer v0.3.6 は CadCore v0.12.2 を同梱していました。
+- v0.3.7 のソースプロジェクトは `CadCoreBundledVersion=0.9.0` のままでした。
+- CadCore submodule も v0.9.0 を指したままでした。
+
+v0.3.7 ではソース submodule と source-build の bundled version を **CadCore v0.12.3 / commit `2f150fbdcf380fba6f60df7f8a41361322afdd8f`** に固定します。Acceptance には次の2つの強制 gate を追加します。
+
+1. 宣言された version または gitlink が v0.12.3 でなければ source build を失敗させます。
+2. 最終 MSIXBundle を展開し、`Kernels/Bundled/0.12.3` 内の5つの assembly が公開済み CadCore v0.12.3 release payload と SHA-256 で完全一致することを確認します。
+
+これにより「カーネルリポジトリだけ修正したが Viewer は旧カーネルを実行している」という偽の修正完了を防ぎます。
+
+## 実図面 Acceptance の境界
+
+長い直角線、寸法文字の anchor / color / architectural tick、旧式 CJK SHX fallback に対する v0.12.3 の変更は、v0.3.7 で初めて実際にアプリへ同梱されます。ただし問題を再現する元 DWG がない状態では、これらは **candidate fix** であり、視覚的な修正完了とは扱いません。
+
+最終 Acceptance は元図面を AutoCAD と SpatialViewer で直接比較し、3つの差異が実際に消えた時点でのみ完了とします。
## 変更しない範囲
-- タイトルバー、ハンバーガーメニュー、NavigationView、ページ背景、タブ、CAD 描画、Cad Core の挙動は変更しません。
+- 既存のタイトルバー、ハンバーガーメニュー、NavigationView、ページ背景、タブ、既存インタラクションのレイアウトは本統合で再設計しません。
- 第2の独立 WinUI ウィンドウ、文字、ボタン、疑似プログレスバーは追加しません。
diff --git a/docs/RELEASE-NOTES-v0.3.7.md b/docs/RELEASE-NOTES-v0.3.7.md
index 1e43459..19b678c 100644
--- a/docs/RELEASE-NOTES-v0.3.7.md
+++ b/docs/RELEASE-NOTES-v0.3.7.md
@@ -1,18 +1,37 @@
-# SpatialViewer v0.3.7 启动界面
+# SpatialViewer v0.3.7 启动界面与 CadCore v0.12.3 集成
-SpatialViewer v0.3.7 采用与 UrbanPlanToolbox、PageArc 当前版本一致的两阶段启动机制:Windows 原生启动页负责最早期进程启动,主窗口创建后立即切换到 Mica 上的应用内启动层,并在真实界面准备完成后平滑淡出。
+SpatialViewer v0.3.7 采用与 UrbanPlanToolbox、PageArc 当前版本一致的两阶段启动机制,同时修正此前验收中的一个关键问题:开发构建与已发布 v0.3.6 实际没有运行本轮 CAD 实图修复所对应的 CadCore v0.12.3。
-## 主要变化
+## 启动界面
- 保留 MSIX `uap:SplashScreen` 作为 Stage 1 冷启动引导层,继续提供 100%、125%、150%、200%、400% 五档 DPI 资源并保持 `uap5:Optional="true"`。
-- Stage 2 在真实 WinUI 主窗口中使用透明 `StartupOverlay`;背景直接透出窗口自身的 `MicaBackdrop`,不再把原生 `#202020` 启动图直接跳转到完整界面。
-- 主界面在启动 Logo 后方同步完成布局与初始化,启动层撤除前保持不可点击,避免出现半初始化界面或标题栏后黑屏。
-- 启动 Logo 首次真正渲染后开始计时,快速启动时至少完整显示约 500 ms;初始化较慢时不会额外阻塞,而是自然等待 Shell 就绪。
-- Shell、Logo 与最短展示时间均满足后,先显示完整主界面,再以约 200 ms EaseOut 淡出启动层。
-- 增加 1 秒 Logo 解码兜底和 5 秒启动 watchdog;任何异常都必须 fail-open,启动界面本身不能成为卡死点。
-- 将构建门禁改为验证“原生 Stage 1 + Mica Stage 2”的混合启动契约,同时锁定现有标题栏几何,防止启动功能再次误改标题栏。
+- Stage 2 在真实 WinUI 主窗口中使用透明 `StartupOverlay`;背景直接透出窗口自身的 `MicaBackdrop`。
+- 主界面在启动 Logo 后方同步完成布局与初始化,启动层撤除前保持不可点击。
+- Logo 首帧真正渲染后开始计时,快速启动时至少完整显示约 500 ms;随后以约 200 ms EaseOut 淡出。
+- 增加 1 秒 Logo 解码兜底和 5 秒启动 watchdog,保持 fail-open。
+
+## CadCore 集成修正
+
+此前不能把“CadCore v0.12.3 的单元测试通过”视为看图器实图问题已经修复,因为:
+
+- SpatialViewer v0.3.6 正式包随包内核仍为 CadCore v0.12.2;
+- v0.3.7 源码项目此前仍声明 `CadCoreBundledVersion=0.9.0`,子模块也仍指向 CadCore v0.9.0;
+- 因此直接运行/构建看图器并不会实际执行 v0.12.3 的代码。
+
+v0.3.7 现在将源码子模块和 `CadCoreBundledVersion` 都推进到 **CadCore v0.12.3 / commit `2f150fbdcf380fba6f60df7f8a41361322afdd8f`**。验收流水线同时新增两道强制门禁:
+
+1. 源码构建必须实际引用 v0.12.3,版本或 gitlink 不一致即失败;
+2. 最终 MSIXBundle 解包后,`Kernels/Bundled/0.12.3` 中五个 CadCore 程序集必须与 CadCore v0.12.3 GitHub Release 逐文件 SHA-256 一致。
+
+这样可以排除“内核仓库改了,但看图器仍在跑旧内核”的假修复。
+
+## CAD 实图验收边界
+
+CadCore v0.12.3 中针对长直角线、尺寸文字锚点/颜色/建筑 tick、旧式 CJK SHX fallback 的代码会随 v0.3.7 真正进入应用。但这些改动在没有原始问题 DWG 的情况下仍只能视为**候选修复**,不能仅凭合成测试宣布三个实图问题已解决。
+
+后续验收必须直接使用复现问题的原始图纸,对比 AutoCAD 与 SpatialViewer 的实际画面;只有三项视觉差异均消失后才标记为完成。
## 保持不变
-- 标题栏、汉堡菜单、NavigationView、页面背景、标签页、CAD 渲染与 Cad Core 行为保持原样。
+- 标题栏、汉堡菜单、NavigationView、页面背景、标签页及既有交互不因本次 CadCore 集成而重构。
- 不创建第二个独立 WinUI 窗口,不加入文字、按钮或伪进度条。
diff --git a/external/SpatialViewer.CadCore b/external/SpatialViewer.CadCore
index a62bf36..2f150fb 160000
--- a/external/SpatialViewer.CadCore
+++ b/external/SpatialViewer.CadCore
@@ -1 +1 @@
-Subproject commit a62bf36a716c26cd184376a3733d745fb869e840
+Subproject commit 2f150fbdcf380fba6f60df7f8a41361322afdd8f
diff --git a/release/release.json b/release/release.json
index fa41fda..25403e2 100644
--- a/release/release.json
+++ b/release/release.json
@@ -11,8 +11,8 @@
}
},
"title": {
- "zh-CN": "SpatialViewer v0.3.7 启动界面与主题修复",
- "ja-JP": "SpatialViewer v0.3.7 起動画面とテーマ修正",
- "en-US": "SpatialViewer v0.3.7 Startup Screen and Theme Fix"
+ "zh-CN": "SpatialViewer v0.3.7 启动界面、主题修复与 CadCore v0.12.3 集成",
+ "ja-JP": "SpatialViewer v0.3.7 起動画面・テーマ修正と CadCore v0.12.3 統合",
+ "en-US": "SpatialViewer v0.3.7 Startup, Theme Fix, and CadCore v0.12.3 Integration"
}
-}
+}
\ No newline at end of file
diff --git a/src/SpatialViewer.App/SpatialViewer.App.csproj b/src/SpatialViewer.App/SpatialViewer.App.csproj
index 43361a9..a47d3ad 100644
--- a/src/SpatialViewer.App/SpatialViewer.App.csproj
+++ b/src/SpatialViewer.App/SpatialViewer.App.csproj
@@ -14,7 +14,7 @@
0.3.7
zh-CN
Scale|DXFeatureLevel
- 0.9.0
+ 0.12.3