LOK runs on Windows and Linux; packaging stages engines (W-01, K-01)

The kernel is the merged library on every platform; Windows and
Linux find it beside the app in libreoffice/program. All three run
unipoll: macOS through GCD, Linux by answering one request per poll,
Windows through a message-only window on the loop's thread (LOK's
own main thread had deadlocked Calc loads). Patch 0043 flushes
callbacks inline everywhere, so a request sees its result; 0042 stops
MSVC's Boost auto-link. Linux paints with cairo, BGRA; the start-up
check now paints red text and finds red in byte two on every
platform, since getTileMode does not see Skia.

ely-lok on Windows: 180 of 189 pass; on Linux 187. The rest are
listed after 0.1.3 (spelling, Calc dark tiles, show layers and
fields, a11y selection). Tests build file URLs portably and accept
CRLF where Windows writes it.

packaging/stage.sh lays out an app with its engines for Windows and
Linux; licenses.sh finds each licence on all three. ElyMark finds its
page beside the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-10 18:27:53 -04:00
1 parent dc4c1ed0fe
commit c96d39a342
34 files changed
+658 -214

No files matched your search

+6 -11
View File
@@ -3,12 +3,10 @@
use std::{io, path::Path};
use crate::client::{BUILD_ID, Worker};
#[cfg(target_os = "macos")]
use crate::ipc::{self, Pack, Unpack, tag};
/// A tiny flat-XML document for the tile self-check.
#[cfg(target_os = "macos")]
const VERIFY_DOC: &str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><office:document xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" office:version=\"1.3\" office:mimetype=\"application/vnd.oasis.opendocument.text\"><office:body><office:text><text:p>verify</text:p></office:text></office:body></office:document>";
/// Red text: a BGRA tile shows red in byte two.
const VERIFY_DOC: &str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><office:document xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" office:version=\"1.3\" office:mimetype=\"application/vnd.oasis.opendocument.text\"><office:automatic-styles><style:style style:name=\"T1\" style:family=\"text\"><style:text-properties fo:color=\"#ff0000\" fo:font-size=\"28pt\" fo:font-weight=\"bold\"/></style:style></office:automatic-styles><office:body><office:text><text:p><text:span text:style-name=\"T1\">verify</text:span></text:p></office:text></office:body></office:document>";
impl Worker {
/// Rejects builds that are not the pinned one (LOK-01).
@@ -16,13 +14,11 @@ impl Worker {
if !build.contains(BUILD_ID) {
return self.reject(format!("not the pinned build {BUILD_ID}: {build}"));
}
#[cfg(target_os = "macos")]
if !self.tile_self_check(profile_dir)? {
return self.reject(format!(
"the pinned build {BUILD_ID} does not paint tiles (unpatched)"
"the pinned build {BUILD_ID} paints no BGRA red (unpatched, or another order)"
));
}
let _ = profile_dir;
Ok(())
}
@@ -53,15 +49,14 @@ impl Worker {
Ok(build)
}
/// Paints one tile; the bytes it gained.
#[cfg(target_os = "macos")]
/// Paints the red text; whether BGRA red came out.
pub(crate) fn tile_self_check(&mut self, profile_dir: &Path) -> io::Result<bool> {
let doc = profile_dir.join("lok-verify.fodt");
std::fs::write(&doc, VERIFY_DOC)?;
let url = ipc::file_url_of(&doc.canonicalize()?);
let payload = self.request(tag::VERIFY, &Pack::new().str(&url).bytes())?;
let gained = Unpack::new(&payload).u64()?;
Ok(gained > 0)
let red = Unpack::new(&payload).u64()?;
Ok(red > 0)
}
}