mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-28 14:19:57 -08:00
The deb, rpm and tar.gz packages install share/thumbnailers/ai.storyteller.vectorcraft.thumbnailer for application/x-vectorcraft and application/x-vectorcraft-template. It runs the new `vectorcraft-cli thumbnail --size N IN OUT`, which opens the document as the app does and writes an 8-bit RGBA PNG of the first artboard, N pixels (1 to 1024, default 256) on its longer side. A file larger than 256 MiB, one that can't be opened, a document that shows nothing, or a run longer than 20 seconds writes no PNG and exits non-zero, so the file manager keeps the file's icon. The Nightly deb and rpm leave the entry out, as they leave out the MIME package. The render moves into vectorcraft_render::encode::first_artboard, which the embedded native preview also uses.
18 lines
680 B
Rust
18 lines
680 B
Rust
//! Integration tests: one test binary for the crate, one module per area.
|
||
// Unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||
|
||
mod cli;
|
||
mod fileio;
|
||
mod mcp_e2e;
|
||
mod script;
|
||
mod thumbnail;
|
||
|
||
/// Nextest relocates archived binaries; Cargo's compile-time path still names the build runner.
|
||
fn bin() -> std::path::PathBuf {
|
||
std::env::var_os("NEXTEST_BIN_EXE_vectorcraft_cli")
|
||
.or_else(|| std::env::var_os("CARGO_BIN_EXE_vectorcraft-cli"))
|
||
.map(std::path::PathBuf::from)
|
||
.unwrap_or_else(|| env!("CARGO_BIN_EXE_vectorcraft-cli").into())
|
||
}
|