6 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Opus 5.5 d4cb274749 0.1.7
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 00:33:01 -04:00
ZacharyZhang-NYandClaude Opus 5.5 632a66eb46 R7.9: Explorer's New makes docx, xlsx, pptx and md on Windows
Each app installs a blank file and points ShellNew at it. Explorer
lists a type only through its default class, so a type no program
handles (no default, or one naming no class) gets the app's class;
an installed handler is never replaced. Uninstall removes only what
this install wrote.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 00:32:48 -04:00
ZacharyZhang-NYandClaude Opus 5.5 2f971c646f R7.3: Linux and Windows kernels lay out 宋体 the same
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 18:53:41 -04:00
ZacharyZhang-NYandClaude Opus 5.5 21394b40a2 R7.8: replies on #3-#6, feature request #7
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 18:48:24 -04:00
ZacharyZhang-NYandClaude Opus 5.5 aae000247d R7.7: one source archive pair per release
Windows checks out symlinks as files, so only Linux (CI) and macOS
(release.sh) write source archives. ci.sh skips names already on
the release; the first platform's copy stays.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 18:34:27 -04:00
ZacharyZhang-NYandClaude Opus 5.5 a1b8c18ffd R7.7: crates.py lists what cargo links on this target
The walk over cargo metadata ignored an edge's target, so lopdf (Linux
only, a test dependency elsewhere) counted on Windows. Linux needs the
BSD-3-Clause text for alloc-stdlib, which ships no licence file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 17:08:30 -04:00
24 changed files with 261 additions and 44 deletions

No files matched your search

Generated
+15 -15
View File
@@ -1938,7 +1938,7 @@ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
[[package]]
name = "ely-agent"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"ely-platform",
"ely-ui",
@@ -1947,7 +1947,7 @@ dependencies = [
[[package]]
name = "ely-doc"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"csv",
@@ -1969,7 +1969,7 @@ dependencies = [
[[package]]
name = "ely-files"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"aes-gcm",
"dunce",
@@ -2032,14 +2032,14 @@ dependencies = [
[[package]]
name = "ely-ipc"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"log",
]
[[package]]
name = "ely-lok"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"base64 0.23.1",
"dunce",
@@ -2060,7 +2060,7 @@ dependencies = [
[[package]]
name = "ely-mail"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"ely-platform",
"ely-ui",
@@ -2069,7 +2069,7 @@ dependencies = [
[[package]]
name = "ely-mark"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"base64 0.23.1",
@@ -2094,7 +2094,7 @@ dependencies = [
[[package]]
name = "ely-office"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"directories",
@@ -2115,7 +2115,7 @@ dependencies = [
[[package]]
name = "ely-pdf"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"dunce",
"ely-files",
@@ -2133,7 +2133,7 @@ dependencies = [
[[package]]
name = "ely-pdf-engine"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"cc",
"ely-ipc",
@@ -2150,7 +2150,7 @@ dependencies = [
[[package]]
name = "ely-platform"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"arboard",
@@ -2189,7 +2189,7 @@ dependencies = [
[[package]]
name = "ely-show"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"ely-files",
"ely-gpui-component",
@@ -2209,7 +2209,7 @@ dependencies = [
[[package]]
name = "ely-table"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"ely-gpui-component",
"ely-lok",
@@ -2226,7 +2226,7 @@ dependencies = [
[[package]]
name = "ely-tree"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"dunce",
"ely-files",
@@ -2246,7 +2246,7 @@ dependencies = [
[[package]]
name = "ely-ui"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"directories",
+1 -1
View File
@@ -5,7 +5,7 @@ members = ["apps/*", "crates/*"]
exclude = ["engines", "reference"]
[workspace.package]
version = "0.1.6"
version = "0.1.7"
edition = "2024"
rust-version = "1.95"
license = "AGPL-3.0-or-later"
+6 -3
View File
@@ -132,8 +132,9 @@ tests/scripts/linux-backends.sh Linux 构建带 Wayland 与 X11;Hyprland 上
packaging/linux/container.sh 命令 在 Ubuntu 26.04 镜像里运行(引擎、应用、打包;目标在 target/ubuntu)
tests/scripts/linux-glibc.sh Linux 的应用、worker 与引擎要求的 glibc 不高于 2.43
packaging/linux/package.sh 应用 出该应用的 AppImage、deb、rpm 与 Arch 包到 dist/(在容器里运行)
packaging/source.sh dist 本提交的源码包与随包的 copyleft 上游源码(打过补丁的 MuPDF、Git),文件名带提交号;工作区有未提交改动即拒绝(macOS 的 release.sh 与 CI 的 Windows、Linux 调用)
packaging/source.sh dist 本提交的源码包与随包的 copyleft 上游源码(打过补丁的 MuPDF、Git),文件名带提交号;工作区有未提交改动即拒绝(macOS 的 release.sh 与 CI 的 Linux 调用,发布只上传 Linux 的;Windows 的检出把符号链接写成文件,不出源码包)
tests/scripts/ci-share.sh ci.sh 只经指向 ELY_SHARE 的链接用共享引擎:自建目录、指向别处或目标带换行的链接即拒绝
tests/scripts/ci-upload.sh ci.sh 的上传:macOS 建源码包而不上传,Linux 上传,重跑遇已有的同名文件即失败、什么也不传(假 curl)
tests/scripts/linux-packages.sh deb、rpm、Arch 包在干净的 Ubuntu 26.04、Fedora 44、Arch 容器里装上,每个 ELF 都找得到库
tests/scripts/linux-pins.sh Linux 打包工具(appimagetool、linuxdeploy、运行时、nfpm)的下载与钉的散列相符
tests/scripts/linux-installed.sh installed|appimage Hyprland 上装好的六个应用或 AppImage:一个窗口、随 Omarchy(Catppuccin)、读出页面文字(PDF、Markdown 经各自引擎),ElyTree 随换主题到 Latte(grim 按窗口截取)
@@ -143,6 +144,7 @@ tests/scripts/*.sh *.py 脚本测试(缺工具时报 SKIP)
packaging/macos/bundle.sh ely-doc debug 出 dist/ElyDoc.app(带图标、文档类型与该应用的引擎)
packaging/macos/release.sh [批次] 该批各应用的 release 包与 dmg,另有装全部的 ElyOffice dmg;ELY_SIGN_IDENTITY 加 ELY_NOTARY_PROFILE 即公证
packaging/windows/bundle.sh 由 dist 里各应用的安装程序出合集 ElyOffice 安装程序(先跑 installer.sh)
packaging/windows/templates.sh 以本构建的内核重写 packaging/windows/new 的空白 DOCX、XLSX、PPTX(右键“新建”用)
packaging/icons/masters.py 写出 assets/icons 的全部 SVG 母版(图标设计只改这里)
packaging/icons/build.sh 由 assets/icons 的母版渲染 icns、png、ico(只在 macOS)
tests/scripts/icons.sh 八个图标齐全、未过期,macOS 为 squircle,其余无底形
@@ -273,7 +275,7 @@ cargo run -p ely-doc 启动一个应用(ElyDoc 先 cargo build -p ely
- 2026-10-09:每个应用只跑一份(缺陷清单 X-03)。`ely_ui::run` 在写日志之前取应用数据目录的 `instance.lock`(`ely_platform::instance::hold`;Unix 为 fcntl 记录锁,进程结束即放,被拒时以 `F_GETLK` 向系统问出持锁的进程号,不另存进程号文件,同时启动的几份也报得准;Windows 为 LockFileEx,不报进程号);原先第二份启动即清空第一份的工作目录、把它的恢复点当作干净结束删掉、改写崩溃锁。2026-10-14 起(用户报:已开着时再打开文件弹“已在运行”而不是新标签,各应用同此)第二份把文件交给运行中的那份后退出:持锁的那份在 127.0.0.1 开一个门(`instance::Door`,随机端口),端口、进程号与 32 字节随机令牌写在数据目录的 `instance.door`(先写临时文件再改名,Unix 为 0600);第二份先按当前目录把启动参数变成绝对路径,连上后先发令牌,门答“开”或“拒”之后才发各路径(`ely-ipc` 的帧,Unix 为原字节,Windows 为 UTF-16),收到回执即以 0 退出、不弹框;门未开、连不上、令牌被拒(旧的门文件)或答“开”之前断开时 10 秒内重试,路径发出后不重试(不会开两次),仍不成即照旧报“已在运行……未收下文件”及原因。门为每个来者各开一个线程,一个来者从连上到答完共 5 秒(零星补字不续期),令牌前的帧至多 64 字节、路径帧至多 128 KiB(`ely_ipc::read_capped`,超出即在分配前拒绝)。Windows 上第二份先 `AllowSetForegroundWindow` 让持锁的那份能到前台。每个应用的启动(`ely_ui::run`,`blank` 的 ElyMail、ElyAgent 同)在主窗口开出后装上交接的接收者(`opening::home`):先把主窗口带到前台(最小化的先复原),再把文件放进 `ely_ui::on_open` 的同一队列(各应用不改),然后才回执;主窗口已不在即不回执,第二份照报未收下。不带文件的再次启动只带到前台。主窗口关闭即退出应用(只剩设置窗口时进程原会一直持锁,却开不了文件)。macOS 经访达打开文件本就交给运行中的那份。`instance` 的单测以两个进程核对交接与伪造令牌被拒;`tests/scripts/one-instance.sh`(macOS)核对第二份 ElyDoc 交出文件、第一份开出它且工作目录不动,本次未在 macOS 上跑;Windows 上以真窗口的 ElyMark 核对(第二份 132 毫秒退出,第一份多一个标签)。
- 2026-10-10:ElyMark 的链接(M-05,我定,同常见编辑器):可视模式单击链接是编辑,Cmd 单击(Windows、Linux 为 Ctrl)交应用;预览单击即交应用;应用照 ElyPDF:http、https、mailto 交系统打开,其余提示拒绝。
- 2026-10-10:Windows 与 Linux 的构建环境(E-01)。Windows:MSVC(VS 2022,v143);MuPDF 由 `build-mupdf.sh` 以 MSBuild 编上游 `platform/win32` 的 `libmupdf`(静态运行库 /MT,同 Rust 的 `crt-static`;`HAVE_LIBCRYPTO`,`libmupdf.lib` 内含第三方、Tesseract 与 PKCS#7);静态 OpenSSL 取自钉在 2026.07.29 的 vcpkg(`engines/vcpkg`,`openssl:x64-windows-static`);Git 为 Git for Windows 的 MinGit 2.56.0(钉散列,`engines/git/cmd/git.exe`,LFS 在 `ucrt64/libexec/git-core`);`%TEMP%` 下的程序被系统的应用控制拦下,构建与探针都不放那里;cmake 与 ninja 须在 PATH;LibreOffice 的 configure 只认 VS 自带的 CMake(组件 `VC.CMake.Project`)。仓库与 `reference/` 一律 LF(`core.autocrlf false`、`core.eol lf`;`fetch-references.sh` 对每个上游照设)。Linux:WSL 的 Ubuntu 26.04;静态 libcrypto 另需其 pkg-config 列出的库(jitterentropy、zstd、z)。LibreOffice 在 Linux 照 Collabora 的 LOKit 配置构建(无图形后端、cairo RGBA、自带各库)。
- 2026-10-10:Windows 与 Linux 的内核与 worker(W-01、K-01,用户定:0.1.3 先三端发布)。内核只认合并库(`ffi::KERNEL`:`libmergedlo.dylib`、`libmergedlo.so`、`mergedlo.dll`;`sofficeapp` 在合并构建里是文本占位);Windows 载入时一并搜索该 DLL 所在的 `program/`。查找次序照旧,Windows 与 Linux 的包内位置是应用旁的 `libreoffice/program`,开发构建为 `engines/lo-src/instdir/program`。worker 的主循环:macOS 照旧以 GCD;Linux 以 unipoll,`runLoop` 的轮询回调里每次答一个请求,内核的唤醒回调往同一队列放信号(`worker/unipoll.rs`;回调的数据指针须非空,VCL 见空即不调用);Windows 也以 unipoll:LOK 不另起主线程,worker 的主线程跑 `runLoop`(Windows 的消息循环),请求经只收消息的窗口投到这条线程上执行(`worker/messages.rs`),同 macOS 的 GCD;原先 LOK 自起主线程、worker 在另一线程作答,载入表格即死锁。Windows 的循环不调轮询回调,但须传非空的回调,`isUnipoll` 只看它。补丁 `0043-lok-callbacks-flush-inline-everywhere.patch`:回调队列在各平台都即时冲出(原只 macOS),否则请求里等的命令结果与状态要等下一轮主循环才到。`0042-svx-boost-json-needs-no-library.patch`:svxcore 与 sd 定义 `BOOST_ALL_NO_LIB`,MSVC 不再按 Boost 的自动链接索要 `libboost_json`、`libboost_container`。Linux 的内核以 cairo 画图块(worker 设 `SAL_DISABLESKIA`;构建去掉 `--enable-cairo-rgba`,自带的 cairo 要清掉重建),字节为 BGRA,同 macOS 与 Windows;`getTileMode` 只看 cairo 开关,不可信。worker 启动核对在三端都画一段红字,按 BGRA 找不到红色即拒绝。`scripts/apply-lo-patches.sh` 的临时库设 `core.autocrlf false`(Windows 默认转换使任何前缀都对不上)。Windows 的 LibreOffice 在 Cygwin 下构建(`build-libreoffice.sh` 的 CYGWIN 分支:去掉 Unix 专用开关,加 VS 2022,用 `/opt/lo/bin` 的 make,清掉 Git Bash 带进来的 `MSYSTEM`);构建目录与 Cygwin 排除在 Defender 扫描之外(否则并行 configure 删不掉 `conftest.dir`)。英文词典扩展里的 Lightproof(Python 写的语法检查)在构建后删去:macOS 与 Linux 的内核不带 Python,它本不生效;Windows 必带内置 Python(Cygwin 下 configure 不许去掉),第二次用同一配置启动时初始化它,worker 挂起。worker 以 `SAL_NOLOCK_PROFILE` 运行,`ely.xcd` 关掉 LibreOffice 的文档锁(`Common/Misc/UseLocking`):被强杀的 worker 留下的锁会让下次启动或载入弹出交互而挂起;每个应用只有一个 worker 用自己的配置,冲突由 Ely 自己核对。三端发布(CI-01):`.gitea/workflows/release.yml` 在打标签时于三台运行器上执行 `scripts/ci.sh`:macOS 在 Mac mini 的常驻克隆里借用开发克隆 `~/Documents/GitHub/ElyOfficeSuite` 的引擎(`ELY_SHARE`;2026-10-11 起:从零构建 LibreOffice 超过 act_runner 默认的 3 小时,v0.1.3 的 Mac 任务被杀、无 dmg),Windows 在本机运行器上把 `engines` 与 `reference` 接到开发克隆,Linux 由同一台 Windows 运行器经 WSL 构建(服务器上的 Linux 运行器是一次性容器,建不了内核);各自打包后上传到该标签的发布。Windows 为 NSIS 安装程序,Linux 为 AppImage、deb、rpm 与 Arch 包(引擎构建与打包都经 `packaging/linux/container.sh` 进 Ubuntu 26.04 容器,WSL 里须有 docker;`ELY_SHARE` 的目录一并挂进容器),都由 `packaging/stage.sh` 分装引擎;每个平台都上传本提交的源码包(`packaging/source.sh`);更新清单只含 macOS(Windows 与 Linux 的自动安装未做)。
- 2026-10-10:Windows 与 Linux 的内核与 worker(W-01、K-01,用户定:0.1.3 先三端发布)。内核只认合并库(`ffi::KERNEL`:`libmergedlo.dylib`、`libmergedlo.so`、`mergedlo.dll`;`sofficeapp` 在合并构建里是文本占位);Windows 载入时一并搜索该 DLL 所在的 `program/`。查找次序照旧,Windows 与 Linux 的包内位置是应用旁的 `libreoffice/program`,开发构建为 `engines/lo-src/instdir/program`。worker 的主循环:macOS 照旧以 GCD;Linux 以 unipoll,`runLoop` 的轮询回调里每次答一个请求,内核的唤醒回调往同一队列放信号(`worker/unipoll.rs`;回调的数据指针须非空,VCL 见空即不调用);Windows 也以 unipoll:LOK 不另起主线程,worker 的主线程跑 `runLoop`(Windows 的消息循环),请求经只收消息的窗口投到这条线程上执行(`worker/messages.rs`),同 macOS 的 GCD;原先 LOK 自起主线程、worker 在另一线程作答,载入表格即死锁。Windows 的循环不调轮询回调,但须传非空的回调,`isUnipoll` 只看它。补丁 `0043-lok-callbacks-flush-inline-everywhere.patch`:回调队列在各平台都即时冲出(原只 macOS),否则请求里等的命令结果与状态要等下一轮主循环才到。`0042-svx-boost-json-needs-no-library.patch`:svxcore 与 sd 定义 `BOOST_ALL_NO_LIB`,MSVC 不再按 Boost 的自动链接索要 `libboost_json`、`libboost_container`。Linux 的内核以 cairo 画图块(worker 设 `SAL_DISABLESKIA`;构建去掉 `--enable-cairo-rgba`,自带的 cairo 要清掉重建),字节为 BGRA,同 macOS 与 Windows;`getTileMode` 只看 cairo 开关,不可信。worker 启动核对在三端都画一段红字,按 BGRA 找不到红色即拒绝。`scripts/apply-lo-patches.sh` 的临时库设 `core.autocrlf false`(Windows 默认转换使任何前缀都对不上)。Windows 的 LibreOffice 在 Cygwin 下构建(`build-libreoffice.sh` 的 CYGWIN 分支:去掉 Unix 专用开关,加 VS 2022,用 `/opt/lo/bin` 的 make,清掉 Git Bash 带进来的 `MSYSTEM`);构建目录与 Cygwin 排除在 Defender 扫描之外(否则并行 configure 删不掉 `conftest.dir`)。英文词典扩展里的 Lightproof(Python 写的语法检查)在构建后删去:macOS 与 Linux 的内核不带 Python,它本不生效;Windows 必带内置 Python(Cygwin 下 configure 不许去掉),第二次用同一配置启动时初始化它,worker 挂起。worker 以 `SAL_NOLOCK_PROFILE` 运行,`ely.xcd` 关掉 LibreOffice 的文档锁(`Common/Misc/UseLocking`):被强杀的 worker 留下的锁会让下次启动或载入弹出交互而挂起;每个应用只有一个 worker 用自己的配置,冲突由 Ely 自己核对。三端发布(CI-01):`.gitea/workflows/release.yml` 在打标签时于三台运行器上执行 `scripts/ci.sh`:macOS 在 Mac mini 的常驻克隆里借用开发克隆 `~/Documents/GitHub/ElyOfficeSuite` 的引擎(`ELY_SHARE`;2026-10-11 起:从零构建 LibreOffice 超过 act_runner 默认的 3 小时,v0.1.3 的 Mac 任务被杀、无 dmg),Windows 在本机运行器上把 `engines` 与 `reference` 接到开发克隆,Linux 由同一台 Windows 运行器经 WSL 构建(服务器上的 Linux 运行器是一次性容器,建不了内核);各自打包后上传到该标签的发布。Windows 为 NSIS 安装程序,Linux 为 AppImage、deb、rpm 与 Arch 包(引擎构建与打包都经 `packaging/linux/container.sh` 进 Ubuntu 26.04 容器,WSL 里须有 docker;`ELY_SHARE` 的目录一并挂进容器),都由 `packaging/stage.sh` 分装引擎;本提交的源码包只由 Linux 上传(`packaging/source.sh`;macOS 照建供 `release-macos.sh` 核对,不上传,两端并行时不重复;Windows 的检出把符号链接写成文件,不出);重跑时所传文件有任一同名的已在发布里即失败、什么也不传,写明须先删去哪些(重建的字节不同,更新清单的散列会对不上已在的 dmg);更新清单只含 macOS(Windows 与 Linux 的自动安装未做)。
- 2026-10-11:gpui 的 Windows 窗口关闭(W-03 冒烟查出)。`gpui-pre-windows` 0.3.8 在窗口关闭时报三条错:系统已销毁窗口(ElyTree 的关窗交给系统)后 Drop 仍对旧句柄 `RevokeDragDrop` 与 `DestroyWindow`(拖放处理器因此不释放,连带窗口状态);销毁时的失活回报排在异步任务里,执行时窗口已移除(“window not found”);退出后后台任务向已销毁的平台窗口投递(`Invalid window handle`)。修复在 `vendor/gpui-pre-windows`:`WM_DESTROY` 时记下已销毁、在句柄仍有效时撤销拖放、去掉失活回调,Drop 见已销毁即不再动句柄;平台窗口已不在时投递失败只记 debug(应用已退出),其余投递失败照报。三个应用关窗与退出的日志无错。
- 2026-10-11(用户报:Windows 启动带黑色命令行窗口、“打开方式”里无图标、点 X 不退出、表格全黑无网格线):四处根因。命令行窗口:应用是控制台子系统;发行构建改为 `windows_subsystem = "windows"`(开发构建照旧有控制台看日志),子进程(两个 worker、Git、`cmd start`)一律经 `ely_ipc::windowless` 以 `CREATE_NO_WINDOW` 启动。图标:exe 里只有 gpui 的清单资源;各应用共用构建脚本 `packaging/windows/icon.rs`,把 `assets/icons/<应用>.ico` 编成资源 1(gpui 的窗口图标也取资源 1)。点 X 不退出:窗口其实弹了“保存更改”询问。`ely.xcd` 深色方案的 `CalcNotesBackground` 与浅色不同,Calc 在配色变化时改写批注样式并记一步撤销(`ScDetectiveFunc::UpdateAllComments`),未动的表格切到深色即算已修改;两套方案的批注底色改为同一值(LibreOffice 默认的浅黄),切换主题不再改文档,三端同此(`sheet.rs` 的 `a_theme_switch_is_no_edit`)。全黑:Win32 的虚拟设备没有 `SetSizeUsingBuffer`(基类默认返回假,断言在发行构建里不在),给客户缓冲区的设备停在 1×1 像素,Calc 图块只画了一个像素,放映图层同空;补丁 `0044-lok-win32-paints-then-copies.patch` 让 Windows 走 macOS 的路:按全尺寸画进设备,再拷进客户缓冲区(`doc_paintTile` 与 `SlideshowLayerRenderer`)。Writer 自设设备尺寸,原本不受影响。`tests/scripts/lo-patches.sh` 的临时库也设 `core.autocrlf false`(原先在 Windows 上恒失败)。
- 2026-10-11(用户报:Windows 上标题栏的最小化、最大化、关闭三个按钮都按不动):gpui 回答系统的命中测试(`WM_NCHITTEST`)时按绘制次序取第一个含指针的窗口控制区,标题栏的拖动区先于其中的按钮画出,按钮上一律答“标题栏”,系统把按下当作拖动窗口的开始,点击到不了按钮。修复在 `vendor/gpui-pre`(原样一个提交,其后是修复):按命中测试的次序取最上层的控制区,且只看未被遮挡的部分(同 `is_hovered`,盖在标题栏上的对话框挡住其下的按钮)。实测(发行构建,DPI 感知的探针移动真实指针):自右向左依次答关闭、最大化、最小化、拖动;按下最小化即最小化,最大化即最大化,关闭即退出、worker 随之结束;v0.1.3 的安装版同一探针处处答拖动。该回调只有 Windows 平台调用。
@@ -311,7 +313,8 @@ cargo run -p ely-doc 启动一个应用(ElyDoc 先 cargo build -p ely
- 2026-10-15(用户报:ElyShow 编辑区滚轮与上下键不换页,三端):内核在未选中对象时把上下键当作滚动窗口(`fupoor.cxx`),Ely 的画布整页适合、无处可滚,滚轮同样。`LokView::turn_parts`(ElyShow 首次适合时调用)之后:整页可见时滚轮换页(`view/turn.rs`):滚轮的行按本平台每格的行数(`ely_lok::notch`:macOS 1,Windows 取系统设置,X11 与 Wayland 为 3)折成格,整格的行每格一页(快速连滚与一次多格都照格数);一串行里出现不足一格的(X11、Windows 的触控板)即为平滑滚动,此后到停顿前不再换页,像素(macOS、Wayland 的触控板)同按手势:一次手势换一页(满一格或 50 像素),惯性不算;有起止的手势(macOS)只到结束才算完,没有起止的停 200 毫秒即为下一次。X11 的滚轮与触控板同为行、gpui 不分,以整格开头的触控板滑动在出现小数之前会按格换页(已知限制)。未选中对象、未编辑文字时上下键换页。换页一律经有序输入队列交 worker(`TURN`):worker 按之前各输入回报后的状态判定,有选区、选中对象或插入点即把方向键照常交内核,否则当场切页(到首末页即停,同缩略图条的 `setPart`),视图在落地时换上 worker 所示的页,其后排队的键与点按都落在新页上(Tab 后紧接的 Down 移动所选对象;Down、Tab、Down 是换页后在新页上选中并移动);ElyShow 后台读回的当前页只在视图已无待落地输入时采用(R6.13)。
- 2026-10-16(用户定):合集安装包(R7.1)。macOS 一个公证的 `ElyOffice-<版本>-<架构>.dmg`,装首批六个已签名的 .app 与“应用程序”替身,用户拖入所要的(`release.sh` 的 `dmg` 与单个应用共用);无 Developer ID Installer 证书,不出 .pkg。Windows 一个 `ElyOffice-<版本>-windows-x86_64-setup.exe`(`packaging/windows/bundle.nsi`),组件页勾选应用,所选的各自的安装程序以 `/S` 运行,所以装法、位置、升级、卸载项与单装完全相同;某个退出码非零即停下并写明其名与退出码(2 为文件被占用或位置被占),之前装上的照旧。Linux 不出合集。单个应用的包、更新清单照旧。
- 2026-10-16(Gitea #6):设置窗口多出一行应用菜单(R7.2)。设置窗口沿用主窗口的外壳 `Shell`,Windows 与 Linux 上随之画出菜单栏(macOS 菜单在系统菜单栏,不受影响)与更新横幅。菜单栏与更新横幅只属主窗口:`Shell::secondary` 去掉两者,设置窗口用它;`settings/tests.rs` 量内容起点距标题栏底:只装菜单时主窗口大于零(macOS 为零),再有待下载的新版时更大,设置窗口为零。
- 2026-10-16(Gitea #4):装了宋体仍报缺少(R7.3)。内核按名找字体时比较 `GetEnglishSearchFontName`(小写 ASCII、去空格、中日韩本地名译为英文名,`宋体` 即 `simsun`),所以文档的 `宋体` 找到并用上 SimSun;缺字检查却比较原名与所用字体名,报为缺失。Linux 上内核以界面语言(英文)为 fontconfig 字体取名,文档里的本地名一律报缺。补丁 `0048-lok-fonts-missing-by-search-name.patch`:缺字检查同样比较检索名。实测(2026-10-16):Arch 容器装 ElyDoc 0.1.5 的 Arch 包与 simsun.ttc,40 行宋体五号、文档网格的 docx 报缺宋体,正文实为 SimSun(无此字体时为方框),与 Windows 同为一页;换上打过 0048 的内核后同一容器不再报缺、仍为一页。用户所说一页变两页未能复现,需其文件。缺字检查测试:`navigate/tests.rs` 以随包的 DejaVu Sans 写作 `DEJAVU SANS`,只报真缺的字体。另见:Linux 上属性栏的字体框为空(字体列表只有 SimSun,文档写宋体),未改。
- 2026-10-16(Gitea #4):装了宋体仍报缺少(R7.3)。内核按名找字体时比较 `GetEnglishSearchFontName`(小写 ASCII、去空格、中日韩本地名译为英文名,`宋体` 即 `simsun`),所以文档的 `宋体` 找到并用上 SimSun;缺字检查却比较原名与所用字体名,报为缺失。Linux 上内核以界面语言(英文)为 fontconfig 字体取名,文档里的本地名一律报缺。补丁 `0048-lok-fonts-missing-by-search-name.patch`:缺字检查同样比较检索名。实测(2026-10-16):Arch 容器装 ElyDoc 0.1.5 的 Arch 包与 simsun.ttc,40 行宋体五号、文档网格的 docx 报缺宋体,正文实为 SimSun(无此字体时为方框),与 Windows 同为一页;换上打过 0048 的内核后同一容器不再报缺、仍为一页。用户所说一页变两页未能复现,需其文件:十种宋体版式(44 与 45 行的文档网格、无网格、折行两端对齐、字符网格、粗体、小四、固定行距、1.5 倍行距)在 Windows 与 Linux 内核上页数、断行、分页逐行相同(`.work/r7/pages`),网格下每页 44 行、每行约 39 字,同 Word 的 A4 默认;差别若在,是该文件里 LibreOffice 与 Word 的排版不同,与平台无关。缺字检查测试:`navigate/tests.rs` 以随包的 DejaVu Sans 写作 `DEJAVU SANS`,只报真缺的字体。另见:Linux 上属性栏的字体框为空(字体列表只有 SimSun,文档写宋体),未改。
- 2026-10-16(Gitea #5):每个 PDF 打开即报已损坏(R7.4)。C11.8 把画图块与导出时 MuPDF 的任何警告都算作损坏;读页面时载入未嵌入的字体也发警告(中文文件里写名而不嵌入的宋体等:`non-embedded font using identity encoding`),合法的文件因此转为修复副本、保存一律另存。现在警告监视(`keep_warning`,打开时的扫描、画图块、导出与 Markdown 的 PDF 共用)只略去这一句与紧随其后的 MuPDF 重复计数(`... repeated N times...`);其余照算损坏,含内容的语法错误、无字体写字、坏的嵌入字体与图片流。读文字与搜索也受监视(坏图片读过即被缓存,之后画图块、导出与检查都不再报警告):其间遇到的损坏记入报告与该文档,下一次画图块或检查图片报出,报出之前导出图片与文字一律拒绝。监视开始时,MuPDF 尚未报出的重复计数(来自其余未受监视的读取)按它所重复的那句归类(`ctx->warn.message`):字体提示的重复略去,其余照算。`tests/output.rs` 核对:两个同名未嵌入字体的文件先读文字再画图块、导出图片与文字都不算损坏;无字体写字与 `BT ] ET` 的图块为损坏;`[/FlateDecode /ASCIIHexDecode]` 下校验和错的图片使两种导出都被拒、图块为损坏。先读文字或搜索后,这样的两张图片、颜色键掩码无效的一张图片、以及它在两个未嵌入字体之前或之后画出,画图块、导出与检查图片仍报损坏。
- 2026-10-16(Gitea #3):Windows 与 Linux 打印(R7.6)。`print_pdf` 改为异步:对话框在应用线程上,读页与出作业在自己的线程上(`print::off`),应用不卡。Windows:系统打印对话框(`PrintDlgEx`,Windows 11 显示为新式对话框),打开前把默认打印机的设置改成文档的纸张与方向(按打印机自己的纸型匹配(纸型须装得下页面,至多大 2 毫米,Linux 的 PWG 名同此);没有即自定义尺寸),设置须连同打印机名(`DEVNAMES`)一起交给对话框,否则对话框改用打印机自己的偏好(实测:Letter 文档印成 A4);所选页码范围照办,份数交驱动;勾“打印到文件”时文档输出为 `FILE:`,由打印子系统问文件名。驱动不支持所设纸张时会换成别的(实测“Microsoft Print to PDF”没有自定义尺寸,1000×600 点的页面换成 A4),所以出作业之前(`StartDoc` 之前)按打印机实际的纸张核对每一页:超出纸张半点以上(纸张尺寸至多舍入到整点,`print::ROUNDING`)、转过来也超出即报错,什么也不印(实测:600×842 点的页面原在 A4 上印出、右缘被裁)。页面由 Windows 自带的 PDF 渲染(`Windows.Data.Pdf`)按打印机分辨率分条画出,按原大从纸张的角上放(扣去不可打印的偏移),只在转过来才放得下时左转 90 度;渲染器的尺寸按 DIP 算、乘显示缩放,每次作业先试画一次量出倍数。`ELY_PRINT_TO` 时不弹对话框,经“Microsoft Print to PDF”写成文件(测试用)。`GlobalFree` 成功时返回空,windows-rs 读成错误码 0 的错误,须当作成功(否则打印报“操作成功完成”)。Linux:经 xdg 桌面门户的 `org.freedesktop.portal.Print`(`PreparePrint` 后带其令牌 `Print`,交出 PDF 的文件描述符),页面设置为文档纸张(标准纸型给 PWG 名,否则自定义毫米尺寸),边距为零,只许输出 PDF(`supported_output_file_formats`,否则对话框可选 PostScript,写出的却是 PDF);门户照原样交出所给的字节,对话框的选择由应用排定(`print/linux/sheets.rs`):GTK 设置里的页码范围(从零起)、奇偶页、倒序、份数与逐份、缩放、每张页数与排列,排到对话框所选纸张与方向上,每页为一个表单对象(带可打印批注的外观;带 NoRotate 的批注在转过的页面上绕其左上角转回、保持正立,同 MuPDF;外观的资源名避开页面已有的;可打印却没有外观的批注即报错,链接与弹出说明本无外观),单页按原大乘缩放从纸张左上角放,超出半点以上而转过来放得下即左转,否则报错;方向照 GTK 的写法(`reverse-portrait`,门户文档的页面设置同此);奇偶页只在 GTK 的文件与 lpr 后端时由 Ely 排(设置里有 `output-uri` 或 `lpr-commandline`),CUPS 后端自己把它交给 CUPS(`cups-page-set`,GTK 3.24.52 实测),Ely 再排一次即丢页;份数、每张页数等 GTK 留给应用,Ely 照排;裁剪框超出媒体框的部分不印(取两者的交);页码范围的开放终点 GTK 写作 -1(`1--1`),倒着的范围即报错;多页按格居中,再交内存文件(`memfd`);直接用 zbus:ashpd 0.13.13 的 `PageSetup`、`Settings` 缺任一字段即解析失败,真门户的回复常不带 `PPDName`。页面尺寸由 lopdf 读(CropBox,否则 MediaBox,继承、`/Rotate` 与页面自己的 `/UserUnit`)。打印不再按平台禁用(原 `print::BUILT` 与“此平台尚未构建”删去)。替身门户的测试核对选页、缩放、倒序与份数后交出的页面与位置,与只许 PDF。ElyPDF 的打印副本(`ely_print_copy`)按打印的规则画:可打印(不隐藏)的批注与表单控件,外观画进页面内容(位置照 MuPDF 自己的 `pdf_annot_transform`,与屏上一致;无外观的先由 MuPDF 生成,MuPDF 原只在显示时放在本地表里、不存入文件),其余批注与表单去掉,只留链接;系统的渲染器按屏幕规则画(不打印的照画,“打印但不显示”的不画,实测 Windows),画进内容后各渲染器都只见要打印的;仍画不出的即报错;`tests/output.rs` 渲染副本核对。真窗口(Windows):ElyDoc 的 Ctrl+P、Ely 的打印对话框、系统对话框、“Microsoft Print to PDF”的另存为,印出的 PDF 为文档的 Letter;系统对话框取消时不打印、不报错(`.work/r76/print.ps1`)。未验证:Linux 真桌面上的门户(只对替身门户核对);实体打印机。
- 2026-10-16(用户定):Windows 资源管理器的右键“新建”可建 DOCX、XLSX、PPTX 与 Markdown 文件(R7.9)。空白文件在 `packaging/windows/new`(`templates.sh` 以本构建的内核把空文件转存而得,无作者与日期;Markdown 为空文件),随所属的应用装在安装目录(列在 `.ely-installed` 里),`HKCU\…\.<扩展名>\ShellNew` 的 `FileName` 指向它。资源管理器只在扩展名有默认 ProgID 时列出新建项(实测:只有 `ShellNew`、或只在 `OpenWithProgids` 下时都不列);所以只在该类型没有任何程序处理时(HKCR 下无默认值,或默认值所指的类不存在:本机 Windows 11 的 `.md` 指向不存在的 `Markdown Document`)把默认值设为本应用的 ProgID(写在 HKCU,用户自己的 `UserChoice` 不动),已有的从不改动(装着 Office、WPS 时新建菜单用它们自己的项);没有处理程序的这四种类型从此由 Ely 打开。卸载只删仍是本安装写下的 `ShellNew` 与默认值。ProgID 的名称为“<应用> Document”(新建菜单与类型列显示它)。`tests/scripts/types.sh` 核对四种都有新建项,默认值只在判空之后写。
- 2026-10-16(用户定):ElyMark 打开的块保持原样(R7.5)。组件库 bff7ebc 起,可视模式里按下的块以原文显示在它合上时的框里(同样的边距与透明边框),字号、行高与颜色同合上时:段落、列表、引用等为正文,标题按其级数的字号、1.3 倍行高、加粗(六级为次要色),照原文写出的块(链接定义等)为等宽次要色;不再加深色底板与另一套边距,按下前后不挪位置。代码块、块公式与 front matter 仍有自己的底板(代码与 front matter 为等宽小号,front matter 为次要色,同合上时)。输入框的着色(源码模式同用)给标题与粗体同一字重(原为半粗,压过所设的加粗),六级标题里的字照为次要色(行内代码照为正文色,2e65b05),front matter 照 front matter 读(原读成分隔线加标题,键名变亮变粗)(1ff993d、962964e)。表格单元格照旧。打字机模式的居中另按两端余量判定(原只按块高与视图高,打开前后同高时首块不再居中)。同批带入组件库 cdc5ce8(标题栏拖动区里的控件按下归控件,Windows)。Windows 真窗口核对(`.work/r75`):段落、三级标题、代码块打开前后位置相同。
+1 -1
View File
@@ -2,7 +2,7 @@
随发行说明发布,每个版本一份。支持某格式不等于支持它的全部功能;下表只写已验证的内容、已知限制与保存行为。
版本:Ely Office 0.1.6(首版六个应用:ElyDoc、ElyTable、ElyShow、ElyPDF、ElyTree、ElyMark)。日期 2026-10-16。
版本:Ely Office 0.1.7(首版六个应用:ElyDoc、ElyTable、ElyShow、ElyPDF、ElyTree、ElyMark)。日期 2026-10-17。
内核:LibreOffice 26.2.6.3(8221e31,加 `patches/libreoffice` 0001–0048);MuPDF 1.28.5(8ad45e9,加 `patches/mupdf` 0001–0005);Git 2.56.0(a018953)与 git-lfs 3.8.0。
验证机:macOS 27.0 arm64。Windows 与 Linux 未验证。本机没有 Microsoft Office:与 Office 的交叉检查未做(待做)。
+9 -14
View File
@@ -10,26 +10,21 @@ root = pathlib.Path(__file__).resolve().parent.parent
standard = root / "packaging" / "licenses"
host = next(line.split()[1] for line in subprocess.run(
["rustc", "-vV"], check=True, capture_output=True, text=True).stdout.splitlines() if line.startswith("host:"))
# Only what this machine's build links.
meta = json.loads(subprocess.run(
["cargo", "metadata", "--format-version", "1", "--locked", "--filter-platform", host,
["cargo", "metadata", "--format-version", "1", "--locked",
"--manifest-path", str(root / "Cargo.toml")],
check=True, capture_output=True, text=True).stdout)
by_id = {package["id"]: package for package in meta["packages"]}
own = set(meta["workspace_members"])
nodes = {node["id"]: node for node in meta["resolve"]["nodes"]}
# What links in: normal edges, for this machine's target.
wanted, stack = set(), [pid for pid in own if by_id[pid]["name"] in sys.argv[1:]]
if len(stack) != len(sys.argv) - 1:
if len([pid for pid in own if by_id[pid]["name"] in sys.argv[1:]]) != len(sys.argv) - 1:
sys.exit(f"crates.py: unknown package among {sys.argv[1:]}")
while stack:
pid = stack.pop()
if pid in wanted:
continue
wanted.add(pid)
for dep in nodes[pid]["deps"]:
if any(kind["kind"] is None for kind in dep["dep_kinds"]):
stack.append(dep["pkg"])
# Cargo decides which normal edges link on this target.
tree = subprocess.run(
["cargo", "tree", "--locked", "-e", "normal", "--target", host, "--prefix", "none", "-f", "{p}",
"--manifest-path", str(root / "Cargo.toml"), *[arg for name in sys.argv[1:] for arg in ("-p", name)]],
check=True, capture_output=True, text=True).stdout
linked = {tuple(line.split()[:2]) for line in tree.splitlines() if line.strip()}
wanted = {pid for pid, package in by_id.items() if (package["name"], "v" + package["version"]) in linked}
out, missing = [], []
for pid in sorted(wanted - own, key=lambda pid: (by_id[pid]["name"], by_id[pid]["version"])):
+24
View File
@@ -0,0 +1,24 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+1
View File
@@ -1,6 +1,7 @@
; Per-user installer; pass each define the checks below name.
Unicode true
!include "MUI2.nsh"
!include "LogicLib.nsh"
!ifndef APP_NAME
!error "pass -DAPP_NAME"
+4
View File
@@ -18,6 +18,10 @@ makensis=${MAKENSIS:-"/c/Program Files (x86)/NSIS/makensis.exe"}
}
stage=$root/target/stage/$slug
"$root/packaging/stage.sh" "$slug" "$stage"
# Explorer's New copies these; the install list owns them.
for ext in $(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 }' "$root/packaging/types.tsv"); do
[ ! -e "$root/packaging/windows/new/new.$ext" ] || cp "$root/packaging/windows/new/new.$ext" "$stage/"
done
types=$root/target/stage/$slug-types.nsh
"$root/packaging/windows/types.sh" "$slug" >"$types"
list=$root/target/stage/$slug-files.txt
Binary file not shown.
View File
Whitespace-only changes.
Binary file not shown.
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Writes packaging/windows/new: the blank files Explorer's New makes.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
soffice=$root/engines/lo-src/instdir/program/soffice.com
[ -x "$soffice" ] || {
echo "templates.sh: no kernel at $soffice; run scripts/build-libreoffice.sh" >&2
exit 1
}
out=$root/packaging/windows/new
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
mkdir "$work/in"
# The kernel reads an empty file as a new document.
for ext in docx xlsx pptx; do
: >"$work/in/new.$ext"
"$soffice" --headless --norestore "-env:UserInstallation=file:///$(cygpath -m "$work/profile")" \
--convert-to "$ext" --outdir "$(cygpath -w "$out")" "$(cygpath -w "$work/in/new.$ext")"
[ -s "$out/new.$ext" ] || {
echo "templates.sh: the kernel wrote no new.$ext" >&2
exit 1
}
done
: >"$out/new.md"
+31 -1
View File
@@ -10,11 +10,16 @@ progid="ElyOffice.$name"
classes='Software\Classes'
exts=$(awk -F'\t' -v slug="$slug" '$1 == slug && $2 != "/" { print $2 }' "$root/packaging/types.tsv")
folder=$(awk -F'\t' -v slug="$slug" '$1 == slug && $2 == "/" { print "yes" }' "$root/packaging/types.tsv")
# Types Explorer's New menu makes, from packaging/windows/new.
fresh=""
for ext in $exts; do
[ ! -e "$root/packaging/windows/new/new.$ext" ] || fresh="$fresh $ext"
done
# Open With lists the app; the user's default stays theirs.
echo '!macro ElyTypesInstall'
if [ -n "$exts" ]; then
echo " WriteRegStr HKCU \"$classes\\$progid\" \"\" \"$name\""
echo " WriteRegStr HKCU \"$classes\\$progid\" \"\" \"$name Document\""
echo " WriteRegStr HKCU \"$classes\\$progid\\DefaultIcon\" \"\" \"\$INSTDIR\\$slug.ico\""
echo " WriteRegStr HKCU \"$classes\\$progid\\shell\\open\\command\" \"\" '\"\$INSTDIR\\$slug.exe\" \"%1\"'"
echo " WriteRegStr HKCU \"$classes\\Applications\\$slug.exe\" \"FriendlyAppName\" \"$name\""
@@ -23,6 +28,20 @@ if [ -n "$exts" ]; then
echo " WriteRegStr HKCU \"$classes\\Applications\\$slug.exe\\SupportedTypes\" \".$ext\" \"\""
done
fi
for ext in $fresh; do
echo " WriteRegStr HKCU \"$classes\\.$ext\\ShellNew\" \"FileName\" \"\$INSTDIR\\new.$ext\""
# New needs a class; take only a handlerless type.
echo " ReadRegStr \$0 HKCR \".$ext\" \"\""
echo " ClearErrors"
# A default naming no class handles nothing either.
echo " \${If} \$0 != \"\""
echo " EnumRegKey \$1 HKCR \"\$0\" 0"
echo " \${EndIf}"
echo " \${If} \$0 == \"\""
echo " \${OrIf} \${Errors}"
echo " WriteRegStr HKCU \"$classes\\.$ext\" \"\" \"$progid\""
echo " \${EndIf}"
done
if [ -n "$folder" ]; then
echo " WriteRegStr HKCU \"$classes\\Directory\\shell\\$progid\" \"\" \"Open in $name\""
echo " WriteRegStr HKCU \"$classes\\Directory\\shell\\$progid\" \"Icon\" \"\$INSTDIR\\$slug.ico\""
@@ -39,6 +58,17 @@ if [ -n "$exts" ]; then
echo " DeleteRegValue HKCU \"$classes\\.$ext\\OpenWithProgids\" \"$progid\""
done
fi
# Only what this install wrote.
for ext in $fresh; do
echo " ReadRegStr \$0 HKCU \"$classes\\.$ext\\ShellNew\" \"FileName\""
echo " \${If} \$0 == \"\$INSTDIR\\new.$ext\""
echo " DeleteRegKey HKCU \"$classes\\.$ext\\ShellNew\""
echo " \${EndIf}"
echo " ReadRegStr \$0 HKCU \"$classes\\.$ext\" \"\""
echo " \${If} \$0 == \"$progid\""
echo " DeleteRegValue HKCU \"$classes\\.$ext\" \"\""
echo " \${EndIf}"
done
if [ -n "$folder" ]; then
echo " DeleteRegKey HKCU \"$classes\\Directory\\shell\\$progid\""
fi
+24 -2
View File
@@ -66,8 +66,10 @@ case $os in
;;
esac
# macOS's release.sh writes its own source archives.
[ "$os" = macos ] || packaging/source.sh "$dist"
# Windows checkouts flatten symlinks; Linux and macOS write source.
if [ "$os" = linux ]; then
packaging/source.sh "$dist"
fi
# The tag's release, made by whichever platform comes first.
api=https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/ElyOffice
@@ -79,9 +81,29 @@ if ! id=$(release_id 2>/dev/null); then
curl -fsS -H "$auth" -H "Content-Type: application/json" -d "$body" "$api/releases" >/dev/null || true
id=$(release_id)
fi
names=()
for file in "$dist"/*; do
[ -f "$file" ] || continue
name=$(basename "$file")
# Linux alone publishes the source pair.
if [ "$os" != linux ] && [[ $name == *-source.tar.gz ]]; then
echo "ci.sh: $name is Linux's to upload"
continue
fi
names+=("$name")
done
# Rebuilt bytes differ; never mix them with earlier uploads.
have=$(curl -fsS -H "$auth" "$api/releases/$id/assets" | python3 -c 'import json, sys; print("\n".join(a["name"] for a in json.load(sys.stdin)))')
taken=()
for name in "${names[@]}"; do
if grep -qxF "$name" <<<"$have"; then taken+=("$name"); fi
done
if [ ${#taken[@]} -gt 0 ]; then
echo "ci.sh: already on $tag; delete them, then rerun: ${taken[*]}" >&2
exit 1
fi
for name in "${names[@]}"; do
file=$dist/$name
echo "ci.sh: uploading $name"
curl -fsS -H "$auth" -F "attachment=@$file" "$api/releases/$id/assets?name=$name" >/dev/null
done
+3 -2
View File
@@ -282,5 +282,6 @@
- [x] R7.4 打开 PDF 总说已损坏(#5,§11):画图块时 MuPDF 的任何警告都算损坏,未嵌入的中日韩字体(“non-embedded font using identity encoding”)即触发;损坏只认结构修复、读不出的对象与流、画不出的图片与内容
- [x] R7.5 ElyMark 打开的正文块变成一块深色框(§14,用户定):按下的段落保持原样,不加底色与内边距,不挪位置;代码块仍有自己的底板
- [x] R7.6 Windows 与 Linux 不能打印(#3,§19.3):`print_pdf` 只有 macOS;Windows 用系统打印对话框,Linux 经 xdg 桌面门户的打印接口
- [ ] R7.7 发布 0.1.6:版本号,三端建包、签名公证、上传,合集包一并上传,本机装上
- [ ] R7.8 答复 #3 至 #6:每条写已修于 0.1.6;#6 的工作区建议另开 [FEATURE REQUEST] 并链过去
- [x] R7.7 发布 0.1.6:版本号,三端建包、签名公证、上传,合集包一并上传,本机装上(v0.1.6 共 46 个文件,出自 a1b8c18:六个公证 dmg 与 ElyOffice dmg、六个安装程序与合集 setup.exe、24 个 Linux 包、一对源码包;`crates.py` 改问 cargo 本机链进的 crate,补 BSD-3-Clause;源码包只由 Linux 上传,重跑遇同名即失败、什么也不传(`ci-upload.sh`);本机六个应用静默装上 0.1.6、冒烟通过 — 第 1 轮:macOS 与 Linux 并行会重复上传源码;第 2 轮:重跑跳过同名会使更新清单与 dmg 散列不符、注释超长;第 3 轮:部分已传的重跑未测、注释超长,修后不再审查)
- [x] R7.8 答复 #3 至 #6:每条写已修于 0.1.6;#6 的工作区建议另开 [FEATURE REQUEST] 并链过去(#3、#4、#5、#6 各一条答复,#7 为 [FEATURE REQUEST] 工作区与常用文件夹;#3、#5、#6 关闭,#4 开着等报告者的文件 — 第 1 轮:#5 的答复说只有读不出的内容才算损坏,超出 0.1.6 所修,改为只说未嵌入字体的提示不再算损坏;第 2 轮 PASS)
- [x] R7.9 Windows 右键“新建”(用户 2026-10-16 定,发 0.1.7,只发 Windows):资源管理器的新建菜单可建 DOCX、XLSX、PPTX、Markdown 文件,各由所属的应用装上与卸下(`types.sh` 测试另以两个变体核对:去掉判空、去掉 md 的模板各自失败;本机在 0.1.6 上静默装 0.1.7 的 ElyDoc、ElyTable、ElyShow、ElyMark:新建菜单列出四项,无 `.ely-old`,四个模板按新建的方式复制后在所属应用里打开,日志无错误与警告;卸载 ElyMark 后 `.md` 的新建项与默认值都删去、`UserChoice` 未动,重装复原;`windows-installer.sh`、`windows-bundle.sh` 通过。未送审:用户要求从简)
+3
View File
@@ -0,0 +1,3 @@
FAIL
scripts/ci.sh:85 — The duplicate check reads the release's assets only once, so concurrent macOS and Linux jobs can both upload the shared source archives. Both jobs can take their snapshot before either uploads the archives; macOS still generates them through `packaging/macos/release.sh`. An isolated probe running the unchanged CI script for both platforms reproduced two uploads of each source filename, with both processes exiting 0 (`.work/R7.7-r1/ci-upload-probe.log`). Gitea permits duplicate attachment names, so this defeats the stated single-pair/first-upload-wins behavior. Assign shared-source uploads to one platform or serialize their publication, and add a regression covering concurrent jobs. The published v0.1.6 asset list currently has no duplicates; this defect is in the changed CI logic.
+5
View File
@@ -0,0 +1,5 @@
FAIL
scripts/ci.sh:94 — Rerunning a partially uploaded macOS release can publish update manifests with incorrect hashes. The script deletes `dist` and rebuilds before this name-only skip. If the first run uploads the DMGs but fails before uploading `ely-doc.json`, the rerun retains the first build's DMGs and uploads manifests hashing the rebuilt, newly signed DMGs. A WSL probe using unchanged `ci.sh` and `packaging/macos/release.sh`, with local packaging-tool and curl stubs, reproduced an initial exit 22 followed by exit 0 and six mismatched manifest hashes (`.work/R7.7-r2/ci-resume-real-release.log`). Update downloads then fail hash verification, breaking PRD §4.2. Resume the original artifacts or generate missing manifests from the retained release artifacts, and add a regression for an interrupted upload followed by a rebuild with different bytes.
tests/scripts/ci-upload.sh:34 — The new comment “A clone whose packaging writes one package and the source pair.” contains eleven words, violating the explicit ten-word rule. Running `tests/scripts/comments.py` against this tree exits 1 and identifies this line (`.work/R7.7-r2/comments.log`). Shorten the comment to ten words or fewer.
+5
View File
@@ -0,0 +1,5 @@
FAIL
tests/scripts/ci-upload.sh:67 — The rerun test starts with every output already uploaded, so it does not protect the required all-or-nothing check for partially populated releases. In WSL, moving collision detection inside the upload loop still lets this test pass; with only `ElyTree-0.1.6-x86_64.dmg` already present, that variant uploads six earlier DMGs before exiting 1 (`.work/R7.7-r3/ci-resume-and-mutation.log`). Add a partial-release case with a conflicting filename after missing files in upload order, asserting exit 1, the conflicting names, and no new uploads.
scripts/ci.sh:95 — The new comment “A rebuild differs in bytes; never mix it with earlier uploads.” contains eleven words, violating the explicit ten-word rule. Running `tests/scripts/comments.py` reports this line (`.work/R7.7-r3/comments.log`), although the comment identified in round 2 is fixed. Shorten this comment to ten words or fewer.
+3
View File
@@ -0,0 +1,3 @@
FAIL
- .work/issues/r5.json:1(已发布的 [Gitea #5 回复 348](https://git.zacharyzhang.com/ZacharyZhang-NY/ElyOffice/issues/5#issuecomment-348),正文第 1 行):回复称“现在只有真读不出的内容才算损坏”,超出了 0.1.6 的实际修复。`agents.md:316` 与 `crates/ely-pdf-engine/shim/ely_mupdf.c:65` 明确只排除 `non-embedded font using identity encoding:` 及其重复计数,其余警告仍判为损坏。独立重建 worker 后,用未嵌入 SimSun 的单页 PDF,仅将字体描述的 `/Ascent 859` 改成 `/Ascent 20000`:文字提取结果和整页像素散列均与正常文件相同,却因 `bogus font ... ascent/descent values` 返回 `damaged=true`(`.work/R7.8-r1/pdf-reply-probe.log`)。用户更新后仍可能在内容完全可读时收到损坏提示。应将公开回复收窄为本次修正了未嵌入字体的特定提示误报,保留其他损坏检查;不要声称损坏判定已经只限于不可读内容。
+1
View File
@@ -0,0 +1 @@
PASS
+2 -1
View File
@@ -23,7 +23,8 @@ attempt() { # name, setup; sets status, writes the output
cp "$root/packaging/apps.tsv" "$clone/packaging/"
(cd "$clone" && eval "$2")
status=0
ELY_SHARE=$share ELY_RELEASE_TOKEN=unused "$clone/scripts/ci.sh" macos "v$version" >"$work/$1.out" 2>&1 ||
ELY_SHARE=$share ELY_RELEASE_TOKEN=unused ELY_SIGN_IDENTITY=unused ELY_NOTARY_PROFILE=unused \
"$clone/scripts/ci.sh" macos "v$version" >"$work/$1.out" 2>&1 ||
status=$?
}
# The target as stored plus a newline and x.
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env bash
# ci.sh uploads: Linux alone sends source; reruns refuse.
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
fail() {
echo "FAIL: $*" >&2
exit 1
}
command -v python3 >/dev/null || {
echo "SKIP: no python3"
exit 0
}
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
mkdir -p "$work/share/engines" "$work/share/reference" "$work/bin"
export STATE=$work/uploads
: >"$STATE"
# The release API: one release, its assets in $STATE.
cat >"$work/bin/curl" <<'EOF'
#!/usr/bin/env bash
url=${!#}
case $url in
*/releases/tags/*) echo '{"id": 1}' ;;
*/releases/1/assets) python3 -c 'import json, sys; print(json.dumps([{"name": l.split()[0]} for l in open(sys.argv[1]) if l.strip()]))' "$STATE" ;;
*/releases/1/assets\?name=*) echo "${url##*name=} $CI_OS" >>"$STATE" ;;
*) echo "curl stub: unexpected $url" >&2; exit 22 ;;
esac
EOF
chmod +x "$work/bin/curl"
# A clone writing one package and the source pair.
clone() { # os
local at=$work/$1 source='d=$1; touch "$d/ElyOffice-V-c0ffee-source.tar.gz" "$d/ElyOffice-V-c0ffee-upstream-source.tar.gz"'
mkdir -p "$at/scripts" "$at/packaging/macos" "$at/packaging/linux"
cp "$root/scripts/ci.sh" "$at/scripts/"
cp "$root/Cargo.toml" "$at/"
cp "$root/packaging/apps.tsv" "$at/packaging/"
write() { printf '#!/usr/bin/env bash\n%s\n' "$2" >"$at/$1" && chmod +x "$at/$1"; }
write packaging/source.sh "$source"
write packaging/macos/release.sh "mkdir -p dist; touch dist/App-$1.dmg; packaging/source.sh dist"
write packaging/linux/container.sh 'exec "$@"'
write packaging/linux/package.sh "mkdir -p dist; touch dist/\$1-$1.AppImage"
}
go() { # os
CI_OS=$1 PATH=$work/bin:$PATH ELY_SHARE=$work/share ELY_RELEASE_TOKEN=unused \
ELY_SIGN_IDENTITY=unused ELY_NOTARY_PROFILE=unused \
"$work/$1/scripts/ci.sh" "$1" "v$version" >"$work/$1.out" 2>&1
}
run() { # os
clone "$1"
go "$1" || fail "$1: $(cat "$work/$1.out")"
}
uploads() { # name pattern, os
awk -v n="$1" -v o="$2" '$1 ~ n && $2 == o' "$STATE" | wc -l
}
# macOS first: it builds the pair and uploads neither.
run macos
[ "$(uploads 'source' macos)" -eq 0 ] || fail "macOS uploaded source: $(cat "$STATE")"
[ "$(uploads 'App-macos.dmg' macos)" -eq 1 ] || fail "macOS skipped its dmg"
run linux
[ "$(uploads '-source.tar.gz' linux)" -eq 2 ] || fail "Linux did not upload the pair: $(cat "$STATE")"
# A rebuild over its own uploads sends nothing and fails.
before=$(cat "$STATE")
rm -rf "$work/linux"
clone linux
if go linux; then fail "the rerun passed: $(cat "$work/linux.out")"; fi
grep -q "already on v$version; delete them, then rerun" "$work/linux.out" || fail "rerun: $(cat "$work/linux.out")"
[ "$(cat "$STATE")" = "$before" ] || fail "the rerun uploaded: $(cat "$STATE")"
# Only the last upload left: the rerun still sends nothing.
last=$(awk '$2 == "linux" { n = $1 } END { print n }' "$STATE")
grep -v ' linux$' "$STATE" >"$work/kept" || true
echo "$last linux" >>"$work/kept"
cp "$work/kept" "$STATE"
before=$(cat "$STATE")
if go linux; then fail "the partial rerun passed: $(cat "$work/linux.out")"; fi
grep -q "delete them, then rerun: $last$" "$work/linux.out" || fail "partial: $(cat "$work/linux.out")"
[ "$(cat "$STATE")" = "$before" ] || fail "the partial rerun uploaded: $(cat "$STATE")"
echo "ci-upload: Linux alone uploads source; reruns refuse"
+16 -4
View File
@@ -28,7 +28,19 @@ for slug in $(cut -f1 "$types" | sort -u); do
mimes=$(cut -f3 <<<"$rows" | sort -u | wc -l | tr -d ' ')
[ "$utis" -eq "$mimes" ] || fail "$slug: macOS declares $utis types, the table $mimes"
done
# Never the default: macOS ranks Alternate; Windows only lists.
! grep -q 'Classes\\\.[a-z]*" ""' <(for s in $(cut -f1 "$types" | sort -u); do "$root/packaging/windows/types.sh" "$s"; done) ||
fail "Windows sets a default handler"
echo "ok: types ($count file types on three systems)"
# Never the default: Windows fills only a handlerless type.
for s in $(cut -f1 "$types" | sort -u); do
"$root/packaging/windows/types.sh" "$s" | awk -v slug="$s" '
/WriteRegStr HKCU "Software\\Classes\\\.[a-z]*" ""/ && (prev !~ /\$\{OrIf\} \$\{Errors\}$/ || prev2 !~ /\$\{If\} \$0 == ""$/) { print slug ": " $0; bad = 1 }
{ prev2 = prev; prev = $0 } END { exit bad }' || fail "Windows sets a default handler"
done
# Explorer's New makes docx, xlsx, pptx and md.
fresh=0
for ext in docx xlsx pptx md; do
slug=$(awk -F'\t' -v ext="$ext" '$2 == ext { print $1 }' "$types")
windows=$("$root/packaging/windows/types.sh" "$slug")
grep -qF "\\.$ext\\ShellNew\" \"FileName\" \"\$INSTDIR\\new.$ext\"" <<<"$windows" ||
fail "$slug: New misses .$ext"
fresh=$((fresh + 1))
done
echo "ok: types ($count file types on three systems, $fresh in New)"