Repository navigation
fix(packaging): canonicalize the archive path in the Office engine hook - #650
Merged
Merged
Conversation
The hook compared realpath'd resolution results against the archive path as spelled in the Harness entry path. A symlinked or junctioned install directory, Windows 8.3 names or drive-letter case made the prefix check miss, leaving the LibreOffice engine resolved inside app.asar where the OS cannot spawn it. Canonicalize the archive first, as upstream office-engine.ts does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wangweif
pushed a commit
to wangweif/dsh-desktop
that referenced
this pull request
Oct 4, 2026
合并 dataelement/dsh-desktop upstream/main(90 个提交): - dsh 内核 0.1.5-rc.2 → 0.2.0-rc.2(DeepSeek 官方最新),patches 全套换代 - 内置 Office 引擎:office-docx/xlsx/pptx 技能 + Python authoring 运行时 - 打包架构升级:app.asar + 仅原生文件解包;macOS 去捆绑 Node - macOS 构建矩阵化(arm64/x64 合一),windows-menu 改原生弹出菜单 冲突解决原则:采纳上游新架构,保留农科小智品牌与企业登录/平台智能体定制; enterprise-login/agents 资源保留,productName 保持农科小智智能体。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #647. This commit was pushed to that branch after the PR had already merged, so it never reached main. Needed before v0.11.0.
Problem
build/office-engine-resolution.mjs(added in #647) redirects@deepseek-ai/libreoffice-kit-<platform>-*toapp.asar.unpacked, so the OS can spawn the LibreOffice engine. It compares the realpath'd resolution result with the archive path as spelled in the Harness entry path.The spellings differ when the install directory is reached through a symlink or junction, uses Windows 8.3 short names (e.g.
PROGRA~1), or has a different drive-letter case. Then the prefix check misses, the engine stays insideapp.asar, and Office preview fails ("Installed LibreOfficeKit executable is not executable" / spawn failure).Fix
Canonicalize the archive path before comparing, as upstream
apps/desktop-host/src/office-engine.tsdoes. Electron's asar-aware fs returns the real path forapp.asaritself.Checks
test/office-engine-resolution.test.ts: the entry path names the install directory through a link. It fails without the fix and passes with it. The test runs on the Electron runtime in Node mode.realpathSync(app.asar)on the Helper returns the archive path. A real ODT → PDF conversion through the hook still succeeds.npm teston top of current main (including feat(office): offline Python authoring on Windows and macOS #649): 181 files / 1613 tests pass.pretestneededNODE_USE_ENV_PROXY=1locally to download the Office runtime from GitHub.npm run typecheckpasses;git diff --checkis clean.Not verified: an actual Windows install through a junction or 8.3 path.
🤖 Generated with Claude Code