fix: TOC navigation and pagination improvements
- Fix recalculate_pages missing heading_top_spacing in page height calculation - Improve build_toc path matching: extract filename first, fall back to substring - Filter out EPUB3 nav.xhtml from content sections - Skip Windows resource compilation when windres is not available - Add unit tests for TOC filename matching and nav filtering
This commit is contained in:
12
build.rs
12
build.rs
@@ -1,6 +1,16 @@
|
||||
#[cfg(target_os = "windows")]
|
||||
fn main() {
|
||||
embed_resource::compile("read.rc", embed_resource::NONE);
|
||||
let windres_available = std::process::Command::new("where")
|
||||
.arg("windres")
|
||||
.output()
|
||||
.map(|o| o.status.success())
|
||||
.unwrap_or(false);
|
||||
|
||||
if windres_available {
|
||||
embed_resource::compile("read.rc", embed_resource::NONE);
|
||||
} else {
|
||||
println!("cargo:warning=windres not found, skipping Windows resource (icon) compilation");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
|
||||
Reference in New Issue
Block a user